From 63712cbb1c3ec6c80dee9588dacee2717d8fff14 Mon Sep 17 00:00:00 2001 From: Wlodzimierz Borkowski Date: Tue, 5 Apr 2016 13:03:31 +0200 Subject: [PATCH 001/339] invalid arg during applying SELinux label Tested with ubuntu 16.04 with selinux support. Actually after chcon with long label got: Invalid argument from cmd --- hack/local-up-cluster.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 71735181e8..ca5bd9022d 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -305,7 +305,7 @@ function start_kubelet { which chcon > /dev/null ; then if [[ ! $(ls -Zd /var/lib/kubelet) =~ system_u:object_r:svirt_sandbox_file_t:s0 ]] ; then echo "Applying SELinux label to /var/lib/kubelet directory." - if ! chcon -R system_u:object_r:svirt_sandbox_file_t:s0 /var/lib/kubelet; then + if ! sudo chcon -Rt svirt_sandbox_file_t /var/lib/kubelet; then echo "Failed to apply selinux label to /var/lib/kubelet." fi fi From 1491e6c6623a2b7ba7e465533110a334538034bd Mon Sep 17 00:00:00 2001 From: Christian Stewart Date: Thu, 28 Apr 2016 00:05:37 -0400 Subject: [PATCH 002/339] cluster/aws: Add option for kubeconfig context Added KUBE_CONFIG_CONTEXT environment variable to customize the kubeconfig context created at the end of the aws kube-up script. Signed-off-by: Christian Stewart --- cluster/aws/config-default.sh | 1 + cluster/aws/config-test.sh | 1 + cluster/aws/util.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cluster/aws/config-default.sh b/cluster/aws/config-default.sh index 4ff07ad782..a032400703 100644 --- a/cluster/aws/config-default.sh +++ b/cluster/aws/config-default.sh @@ -66,6 +66,7 @@ EXTRA_DOCKER_OPTS="${EXTRA_DOCKER_OPTS:-}" INSTANCE_PREFIX="${KUBE_AWS_INSTANCE_PREFIX:-kubernetes}" CLUSTER_ID=${INSTANCE_PREFIX} AWS_SSH_KEY=${AWS_SSH_KEY:-$HOME/.ssh/kube_aws_rsa} +CONFIG_CONTEXT="${KUBE_CONFIG_CONTEXT:-aws_${INSTANCE_PREFIX}}" IAM_PROFILE_MASTER="kubernetes-master" IAM_PROFILE_NODE="kubernetes-minion" diff --git a/cluster/aws/config-test.sh b/cluster/aws/config-test.sh index 3c1b1dfb05..422c2d3380 100755 --- a/cluster/aws/config-test.sh +++ b/cluster/aws/config-test.sh @@ -52,6 +52,7 @@ DOCKER_STORAGE=${DOCKER_STORAGE:-aufs} EXTRA_DOCKER_OPTS="${EXTRA_DOCKER_OPTS:-}" INSTANCE_PREFIX="${KUBE_AWS_INSTANCE_PREFIX:-e2e-test-${USER}}" +CONFIG_CONTEXT="${KUBE_CONFIG_CONTEXT:-aws_${INSTANCE_PREFIX}}" CLUSTER_ID=${INSTANCE_PREFIX} AWS_SSH_KEY=${AWS_SSH_KEY:-$HOME/.ssh/kube_aws_rsa} IAM_PROFILE_MASTER="kubernetes-master" diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index 874088271b..c9d3c53234 100755 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -1292,7 +1292,7 @@ function build-config() { export KUBE_CERT="${CERT_DIR}/pki/issued/kubecfg.crt" export KUBE_KEY="${CERT_DIR}/pki/private/kubecfg.key" export CA_CERT="${CERT_DIR}/pki/ca.crt" - export CONTEXT="aws_${INSTANCE_PREFIX}" + export CONTEXT="${CONFIG_CONTEXT}" ( umask 077 create-kubeconfig From 0c5713084b43d22527b72646fefefe3369a32551 Mon Sep 17 00:00:00 2001 From: amehdy Date: Sat, 14 May 2016 02:04:35 -0700 Subject: [PATCH 003/339] Fixed misleading error message when a resource with no selector or name is provided to kubectl delete or label command --- pkg/kubectl/cmd/delete_test.go | 52 +++++++++++++++++++++++++++++++++ pkg/kubectl/cmd/label_test.go | 12 ++++++++ pkg/kubectl/resource/builder.go | 3 ++ 3 files changed, 67 insertions(+) diff --git a/pkg/kubectl/cmd/delete_test.go b/pkg/kubectl/cmd/delete_test.go index 1f2122ab01..ab297f9ee9 100644 --- a/pkg/kubectl/cmd/delete_test.go +++ b/pkg/kubectl/cmd/delete_test.go @@ -26,6 +26,7 @@ import ( "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/client/unversioned/fake" ) @@ -447,3 +448,54 @@ func TestDeleteMultipleSelector(t *testing.T) { t.Errorf("unexpected output: %s", buf.String()) } } + +func TestResourceErrors(t *testing.T) { + testCases := map[string]struct { + args []string + flags map[string]string + errFn func(error) bool + }{ + "no args": { + args: []string{}, + errFn: func(err error) bool { return strings.Contains(err.Error(), "you must provide one or more resources") }, + }, + "resources but no selectors": { + args: []string{"pods"}, + errFn: func(err error) bool { + return strings.Contains(err.Error(), "resource(s) were provided, but no name, label selector, or --all flag specified") + }, + }, + "multiple resources but no selectors": { + args: []string{"pods,deployments"}, + errFn: func(err error) bool { + return strings.Contains(err.Error(), "resource(s) were provided, but no name, label selector, or --all flag specified") + }, + }, + } + + for k, testCase := range testCases { + f, tf, _ := NewAPIFactory() + tf.Printer = &testPrinter{} + tf.Namespace = "test" + tf.ClientConfig = &restclient.Config{ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}} + + buf := bytes.NewBuffer([]byte{}) + cmd := NewCmdDelete(f, buf) + cmd.SetOutput(buf) + + for k, v := range testCase.flags { + cmd.Flags().Set(k, v) + } + err := RunDelete(f, buf, cmd, testCase.args, &DeleteOptions{}) + if !testCase.errFn(err) { + t.Errorf("%s: unexpected error: %v", k, err) + continue + } + if tf.Printer.(*testPrinter).Objects != nil { + t.Errorf("unexpected print to default printer") + } + if buf.Len() > 0 { + t.Errorf("buffer should be empty: %s", string(buf.Bytes())) + } + } +} diff --git a/pkg/kubectl/cmd/label_test.go b/pkg/kubectl/cmd/label_test.go index 24c2cff20e..dbfdf9a868 100644 --- a/pkg/kubectl/cmd/label_test.go +++ b/pkg/kubectl/cmd/label_test.go @@ -295,6 +295,18 @@ func TestLabelErrors(t *testing.T) { args: []string{"pods=bar"}, errFn: func(err error) bool { return strings.Contains(err.Error(), "one or more resources must be specified") }, }, + "resources but no selectors": { + args: []string{"pods", "app=bar"}, + errFn: func(err error) bool { + return strings.Contains(err.Error(), "resource(s) were provided, but no name, label selector, or --all flag specified") + }, + }, + "multiple resources but no selectors": { + args: []string{"pods,deployments", "app=bar"}, + errFn: func(err error) bool { + return strings.Contains(err.Error(), "resource(s) were provided, but no name, label selector, or --all flag specified") + }, + }, } for k, testCase := range testCases { diff --git a/pkg/kubectl/resource/builder.go b/pkg/kubectl/resource/builder.go index 0a40e7b21b..d984b5bb85 100644 --- a/pkg/kubectl/resource/builder.go +++ b/pkg/kubectl/resource/builder.go @@ -675,6 +675,9 @@ func (b *Builder) visitorResult() *Result { return &Result{singular: singular, visitor: visitors, sources: b.paths} } + if len(b.resources) != 0 { + return &Result{err: fmt.Errorf("resource(s) were provided, but no name, label selector, or --all flag specified")} + } return &Result{err: fmt.Errorf("you must provide one or more resources by argument or filename (%s)", strings.Join(InputExtensions, "|"))} } From cee09e17a441b143004a86e42bcbca3efe0a57d1 Mon Sep 17 00:00:00 2001 From: zhouhaibing089 Date: Fri, 1 Apr 2016 23:34:16 +0800 Subject: [PATCH 004/339] mount instanceid file from config drive when using openstack cloud provider --- cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest | 5 +++++ .../kube-controller-manager/kube-controller-manager.manifest | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest b/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest index 81e31b291e..59a5f83fdc 100644 --- a/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest +++ b/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest @@ -27,6 +27,11 @@ {% set cloud_config_mount = "{\"name\": \"cloudconfigmount\",\"mountPath\": \"" + grains.cloud_config + "\", \"readOnly\": true}," -%} {% set cloud_config_volume = "{\"name\": \"cloudconfigmount\",\"hostPath\": {\"path\": \"" + grains.cloud_config + "\"}}," -%} {% endif -%} + + {% if grains.cloud in ['openstack'] -%} + {% set cloud_config_mount = "{\"name\": \"instanceid\",\"mountPath\": \"/var/lib/cloud/data/instance-id\",\"readOnly\": true}," -%} + {% set cloud_config_volume = "{\"name\": \"instanceid\",\"hostPath\": {\"path\": \"/var/lib/cloud/data/instance-id\"}}," -%} + {% endif -%} {% endif -%} {% set advertise_address = "" -%} diff --git a/cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest b/cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest index e13048abea..3e2813446b 100644 --- a/cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest +++ b/cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest @@ -46,6 +46,11 @@ {% set cloud_config_mount = "{\"name\": \"cloudconfigmount\",\"mountPath\": \"" + grains.cloud_config + "\", \"readOnly\": true}," -%} {% set cloud_config_volume = "{\"name\": \"cloudconfigmount\",\"hostPath\": {\"path\": \"" + grains.cloud_config + "\"}}," -%} {% endif -%} + + {% if grains.cloud in ['openstack'] -%} + {% set cloud_config_mount = "{\"name\": \"instanceid\",\"mountPath\": \"/var/lib/cloud/data/instance-id\",\"readOnly\": true}," -%} + {% set cloud_config_volume = "{\"name\": \"instanceid\",\"hostPath\": {\"path\": \"/var/lib/cloud/data/instance-id\"}}," -%} + {% endif -%} {% endif -%} {% set root_ca_file = "" -%} From 74901ae150f509d85fcdaa6939aada2cbb27502f Mon Sep 17 00:00:00 2001 From: root Date: Tue, 17 May 2016 10:01:37 -0400 Subject: [PATCH 005/339] No need to log empty string --- plugin/pkg/scheduler/algorithm/predicates/predicates.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates.go b/plugin/pkg/scheduler/algorithm/predicates/predicates.go index 4b1c8c9b5d..612125032a 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates.go @@ -151,7 +151,7 @@ func (c *MaxPDVolumeCountChecker) filterVolumes(volumes []api.Volume, namespace } else if vol.PersistentVolumeClaim != nil { pvcName := vol.PersistentVolumeClaim.ClaimName if pvcName == "" { - return fmt.Errorf("PersistentVolumeClaim had no name: %q", pvcName) + return fmt.Errorf("PersistentVolumeClaim had no name") } pvc, err := c.pvcInfo.GetPersistentVolumeClaimInfo(namespace, pvcName) if err != nil { @@ -304,7 +304,7 @@ func (c *VolumeZoneChecker) predicate(pod *api.Pod, nodeInfo *schedulercache.Nod if volume.PersistentVolumeClaim != nil { pvcName := volume.PersistentVolumeClaim.ClaimName if pvcName == "" { - return false, fmt.Errorf("PersistentVolumeClaim had no name: %q", pvcName) + return false, fmt.Errorf("PersistentVolumeClaim had no name") } pvc, err := c.pvcInfo.GetPersistentVolumeClaimInfo(namespace, pvcName) if err != nil { From b97367034469693c2e64018de945f2002badaabf Mon Sep 17 00:00:00 2001 From: PingWang Date: Fri, 20 May 2016 08:49:53 +0800 Subject: [PATCH 006/339] Add the length detection of the "predicateFuncs" in generic_scheduler.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PR add the length detection of the "predicateFuncs" for "findNodesThatFit" function of generic_scheduler.go. In “findNodesThatFit” function, if the length of the "predicateFuncs" parameter is 0, it can set filtered equals nodes.Items, and needn't to traverse the nodes.Items. --- plugin/pkg/scheduler/generic_scheduler.go | 42 +++++++++++++---------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/plugin/pkg/scheduler/generic_scheduler.go b/plugin/pkg/scheduler/generic_scheduler.go index 8020b9eaa2..fdd7589844 100644 --- a/plugin/pkg/scheduler/generic_scheduler.go +++ b/plugin/pkg/scheduler/generic_scheduler.go @@ -137,31 +137,35 @@ func (g *genericScheduler) selectHost(priorityList schedulerapi.HostPriorityList // Filters the nodes to find the ones that fit based on the given predicate functions // Each node is passed through the predicate functions to determine if it is a fit func findNodesThatFit(pod *api.Pod, nodeNameToInfo map[string]*schedulercache.NodeInfo, predicateFuncs map[string]algorithm.FitPredicate, nodes api.NodeList, extenders []algorithm.SchedulerExtender) (api.NodeList, FailedPredicateMap, error) { - predicateResultLock := sync.Mutex{} filtered := []api.Node{} failedPredicateMap := FailedPredicateMap{} - errs := []error{} - checkNode := func(i int) { - nodeName := nodes.Items[i].Name - fits, failedPredicate, err := podFitsOnNode(pod, nodeNameToInfo[nodeName], predicateFuncs) - - predicateResultLock.Lock() - defer predicateResultLock.Unlock() - if err != nil { - errs = append(errs, err) - return + if len(predicateFuncs) == 0 { + filtered = nodes.Items + } else { + predicateResultLock := sync.Mutex{} + errs := []error{} + checkNode := func(i int) { + nodeName := nodes.Items[i].Name + fits, failedPredicate, err := podFitsOnNode(pod, nodeNameToInfo[nodeName], predicateFuncs) + + predicateResultLock.Lock() + defer predicateResultLock.Unlock() + if err != nil { + errs = append(errs, err) + return + } + if fits { + filtered = append(filtered, nodes.Items[i]) + } else { + failedPredicateMap[nodeName] = failedPredicate + } } - if fits { - filtered = append(filtered, nodes.Items[i]) - } else { - failedPredicateMap[nodeName] = failedPredicate + workqueue.Parallelize(16, len(nodes.Items), checkNode) + if len(errs) > 0 { + return api.NodeList{}, FailedPredicateMap{}, errors.NewAggregate(errs) } } - workqueue.Parallelize(16, len(nodes.Items), checkNode) - if len(errs) > 0 { - return api.NodeList{}, FailedPredicateMap{}, errors.NewAggregate(errs) - } if len(filtered) > 0 && len(extenders) != 0 { for _, extender := range extenders { From 4913481b0503637c5c3faae2e9099836a7500dc6 Mon Sep 17 00:00:00 2001 From: Mike Metral Date: Wed, 18 May 2016 00:29:55 -0700 Subject: [PATCH 007/339] enable recursive processing in kubectl edit --- hack/test-cmd.sh | 13 ++ pkg/kubectl/cmd/edit.go | 435 ++++++++++++++++++++-------------------- 2 files changed, 230 insertions(+), 218 deletions(-) diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 8178819119..51b75edc35 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -930,6 +930,19 @@ __EOF__ kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" 'busybox0:busybox1:' kube::test::if_has_string "${output_message}" 'error validating data: kind not set' + ## Edit multiple busybox PODs by updating the image field of multiple PODs recursively from a directory. tmp-editor.sh is a fake editor + # Pre-condition: busybox0 & busybox1 PODs exist + kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" 'busybox0:busybox1:' + # Command + echo -e '#!/bin/bash\nsed -i "s/image: busybox/image: prom\/busybox/g" $1' > /tmp/tmp-editor.sh + chmod +x /tmp/tmp-editor.sh + output_message=$(! EDITOR=/tmp/tmp-editor.sh kubectl edit -f hack/testdata/recursive/pod --recursive 2>&1 "${kube_flags[@]}") + # Post-condition: busybox0 & busybox1 PODs are edited, and since busybox2 is malformed, it should error + kube::test::get_object_assert pods "{{range.items}}{{$image_field}}:{{end}}" 'prom/busybox:prom/busybox:' + kube::test::if_has_string "${output_message}" "Object 'Kind' is missing" + # cleaning + rm /tmp/tmp-editor.sh + ## Replace multiple busybox PODs recursively from directory of YAML files # Pre-condition: busybox0 & busybox1 PODs exist kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" 'busybox0:busybox1:' diff --git a/pkg/kubectl/cmd/edit.go b/pkg/kubectl/cmd/edit.go index bd5098b874..ed77f7747a 100644 --- a/pkg/kubectl/cmd/edit.go +++ b/pkg/kubectl/cmd/edit.go @@ -161,6 +161,7 @@ func RunEdit(f *cmdutil.Factory, out, errOut io.Writer, cmd *cobra.Command, args NamespaceParam(cmdNamespace).DefaultNamespace(). FilenameParam(enforceNamespace, options.Recursive, options.Filenames...). ResourceTypeOrNameArgs(true, args...). + ContinueOnError(). Flatten(). Latest(). Do() @@ -169,11 +170,6 @@ func RunEdit(f *cmdutil.Factory, out, errOut io.Writer, cmd *cobra.Command, args return err } - infos, err := r.Infos() - if err != nil { - return err - } - clientConfig, err := f.ClientConfig() if err != nil { return err @@ -184,254 +180,257 @@ func RunEdit(f *cmdutil.Factory, out, errOut io.Writer, cmd *cobra.Command, args if err != nil { return err } - originalObj, err := resource.AsVersionedObject(infos, false, defaultVersion, encoder) - if err != nil { - return err - } var ( windowsLineEndings = cmdutil.GetFlagBool(cmd, "windows-line-endings") edit = editor.NewDefaultEditor(f.EditorEnvs()) - results = editResults{} - original = []byte{} - edited = []byte{} - file string ) - containsError := false + err = r.Visit(func(info *resource.Info, err error) error { + var ( + results = editResults{} + original = []byte{} + edited = []byte{} + file string + ) - for { - // infos mutates over time to be the list of things we've tried and failed to edit - // this means that our overall list changes over time. - objToEdit, err := resource.AsVersionedObject(infos, false, defaultVersion, encoder) - if err != nil { - return err - } + containsError := false - // generate the file to edit - buf := &bytes.Buffer{} - var w io.Writer = buf - if windowsLineEndings { - w = crlf.NewCRLFWriter(w) - } - if err := results.header.writeTo(w); err != nil { - return preservedFile(err, results.file, errOut) - } - if !containsError { - if err := printer.PrintObj(objToEdit, w); err != nil { - return preservedFile(err, results.file, errOut) - } - original = buf.Bytes() - } else { - // In case of an error, preserve the edited file. - // Remove the comments (header) from it since we already - // have included the latest header in the buffer above. - buf.Write(manualStrip(edited)) - } - - // launch the editor - editedDiff := edited - edited, file, err = edit.LaunchTempFile(fmt.Sprintf("%s-edit-", filepath.Base(os.Args[0])), ext, buf) - if err != nil { - return preservedFile(err, results.file, errOut) - } - if bytes.Equal(stripComments(editedDiff), stripComments(edited)) { - // Ugly hack right here. We will hit this either (1) when we try to - // save the same changes we tried to save in the previous iteration - // which means our changes are invalid or (2) when we exit the second - // time. The second case is more usual so we can probably live with it. - // TODO: A less hacky fix would be welcome :) - fmt.Fprintln(errOut, "Edit cancelled, no valid changes were saved.") - return nil - } - - // cleanup any file from the previous pass - if len(results.file) > 0 { - os.Remove(results.file) - } - glog.V(4).Infof("User edited:\n%s", string(edited)) - - // Compare content without comments - if bytes.Equal(stripComments(original), stripComments(edited)) { - os.Remove(file) - fmt.Fprintln(errOut, "Edit cancelled, no changes made.") - return nil - } - lines, err := hasLines(bytes.NewBuffer(edited)) - if err != nil { - return preservedFile(err, file, errOut) - } - if !lines { - os.Remove(file) - fmt.Fprintln(errOut, "Edit cancelled, saved file was empty.") - return nil - } - - results = editResults{ - file: file, - } - - // parse the edited file - updates, err := resourceMapper.InfoForData(edited, "edited-file") - if err != nil { - // syntax error - containsError = true - results.header.reasons = append(results.header.reasons, editReason{head: fmt.Sprintf("The edited file had a syntax error: %v", err)}) - continue - } - // not a syntax error as it turns out... - containsError = false - - namespaceVisitor := resource.NewFlattenListVisitor(updates, resourceMapper) - // need to make sure the original namespace wasn't changed while editing - if err = namespaceVisitor.Visit(resource.RequireNamespace(cmdNamespace)); err != nil { - return preservedFile(err, file, errOut) - } - - mutatedObjects := []runtime.Object{} - annotationVisitor := resource.NewFlattenListVisitor(updates, resourceMapper) - // iterate through all items to apply annotations - if err = annotationVisitor.Visit(func(info *resource.Info, incomingErr error) error { - // put configuration annotation in "updates" - if err := kubectl.CreateOrUpdateAnnotation(cmdutil.GetFlagBool(cmd, cmdutil.ApplyAnnotationsFlag), info, encoder); err != nil { + for { + infos := []*resource.Info{info} + originalObj, err := resource.AsVersionedObject(infos, false, defaultVersion, encoder) + if err != nil { return err } - if cmdutil.ShouldRecord(cmd, info) { - if err := cmdutil.RecordChangeCause(info.Object, f.Command()); err != nil { - return err - } + + objToEdit := originalObj + + // generate the file to edit + buf := &bytes.Buffer{} + var w io.Writer = buf + if windowsLineEndings { + w = crlf.NewCRLFWriter(w) } - mutatedObjects = append(mutatedObjects, info.Object) - return nil + results.header.writeTo(w) - }); err != nil { - return preservedFile(err, file, errOut) - } + if !containsError { + if err := printer.PrintObj(objToEdit, w); err != nil { + return preservedFile(err, results.file, errOut) + } + original = buf.Bytes() + } else { + // In case of an error, preserve the edited file. + // Remove the comments (header) from it since we already + // have included the latest header in the buffer above. + buf.Write(manualStrip(edited)) + } - // if we mutated a list in the visitor, persist the changes on the overall object - if meta.IsListType(updates.Object) { - meta.SetList(updates.Object, mutatedObjects) - } + // launch the editor + editedDiff := edited + edited, file, err = edit.LaunchTempFile(fmt.Sprintf("%s-edit-", filepath.Base(os.Args[0])), ext, buf) + if err != nil { + return preservedFile(err, results.file, errOut) + } + if bytes.Equal(stripComments(editedDiff), stripComments(edited)) { + // Ugly hack right here. We will hit this either (1) when we try to + // save the same changes we tried to save in the previous iteration + // which means our changes are invalid or (2) when we exit the second + // time. The second case is more usual so we can probably live with it. + // TODO: A less hacky fix would be welcome :) + fmt.Fprintln(errOut, "Edit cancelled, no valid changes were saved.") + return nil + } - patchVisitor := resource.NewFlattenListVisitor(updates, resourceMapper) - err = patchVisitor.Visit(func(info *resource.Info, incomingErr error) error { - currOriginalObj := originalObj + // cleanup any file from the previous pass + if len(results.file) > 0 { + os.Remove(results.file) + } + glog.V(4).Infof("User edited:\n%s", string(edited)) - // if we're editing a list, then navigate the list to find the item that we're currently trying to edit - if meta.IsListType(originalObj) { - currOriginalObj = nil - editObjUID, err := meta.NewAccessor().UID(info.Object) - if err != nil { + // Compare content without comments + if bytes.Equal(stripComments(original), stripComments(edited)) { + os.Remove(file) + fmt.Fprintln(errOut, "Edit cancelled, no changes made.") + return nil + } + lines, err := hasLines(bytes.NewBuffer(edited)) + if err != nil { + return preservedFile(err, file, errOut) + } + if !lines { + os.Remove(file) + fmt.Fprintln(errOut, "Edit cancelled, saved file was empty.") + return nil + } + + results = editResults{ + file: file, + } + + // parse the edited file + updates, err := resourceMapper.InfoForData(edited, "edited-file") + if err != nil { + // syntax error + containsError = true + results.header.reasons = append(results.header.reasons, editReason{head: fmt.Sprintf("The edited file had a syntax error: %v", err)}) + continue + } + // not a syntax error as it turns out... + containsError = false + + namespaceVisitor := resource.NewFlattenListVisitor(updates, resourceMapper) + // need to make sure the original namespace wasn't changed while editing + if err = namespaceVisitor.Visit(resource.RequireNamespace(cmdNamespace)); err != nil { + return preservedFile(err, file, errOut) + } + + mutatedObjects := []runtime.Object{} + annotationVisitor := resource.NewFlattenListVisitor(updates, resourceMapper) + // iterate through all items to apply annotations + if err = annotationVisitor.Visit(func(info *resource.Info, incomingErr error) error { + // put configuration annotation in "updates" + if err := kubectl.CreateOrUpdateAnnotation(cmdutil.GetFlagBool(cmd, cmdutil.ApplyAnnotationsFlag), info, encoder); err != nil { return err } - - listItems, err := meta.ExtractList(originalObj) - if err != nil { - return err + if cmdutil.ShouldRecord(cmd, info) { + if err := cmdutil.RecordChangeCause(info.Object, f.Command()); err != nil { + return err + } } + mutatedObjects = append(mutatedObjects, info.Object) - // iterate through the list to find the item with the matching UID - for i := range listItems { - originalObjUID, err := meta.NewAccessor().UID(listItems[i]) + return nil + + }); err != nil { + return preservedFile(err, file, errOut) + } + + // if we mutated a list in the visitor, persist the changes on the overall object + if meta.IsListType(updates.Object) { + meta.SetList(updates.Object, mutatedObjects) + } + + patchVisitor := resource.NewFlattenListVisitor(updates, resourceMapper) + err = patchVisitor.Visit(func(info *resource.Info, incomingErr error) error { + currOriginalObj := originalObj + + // if we're editing a list, then navigate the list to find the item that we're currently trying to edit + if meta.IsListType(originalObj) { + currOriginalObj = nil + editObjUID, err := meta.NewAccessor().UID(info.Object) if err != nil { return err } - if editObjUID == originalObjUID { - currOriginalObj = listItems[i] - break + + listItems, err := meta.ExtractList(originalObj) + if err != nil { + return err } - } - if currOriginalObj == nil { - return fmt.Errorf("no original object found for %#v", info.Object) + + // iterate through the list to find the item with the matching UID + for i := range listItems { + originalObjUID, err := meta.NewAccessor().UID(listItems[i]) + if err != nil { + return err + } + if editObjUID == originalObjUID { + currOriginalObj = listItems[i] + break + } + } + if currOriginalObj == nil { + return fmt.Errorf("no original object found for %#v", info.Object) + } + } + originalSerialization, err := runtime.Encode(encoder, currOriginalObj) + if err != nil { + return err + } + editedSerialization, err := runtime.Encode(encoder, info.Object) + if err != nil { + return err + } + + // compute the patch on a per-item basis + // use strategic merge to create a patch + originalJS, err := yaml.ToJSON(originalSerialization) + if err != nil { + return err + } + editedJS, err := yaml.ToJSON(editedSerialization) + if err != nil { + return err + } + + if reflect.DeepEqual(originalJS, editedJS) { + // no edit, so just skip it. + cmdutil.PrintSuccess(mapper, false, out, info.Mapping.Resource, info.Name, "skipped") + return nil + } + + patch, err := strategicpatch.CreateStrategicMergePatch(originalJS, editedJS, currOriginalObj) + // TODO: change all jsonmerge to strategicpatch + // for checking preconditions + preconditions := []jsonmerge.PreconditionFunc{} + if err != nil { + glog.V(4).Infof("Unable to calculate diff, no merge is possible: %v", err) + return err + } else { + preconditions = append(preconditions, jsonmerge.RequireKeyUnchanged("apiVersion")) + preconditions = append(preconditions, jsonmerge.RequireKeyUnchanged("kind")) + preconditions = append(preconditions, jsonmerge.RequireMetadataKeyUnchanged("name")) + results.version = defaultVersion + } + + if hold, msg := jsonmerge.TestPreconditionsHold(patch, preconditions); !hold { + fmt.Fprintf(errOut, "error: %s", msg) + return preservedFile(nil, file, errOut) + } + + patched, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch) + if err != nil { + fmt.Fprintln(out, results.addError(err, info)) + return nil + } + info.Refresh(patched, true) + cmdutil.PrintSuccess(mapper, false, out, info.Mapping.Resource, info.Name, "edited") + return nil + }) + if err != nil { + return preservedFile(err, results.file, errOut) } - originalSerialization, err := runtime.Encode(encoder, currOriginalObj) - if err != nil { - return err + // Handle all possible errors + // + // 1. retryable: propose kubectl replace -f + // 2. notfound: indicate the location of the saved configuration of the deleted resource + // 3. invalid: retry those on the spot by looping ie. reloading the editor + if results.retryable > 0 { + fmt.Fprintf(errOut, "You can run `%s replace -f %s` to try this update again.\n", filepath.Base(os.Args[0]), file) + return errExit } - editedSerialization, err := runtime.Encode(encoder, info.Object) - if err != nil { - return err + if results.notfound > 0 { + fmt.Fprintf(errOut, "The edits you made on deleted resources have been saved to %q\n", file) + return errExit } - // compute the patch on a per-item basis - // use strategic merge to create a patch - originalJS, err := yaml.ToJSON(originalSerialization) - if err != nil { - return err - } - editedJS, err := yaml.ToJSON(editedSerialization) - if err != nil { - return err - } - - if reflect.DeepEqual(originalJS, editedJS) { - // no edit, so just skip it. - cmdutil.PrintSuccess(mapper, false, out, info.Mapping.Resource, info.Name, "skipped") + if len(results.edit) == 0 { + if results.notfound == 0 { + os.Remove(file) + } else { + fmt.Fprintf(out, "The edits you made on deleted resources have been saved to %q\n", file) + } return nil } - patch, err := strategicpatch.CreateStrategicMergePatch(originalJS, editedJS, currOriginalObj) - // TODO: change all jsonmerge to strategicpatch - // for checking preconditions - preconditions := []jsonmerge.PreconditionFunc{} - if err != nil { - glog.V(4).Infof("Unable to calculate diff, no merge is possible: %v", err) - return err - } else { - preconditions = append(preconditions, jsonmerge.RequireKeyUnchanged("apiVersion")) - preconditions = append(preconditions, jsonmerge.RequireKeyUnchanged("kind")) - preconditions = append(preconditions, jsonmerge.RequireMetadataKeyUnchanged("name")) - results.version = defaultVersion - } - - if hold, msg := jsonmerge.TestPreconditionsHold(patch, preconditions); !hold { - fmt.Fprintf(errOut, "error: %s", msg) - return preservedFile(nil, file, errOut) - } - - patched, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch) - if err != nil { - fmt.Fprintln(out, results.addError(err, info)) - return nil - } - info.Refresh(patched, true) - cmdutil.PrintSuccess(mapper, false, out, info.Mapping.Resource, info.Name, "edited") - return nil - }) - if err != nil { - return preservedFile(err, results.file, errOut) + // loop again and edit the remaining items + infos = results.edit } - - // Handle all possible errors - // - // 1. retryable: propose kubectl replace -f - // 2. notfound: indicate the location of the saved configuration of the deleted resource - // 3. invalid: retry those on the spot by looping ie. reloading the editor - if results.retryable > 0 { - fmt.Fprintf(errOut, "You can run `%s replace -f %s` to try this update again.\n", filepath.Base(os.Args[0]), file) - return errExit - } - if results.notfound > 0 { - fmt.Fprintf(errOut, "The edits you made on deleted resources have been saved to %q\n", file) - return errExit - } - - if len(results.edit) == 0 { - if results.notfound == 0 { - os.Remove(file) - } else { - fmt.Fprintf(out, "The edits you made on deleted resources have been saved to %q\n", file) - } - return nil - } - - // loop again and edit the remaining items - infos = results.edit - } + }) + return err } // editReason preserves a message about the reason this file must be edited again From 36740719d9544d9adb2e4df3b8e24c41a3d6767e Mon Sep 17 00:00:00 2001 From: PingWang Date: Mon, 23 May 2016 09:17:17 +0800 Subject: [PATCH 008/339] exec gofmt -s --- plugin/pkg/scheduler/generic_scheduler.go | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/plugin/pkg/scheduler/generic_scheduler.go b/plugin/pkg/scheduler/generic_scheduler.go index fdd7589844..fecb6fbf92 100644 --- a/plugin/pkg/scheduler/generic_scheduler.go +++ b/plugin/pkg/scheduler/generic_scheduler.go @@ -140,6 +140,7 @@ func findNodesThatFit(pod *api.Pod, nodeNameToInfo map[string]*schedulercache.No filtered := []api.Node{} failedPredicateMap := FailedPredicateMap{} + //wp:#25606 if len(predicateFuncs) == 0 { filtered = nodes.Items } else { @@ -148,7 +149,7 @@ func findNodesThatFit(pod *api.Pod, nodeNameToInfo map[string]*schedulercache.No checkNode := func(i int) { nodeName := nodes.Items[i].Name fits, failedPredicate, err := podFitsOnNode(pod, nodeNameToInfo[nodeName], predicateFuncs) - + predicateResultLock.Lock() defer predicateResultLock.Unlock() if err != nil { @@ -173,6 +174,24 @@ func findNodesThatFit(pod *api.Pod, nodeNameToInfo map[string]*schedulercache.No if err != nil { return api.NodeList{}, FailedPredicateMap{}, err } + //add the extender failed info to failedPredicateMap wp:#25797 + for _, filteredNode := range filtered { + nodeIn := false + for _, exNode := range filteredList.Items { + if filteredNode.Name == exNode.Name { + nodeIn = true + break + } + } + if !nodeIn { + if re, ok := extender.(*HTTPExtender); ok { + failedPredicateMap[filteredNode.Name] = fmt.Sprintf("%s, %s", re.extenderURL, re.filterVerb) + } else { + failedPredicateMap[filteredNode.Name] = "extender failed" + } + } + } + filtered = filteredList.Items if len(filtered) == 0 { break From e2af16b1d5358e71c10affeafb5e538df4ae67b5 Mon Sep 17 00:00:00 2001 From: PingWang Date: Mon, 23 May 2016 09:18:15 +0800 Subject: [PATCH 009/339] Update generic_scheduler.go --- plugin/pkg/scheduler/generic_scheduler.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/plugin/pkg/scheduler/generic_scheduler.go b/plugin/pkg/scheduler/generic_scheduler.go index fecb6fbf92..4c7288f4e5 100644 --- a/plugin/pkg/scheduler/generic_scheduler.go +++ b/plugin/pkg/scheduler/generic_scheduler.go @@ -140,7 +140,6 @@ func findNodesThatFit(pod *api.Pod, nodeNameToInfo map[string]*schedulercache.No filtered := []api.Node{} failedPredicateMap := FailedPredicateMap{} - //wp:#25606 if len(predicateFuncs) == 0 { filtered = nodes.Items } else { @@ -174,24 +173,6 @@ func findNodesThatFit(pod *api.Pod, nodeNameToInfo map[string]*schedulercache.No if err != nil { return api.NodeList{}, FailedPredicateMap{}, err } - //add the extender failed info to failedPredicateMap wp:#25797 - for _, filteredNode := range filtered { - nodeIn := false - for _, exNode := range filteredList.Items { - if filteredNode.Name == exNode.Name { - nodeIn = true - break - } - } - if !nodeIn { - if re, ok := extender.(*HTTPExtender); ok { - failedPredicateMap[filteredNode.Name] = fmt.Sprintf("%s, %s", re.extenderURL, re.filterVerb) - } else { - failedPredicateMap[filteredNode.Name] = "extender failed" - } - } - } - filtered = filteredList.Items if len(filtered) == 0 { break From 10c1234c98a11ef5706dc147a9152ba415721e7b Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Tue, 24 May 2016 22:35:19 -0400 Subject: [PATCH 010/339] Add WrapUpdatedObjectInfo helper --- pkg/api/rest/update.go | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/pkg/api/rest/update.go b/pkg/api/rest/update.go index bc5ed0c5f8..2645e2c31d 100644 --- a/pkg/api/rest/update.go +++ b/pkg/api/rest/update.go @@ -173,3 +173,44 @@ func (i *defaultUpdatedObjectInfo) UpdatedObject(ctx api.Context, oldObj runtime return newObj, nil } + +// wrappedUpdatedObjectInfo allows wrapping an existing objInfo and +// chaining additional transformations/checks on the result of UpdatedObject() +type wrappedUpdatedObjectInfo struct { + // obj is the updated object + objInfo UpdatedObjectInfo + + // transformers is an optional list of transforming functions that modify or + // replace obj using information from the context, old object, or other sources. + transformers []TransformFunc +} + +// WrapUpdatedObjectInfo returns an UpdatedObjectInfo impl that delegates to +// the specified objInfo, then calls the passed transformers +func WrapUpdatedObjectInfo(objInfo UpdatedObjectInfo, transformers ...TransformFunc) UpdatedObjectInfo { + return &wrappedUpdatedObjectInfo{objInfo, transformers} +} + +// Preconditions satisfies the UpdatedObjectInfo interface. +func (i *wrappedUpdatedObjectInfo) Preconditions() *api.Preconditions { + return i.objInfo.Preconditions() +} + +// UpdatedObject satisfies the UpdatedObjectInfo interface. +// It delegates to the wrapped objInfo and passes the result through any configured transformers. +func (i *wrappedUpdatedObjectInfo) UpdatedObject(ctx api.Context, oldObj runtime.Object) (runtime.Object, error) { + newObj, err := i.objInfo.UpdatedObject(ctx, oldObj) + if err != nil { + return newObj, err + } + + // Allow any configured transformers to update the new object or error + for _, transformer := range i.transformers { + newObj, err = transformer(ctx, newObj, oldObj) + if err != nil { + return nil, err + } + } + + return newObj, nil +} From 8497255bcd59b992aca4250172fac57d4967c1e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= Date: Fri, 27 May 2016 18:42:13 +0100 Subject: [PATCH 011/339] Add -g curl option to hack/lib/util.sh wait_for_url MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Martins --- hack/lib/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/lib/util.sh b/hack/lib/util.sh index 108c77bf3e..6ae8b69d59 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -32,7 +32,7 @@ kube::util::wait_for_url() { local i for i in $(seq 1 $times); do local out - if out=$(curl -fs $url 2>/dev/null); then + if out=$(curl -gfs $url 2>/dev/null); then kube::log::status "On try ${i}, ${prefix}: ${out}" return 0 fi From ca9b63add2092a627ba5e8e88e35c1fdb2777d69 Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Fri, 27 May 2016 16:55:42 -0700 Subject: [PATCH 012/339] e2e: Delete old code --- test/e2e/pods.go | 178 ----------------------------------------------- 1 file changed, 178 deletions(-) diff --git a/test/e2e/pods.go b/test/e2e/pods.go index da3d0821e4..1201d76d92 100644 --- a/test/e2e/pods.go +++ b/test/e2e/pods.go @@ -1422,182 +1422,4 @@ var _ = framework.KubeDescribe("Pods", func() { framework.Failf("expected %s back-off got=%s on delay2", kubelet.MaxContainerBackOff, delay2) } }) - - // The following tests for remote command execution and port forwarding are - // commented out because the GCE environment does not currently have nsenter - // in the kubelet's PATH, nor does it have socat installed. Once we figure - // out the best way to have nsenter and socat available in GCE (and hopefully - // all providers), we can enable these tests. - /* - It("should support remote command execution", func() { - clientConfig, err := framework.LoadConfig() - if err != nil { - framework.Failf("Failed to create client config: %v", err) - } - - podClient := f.Client.Pods(f.Namespace.Name) - - By("creating the pod") - name := "pod-exec-" + string(util.NewUUID()) - value := strconv.Itoa(time.Now().Nanosecond()) - pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ - Name: name, - Labels: map[string]string{ - "name": "foo", - "time": value, - }, - }, - Spec: api.PodSpec{ - Containers: []api.Container{ - { - Name: "nginx", - Image: "gcr.io/google_containers/nginx:1.7.9", - }, - }, - }, - } - - By("submitting the pod to kubernetes") - _, err = podClient.Create(pod) - if err != nil { - framework.Failf("Failed to create pod: %v", err) - } - defer func() { - // We call defer here in case there is a problem with - // the test so we can ensure that we clean up after - // ourselves - podClient.Delete(pod.Name, api.NewDeleteOptions(0)) - }() - - By("waiting for the pod to start running") - framework.ExpectNoError(f.WaitForPodRunning(pod.Name)) - - By("verifying the pod is in kubernetes") - selector := labels.SelectorFromSet(labels.Set(map[string]string{"time": value})) - options := api.ListOptions{LabelSelector: selector} - pods, err := podClient.List(options) - if err != nil { - framework.Failf("Failed to query for pods: %v", err) - } - Expect(len(pods.Items)).To(Equal(1)) - - pod = &pods.Items[0] - By(fmt.Sprintf("executing command on host %s pod %s in container %s", - pod.Status.Host, pod.Name, pod.Spec.Containers[0].Name)) - req := f.Client.Get(). - Prefix("proxy"). - Resource("nodes"). - Name(pod.Status.Host). - Suffix("exec", f.Namespace.Name, pod.Name, pod.Spec.Containers[0].Name) - - out := &bytes.Buffer{} - e := remotecommand.New(req, clientConfig, []string{"whoami"}, nil, out, nil, false) - err = e.Execute() - if err != nil { - framework.Failf("Failed to execute command on host %s pod %s in container %s: %v", - pod.Status.Host, pod.Name, pod.Spec.Containers[0].Name, err) - } - if e, a := "root\n", out.String(); e != a { - framework.Failf("exec: whoami: expected '%s', got '%s'", e, a) - } - }) - - It("should support port forwarding", func() { - clientConfig, err := framework.LoadConfig() - if err != nil { - framework.Failf("Failed to create client config: %v", err) - } - - podClient := f.Client.Pods(f.Namespace.Name) - - By("creating the pod") - name := "pod-portforward-" + string(util.NewUUID()) - value := strconv.Itoa(time.Now().Nanosecond()) - pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ - Name: name, - Labels: map[string]string{ - "name": "foo", - "time": value, - }, - }, - Spec: api.PodSpec{ - Containers: []api.Container{ - { - Name: "nginx", - Image: "gcr.io/google_containers/nginx:1.7.9", - Ports: []api.Port{{ContainerPort: 80}}, - }, - }, - }, - } - - By("submitting the pod to kubernetes") - _, err = podClient.Create(pod) - if err != nil { - framework.Failf("Failed to create pod: %v", err) - } - defer func() { - // We call defer here in case there is a problem with - // the test so we can ensure that we clean up after - // ourselves - podClient.Delete(pod.Name, api.NewDeleteOptions(0)) - }() - - By("waiting for the pod to start running") - framework.ExpectNoError(f.WaitForPodRunning(pod.Name)) - - By("verifying the pod is in kubernetes") - selector := labels.SelectorFromSet(labels.Set(map[string]string{"time": value})) - options := api.ListOptions{LabelSelector: selector} - pods, err := podClient.List(options) - if err != nil { - framework.Failf("Failed to query for pods: %v", err) - } - Expect(len(pods.Items)).To(Equal(1)) - - pod = &pods.Items[0] - By(fmt.Sprintf("initiating port forwarding to host %s pod %s in container %s", - pod.Status.Host, pod.Name, pod.Spec.Containers[0].Name)) - - req := f.Client.Get(). - Prefix("proxy"). - Resource("nodes"). - Name(pod.Status.Host). - Suffix("portForward", f.Namespace.Name, pod.Name) - - stopChan := make(chan struct{}) - pf, err := portforward.New(req, clientConfig, []string{"5678:80"}, stopChan) - if err != nil { - framework.Failf("Error creating port forwarder: %s", err) - } - - errorChan := make(chan error) - go func() { - errorChan <- pf.ForwardPorts() - }() - - // wait for listeners to start - <-pf.Ready - - resp, err := http.Get("http://localhost:5678/") - if err != nil { - framework.Failf("Error with http get to localhost:5678: %s", err) - } - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - framework.Failf("Error reading response body: %s", err) - } - - titleRegex := regexp.MustCompile("(.+)") - matches := titleRegex.FindStringSubmatch(string(body)) - if len(matches) != 2 { - Fail("Unable to locate page title in response HTML") - } - if e, a := "Welcome to nginx on Debian!", matches[1]; e != a { - framework.Failf(": expected '%s', got '%s'", e, a) - } - }) - */ }) From b8740c2c67392ca9d9837f9ee43955ca89d3c263 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee <gyuhox@gmail.com> Date: Sun, 29 May 2016 02:17:35 -0700 Subject: [PATCH 013/339] pkg/storage/etcd3: remove name field in test Current test gets the name with its test table index, so there seems to be no reason to have name field in test table. --- pkg/storage/etcd3/store_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/storage/etcd3/store_test.go b/pkg/storage/etcd3/store_test.go index 2fd686d2ee..e66f859e98 100644 --- a/pkg/storage/etcd3/store_test.go +++ b/pkg/storage/etcd3/store_test.go @@ -274,7 +274,6 @@ func TestGuaranteedUpdate(t *testing.T) { tests := []struct { key string - name string ignoreNotFound bool precondition *storage.Preconditions expectNotFoundErr bool From 5c288a77fe701b20b79daa949e60d086bff22498 Mon Sep 17 00:00:00 2001 From: Matt Freeman <nowprovision@users.noreply.github.com> Date: Sun, 29 May 2016 19:44:20 +0700 Subject: [PATCH 014/339] Fix error handling in endpoint controller Added missing returns, subsequent statements depend on key --- pkg/controller/endpoint/endpoints_controller.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/controller/endpoint/endpoints_controller.go b/pkg/controller/endpoint/endpoints_controller.go index 257ecb3df1..6b91b644e8 100644 --- a/pkg/controller/endpoint/endpoints_controller.go +++ b/pkg/controller/endpoint/endpoints_controller.go @@ -273,6 +273,7 @@ func (e *EndpointController) deletePod(obj interface{}) { podKey, err := keyFunc(obj) if err != nil { glog.Errorf("Couldn't get key for object %+v: %v", obj, err) + return } glog.Infof("Pod %q was deleted but we don't have a record of its final state, so it will take up to %v before it will be removed from all endpoint records.", podKey, FullServiceResyncPeriod) @@ -284,6 +285,7 @@ func (e *EndpointController) enqueueService(obj interface{}) { key, err := keyFunc(obj) if err != nil { glog.Errorf("Couldn't get key for object %+v: %v", obj, err) + return } e.queue.Add(key) From 5dcbc7ce5bd828b27405b1ad8b2731ad8d34a51c Mon Sep 17 00:00:00 2001 From: Angus Salkeld <asalkeld@mirantis.com> Date: Mon, 30 May 2016 14:01:38 +1000 Subject: [PATCH 015/339] Check for an empty value in validateField reflect.TypeOf() can take a nil (it then returns a nil), but Kind() panics on a nil. Fixes #20627 --- hack/test-cmd.sh | 12 +++++++++++ hack/testdata/invalid-rc-with-empty-args.yaml | 20 +++++++++++++++++++ pkg/api/validation/schema.go | 5 ++++- pkg/api/validation/schema_test.go | 1 + .../validation/testdata/v1/invalidPod4.yaml | 14 +++++++++++++ 5 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 hack/testdata/invalid-rc-with-empty-args.yaml create mode 100644 pkg/api/validation/testdata/v1/invalidPod4.yaml diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 7704db2904..fc9e3907ea 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -884,6 +884,18 @@ __EOF__ kubectl delete hpa frontend "${kube_flags[@]}" kubectl delete rc frontend "${kube_flags[@]}" + ## kubectl create should not panic on empty string lists in a template + ERROR_FILE="${KUBE_TEMP}/validation-error" + kubectl create -f hack/testdata/invalid-rc-with-empty-args.yaml "${kube_flags[@]}" 2> "${ERROR_FILE}" || true + # Post-condition: should get an error reporting the empty string + if grep -q "unexpected nil value for field" "${ERROR_FILE}"; then + kube::log::status "\"kubectl create with empty string list returns error as expected: $(cat ${ERROR_FILE})" + else + kube::log::status "\"kubectl create with empty string list returns unexpected error or non-error: $(cat ${ERROR_FILE})" + exit 1 + fi + rm "${ERROR_FILE}" + ## kubectl apply should create the resource that doesn't exist yet # Pre-Condition: no POD exists kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" '' diff --git a/hack/testdata/invalid-rc-with-empty-args.yaml b/hack/testdata/invalid-rc-with-empty-args.yaml new file mode 100644 index 0000000000..14657f1939 --- /dev/null +++ b/hack/testdata/invalid-rc-with-empty-args.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: ReplicationController +metadata: + name: kube-dns-v10 + namespace: kube-system +spec: + replicas: 1 + selector: + k8s-app: kube-dns + template: + metadata: + labels: + k8s-app: kube-dns + spec: + containers: + - name: carbon-relay + image: banno/carbon-relay + args: + - +# above is the empty arg string. \ No newline at end of file diff --git a/pkg/api/validation/schema.go b/pkg/api/validation/schema.go index c52a0b6d71..726cb518b5 100644 --- a/pkg/api/validation/schema.go +++ b/pkg/api/validation/schema.go @@ -297,6 +297,10 @@ func (s *SwaggerSchema) isGenericArray(p swagger.ModelProperty) bool { var versionRegexp = regexp.MustCompile(`^v.+\..*`) func (s *SwaggerSchema) validateField(value interface{}, fieldName, fieldType string, fieldDetails *swagger.ModelProperty) []error { + allErrs := []error{} + if reflect.TypeOf(value) == nil { + return append(allErrs, fmt.Errorf("unexpected nil value for field %v", fieldName)) + } // TODO: caesarxuchao: because we have multiple group/versions and objects // may reference objects in other group, the commented out way of checking // if a filedType is a type defined by us is outdated. We use a hacky way @@ -310,7 +314,6 @@ func (s *SwaggerSchema) validateField(value interface{}, fieldName, fieldType st // if strings.HasPrefix(fieldType, apiVersion) { return s.ValidateObject(value, fieldName, fieldType) } - allErrs := []error{} switch fieldType { case "string": // Be loose about what we accept for 'string' since we use IntOrString in a couple of places diff --git a/pkg/api/validation/schema_test.go b/pkg/api/validation/schema_test.go index 3499acab25..876e467d37 100644 --- a/pkg/api/validation/schema_test.go +++ b/pkg/api/validation/schema_test.go @@ -209,6 +209,7 @@ func TestInvalid(t *testing.T) { "invalidPod1.json", // command is a string, instead of []string. "invalidPod2.json", // hostPort if of type string, instead of int. "invalidPod3.json", // volumes is not an array of objects. + "invalidPod4.yaml", // string list with empty string. "invalidPod.yaml", // command is a string, instead of []string. } for _, test := range tests { diff --git a/pkg/api/validation/testdata/v1/invalidPod4.yaml b/pkg/api/validation/testdata/v1/invalidPod4.yaml new file mode 100644 index 0000000000..f02bf7b336 --- /dev/null +++ b/pkg/api/validation/testdata/v1/invalidPod4.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Pod +metadata: + labels: + name: redis-master + name: name +spec: + containers: + - image: gcr.io/fake_project/fake_image:fake_tag + name: master + args: + - + command: + - \ No newline at end of file From 4c437aa2c670460eb57f67231d05eaa569b82765 Mon Sep 17 00:00:00 2001 From: Jonathan Boulle <jonathan.boulle@coreos.com> Date: Fri, 15 Jan 2016 19:11:12 +0100 Subject: [PATCH 016/339] Remove unused coreos/go-etcd fork from third_party The only usage of this was removed via #18635 --- .../forked/coreos/go-etcd/etcd/client.go | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 third_party/forked/coreos/go-etcd/etcd/client.go diff --git a/third_party/forked/coreos/go-etcd/etcd/client.go b/third_party/forked/coreos/go-etcd/etcd/client.go deleted file mode 100644 index 7826be8066..0000000000 --- a/third_party/forked/coreos/go-etcd/etcd/client.go +++ /dev/null @@ -1,32 +0,0 @@ -package etcd - -import ( - "errors" - "net" - "time" -) - -// dial attempts to open a TCP connection to the provided address, explicitly -// enabling keep-alives with a one-second interval. -func Dial(network, addr string) (net.Conn, error) { - conn, err := net.DialTimeout(network, addr, time.Second) - if err != nil { - return nil, err - } - - tcpConn, ok := conn.(*net.TCPConn) - if !ok { - return nil, errors.New("Failed type-assertion of net.Conn as *net.TCPConn") - } - - // Keep TCP alive to check whether or not the remote machine is down - if err = tcpConn.SetKeepAlive(true); err != nil { - return nil, err - } - - if err = tcpConn.SetKeepAlivePeriod(time.Second); err != nil { - return nil, err - } - - return tcpConn, nil -} From 82096d12798cd87ecb7d6db2a53a13ac6f70755e Mon Sep 17 00:00:00 2001 From: deads2k <deads@redhat.com> Date: Tue, 17 May 2016 16:11:38 -0400 Subject: [PATCH 017/339] remove confusing, dead code from master.go --- pkg/master/master.go | 73 -------------------------------------------- 1 file changed, 73 deletions(-) diff --git a/pkg/master/master.go b/pkg/master/master.go index 736e536032..715b803994 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -254,9 +254,6 @@ func (m *Master) InstallAPIs(c *Config) { m.MuxHelper.HandleFunc("/metrics", defaultMetricsHandler) } - // allGroups records all supported groups at /apis - allGroups := []unversioned.APIGroup{} - // Install extensions unless disabled. if c.APIResourceConfigSource.AnyResourcesForVersionEnabled(extensionsapiv1beta1.SchemeGroupVersion) { var err error @@ -280,17 +277,6 @@ func (m *Master) InstallAPIs(c *Config) { NegotiatedSerializer: api.Codecs, } apiGroupsInfo = append(apiGroupsInfo, apiGroupInfo) - - extensionsGVForDiscovery := unversioned.GroupVersionForDiscovery{ - GroupVersion: extensionsGroupMeta.GroupVersion.String(), - Version: extensionsGroupMeta.GroupVersion.Version, - } - group := unversioned.APIGroup{ - Name: extensionsGroupMeta.GroupVersion.Group, - Versions: []unversioned.GroupVersionForDiscovery{extensionsGVForDiscovery}, - PreferredVersion: extensionsGVForDiscovery, - } - allGroups = append(allGroups, group) } // Install autoscaling unless disabled. @@ -312,17 +298,6 @@ func (m *Master) InstallAPIs(c *Config) { NegotiatedSerializer: api.Codecs, } apiGroupsInfo = append(apiGroupsInfo, apiGroupInfo) - - autoscalingGVForDiscovery := unversioned.GroupVersionForDiscovery{ - GroupVersion: autoscalingGroupMeta.GroupVersion.String(), - Version: autoscalingGroupMeta.GroupVersion.Version, - } - group := unversioned.APIGroup{ - Name: autoscalingGroupMeta.GroupVersion.Group, - Versions: []unversioned.GroupVersionForDiscovery{autoscalingGVForDiscovery}, - PreferredVersion: autoscalingGVForDiscovery, - } - allGroups = append(allGroups, group) } // Install batch unless disabled. @@ -348,19 +323,7 @@ func (m *Master) InstallAPIs(c *Config) { batchv2alpha1Resources := m.getBatchResources(c, batchapiv2alpha1.SchemeGroupVersion) apiGroupInfo.VersionedResourcesStorageMap["v2alpha1"] = batchv2alpha1Resources } - apiGroupsInfo = append(apiGroupsInfo, apiGroupInfo) - - batchGVForDiscovery := unversioned.GroupVersionForDiscovery{ - GroupVersion: batchGroupMeta.GroupVersion.String(), - Version: batchGroupMeta.GroupVersion.Version, - } - group := unversioned.APIGroup{ - Name: batchGroupMeta.GroupVersion.Group, - Versions: []unversioned.GroupVersionForDiscovery{batchGVForDiscovery}, - PreferredVersion: batchGVForDiscovery, - } - allGroups = append(allGroups, group) } if c.APIResourceConfigSource.AnyResourcesForVersionEnabled(policyapiv1alpha1.SchemeGroupVersion) { @@ -381,18 +344,6 @@ func (m *Master) InstallAPIs(c *Config) { NegotiatedSerializer: api.Codecs, } apiGroupsInfo = append(apiGroupsInfo, apiGroupInfo) - - policyGVForDiscovery := unversioned.GroupVersionForDiscovery{ - GroupVersion: policyGroupMeta.GroupVersion.String(), - Version: policyGroupMeta.GroupVersion.Version, - } - group := unversioned.APIGroup{ - Name: policyGroupMeta.GroupVersion.Group, - Versions: []unversioned.GroupVersionForDiscovery{policyGVForDiscovery}, - PreferredVersion: policyGVForDiscovery, - } - allGroups = append(allGroups, group) - } if c.APIResourceConfigSource.AnyResourcesForVersionEnabled(appsapi.SchemeGroupVersion) { @@ -413,18 +364,6 @@ func (m *Master) InstallAPIs(c *Config) { NegotiatedSerializer: api.Codecs, } apiGroupsInfo = append(apiGroupsInfo, apiGroupInfo) - - appsGVForDiscovery := unversioned.GroupVersionForDiscovery{ - GroupVersion: appsGroupMeta.GroupVersion.String(), - Version: appsGroupMeta.GroupVersion.Version, - } - group := unversioned.APIGroup{ - Name: appsGroupMeta.GroupVersion.Group, - Versions: []unversioned.GroupVersionForDiscovery{appsGVForDiscovery}, - PreferredVersion: appsGVForDiscovery, - } - allGroups = append(allGroups, group) - } if c.APIResourceConfigSource.AnyResourcesForVersionEnabled(rbacapi.SchemeGroupVersion) { @@ -445,18 +384,6 @@ func (m *Master) InstallAPIs(c *Config) { NegotiatedSerializer: api.Codecs, } apiGroupsInfo = append(apiGroupsInfo, apiGroupInfo) - - rbacGVForDiscovery := unversioned.GroupVersionForDiscovery{ - GroupVersion: rbacGroupMeta.GroupVersion.String(), - Version: rbacGroupMeta.GroupVersion.Version, - } - group := unversioned.APIGroup{ - Name: rbacGroupMeta.GroupVersion.Group, - Versions: []unversioned.GroupVersionForDiscovery{rbacGVForDiscovery}, - PreferredVersion: rbacGVForDiscovery, - } - allGroups = append(allGroups, group) - } if err := m.InstallAPIGroups(apiGroupsInfo); err != nil { From 372827fd5a975bbc83acc27a926988acc1237251 Mon Sep 17 00:00:00 2001 From: Jarrett Cruger <jcruger@godaddy.com> Date: Tue, 31 May 2016 19:06:48 -0400 Subject: [PATCH 018/339] [fix] allow ALLOW_PRIVILEGED to be passed to kubelet and kube-api, needed for running docker in docker --- cluster/ubuntu/config-default.sh | 5 ++++- cluster/ubuntu/util.sh | 25 ++++++++++++++++--------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/cluster/ubuntu/config-default.sh b/cluster/ubuntu/config-default.sh index f5c6b378e2..6b55042e2b 100755 --- a/cluster/ubuntu/config-default.sh +++ b/cluster/ubuntu/config-default.sh @@ -17,7 +17,7 @@ ## Contains configuration values for the Ubuntu cluster # Define all your cluster nodes, MASTER node comes first" -# And separated with blank space like <user_1@ip_1> <user_2@ip_2> <user_3@ip_3> +# And separated with blank space like <user_1@ip_1> <user_2@ip_2> <user_3@ip_3> export nodes=${nodes:-"vcap@10.10.103.250 vcap@10.10.103.162 vcap@10.10.103.223"} # Define all your nodes role: a(master) or i(minion) or ai(both master and minion), @@ -112,5 +112,8 @@ ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}" # Add environment variable separated with blank space like "http_proxy=http://10.x.x.x:8080 https_proxy=https://10.x.x.x:8443" PROXY_SETTING=${PROXY_SETTING:-""} +# Optional: Allows kublet/kube-api to be run in privileged mode +ALLOW_PRIVILEGED=${ALLOW_PRIVILEGED:-"false"} + DEBUG=${DEBUG:-"false"} diff --git a/cluster/ubuntu/util.sh b/cluster/ubuntu/util.sh index 32fa615bc3..363323cc0d 100755 --- a/cluster/ubuntu/util.sh +++ b/cluster/ubuntu/util.sh @@ -245,6 +245,7 @@ KUBE_APISERVER_OPTS="\ --admission-control=${2}\ --service-node-port-range=${3}\ --advertise-address=${4}\ + --allow-privileged=${5}\ --client-ca-file=/srv/kubernetes/ca.crt\ --tls-cert-file=/srv/kubernetes/server.cert\ --tls-private-key-file=/srv/kubernetes/server.key" @@ -279,9 +280,10 @@ EOF # $3: If non-empty then the DNS server IP to configure in each pod. # $4: If non-empty then added to each pod's domain search list. # $5: Pathname of the kubelet config file or directory. -# $6: If empty then flannel is used otherwise CNI is used. +# $6: Whether or not we run kubelet in priviliged mode +# $7: If empty then flannel is used otherwise CNI is used. function create-kubelet-opts() { - if [ -n "$6" ] ; then + if [ -n "$7" ] ; then cni_opts=" --network-plugin=cni --network-plugin-dir=/etc/cni/net.d" else cni_opts="" @@ -294,6 +296,7 @@ KUBELET_OPTS="\ --cluster-dns=${3} \ --cluster-domain=${4} \ --config=${5} \ + --allow-privileged=${6} $cni_opts" EOF } @@ -472,7 +475,8 @@ function provision-master() { '${SERVICE_CLUSTER_IP_RANGE}' \ '${ADMISSION_CONTROL}' \ '${SERVICE_NODE_PORT_RANGE}' \ - '${MASTER_IP}' + '${MASTER_IP}' \ + '${ALLOW_PRIVILIGED}' create-kube-controller-manager-opts '${NODE_IPS}' create-kube-scheduler-opts create-flanneld-opts '127.0.0.1' '${MASTER_IP}' @@ -534,7 +538,7 @@ function provision-node() { service kube-proxy start' NEED_RECONFIG_DOCKER=false fi - + BASH_DEBUG_FLAGS="" if [[ "$DEBUG" == "true" ]] ; then BASH_DEBUG_FLAGS="set -x" @@ -553,6 +557,7 @@ function provision-node() { '${DNS_SERVER_IP}' \ '${DNS_DOMAIN}' \ '${KUBELET_CONFIG}' \ + '${ALLOW_PRIVILEGED}' \ '${CNI_PLUGIN_CONF}' create-kube-proxy-opts \ '${1#*@}' \ @@ -560,7 +565,7 @@ function provision-node() { '${KUBE_PROXY_EXTRA_OPTS}' create-flanneld-opts '${MASTER_IP}' '${1#*@}' - sudo -E -p '[sudo] password to start node: ' -- /bin/bash -ce ' + sudo -E -p '[sudo] password to start node: ' -- /bin/bash -ce ' ${BASH_DEBUG_FLAGS} cp ~/kube/default/* /etc/default/ cp ~/kube/init_conf/* /etc/init/ @@ -615,7 +620,7 @@ function provision-masterandnode() { "' NEED_RECONFIG_DOCKER=false fi - + EXTRA_SANS=( IP:${MASTER_IP} IP:${SERVICE_CLUSTER_IP_RANGE%.*}.1 @@ -644,7 +649,8 @@ function provision-masterandnode() { '${SERVICE_CLUSTER_IP_RANGE}' \ '${ADMISSION_CONTROL}' \ '${SERVICE_NODE_PORT_RANGE}' \ - '${MASTER_IP}' + '${MASTER_IP}' \ + '${ALLOW_PRIVILEGED}' create-kube-controller-manager-opts '${NODE_IPS}' create-kube-scheduler-opts create-kubelet-opts \ @@ -653,6 +659,7 @@ function provision-masterandnode() { '${DNS_SERVER_IP}' \ '${DNS_DOMAIN}' \ '${KUBELET_CONFIG}' \ + '${ALLOW_PRIVILEGED}' \ '${CNI_PLUGIN_CONF}' create-kube-proxy-opts \ '${MASTER_IP}' \ @@ -660,7 +667,7 @@ function provision-masterandnode() { '${KUBE_PROXY_EXTRA_OPTS}' create-flanneld-opts '127.0.0.1' '${MASTER_IP}' - FLANNEL_OTHER_NET_CONFIG='${FLANNEL_OTHER_NET_CONFIG}' sudo -E -p '[sudo] password to start master: ' -- /bin/bash -ce ' + FLANNEL_OTHER_NET_CONFIG='${FLANNEL_OTHER_NET_CONFIG}' sudo -E -p '[sudo] password to start master: ' -- /bin/bash -ce ' ${BASH_DEBUG_FLAGS} cp ~/kube/default/* /etc/default/ cp ~/kube/init_conf/* /etc/init/ @@ -697,7 +704,7 @@ function check-pods-torn-down() { # Delete a kubernetes cluster function kube-down() { export KUBECTL_PATH="${KUBE_ROOT}/cluster/ubuntu/binaries/kubectl" - + export KUBE_CONFIG_FILE=${KUBE_CONFIG_FILE:-${KUBE_ROOT}/cluster/ubuntu/config-default.sh} source "${KUBE_CONFIG_FILE}" From d046275a36f1107d34ab3707df7676a0fbbc959c Mon Sep 17 00:00:00 2001 From: Mike Danese <mikedanese@google.com> Date: Tue, 31 May 2016 17:29:57 -0700 Subject: [PATCH 019/339] now that go test runs iteration loops, use that instead of custom executor --- hack/test-go.sh | 54 +++---------------------------------------------- 1 file changed, 3 insertions(+), 51 deletions(-) diff --git a/hack/test-go.sh b/hack/test-go.sh index f87b16559e..1553f410a4 100755 --- a/hack/test-go.sh +++ b/hack/test-go.sh @@ -74,7 +74,6 @@ usage: $0 [OPTIONS] [TARGETS] OPTIONS: -p <number> : number of parallel workers, must be >= 1 - -i <number> : number of times to run each test per worker, must be >= 1 EOF } @@ -82,7 +81,6 @@ isnum() { [[ "$1" =~ ^[0-9]+$ ]] } -iterations=1 parallel=1 while getopts "hp:i:" opt ; do case $opt in @@ -99,12 +97,9 @@ while getopts "hp:i:" opt ; do fi ;; i) - iterations="$OPTARG" - if ! isnum "${iterations}" || [[ "${iterations}" -le 0 ]]; then - kube::log::usage "'$0': argument to -i must be numeric and greater than 0" - kube::test::usage - exit 1 - fi + kube::log::usage "'$0': use GOFLAGS='-count <num-iterations>'" + kube::test::usage + exit 1 ;; ?) kube::test::usage @@ -180,50 +175,7 @@ produceJUnitXMLReport() { kube::log::status "Saved JUnit XML test report to ${junit_xml_filename}" } -runTestIterations() { - local worker=$1 - shift - kube::log::status "Worker ${worker}: Running ${iterations} times" - for arg; do - trap 'exit 1' SIGINT - local pkg=${KUBE_GO_PACKAGE}/${arg} - kube::log::status "${pkg}" - # keep going, even if there are failures - local pass=0 - local count=0 - for i in $(seq 1 ${iterations}); do - if go test "${goflags[@]:+${goflags[@]}}" \ - ${KUBE_RACE} ${KUBE_TIMEOUT} "${pkg}" \ - "${testargs[@]:+${testargs[@]}}"; then - pass=$((pass + 1)) - else - ITERATION_FAILURES=$((ITERATION_FAILURES + 1)) - fi - count=$((count + 1)) - done 2>&1 - kube::log::status "Worker ${worker}: ${pass} / ${count} passed" - done - return 0 -} - runTests() { - # TODO: this should probably be refactored to avoid code duplication with the - # coverage version. - if [[ $iterations -gt 1 ]]; then - ITERATION_FAILURES=0 # purposely non-local - if [[ $# -eq 0 ]]; then - set -- $(kube::test::find_dirs) - fi - for p in $(seq 1 ${parallel}); do - runTestIterations ${p} "$@" & - done - wait - if [[ ${ITERATION_FAILURES} -gt 0 ]]; then - return 1 - fi - return 0 - fi - local junit_filename_prefix junit_filename_prefix=$(junitFilenamePrefix) From 44cc9aa9b61c771c51db897e8c055faaebb20dc6 Mon Sep 17 00:00:00 2001 From: Jarrett Cruger <jcruger@godaddy.com> Date: Wed, 1 Jun 2016 14:44:58 -0400 Subject: [PATCH 020/339] [fix] add comment --- cluster/ubuntu/util.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/cluster/ubuntu/util.sh b/cluster/ubuntu/util.sh index 363323cc0d..54815e2c56 100755 --- a/cluster/ubuntu/util.sh +++ b/cluster/ubuntu/util.sh @@ -234,6 +234,7 @@ EOF # $2: Admission Controllers to invoke in the API server. # $3: A port range to reserve for services with NodePort visibility. # $4: The IP address on which to advertise the apiserver to members of the cluster. +# $5: Tells kube-api to run in privileged mode function create-kube-apiserver-opts() { cat <<EOF > ~/kube/default/kube-apiserver KUBE_APISERVER_OPTS="\ From 4615d1e24ce7407cd3db96973feb1613268cbfbb Mon Sep 17 00:00:00 2001 From: Janet Kuo <chiachenk@google.com> Date: Tue, 31 May 2016 16:42:43 -0700 Subject: [PATCH 021/339] Add more information when throwing errors in discoverying 3rd party resources --- pkg/kubectl/cmd/util/factory.go | 10 +++++----- pkg/kubectl/cmd/util/helpers.go | 25 +++++++++++++++---------- pkg/kubectl/cmd/util/helpers_test.go | 4 ++-- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/pkg/kubectl/cmd/util/factory.go b/pkg/kubectl/cmd/util/factory.go index 32c8de1fa6..1f7ff05bbd 100644 --- a/pkg/kubectl/cmd/util/factory.go +++ b/pkg/kubectl/cmd/util/factory.go @@ -251,14 +251,14 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory { // have been dynamically added to the apiserver Object: func(discoverDynamicAPIs bool) (meta.RESTMapper, runtime.ObjectTyper) { cfg, err := clientConfig.ClientConfig() - CheckErr(err) + checkErrWithPrefix("failed to get client config: ", err) cmdApiVersion := unversioned.GroupVersion{} if cfg.GroupVersion != nil { cmdApiVersion = *cfg.GroupVersion } if discoverDynamicAPIs { client, err := clients.ClientForVersion(&unversioned.GroupVersion{Version: "v1"}) - CheckErr(err) + checkErrWithPrefix("failed to find client for version v1: ", err) var versions []unversioned.GroupVersion var gvks []unversioned.GroupVersionKind @@ -272,7 +272,7 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory { break } } - CheckErr(err) + checkErrWithPrefix("failed to get third-party group versions: ", err) if len(versions) > 0 { priorityMapper, ok := mapper.RESTMapper.(meta.PriorityRESTMapper) if !ok { @@ -292,7 +292,7 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory { preferredExternalVersion := versionList[0] thirdPartyMapper, err := kubectl.NewThirdPartyResourceMapper(versionList, getGroupVersionKinds(gvks, group)) - CheckErr(err) + checkErrWithPrefix("failed to create third party resource mapper: ", err) accessor := meta.NewAccessor() groupMeta := apimachinery.GroupMeta{ GroupVersion: preferredExternalVersion, @@ -302,7 +302,7 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory { InterfacesFor: makeInterfacesFor(versionList), } - CheckErr(registered.RegisterGroup(groupMeta)) + checkErrWithPrefix("failed to register group: ", registered.RegisterGroup(groupMeta)) registered.AddThirdPartyAPIGroupVersions(versionList...) multiMapper = append(meta.MultiRESTMapper{thirdPartyMapper}, multiMapper...) } diff --git a/pkg/kubectl/cmd/util/helpers.go b/pkg/kubectl/cmd/util/helpers.go index d8d7949c21..ec6c4526ed 100644 --- a/pkg/kubectl/cmd/util/helpers.go +++ b/pkg/kubectl/cmd/util/helpers.go @@ -105,17 +105,22 @@ func fatal(msg string) { // This method is generic to the command in use and may be used by non-Kubectl // commands. func CheckErr(err error) { - checkErr(err, fatalErrHandler) + checkErr("", err, fatalErrHandler) } -func checkErr(err error, handleErr func(string)) { +// checkErrWithPrefix works like CheckErr, but adds a caller-defined prefix to non-nil errors +func checkErrWithPrefix(prefix string, err error) { + checkErr(prefix, err, fatalErrHandler) +} + +func checkErr(pref string, err error, handleErr func(string)) { if err == nil { return } if errors.IsInvalid(err) { details := err.(*errors.StatusError).Status().Details - prefix := fmt.Sprintf("The %s %q is invalid.\n", details.Kind, details.Name) + prefix := fmt.Sprintf("%sThe %s %q is invalid.\n", pref, details.Kind, details.Name) errs := statusCausesToAggrError(details.Causes) handleErr(MultilineError(prefix, errs)) } @@ -125,23 +130,23 @@ func checkErr(err error, handleErr func(string)) { switch { case len(noMatch.PartialResource.Group) > 0 && len(noMatch.PartialResource.Version) > 0: - handleErr(fmt.Sprintf("the server doesn't have a resource type %q in group %q and version %q", noMatch.PartialResource.Resource, noMatch.PartialResource.Group, noMatch.PartialResource.Version)) + handleErr(fmt.Sprintf("%sthe server doesn't have a resource type %q in group %q and version %q", pref, noMatch.PartialResource.Resource, noMatch.PartialResource.Group, noMatch.PartialResource.Version)) case len(noMatch.PartialResource.Group) > 0: - handleErr(fmt.Sprintf("the server doesn't have a resource type %q in group %q", noMatch.PartialResource.Resource, noMatch.PartialResource.Group)) + handleErr(fmt.Sprintf("%sthe server doesn't have a resource type %q in group %q", pref, noMatch.PartialResource.Resource, noMatch.PartialResource.Group)) case len(noMatch.PartialResource.Version) > 0: - handleErr(fmt.Sprintf("the server doesn't have a resource type %q in version %q", noMatch.PartialResource.Resource, noMatch.PartialResource.Version)) + handleErr(fmt.Sprintf("%sthe server doesn't have a resource type %q in version %q", pref, noMatch.PartialResource.Resource, noMatch.PartialResource.Version)) default: - handleErr(fmt.Sprintf("the server doesn't have a resource type %q", noMatch.PartialResource.Resource)) + handleErr(fmt.Sprintf("%sthe server doesn't have a resource type %q", pref, noMatch.PartialResource.Resource)) } return } // handle multiline errors if clientcmd.IsConfigurationInvalid(err) { - handleErr(MultilineError("Error in configuration: ", err)) + handleErr(MultilineError(fmt.Sprintf("%sError in configuration: ", pref), err)) } if agg, ok := err.(utilerrors.Aggregate); ok && len(agg.Errors()) > 0 { - handleErr(MultipleErrors("", agg.Errors())) + handleErr(MultipleErrors(pref, agg.Errors())) } msg, ok := StandardErrorMessage(err) @@ -151,7 +156,7 @@ func checkErr(err error, handleErr func(string)) { msg = fmt.Sprintf("error: %s", msg) } } - handleErr(msg) + handleErr(fmt.Sprintf("%s%s", pref, msg)) } func statusCausesToAggrError(scs []unversioned.StatusCause) utilerrors.Aggregate { diff --git a/pkg/kubectl/cmd/util/helpers_test.go b/pkg/kubectl/cmd/util/helpers_test.go index 2e2ec7353f..3b09a665c1 100644 --- a/pkg/kubectl/cmd/util/helpers_test.go +++ b/pkg/kubectl/cmd/util/helpers_test.go @@ -238,7 +238,7 @@ func TestCheckInvalidErr(t *testing.T) { } for _, test := range tests { - checkErr(test.err, errHandle) + checkErr("", test.err, errHandle) if errReturned != test.expected { t.Fatalf("Got: %s, expected: %s", errReturned, test.expected) @@ -275,7 +275,7 @@ func TestCheckNoResourceMatchError(t *testing.T) { } for _, test := range tests { - checkErr(test.err, errHandle) + checkErr("", test.err, errHandle) if errReturned != test.expected { t.Fatalf("Got: %s, expected: %s", errReturned, test.expected) From 99264f44568fd4307242358688c8f17df6658746 Mon Sep 17 00:00:00 2001 From: Boris Mattijssen <borismattijssen@gmail.com> Date: Thu, 2 Jun 2016 15:08:50 +0200 Subject: [PATCH 022/339] Update scheduler_extender.md The filter call should actually return a schedulerapi.ExtenderFilterResult with an api.NodeList in it, instead of a raw api.NodeList. --- docs/design/scheduler_extender.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/design/scheduler_extender.md b/docs/design/scheduler_extender.md index e8ad718f45..fa1edbb413 100644 --- a/docs/design/scheduler_extender.md +++ b/docs/design/scheduler_extender.md @@ -125,7 +125,7 @@ type ExtenderArgs struct { } ``` -The "filter" call returns a list of nodes (api.NodeList). The "prioritize" call +The "filter" call returns a list of nodes (schedulerapi.ExtenderFilterResult). The "prioritize" call returns priorities for each node (schedulerapi.HostPriorityList). The "filter" call may prune the set of nodes based on its predicates. Scores From b6130ca7b36b6e3dc8105dfe4bd6e7373f832d2c Mon Sep 17 00:00:00 2001 From: Justin Clayton <justinclayton@users.noreply.github.com> Date: Thu, 2 Jun 2016 10:03:53 -0600 Subject: [PATCH 023/339] remove DCOS section from README.md As far as I can tell, as of DCOS 1.7, the Kubernetes-Mesos framework is no longer available in the DCOS Universe. This PR reflects that change so as not to cause confusion. --- contrib/mesos/README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/contrib/mesos/README.md b/contrib/mesos/README.md index 85addfdac9..7da0baf55e 100644 --- a/contrib/mesos/README.md +++ b/contrib/mesos/README.md @@ -10,14 +10,6 @@ Kubernetes gains the following benefits when installed on Mesos: - **Resource Sharing** - Co-location of Kubernetes with other popular next-generation services on the same cluster (e.g. [Hadoop](https://github.com/mesos/hadoop), [Spark](http://spark.apache.org/), and [Chronos](https://mesos.github.io/chronos/), [Cassandra](http://mesosphere.github.io/cassandra-mesos/), etc.). Resources are allocated to the frameworks based on fairness and can be claimed or passed on depending on framework load. - **Independence from special Network Infrastructure** - Mesos can (but of course doesn't have to) run on networks which cannot assign a routable IP to every container. The Kubernetes on Mesos endpoint controller is specially modified to allow pods to communicate with services in such an environment. -## Features On DCOS - -Kubernetes can also be installed on [Mesosphere DCOS](https://mesosphere.com/learn/), which runs Mesos as its core. This provides the following *additional* enterprise features: - -- **High Availability** - Kubernetes components themselves run within Marathon, which manages restarting/recreating them if they fail, even on a different host if the original host might fail completely. -- **Easy Installation** - One-step installation via the [DCOS CLI](https://github.com/mesosphere/dcos-cli) or DCOS UI. Both download releases from the [Mesosphere Universe](https://github.com/mesosphere/universe), [Multiverse](https://github.com/mesosphere/multiverse), or private package repositories. -- **Easy Maintenance** - See what's going on in the cluster with the DCOS UI. - For more information about how Kubernetes-Mesos is different from Kubernetes, see [Architecture](./docs/architecture.md). From ad3705ab81c3ce3e3d01cd6bb319ecc8fb9a0f79 Mon Sep 17 00:00:00 2001 From: Quinton Hoole <quinton@google.com> Date: Thu, 2 Jun 2016 11:30:31 -0700 Subject: [PATCH 024/339] Add note to development guide regarding GNU tools versions, especially on Mac OS X. --- docs/devel/development.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/devel/development.md b/docs/devel/development.md index 9e00819138..d64b6cba00 100644 --- a/docs/devel/development.md +++ b/docs/devel/development.md @@ -50,6 +50,14 @@ Official releases are built using Docker containers. To build Kubernetes using Docker please follow [these instructions](http://releases.k8s.io/HEAD/build/README.md). +### Local OS/shell environment + +Many of the Kubernetes development helper scripts rely on a fairly up-to-date GNU tools +environment, so most recent Linux distros should work just fine +out-of-the-box. Note that Mac OS X ships with somewhat outdated +BSD-based tools, some of which may be incompatible in subtle ways, so we recommend +[replacing those with modern GNU tools](https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/). + ### Go development environment Kubernetes is written in the [Go](http://golang.org) programming language. From 19be49124b15b32a60940e67e84fa263154f1bec Mon Sep 17 00:00:00 2001 From: Matt Dupre <matthew.dupre@metaswitch.com> Date: Wed, 4 May 2016 10:54:57 -0700 Subject: [PATCH 025/339] Add new policy_provider option to Salt; supporting Calico installation --- cluster/aws/config-default.sh | 3 + cluster/aws/templates/configure-vm-aws.sh | 2 +- cluster/common.sh | 1 + cluster/gce/config-default.sh | 3 + cluster/gce/configure-vm.sh | 3 +- cluster/saltbase/salt/calico/10-calico.conf | 16 +++++ .../salt/calico/calico-policy-agent.manifest | 20 ++++++ cluster/saltbase/salt/calico/master.sls | 43 +++++++++++++ cluster/saltbase/salt/calico/node.sls | 62 +++++++++++++++++++ cluster/saltbase/salt/kubelet/default | 2 + cluster/saltbase/salt/top.sls | 9 +++ cluster/vagrant/config-default.sh | 4 ++ cluster/vagrant/provision-utils.sh | 1 + 13 files changed, 167 insertions(+), 2 deletions(-) create mode 100644 cluster/saltbase/salt/calico/10-calico.conf create mode 100644 cluster/saltbase/salt/calico/calico-policy-agent.manifest create mode 100644 cluster/saltbase/salt/calico/master.sls create mode 100644 cluster/saltbase/salt/calico/node.sls diff --git a/cluster/aws/config-default.sh b/cluster/aws/config-default.sh index 827be7cae7..49e237cd21 100644 --- a/cluster/aws/config-default.sh +++ b/cluster/aws/config-default.sh @@ -153,5 +153,8 @@ OPENCONTRAIL_TAG="${OPENCONTRAIL_TAG:-R2.20}" OPENCONTRAIL_KUBERNETES_TAG="${OPENCONTRAIL_KUBERNETES_TAG:-master}" OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}" +# Network Policy plugin specific settings +POLICY_PROVIDER="${POLICY_PROVIDER:-none}" # calico + # Optional: if set to true, kube-up will configure the cluster to run e2e tests. E2E_STORAGE_TEST_ENVIRONMENT=${KUBE_E2E_STORAGE_TEST_ENVIRONMENT:-false} diff --git a/cluster/aws/templates/configure-vm-aws.sh b/cluster/aws/templates/configure-vm-aws.sh index f24e551ccf..9cd09fd286 100755 --- a/cluster/aws/templates/configure-vm-aws.sh +++ b/cluster/aws/templates/configure-vm-aws.sh @@ -91,7 +91,7 @@ EOF if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then cat <<EOF >>/etc/salt/minion.d/grains.conf kubelet_api_servers: '${KUBELET_APISERVER}' - cbr-cidr: 10.123.45.0/30 + cbr-cidr: 10.123.45.0/29 EOF else # If the kubelet is running disconnected from a master, give it a fixed diff --git a/cluster/common.sh b/cluster/common.sh index 1ca2736afd..7a95ed144b 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -523,6 +523,7 @@ HAIRPIN_MODE: $(yaml-quote ${HAIRPIN_MODE:-}) OPENCONTRAIL_TAG: $(yaml-quote ${OPENCONTRAIL_TAG:-}) OPENCONTRAIL_KUBERNETES_TAG: $(yaml-quote ${OPENCONTRAIL_KUBERNETES_TAG:-}) OPENCONTRAIL_PUBLIC_SUBNET: $(yaml-quote ${OPENCONTRAIL_PUBLIC_SUBNET:-}) +POLICY_PROVIDER: $(yaml-quote ${POLICY_PROVIDER:-}) E2E_STORAGE_TEST_ENVIRONMENT: $(yaml-quote ${E2E_STORAGE_TEST_ENVIRONMENT:-}) KUBE_IMAGE_TAG: $(yaml-quote ${KUBE_IMAGE_TAG:-}) KUBE_DOCKER_REGISTRY: $(yaml-quote ${KUBE_DOCKER_REGISTRY:-}) diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 2abf41882f..24599a47a0 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -131,6 +131,9 @@ OPENCONTRAIL_TAG="${OPENCONTRAIL_TAG:-R2.20}" OPENCONTRAIL_KUBERNETES_TAG="${OPENCONTRAIL_KUBERNETES_TAG:-master}" OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}" +# Network Policy plugin specific settings. +POLICY_PROVIDER="${POLICY_PROVIDER:-none}" # calico + # How should the kubelet configure hairpin mode? HAIRPIN_MODE="${HAIRPIN_MODE:-promiscuous-bridge}" # promiscuous-bridge, hairpin-veth, none # Optional: if set to true, kube-up will configure the cluster to run e2e tests. diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index 93bb7a1698..9d7de63d54 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -445,6 +445,7 @@ hairpin_mode: '$(echo "$HAIRPIN_MODE" | sed -e "s/'/''/g")' opencontrail_tag: '$(echo "$OPENCONTRAIL_TAG" | sed -e "s/'/''/g")' opencontrail_kubernetes_tag: '$(echo "$OPENCONTRAIL_KUBERNETES_TAG")' opencontrail_public_subnet: '$(echo "$OPENCONTRAIL_PUBLIC_SUBNET")' +policy_provider: '$(echo "$POLICY_PROVIDER" | sed -e "s/'/''/g")' enable_manifest_url: '$(echo "${ENABLE_MANIFEST_URL:-}" | sed -e "s/'/''/g")' manifest_url: '$(echo "${MANIFEST_URL:-}" | sed -e "s/'/''/g")' manifest_url_header: '$(echo "${MANIFEST_URL_HEADER:-}" | sed -e "s/'/''/g")' @@ -859,7 +860,7 @@ EOF if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then cat <<EOF >>/etc/salt/minion.d/grains.conf kubelet_api_servers: '${KUBELET_APISERVER}' - cbr-cidr: 10.123.45.0/30 + cbr-cidr: 10.123.45.0/29 EOF else # If the kubelet is running disconnected from a master, give it a fixed diff --git a/cluster/saltbase/salt/calico/10-calico.conf b/cluster/saltbase/salt/calico/10-calico.conf new file mode 100644 index 0000000000..0c6d3284f3 --- /dev/null +++ b/cluster/saltbase/salt/calico/10-calico.conf @@ -0,0 +1,16 @@ +{ + "name": "calico-k8s-network", + "type": "calico", + "etcd_authority": "{{ grains.api_servers }}:6666", + "log_level": "info", + "ipam": { + "type": "host-local", + "subnet": "CBR0_CIDR" + }, + "policy": { + "type": "k8s", + "k8s_api_root": "https://{{ grains.api_servers }}:443/api/v1", + "k8s_client_certificate": "/path/to/client/cert", + "k8s_client_key": "/path/to/client/key" + } +} diff --git a/cluster/saltbase/salt/calico/calico-policy-agent.manifest b/cluster/saltbase/salt/calico/calico-policy-agent.manifest new file mode 100644 index 0000000000..19ed8cd00c --- /dev/null +++ b/cluster/saltbase/salt/calico/calico-policy-agent.manifest @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Pod +metadata: + name: calico-policy-agent + namespace: calico-system + labels: + version: latest + projectcalico.org/app: "policy-agent" +spec: + hostNetwork: true + containers: + - name: policycontroller + image: caseydavenport/calico-policy-controller:latest + env: + - name: ETCD_AUTHORITY + value: "127.0.0.1:6666" + - name: K8S_API + value: "http://127.0.0.1:8080" + - name: LOG_LEVEL + value: "info" diff --git a/cluster/saltbase/salt/calico/master.sls b/cluster/saltbase/salt/calico/master.sls new file mode 100644 index 0000000000..e4d093f0ee --- /dev/null +++ b/cluster/saltbase/salt/calico/master.sls @@ -0,0 +1,43 @@ +{% if pillar.get('policy_provider', '').lower() == 'calico' %} + +calicoctl: + file.managed: + - name: /usr/bin/calicoctl + - source: https://github.com/projectcalico/calico-docker/releases/download/v0.19.0/calicoctl + - source_hash: sha256=6db00c94619e82d878d348c4e1791f8d2f0db59075f6c8e430fefae297c54d96 + - makedirs: True + - mode: 744 + +calico-etcd: + cmd.run: + - unless: docker ps | grep calico-etcd + - name: > + docker run --name calico-etcd -d --restart=always -p 6666:6666 + -v /varetcd:/var/etcd + gcr.io/google_containers/etcd:2.2.1 + /usr/local/bin/etcd --name calico + --data-dir /var/etcd/calico-data + --advertise-client-urls http://{{ grains.id }}:6666 + --listen-client-urls http://0.0.0.0:6666 + --listen-peer-urls http://0.0.0.0:6667 + --initial-advertise-peer-urls http://{{ grains.id }}:6667 + --initial-cluster calico=http://{{ grains.id }}:6667 + +calico-policy-agent: + file.managed: + - name: /etc/kubernetes/manifests/calico-policy-agent.manifest + - source: salt://calico/calico-policy-agent.manifest + - template: jinja + - user: root + - group: root + - mode: 644 + - makedirs: true + - dir_mode: 755 + - context: + cpurequest: '20m' + - require: + - service: docker + - service: kubelet + - cmd: calico-etcd + +{% endif -%} diff --git a/cluster/saltbase/salt/calico/node.sls b/cluster/saltbase/salt/calico/node.sls new file mode 100644 index 0000000000..5995c47345 --- /dev/null +++ b/cluster/saltbase/salt/calico/node.sls @@ -0,0 +1,62 @@ +{% if pillar.get('policy_provider', '').lower() == 'calico' %} + +calicoctl: + file.managed: + - name: /usr/bin/calicoctl + - source: https://github.com/projectcalico/calico-docker/releases/download/v0.19.0/calicoctl + - source_hash: sha256=6db00c94619e82d878d348c4e1791f8d2f0db59075f6c8e430fefae297c54d96 + - makedirs: True + - mode: 744 + +calico-node: + cmd.run: + - name: calicoctl node + - unless: docker ps | grep calico-node + - env: + - ETCD_AUTHORITY: "{{ grains.api_servers }}:6666" + - CALICO_NETWORKING: "false" + - require: + - kmod: ip6_tables + - kmod: xt_set + - service: docker + - file: calicoctl + +calico-cni: + file.managed: + - name: /opt/cni/bin/calico + - source: https://github.com/projectcalico/calico-cni/releases/download/v1.3.0/calico + - source_hash: sha256=2f65616cfca7d7b8967a62f179508d30278bcc72cef9d122ce4a5f6689fc6577 + - makedirs: True + - mode: 744 + +calico-cni-config: + file.managed: + - name: /etc/cni/net.d/10-calico.conf + - source: salt://calico/10-calico.conf + - makedirs: True + - mode: 644 + - template: jinja + +calico-update-cbr0: + cmd.run: + - name: sed -i "s#CBR0_CIDR#$(ip addr list cbr0 | grep -o 'inet [^ ]*' | awk '{print $2}')#" /etc/cni/net.d/10-calico.conf + - require: + - file: calico-cni + - file: calico-cni-config + - cmd: calico-node + - service: kubelet + - service: docker + +calico-restart-kubelet: + cmd.run: + - name: service kubelet restart + - require: + - cmd: calico-update-cbr0 + +ip6_tables: + kmod.present + +xt_set: + kmod.present + +{% endif -%} diff --git a/cluster/saltbase/salt/kubelet/default b/cluster/saltbase/salt/kubelet/default index 255faeb59d..549531e7a4 100644 --- a/cluster/saltbase/salt/kubelet/default +++ b/cluster/saltbase/salt/kubelet/default @@ -151,6 +151,8 @@ {% set network_plugin = "--network-plugin=opencontrail" %} {% elif pillar.get('network_provider', '').lower() == 'cni' %} {% set network_plugin = "--network-plugin=cni --network-plugin-dir=/etc/cni/net.d/" %} +{%elif pillar.get('policy_provider', '').lower() == 'calico' and grains['roles'][0] != 'kubernetes-master' -%} + {% set network_plugin = "--network-plugin=cni --network-plugin-dir=/etc/cni/net.d/" %} {% elif pillar.get('network_provider', '').lower() == 'kubenet' %} {% set network_plugin = "--network-plugin=kubenet" -%} {% if reconcile_cidr_args == '' -%} diff --git a/cluster/saltbase/salt/top.sls b/cluster/saltbase/salt/top.sls index 000bbd9a9e..02b9eb9c3a 100644 --- a/cluster/saltbase/salt/top.sls +++ b/cluster/saltbase/salt/top.sls @@ -15,6 +15,9 @@ base: - docker {% if pillar.get('network_provider', '').lower() == 'flannel' %} - flannel +{% endif %} +{% if pillar.get('policy_provider', '').lower() == 'calico' %} + - cni {% elif pillar.get('network_provider', '').lower() == 'kubenet' %} - cni {% elif pillar.get('network_provider', '').lower() == 'cni' %} @@ -44,6 +47,9 @@ base: {% endif %} - logrotate - supervisor +{% if pillar.get('policy_provider', '').lower() == 'calico' %} + - calico.node +{% endif %} 'roles:kubernetes-master': - match: grain @@ -88,3 +94,6 @@ base: {% if pillar.get('enable_node_autoscaler', '').lower() == 'true' %} - cluster-autoscaler {% endif %} +{% if pillar.get('policy_provider', '').lower() == 'calico' %} + - calico.master +{% endif %} diff --git a/cluster/vagrant/config-default.sh b/cluster/vagrant/config-default.sh index 954b6ad17f..ad0be54207 100755 --- a/cluster/vagrant/config-default.sh +++ b/cluster/vagrant/config-default.sh @@ -109,6 +109,10 @@ fi OPENCONTRAIL_TAG="${OPENCONTRAIL_TAG:-R2.20}" OPENCONTRAIL_KUBERNETES_TAG="${OPENCONTRAIL_KUBERNETES_TAG:-master}" OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}" + +# Network Policy plugin specific settings +POLICY_PROVIDER="${POLICY_PROVIDER:-none}" # calico + # Optional: if set to true, kube-up will configure the cluster to run e2e tests. E2E_STORAGE_TEST_ENVIRONMENT=${KUBE_E2E_STORAGE_TEST_ENVIRONMENT:-false} diff --git a/cluster/vagrant/provision-utils.sh b/cluster/vagrant/provision-utils.sh index 846d9c505c..70dbbe599a 100755 --- a/cluster/vagrant/provision-utils.sh +++ b/cluster/vagrant/provision-utils.sh @@ -67,6 +67,7 @@ cluster_cidr: '$(echo "$CLUSTER_IP_RANGE" | sed -e "s/'/''/g")' opencontrail_tag: '$(echo "$OPENCONTRAIL_TAG" | sed -e "s/'/''/g")' opencontrail_kubernetes_tag: '$(echo "$OPENCONTRAIL_KUBERNETES_TAG" | sed -e "s/'/''/g")' opencontrail_public_subnet: '$(echo "$OPENCONTRAIL_PUBLIC_SUBNET" | sed -e "s/'/''/g")' +policy_provider: '$(echo "$POLICY_PROVIDER" | sed -e "s/'/''/g")' e2e_storage_test_environment: '$(echo "$E2E_STORAGE_TEST_ENVIRONMENT" | sed -e "s/'/''/g")' EOF From 35289c764954011e69d289a20ccb26fd3b0f1062 Mon Sep 17 00:00:00 2001 From: Casey Davenport <casey@tigera.io> Date: Sat, 21 May 2016 09:14:38 -0700 Subject: [PATCH 026/339] Update salt to use latest Calico --- cluster/aws/config-default.sh | 3 -- cluster/aws/templates/configure-vm-aws.sh | 2 +- cluster/common.sh | 17 +++++++-- cluster/gce/config-default.sh | 2 +- cluster/gce/config-test.sh | 3 ++ cluster/gce/configure-vm.sh | 5 +-- cluster/saltbase/salt/calico/10-calico.conf | 12 +++---- .../salt/calico/calico-policy-agent.manifest | 20 ----------- .../calico/calico-policy-controller.manifest | 36 +++++++++++++++++++ cluster/saltbase/salt/calico/master.sls | 32 +++-------------- cluster/saltbase/salt/calico/node.sls | 22 ++---------- cluster/saltbase/salt/kubelet/default | 2 +- cluster/saltbase/salt/top.sls | 6 ++-- cluster/vagrant/config-default.sh | 3 -- cluster/vagrant/provision-utils.sh | 1 - 15 files changed, 75 insertions(+), 91 deletions(-) delete mode 100644 cluster/saltbase/salt/calico/calico-policy-agent.manifest create mode 100644 cluster/saltbase/salt/calico/calico-policy-controller.manifest diff --git a/cluster/aws/config-default.sh b/cluster/aws/config-default.sh index 49e237cd21..827be7cae7 100644 --- a/cluster/aws/config-default.sh +++ b/cluster/aws/config-default.sh @@ -153,8 +153,5 @@ OPENCONTRAIL_TAG="${OPENCONTRAIL_TAG:-R2.20}" OPENCONTRAIL_KUBERNETES_TAG="${OPENCONTRAIL_KUBERNETES_TAG:-master}" OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}" -# Network Policy plugin specific settings -POLICY_PROVIDER="${POLICY_PROVIDER:-none}" # calico - # Optional: if set to true, kube-up will configure the cluster to run e2e tests. E2E_STORAGE_TEST_ENVIRONMENT=${KUBE_E2E_STORAGE_TEST_ENVIRONMENT:-false} diff --git a/cluster/aws/templates/configure-vm-aws.sh b/cluster/aws/templates/configure-vm-aws.sh index 9cd09fd286..f24e551ccf 100755 --- a/cluster/aws/templates/configure-vm-aws.sh +++ b/cluster/aws/templates/configure-vm-aws.sh @@ -91,7 +91,7 @@ EOF if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then cat <<EOF >>/etc/salt/minion.d/grains.conf kubelet_api_servers: '${KUBELET_APISERVER}' - cbr-cidr: 10.123.45.0/29 + cbr-cidr: 10.123.45.0/30 EOF else # If the kubelet is running disconnected from a master, give it a fixed diff --git a/cluster/common.sh b/cluster/common.sh index 7a95ed144b..ffedc8c64a 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -446,8 +446,19 @@ function yaml-quote { # Builds the RUNTIME_CONFIG var from other feature enable options (such as # features in alpha) function build-runtime-config() { - # There is nothing to do here for now. Just using this function as a placeholder. - : + # If a policy provider is specified, enable NetworkPolicy API. + if [[ -n "${NETWORK_POLICY_PROVIDER}" ]]; then + appends="extensions/v1beta1=true,extensions/v1beta1/networkpolicies=true" + fi + + # Generate the RUNTIME_CONFIG. + if [[ -n ${appends} ]]; then + if [[ -n ${RUNTIME_CONFIG} ]]; then + RUNTIME_CONFIG="${RUNTIME_CONFIG},${appends}" + else + RUNTIME_CONFIG="${appends}" + fi + fi } # Writes the cluster name into a temporary file. @@ -523,7 +534,7 @@ HAIRPIN_MODE: $(yaml-quote ${HAIRPIN_MODE:-}) OPENCONTRAIL_TAG: $(yaml-quote ${OPENCONTRAIL_TAG:-}) OPENCONTRAIL_KUBERNETES_TAG: $(yaml-quote ${OPENCONTRAIL_KUBERNETES_TAG:-}) OPENCONTRAIL_PUBLIC_SUBNET: $(yaml-quote ${OPENCONTRAIL_PUBLIC_SUBNET:-}) -POLICY_PROVIDER: $(yaml-quote ${POLICY_PROVIDER:-}) +NETWORK_POLICY_PROVIDER: $(yaml-quote ${NETWORK_POLICY_PROVIDER:-}) E2E_STORAGE_TEST_ENVIRONMENT: $(yaml-quote ${E2E_STORAGE_TEST_ENVIRONMENT:-}) KUBE_IMAGE_TAG: $(yaml-quote ${KUBE_IMAGE_TAG:-}) KUBE_DOCKER_REGISTRY: $(yaml-quote ${KUBE_DOCKER_REGISTRY:-}) diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 24599a47a0..5d34c662db 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -132,7 +132,7 @@ OPENCONTRAIL_KUBERNETES_TAG="${OPENCONTRAIL_KUBERNETES_TAG:-master}" OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}" # Network Policy plugin specific settings. -POLICY_PROVIDER="${POLICY_PROVIDER:-none}" # calico +NETWORK_POLICY_PROVIDER="${NETWORK_POLICY_PROVIDER:-none}" # calico # How should the kubelet configure hairpin mode? HAIRPIN_MODE="${HAIRPIN_MODE:-promiscuous-bridge}" # promiscuous-bridge, hairpin-veth, none diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 8153915ad6..9ca74a17e0 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -158,6 +158,9 @@ OPENCONTRAIL_TAG="${OPENCONTRAIL_TAG:-R2.20}" OPENCONTRAIL_KUBERNETES_TAG="${OPENCONTRAIL_KUBERNETES_TAG:-master}" OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}" +# Network Policy plugin specific settings. +NETWORK_POLICY_PROVIDER="${NETWORK_POLICY_PROVIDER:-none}" # calico + # How should the kubelet configure hairpin mode? HAIRPIN_MODE="${HAIRPIN_MODE:-promiscuous-bridge}" # promiscuous-bridge, hairpin-veth, none diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index 9d7de63d54..b84d8bae4e 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -445,7 +445,7 @@ hairpin_mode: '$(echo "$HAIRPIN_MODE" | sed -e "s/'/''/g")' opencontrail_tag: '$(echo "$OPENCONTRAIL_TAG" | sed -e "s/'/''/g")' opencontrail_kubernetes_tag: '$(echo "$OPENCONTRAIL_KUBERNETES_TAG")' opencontrail_public_subnet: '$(echo "$OPENCONTRAIL_PUBLIC_SUBNET")' -policy_provider: '$(echo "$POLICY_PROVIDER" | sed -e "s/'/''/g")' +network_policy_provider: '$(echo "$NETWORK_POLICY_PROVIDER" | sed -e "s/'/''/g")' enable_manifest_url: '$(echo "${ENABLE_MANIFEST_URL:-}" | sed -e "s/'/''/g")' manifest_url: '$(echo "${MANIFEST_URL:-}" | sed -e "s/'/''/g")' manifest_url_header: '$(echo "${MANIFEST_URL_HEADER:-}" | sed -e "s/'/''/g")' @@ -645,6 +645,7 @@ users: clusters: - name: local cluster: + server: https://kubernetes-master certificate-authority-data: ${KUBELET_CA_CERT} contexts: - context: @@ -860,7 +861,7 @@ EOF if [[ ! -z "${KUBELET_APISERVER:-}" ]] && [[ ! -z "${KUBELET_CERT:-}" ]] && [[ ! -z "${KUBELET_KEY:-}" ]]; then cat <<EOF >>/etc/salt/minion.d/grains.conf kubelet_api_servers: '${KUBELET_APISERVER}' - cbr-cidr: 10.123.45.0/29 + cbr-cidr: 10.123.45.0/30 EOF else # If the kubelet is running disconnected from a master, give it a fixed diff --git a/cluster/saltbase/salt/calico/10-calico.conf b/cluster/saltbase/salt/calico/10-calico.conf index 0c6d3284f3..ae273c1d0e 100644 --- a/cluster/saltbase/salt/calico/10-calico.conf +++ b/cluster/saltbase/salt/calico/10-calico.conf @@ -1,16 +1,16 @@ { - "name": "calico-k8s-network", + "name": "k8s-pod-network", "type": "calico", "etcd_authority": "{{ grains.api_servers }}:6666", "log_level": "info", "ipam": { "type": "host-local", - "subnet": "CBR0_CIDR" + "subnet": "usePodCidr" }, "policy": { - "type": "k8s", - "k8s_api_root": "https://{{ grains.api_servers }}:443/api/v1", - "k8s_client_certificate": "/path/to/client/cert", - "k8s_client_key": "/path/to/client/key" + "type": "k8s" + }, + "kubernetes": { + "kubeconfig": "/var/lib/kubelet/kubeconfig" } } diff --git a/cluster/saltbase/salt/calico/calico-policy-agent.manifest b/cluster/saltbase/salt/calico/calico-policy-agent.manifest deleted file mode 100644 index 19ed8cd00c..0000000000 --- a/cluster/saltbase/salt/calico/calico-policy-agent.manifest +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: calico-policy-agent - namespace: calico-system - labels: - version: latest - projectcalico.org/app: "policy-agent" -spec: - hostNetwork: true - containers: - - name: policycontroller - image: caseydavenport/calico-policy-controller:latest - env: - - name: ETCD_AUTHORITY - value: "127.0.0.1:6666" - - name: K8S_API - value: "http://127.0.0.1:8080" - - name: LOG_LEVEL - value: "info" diff --git a/cluster/saltbase/salt/calico/calico-policy-controller.manifest b/cluster/saltbase/salt/calico/calico-policy-controller.manifest new file mode 100644 index 0000000000..13413d0a6d --- /dev/null +++ b/cluster/saltbase/salt/calico/calico-policy-controller.manifest @@ -0,0 +1,36 @@ +apiVersion: v1 +kind: Pod +metadata: + name: calico-policy-controller + namespace: kube-system + labels: + kubernetes.io/cluster-service: "true" + k8s-app: calico-policy +spec: + hostNetwork: true + containers: + - name: policy-controller + image: calico/kube-policy-controller:v0.2.0 + env: + - name: ETCD_AUTHORITY + value: "127.0.0.1:6666" + - name: K8S_API + value: "http://127.0.0.1:8080" + - name: calico-etcd + image: gcr.io/google_containers/etcd:2.2.1 + command: + - /usr/local/bin/etcd + - --name=calico + - --data-dir=/var/etcd/calico-data + - --advertise-client-urls=http://{{ grains.id }}:6666 + - --listen-client-urls=http://0.0.0.0:6666 + - --listen-peer-urls=http://0.0.0.0:6667 + - --initial-advertise-peer-urls=http://{{ grains.id }}:6667 + - --initial-cluster=calico=http://{{ grains.id }}:6667 + volumeMounts: + - name: varetcd + mountPath: /var/etcd + volumes: + - name: varetcd + hostPath: + path: /var/calico/etcd diff --git a/cluster/saltbase/salt/calico/master.sls b/cluster/saltbase/salt/calico/master.sls index e4d093f0ee..79ac253828 100644 --- a/cluster/saltbase/salt/calico/master.sls +++ b/cluster/saltbase/salt/calico/master.sls @@ -1,32 +1,9 @@ -{% if pillar.get('policy_provider', '').lower() == 'calico' %} +{% if pillar.get('network_policy_provider', '').lower() == 'calico' %} -calicoctl: +calico-policy-controller: file.managed: - - name: /usr/bin/calicoctl - - source: https://github.com/projectcalico/calico-docker/releases/download/v0.19.0/calicoctl - - source_hash: sha256=6db00c94619e82d878d348c4e1791f8d2f0db59075f6c8e430fefae297c54d96 - - makedirs: True - - mode: 744 - -calico-etcd: - cmd.run: - - unless: docker ps | grep calico-etcd - - name: > - docker run --name calico-etcd -d --restart=always -p 6666:6666 - -v /varetcd:/var/etcd - gcr.io/google_containers/etcd:2.2.1 - /usr/local/bin/etcd --name calico - --data-dir /var/etcd/calico-data - --advertise-client-urls http://{{ grains.id }}:6666 - --listen-client-urls http://0.0.0.0:6666 - --listen-peer-urls http://0.0.0.0:6667 - --initial-advertise-peer-urls http://{{ grains.id }}:6667 - --initial-cluster calico=http://{{ grains.id }}:6667 - -calico-policy-agent: - file.managed: - - name: /etc/kubernetes/manifests/calico-policy-agent.manifest - - source: salt://calico/calico-policy-agent.manifest + - name: /etc/kubernetes/manifests/calico-policy-controller.manifest + - source: salt://calico/calico-policy-controller.manifest - template: jinja - user: root - group: root @@ -38,6 +15,5 @@ calico-policy-agent: - require: - service: docker - service: kubelet - - cmd: calico-etcd {% endif -%} diff --git a/cluster/saltbase/salt/calico/node.sls b/cluster/saltbase/salt/calico/node.sls index 5995c47345..b586f487b2 100644 --- a/cluster/saltbase/salt/calico/node.sls +++ b/cluster/saltbase/salt/calico/node.sls @@ -1,4 +1,4 @@ -{% if pillar.get('policy_provider', '').lower() == 'calico' %} +{% if pillar.get('network_policy_provider', '').lower() == 'calico' %} calicoctl: file.managed: @@ -24,8 +24,8 @@ calico-node: calico-cni: file.managed: - name: /opt/cni/bin/calico - - source: https://github.com/projectcalico/calico-cni/releases/download/v1.3.0/calico - - source_hash: sha256=2f65616cfca7d7b8967a62f179508d30278bcc72cef9d122ce4a5f6689fc6577 + - source: https://github.com/projectcalico/calico-cni/releases/download/v1.3.1/calico + - source_hash: sha256=ac05cb9254b5aaa5822cf10325983431bd25489147f2edf9dec7e43d99c43e77 - makedirs: True - mode: 744 @@ -37,22 +37,6 @@ calico-cni-config: - mode: 644 - template: jinja -calico-update-cbr0: - cmd.run: - - name: sed -i "s#CBR0_CIDR#$(ip addr list cbr0 | grep -o 'inet [^ ]*' | awk '{print $2}')#" /etc/cni/net.d/10-calico.conf - - require: - - file: calico-cni - - file: calico-cni-config - - cmd: calico-node - - service: kubelet - - service: docker - -calico-restart-kubelet: - cmd.run: - - name: service kubelet restart - - require: - - cmd: calico-update-cbr0 - ip6_tables: kmod.present diff --git a/cluster/saltbase/salt/kubelet/default b/cluster/saltbase/salt/kubelet/default index 549531e7a4..50afefa3d8 100644 --- a/cluster/saltbase/salt/kubelet/default +++ b/cluster/saltbase/salt/kubelet/default @@ -151,7 +151,7 @@ {% set network_plugin = "--network-plugin=opencontrail" %} {% elif pillar.get('network_provider', '').lower() == 'cni' %} {% set network_plugin = "--network-plugin=cni --network-plugin-dir=/etc/cni/net.d/" %} -{%elif pillar.get('policy_provider', '').lower() == 'calico' and grains['roles'][0] != 'kubernetes-master' -%} +{%elif pillar.get('network_policy_provider', '').lower() == 'calico' and grains['roles'][0] != 'kubernetes-master' -%} {% set network_plugin = "--network-plugin=cni --network-plugin-dir=/etc/cni/net.d/" %} {% elif pillar.get('network_provider', '').lower() == 'kubenet' %} {% set network_plugin = "--network-plugin=kubenet" -%} diff --git a/cluster/saltbase/salt/top.sls b/cluster/saltbase/salt/top.sls index 02b9eb9c3a..83e03fbc9d 100644 --- a/cluster/saltbase/salt/top.sls +++ b/cluster/saltbase/salt/top.sls @@ -16,7 +16,7 @@ base: {% if pillar.get('network_provider', '').lower() == 'flannel' %} - flannel {% endif %} -{% if pillar.get('policy_provider', '').lower() == 'calico' %} +{% if pillar.get('network_policy_provider', '').lower() == 'calico' %} - cni {% elif pillar.get('network_provider', '').lower() == 'kubenet' %} - cni @@ -47,7 +47,7 @@ base: {% endif %} - logrotate - supervisor -{% if pillar.get('policy_provider', '').lower() == 'calico' %} +{% if pillar.get('network_policy_provider', '').lower() == 'calico' %} - calico.node {% endif %} @@ -94,6 +94,6 @@ base: {% if pillar.get('enable_node_autoscaler', '').lower() == 'true' %} - cluster-autoscaler {% endif %} -{% if pillar.get('policy_provider', '').lower() == 'calico' %} +{% if pillar.get('network_policy_provider', '').lower() == 'calico' %} - calico.master {% endif %} diff --git a/cluster/vagrant/config-default.sh b/cluster/vagrant/config-default.sh index ad0be54207..3dc2ea1e42 100755 --- a/cluster/vagrant/config-default.sh +++ b/cluster/vagrant/config-default.sh @@ -110,9 +110,6 @@ OPENCONTRAIL_TAG="${OPENCONTRAIL_TAG:-R2.20}" OPENCONTRAIL_KUBERNETES_TAG="${OPENCONTRAIL_KUBERNETES_TAG:-master}" OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}" -# Network Policy plugin specific settings -POLICY_PROVIDER="${POLICY_PROVIDER:-none}" # calico - # Optional: if set to true, kube-up will configure the cluster to run e2e tests. E2E_STORAGE_TEST_ENVIRONMENT=${KUBE_E2E_STORAGE_TEST_ENVIRONMENT:-false} diff --git a/cluster/vagrant/provision-utils.sh b/cluster/vagrant/provision-utils.sh index 70dbbe599a..846d9c505c 100755 --- a/cluster/vagrant/provision-utils.sh +++ b/cluster/vagrant/provision-utils.sh @@ -67,7 +67,6 @@ cluster_cidr: '$(echo "$CLUSTER_IP_RANGE" | sed -e "s/'/''/g")' opencontrail_tag: '$(echo "$OPENCONTRAIL_TAG" | sed -e "s/'/''/g")' opencontrail_kubernetes_tag: '$(echo "$OPENCONTRAIL_KUBERNETES_TAG" | sed -e "s/'/''/g")' opencontrail_public_subnet: '$(echo "$OPENCONTRAIL_PUBLIC_SUBNET" | sed -e "s/'/''/g")' -policy_provider: '$(echo "$POLICY_PROVIDER" | sed -e "s/'/''/g")' e2e_storage_test_environment: '$(echo "$E2E_STORAGE_TEST_ENVIRONMENT" | sed -e "s/'/''/g")' EOF From e2aab093aa0df38e49ebab85414b7c569fdf23e1 Mon Sep 17 00:00:00 2001 From: Xiang Li <xiangli.cs@gmail.com> Date: Sat, 4 Jun 2016 22:46:54 -0700 Subject: [PATCH 027/339] cacher.go: remove NewCacher func NewCacher is a wrapper of NewCacherFromConfig. NewCacher understands how to create a key func from scopeStrategy. However, it is not the responsibility of cacher. So we should remove this function, and construct the config in its caller, which should understand scopeStrategy. --- .../generic/registry/storage_factory.go | 23 +++++++++++-- pkg/storage/cacher.go | 32 ------------------- 2 files changed, 20 insertions(+), 35 deletions(-) diff --git a/pkg/registry/generic/registry/storage_factory.go b/pkg/registry/generic/registry/storage_factory.go index f1c265113b..4a9c845ccc 100644 --- a/pkg/registry/generic/registry/storage_factory.go +++ b/pkg/registry/generic/registry/storage_factory.go @@ -31,7 +31,24 @@ func StorageWithCacher( resourcePrefix string, scopeStrategy rest.NamespaceScopedStrategy, newListFunc func() runtime.Object) storage.Interface { - return storage.NewCacher( - storageInterface, capacity, etcdstorage.APIObjectVersioner{}, - objectType, resourcePrefix, scopeStrategy, newListFunc) + + config := storage.CacherConfig{ + CacheCapacity: capacity, + Storage: storageInterface, + Versioner: etcdstorage.APIObjectVersioner{}, + Type: objectType, + ResourcePrefix: resourcePrefix, + NewListFunc: newListFunc, + } + if scopeStrategy.NamespaceScoped() { + config.KeyFunc = func(obj runtime.Object) (string, error) { + return storage.NamespaceKeyFunc(resourcePrefix, obj) + } + } else { + config.KeyFunc = func(obj runtime.Object) (string, error) { + return storage.NoNamespaceKeyFunc(resourcePrefix, obj) + } + } + + return storage.NewCacherFromConfig(config) } diff --git a/pkg/storage/cacher.go b/pkg/storage/cacher.go index e7b4d63e2f..0444a2d09b 100644 --- a/pkg/storage/cacher.go +++ b/pkg/storage/cacher.go @@ -28,7 +28,6 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/meta" - "k8s.io/kubernetes/pkg/api/rest" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/conversion" @@ -111,37 +110,6 @@ type Cacher struct { stopWg sync.WaitGroup } -// Create a new Cacher responsible from service WATCH and LIST requests from its -// internal cache and updating its cache in the background based on the given -// configuration. -func NewCacher( - storage Interface, - capacity int, - versioner Versioner, - objectType runtime.Object, - resourcePrefix string, - scopeStrategy rest.NamespaceScopedStrategy, - newListFunc func() runtime.Object) Interface { - config := CacherConfig{ - CacheCapacity: capacity, - Storage: storage, - Versioner: versioner, - Type: objectType, - ResourcePrefix: resourcePrefix, - NewListFunc: newListFunc, - } - if scopeStrategy.NamespaceScoped() { - config.KeyFunc = func(obj runtime.Object) (string, error) { - return NamespaceKeyFunc(resourcePrefix, obj) - } - } else { - config.KeyFunc = func(obj runtime.Object) (string, error) { - return NoNamespaceKeyFunc(resourcePrefix, obj) - } - } - return NewCacherFromConfig(config) -} - // Create a new Cacher responsible from service WATCH and LIST requests from its // internal cache and updating its cache in the background based on the given // configuration. From c530a5810a53f38adcfcaf97916098eccf728a48 Mon Sep 17 00:00:00 2001 From: Xiang Li <xiangli.cs@gmail.com> Date: Sat, 4 Jun 2016 22:49:45 -0700 Subject: [PATCH 028/339] cacher: remove unnecessary initialzation --- pkg/storage/cacher.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/storage/cacher.go b/pkg/storage/cacher.go index e7b4d63e2f..e8b92f1f1a 100644 --- a/pkg/storage/cacher.go +++ b/pkg/storage/cacher.go @@ -158,22 +158,18 @@ func NewCacherFromConfig(config CacherConfig) *Cacher { } cacher := &Cacher{ - usable: sync.RWMutex{}, storage: config.Storage, watchCache: watchCache, reflector: cache.NewReflector(listerWatcher, config.Type, watchCache, 0), - watcherIdx: 0, watchers: make(map[int]*cacheWatcher), versioner: config.Versioner, keyFunc: config.KeyFunc, - stopped: false, // We need to (potentially) stop both: // - wait.Until go-routine // - reflector.ListAndWatch // and there are no guarantees on the order that they will stop. // So we will be simply closing the channel, and synchronizing on the WaitGroup. stopCh: make(chan struct{}), - stopWg: sync.WaitGroup{}, } // See startCaching method for explanation and where this is unlocked. cacher.usable.Lock() From 9a1779110caa85101718787f221950b71a3532af Mon Sep 17 00:00:00 2001 From: Xiang Li <xiangli.cs@gmail.com> Date: Sun, 5 Jun 2016 23:29:57 -0700 Subject: [PATCH 029/339] daemon/controller.go: refactor worker --- pkg/controller/daemon/controller.go | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/pkg/controller/daemon/controller.go b/pkg/controller/daemon/controller.go index ca7935b6e8..2726beb2d9 100644 --- a/pkg/controller/daemon/controller.go +++ b/pkg/controller/daemon/controller.go @@ -23,6 +23,7 @@ import ( "time" "fmt" + "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" @@ -239,7 +240,7 @@ func (dsc *DaemonSetsController) Run(workers int, stopCh <-chan struct{}) { go dsc.podController.Run(stopCh) go dsc.nodeController.Run(stopCh) for i := 0; i < workers; i++ { - go wait.Until(dsc.worker, time.Second, stopCh) + go wait.Until(dsc.runWorker, time.Second, stopCh) } if dsc.internalPodInformer != nil { @@ -251,19 +252,17 @@ func (dsc *DaemonSetsController) Run(workers int, stopCh <-chan struct{}) { dsc.queue.ShutDown() } -func (dsc *DaemonSetsController) worker() { +func (dsc *DaemonSetsController) runWorker() { for { - func() { - dsKey, quit := dsc.queue.Get() - if quit { - return - } - defer dsc.queue.Done(dsKey) - err := dsc.syncHandler(dsKey.(string)) - if err != nil { - glog.Errorf("Error syncing daemon set with key %s: %v", dsKey.(string), err) - } - }() + dsKey, quit := dsc.queue.Get() + if quit { + continue + } + err := dsc.syncHandler(dsKey.(string)) + if err != nil { + glog.Errorf("Error syncing daemon set with key %s: %v", dsKey.(string), err) + } + dsc.queue.Done(dsKey) } } From 886014b1a35c1bdf0fca26fe4da0ba84dc3d5c39 Mon Sep 17 00:00:00 2001 From: Michail Kargakis <mkargaki@redhat.com> Date: Fri, 3 Jun 2016 12:12:26 +0200 Subject: [PATCH 030/339] kubectl: fix sort logic for logs Use a separate sorting algorithm for kubectl logs that sorts from older to newer instead of the other way that ActivePods is doing. --- pkg/controller/controller_utils.go | 37 ++++++++++++++++++++++++++++ pkg/kubectl/cmd/util/factory.go | 6 ++--- pkg/kubectl/cmd/util/factory_test.go | 8 +++--- 3 files changed, 44 insertions(+), 7 deletions(-) diff --git a/pkg/controller/controller_utils.go b/pkg/controller/controller_utils.go index a7aba40bec..3710082ef8 100644 --- a/pkg/controller/controller_utils.go +++ b/pkg/controller/controller_utils.go @@ -525,6 +525,43 @@ func (f *FakePodControl) Clear() { f.Templates = []api.PodTemplateSpec{} } +// ByLogging allows custom sorting of pods so the best one can be picked for getting its logs. +type ByLogging []*api.Pod + +func (s ByLogging) Len() int { return len(s) } +func (s ByLogging) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +func (s ByLogging) Less(i, j int) bool { + // 1. assigned < unassigned + if s[i].Spec.NodeName != s[j].Spec.NodeName && (len(s[i].Spec.NodeName) == 0 || len(s[j].Spec.NodeName) == 0) { + return len(s[i].Spec.NodeName) > 0 + } + // 2. PodRunning < PodUnknown < PodPending + m := map[api.PodPhase]int{api.PodRunning: 0, api.PodUnknown: 1, api.PodPending: 2} + if m[s[i].Status.Phase] != m[s[j].Status.Phase] { + return m[s[i].Status.Phase] < m[s[j].Status.Phase] + } + // 3. ready < not ready + if api.IsPodReady(s[i]) != api.IsPodReady(s[j]) { + return api.IsPodReady(s[i]) + } + // TODO: take availability into account when we push minReadySeconds information from deployment into pods, + // see https://github.com/kubernetes/kubernetes/issues/22065 + // 4. Been ready for more time < less time < empty time + if api.IsPodReady(s[i]) && api.IsPodReady(s[j]) && !podReadyTime(s[i]).Equal(podReadyTime(s[j])) { + return afterOrZero(podReadyTime(s[j]), podReadyTime(s[i])) + } + // 5. Pods with containers with higher restart counts < lower restart counts + if maxContainerRestarts(s[i]) != maxContainerRestarts(s[j]) { + return maxContainerRestarts(s[i]) > maxContainerRestarts(s[j]) + } + // 6. older pods < newer pods < empty timestamp pods + if !s[i].CreationTimestamp.Equal(s[j].CreationTimestamp) { + return afterOrZero(s[j].CreationTimestamp, s[i].CreationTimestamp) + } + return false +} + // ActivePods type allows custom sorting of pods so a controller can pick the best ones to delete. type ActivePods []*api.Pod diff --git a/pkg/kubectl/cmd/util/factory.go b/pkg/kubectl/cmd/util/factory.go index d4c3cc5404..144f8c015d 100644 --- a/pkg/kubectl/cmd/util/factory.go +++ b/pkg/kubectl/cmd/util/factory.go @@ -516,7 +516,7 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory { return nil, errors.New("provided options object is not a PodLogOptions") } selector := labels.SelectorFromSet(t.Spec.Selector) - sortBy := func(pods []*api.Pod) sort.Interface { return controller.ActivePods(pods) } + sortBy := func(pods []*api.Pod) sort.Interface { return controller.ByLogging(pods) } pod, numPods, err := GetFirstPod(c, t.Namespace, selector, 20*time.Second, sortBy) if err != nil { return nil, err @@ -536,7 +536,7 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory { if err != nil { return nil, fmt.Errorf("invalid label selector: %v", err) } - sortBy := func(pods []*api.Pod) sort.Interface { return controller.ActivePods(pods) } + sortBy := func(pods []*api.Pod) sort.Interface { return controller.ByLogging(pods) } pod, numPods, err := GetFirstPod(c, t.Namespace, selector, 20*time.Second, sortBy) if err != nil { return nil, err @@ -796,7 +796,7 @@ See http://releases.k8s.io/HEAD/docs/user-guide/services-firewalls.md for more d // GetFirstPod returns a pod matching the namespace and label selector // and the number of all pods that match the label selector. -func GetFirstPod(client client.Interface, namespace string, selector labels.Selector, timeout time.Duration, sortBy func([]*api.Pod) sort.Interface) (*api.Pod, int, error) { +func GetFirstPod(client client.PodsNamespacer, namespace string, selector labels.Selector, timeout time.Duration, sortBy func([]*api.Pod) sort.Interface) (*api.Pod, int, error) { options := api.ListOptions{LabelSelector: selector} podList, err := client.Pods(namespace).List(options) diff --git a/pkg/kubectl/cmd/util/factory_test.go b/pkg/kubectl/cmd/util/factory_test.go index 4af5fcb888..6d8120cc2f 100644 --- a/pkg/kubectl/cmd/util/factory_test.go +++ b/pkg/kubectl/cmd/util/factory_test.go @@ -476,12 +476,12 @@ func TestGetFirstPod(t *testing.T) { { name: "kubectl logs - two ready pods", podList: newPodList(2, -1, -1, labelSet), - sortBy: func(pods []*api.Pod) sort.Interface { return controller.ActivePods(pods) }, + sortBy: func(pods []*api.Pod) sort.Interface { return controller.ByLogging(pods) }, expected: &api.Pod{ ObjectMeta: api.ObjectMeta{ - Name: "pod-2", + Name: "pod-1", Namespace: api.NamespaceDefault, - CreationTimestamp: unversioned.Date(2016, time.April, 1, 1, 0, 1, 0, time.UTC), + CreationTimestamp: unversioned.Date(2016, time.April, 1, 1, 0, 0, 0, time.UTC), Labels: map[string]string{"test": "selector"}, }, Status: api.PodStatus{ @@ -498,7 +498,7 @@ func TestGetFirstPod(t *testing.T) { { name: "kubectl logs - one unhealthy, one healthy", podList: newPodList(2, -1, 1, labelSet), - sortBy: func(pods []*api.Pod) sort.Interface { return controller.ActivePods(pods) }, + sortBy: func(pods []*api.Pod) sort.Interface { return controller.ByLogging(pods) }, expected: &api.Pod{ ObjectMeta: api.ObjectMeta{ Name: "pod-2", From 165f4de167574782d3df92340f38919455bff875 Mon Sep 17 00:00:00 2001 From: Angus Salkeld <asalkeld@mirantis.com> Date: Wed, 8 Jun 2016 14:22:16 +1000 Subject: [PATCH 031/339] Fix type-o in definitions.html --- hack/gen-swagger-doc/example-output/definitions.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/gen-swagger-doc/example-output/definitions.html b/hack/gen-swagger-doc/example-output/definitions.html index d6f1061854..086d78b933 100644 --- a/hack/gen-swagger-doc/example-output/definitions.html +++ b/hack/gen-swagger-doc/example-output/definitions.html @@ -3849,7 +3849,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; } <tbody> <tr> <td class="tableblock halign-left valign-top"><p class="tableblock">port</p></td> -<td class="tableblock halign-left valign-top"><p class="tableblock">number of name of the port to access on the container; number must be in the range 1 to 65535; name must be an IANA_SVC_NAME</p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">number or name of the port to access on the container; number must be in the range 1 to 65535; name must be an IANA_SVC_NAME</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td> <td class="tableblock halign-left valign-top"></td> From 91de14cf13b209f8f8d5edebc0be9c7e66fab67e Mon Sep 17 00:00:00 2001 From: Chao Xu <xuchao@google.com> Date: Mon, 6 Jun 2016 15:43:57 -0700 Subject: [PATCH 032/339] rename the gc for terminated pods to "podgc" --- cmd/kube-controller-manager/app/controllermanager.go | 4 ++-- .../mesos/pkg/controllermanager/controllermanager.go | 4 ++-- pkg/controller/{gc => podgc}/doc.go | 11 ++++++----- pkg/controller/{gc => podgc}/gc_controller.go | 12 ++++++------ pkg/controller/{gc => podgc}/gc_controller_test.go | 2 +- test/e2e/{garbage_collector.go => pod_gc.go} | 0 6 files changed, 17 insertions(+), 16 deletions(-) rename pkg/controller/{gc => podgc}/doc.go (71%) rename pkg/controller/{gc => podgc}/gc_controller.go (95%) rename pkg/controller/{gc => podgc}/gc_controller_test.go (99%) rename test/e2e/{garbage_collector.go => pod_gc.go} (100%) diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index b94beb0c47..6bfc0c0d24 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -52,7 +52,6 @@ import ( "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/controller/framework/informers" "k8s.io/kubernetes/pkg/controller/garbagecollector" - "k8s.io/kubernetes/pkg/controller/gc" "k8s.io/kubernetes/pkg/controller/job" namespacecontroller "k8s.io/kubernetes/pkg/controller/namespace" nodecontroller "k8s.io/kubernetes/pkg/controller/node" @@ -60,6 +59,7 @@ import ( petset "k8s.io/kubernetes/pkg/controller/petset" "k8s.io/kubernetes/pkg/controller/podautoscaler" "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" + "k8s.io/kubernetes/pkg/controller/podgc" replicaset "k8s.io/kubernetes/pkg/controller/replicaset" replicationcontroller "k8s.io/kubernetes/pkg/controller/replication" resourcequotacontroller "k8s.io/kubernetes/pkg/controller/resourcequota" @@ -220,7 +220,7 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig time.Sleep(wait.Jitter(s.ControllerStartInterval.Duration, ControllerStartJitter)) if s.TerminatedPodGCThreshold > 0 { - go gc.New(clientset.NewForConfigOrDie(restclient.AddUserAgent(kubeconfig, "garbage-collector")), ResyncPeriod(s), int(s.TerminatedPodGCThreshold)). + go podgc.New(clientset.NewForConfigOrDie(restclient.AddUserAgent(kubeconfig, "pod-garbage-collector")), ResyncPeriod(s), int(s.TerminatedPodGCThreshold)). Run(wait.NeverStop) time.Sleep(wait.Jitter(s.ControllerStartInterval.Duration, ControllerStartJitter)) } diff --git a/contrib/mesos/pkg/controllermanager/controllermanager.go b/contrib/mesos/pkg/controllermanager/controllermanager.go index 7c7f602a84..930153b8e6 100644 --- a/contrib/mesos/pkg/controllermanager/controllermanager.go +++ b/contrib/mesos/pkg/controllermanager/controllermanager.go @@ -42,13 +42,13 @@ import ( "k8s.io/kubernetes/pkg/controller/daemon" "k8s.io/kubernetes/pkg/controller/deployment" endpointcontroller "k8s.io/kubernetes/pkg/controller/endpoint" - "k8s.io/kubernetes/pkg/controller/gc" "k8s.io/kubernetes/pkg/controller/job" namespacecontroller "k8s.io/kubernetes/pkg/controller/namespace" nodecontroller "k8s.io/kubernetes/pkg/controller/node" persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/persistentvolume" "k8s.io/kubernetes/pkg/controller/podautoscaler" "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" + "k8s.io/kubernetes/pkg/controller/podgc" replicaset "k8s.io/kubernetes/pkg/controller/replicaset" replicationcontroller "k8s.io/kubernetes/pkg/controller/replication" resourcequotacontroller "k8s.io/kubernetes/pkg/controller/resourcequota" @@ -140,7 +140,7 @@ func (s *CMServer) Run(_ []string) error { Run(int(s.ConcurrentRCSyncs), wait.NeverStop) if s.TerminatedPodGCThreshold > 0 { - go gc.New(clientset.NewForConfigOrDie(restclient.AddUserAgent(kubeconfig, "garbage-collector")), s.resyncPeriod, int(s.TerminatedPodGCThreshold)). + go podgc.New(clientset.NewForConfigOrDie(restclient.AddUserAgent(kubeconfig, "pod-garbage-collector")), s.resyncPeriod, int(s.TerminatedPodGCThreshold)). Run(wait.NeverStop) } diff --git a/pkg/controller/gc/doc.go b/pkg/controller/podgc/doc.go similarity index 71% rename from pkg/controller/gc/doc.go rename to pkg/controller/podgc/doc.go index db08e7a36d..735e2c727a 100644 --- a/pkg/controller/gc/doc.go +++ b/pkg/controller/podgc/doc.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package gc contains a very simple pod "garbage collector" implementation, -// GCController, that runs in the controller manager. If the number of pods +// Package podgc contains a very simple pod "garbage collector" implementation, +// PodGCController, that runs in the controller manager. If the number of pods // in terminated phases (right now either Failed or Succeeded) surpasses a // configurable threshold, the controller will delete pods in terminated state -// until the system reaches the allowed threshold again. The GCController +// until the system reaches the allowed threshold again. The PodGCController // prioritizes pods to delete by sorting by creation timestamp and deleting the -// oldest objects first. The GCController will not delete non-terminated pods. -package gc +// oldest objects first. The PodGCController will not delete non-terminated +// pods. +package podgc diff --git a/pkg/controller/gc/gc_controller.go b/pkg/controller/podgc/gc_controller.go similarity index 95% rename from pkg/controller/gc/gc_controller.go rename to pkg/controller/podgc/gc_controller.go index 485c326c17..fbeab69ad9 100644 --- a/pkg/controller/gc/gc_controller.go +++ b/pkg/controller/podgc/gc_controller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package gc +package podgc import ( "sort" @@ -41,7 +41,7 @@ const ( gcCheckPeriod = 20 * time.Second ) -type GCController struct { +type PodGCController struct { kubeClient clientset.Interface podStore cache.StoreToPodLister podStoreSyncer *framework.Controller @@ -49,11 +49,11 @@ type GCController struct { threshold int } -func New(kubeClient clientset.Interface, resyncPeriod controller.ResyncPeriodFunc, threshold int) *GCController { +func New(kubeClient clientset.Interface, resyncPeriod controller.ResyncPeriodFunc, threshold int) *PodGCController { if kubeClient != nil && kubeClient.Core().GetRESTClient().GetRateLimiter() != nil { metrics.RegisterMetricAndTrackRateLimiterUsage("gc_controller", kubeClient.Core().GetRESTClient().GetRateLimiter()) } - gcc := &GCController{ + gcc := &PodGCController{ kubeClient: kubeClient, threshold: threshold, deletePod: func(namespace, name string) error { @@ -85,13 +85,13 @@ func New(kubeClient clientset.Interface, resyncPeriod controller.ResyncPeriodFun return gcc } -func (gcc *GCController) Run(stop <-chan struct{}) { +func (gcc *PodGCController) Run(stop <-chan struct{}) { go gcc.podStoreSyncer.Run(stop) go wait.Until(gcc.gc, gcCheckPeriod, stop) <-stop } -func (gcc *GCController) gc() { +func (gcc *PodGCController) gc() { terminatedPods, _ := gcc.podStore.List(labels.Everything()) terminatedPodCount := len(terminatedPods) sort.Sort(byCreationTimestamp(terminatedPods)) diff --git a/pkg/controller/gc/gc_controller_test.go b/pkg/controller/podgc/gc_controller_test.go similarity index 99% rename from pkg/controller/gc/gc_controller_test.go rename to pkg/controller/podgc/gc_controller_test.go index e28c9cf03f..c6d230d38c 100644 --- a/pkg/controller/gc/gc_controller_test.go +++ b/pkg/controller/podgc/gc_controller_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package gc +package podgc import ( "sync" diff --git a/test/e2e/garbage_collector.go b/test/e2e/pod_gc.go similarity index 100% rename from test/e2e/garbage_collector.go rename to test/e2e/pod_gc.go From 6902faa74a7a2b7308b65f467f06b71588883990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20Py=C5=BCalski?= <spyzalski@mirantis.com> Date: Wed, 8 Jun 2016 11:55:23 +0200 Subject: [PATCH 033/339] Fixed an error in lvm bash script The space in this script is an obvious typo and caused an error (trying to call volume_id as command). --- examples/flexvolume/lvm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/flexvolume/lvm b/examples/flexvolume/lvm index ae9a1b15c4..bb73f47f40 100755 --- a/examples/flexvolume/lvm +++ b/examples/flexvolume/lvm @@ -49,7 +49,7 @@ attach() { VG=$(echo $1|jq -r '.volumegroup') # LVM substitutes - with -- - VOLUMEID= `echo $VOLUMEID|sed s/-/--/g` + VOLUMEID=`echo $VOLUMEID|sed s/-/--/g` VG=`echo $VG|sed s/-/--/g` DMDEV="/dev/mapper/${VG}-${VOLUMEID}" From 770bd6b7a4f457c1d8d0ca78b81a06a265891d29 Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski <wojtekt@google.com> Date: Tue, 7 Jun 2016 15:52:09 +0200 Subject: [PATCH 034/339] Mount hollow-node logs to parent node hostpath --- .../resources/hollow-node_template.json | 48 ++++++++++++++----- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/test/kubemark/resources/hollow-node_template.json b/test/kubemark/resources/hollow-node_template.json index b23614b394..a9c0c6433c 100644 --- a/test/kubemark/resources/hollow-node_template.json +++ b/test/kubemark/resources/hollow-node_template.json @@ -25,6 +25,12 @@ "secret": { "secretName": "kubeconfig" } + }, + { + "name": "logs-volume", + "hostPath": { + "path": "/var/logs" + } } ], "containers": [ @@ -45,20 +51,29 @@ "key": "content.type" } } + }, + { + "name": "MY_POD_NAME", + "valueFrom": { + "fieldRef": { + "fieldPath": "metadata.name" + } + } } ], "command": [ - "./kubemark.sh" - ], - "args": [ - "--v=3", - "--morph=kubelet", - "$(CONTENT_TYPE)" + "/bin/sh", + "-c", + "./kubemark.sh --morph=kubelet $(CONTENT_TYPE) --v=2 1>>/var/logs/kubelet_$(MY_POD_NAME).log 2>&1" ], "volumeMounts": [ { "name": "kubeconfig-volume", "mountPath": "/kubeconfig" + }, + { + "name": "logs-volume", + "mountPath": "/var/logs" } ], "resources": { @@ -81,20 +96,29 @@ "key": "content.type" } } + }, + { + "name": "MY_POD_NAME", + "valueFrom": { + "fieldRef": { + "fieldPath": "metadata.name" + } + } } ], "command": [ - "./kubemark.sh" - ], - "args": [ - "--v=3", - "--morph=proxy", - "$(CONTENT_TYPE)" + "/bin/sh", + "-c", + "./kubemark.sh --morph=proxy $(CONTENT_TYPE) --v=2 1>>/var/logs/kube_proxy_$(MY_POD_NAME).log 2>&1" ], "volumeMounts": [ { "name": "kubeconfig-volume", "mountPath": "/kubeconfig" + }, + { + "name": "logs-volume", + "mountPath": "/var/logs" } ], "resources": { From a74f700b633f8d739d8f73471875f9d2d44c847a Mon Sep 17 00:00:00 2001 From: Michail Kargakis <mkargaki@redhat.com> Date: Wed, 8 Jun 2016 17:07:01 +0200 Subject: [PATCH 035/339] kubectl: ignore only update conflicts in the scaler --- pkg/kubectl/scale.go | 27 ++++++--------- pkg/kubectl/scale_test.go | 71 +++++++++++++++++++++++++++------------ 2 files changed, 60 insertions(+), 38 deletions(-) diff --git a/pkg/kubectl/scale.go b/pkg/kubectl/scale.go index bef93d9909..480592f467 100644 --- a/pkg/kubectl/scale.go +++ b/pkg/kubectl/scale.go @@ -81,7 +81,7 @@ type ScaleErrorType int const ( ScaleGetFailure ScaleErrorType = iota ScaleUpdateFailure - ScaleUpdateInvalidFailure + ScaleUpdateConflictFailure ) // A ScaleError is returned when a scale request passes @@ -115,11 +115,8 @@ func ScaleCondition(r Scaler, precondition *ScalePrecondition, namespace, name s case nil: return true, nil case ScaleError: - // if it's invalid we shouldn't keep waiting - if e.FailureType == ScaleUpdateInvalidFailure { - return false, err - } - if e.FailureType == ScaleUpdateFailure { + // Retry only on update conflicts. + if e.FailureType == ScaleUpdateConflictFailure { return false, nil } } @@ -153,10 +150,9 @@ func (scaler *ReplicationControllerScaler) ScaleSimple(namespace, name string, p } } controller.Spec.Replicas = int32(newSize) - // TODO: do retry on 409 errors here? if _, err := scaler.c.ReplicationControllers(namespace).Update(controller); err != nil { - if errors.IsInvalid(err) { - return ScaleError{ScaleUpdateInvalidFailure, controller.ResourceVersion, err} + if errors.IsConflict(err) { + return ScaleError{ScaleUpdateConflictFailure, controller.ResourceVersion, err} } return ScaleError{ScaleUpdateFailure, controller.ResourceVersion, err} } @@ -215,10 +211,9 @@ func (scaler *ReplicaSetScaler) ScaleSimple(namespace, name string, precondition } } rs.Spec.Replicas = int32(newSize) - // TODO: do retry on 409 errors here? if _, err := scaler.c.ReplicaSets(namespace).Update(rs); err != nil { - if errors.IsInvalid(err) { - return ScaleError{ScaleUpdateInvalidFailure, rs.ResourceVersion, err} + if errors.IsConflict(err) { + return ScaleError{ScaleUpdateConflictFailure, rs.ResourceVersion, err} } return ScaleError{ScaleUpdateFailure, rs.ResourceVersion, err} } @@ -283,8 +278,8 @@ func (scaler *JobScaler) ScaleSimple(namespace, name string, preconditions *Scal parallelism := int32(newSize) job.Spec.Parallelism = ¶llelism if _, err := scaler.c.Jobs(namespace).Update(job); err != nil { - if errors.IsInvalid(err) { - return ScaleError{ScaleUpdateInvalidFailure, job.ResourceVersion, err} + if errors.IsConflict(err) { + return ScaleError{ScaleUpdateConflictFailure, job.ResourceVersion, err} } return ScaleError{ScaleUpdateFailure, job.ResourceVersion, err} } @@ -348,8 +343,8 @@ func (scaler *DeploymentScaler) ScaleSimple(namespace, name string, precondition // For now I'm falling back to regular Deployment update operation. deployment.Spec.Replicas = int32(newSize) if _, err := scaler.c.Deployments(namespace).Update(deployment); err != nil { - if errors.IsInvalid(err) { - return ScaleError{ScaleUpdateInvalidFailure, deployment.ResourceVersion, err} + if errors.IsConflict(err) { + return ScaleError{ScaleUpdateConflictFailure, deployment.ResourceVersion, err} } return ScaleError{ScaleUpdateFailure, deployment.ResourceVersion, err} } diff --git a/pkg/kubectl/scale_test.go b/pkg/kubectl/scale_test.go index 0dc55cda18..43a8261f6b 100644 --- a/pkg/kubectl/scale_test.go +++ b/pkg/kubectl/scale_test.go @@ -30,27 +30,36 @@ import ( type ErrorReplicationControllers struct { testclient.FakeReplicationControllers - invalid bool + conflict bool + invalid bool } func (c *ErrorReplicationControllers) Update(controller *api.ReplicationController) (*api.ReplicationController, error) { - if c.invalid { + switch { + case c.invalid: return nil, kerrors.NewInvalid(api.Kind(controller.Kind), controller.Name, nil) + case c.conflict: + return nil, kerrors.NewConflict(api.Resource(controller.Kind), controller.Name, nil) } return nil, errors.New("Replication controller update failure") } type ErrorReplicationControllerClient struct { testclient.Fake - invalid bool + conflict bool + invalid bool } func (c *ErrorReplicationControllerClient) ReplicationControllers(namespace string) client.ReplicationControllerInterface { - return &ErrorReplicationControllers{testclient.FakeReplicationControllers{Fake: &c.Fake, Namespace: namespace}, c.invalid} + return &ErrorReplicationControllers{ + FakeReplicationControllers: testclient.FakeReplicationControllers{Fake: &c.Fake, Namespace: namespace}, + conflict: c.conflict, + invalid: c.invalid, + } } func TestReplicationControllerScaleRetry(t *testing.T) { - fake := &ErrorReplicationControllerClient{Fake: testclient.Fake{}, invalid: false} + fake := &ErrorReplicationControllerClient{Fake: testclient.Fake{}, conflict: true} scaler := ReplicationControllerScaler{fake} preconditions := ScalePrecondition{-1, ""} count := uint(3) @@ -63,7 +72,7 @@ func TestReplicationControllerScaleRetry(t *testing.T) { t.Errorf("Expected an update failure to return pass = false, got pass = %v", pass) } if err != nil { - t.Errorf("Did not expect an error on update failure, got %v", err) + t.Errorf("Did not expect an error on update conflict failure, got %v", err) } preconditions = ScalePrecondition{3, ""} scaleFunc = ScaleCondition(&scaler, &preconditions, namespace, name, count) @@ -87,7 +96,7 @@ func TestReplicationControllerScaleInvalid(t *testing.T) { t.Errorf("Expected an update failure to return pass = false, got pass = %v", pass) } e, ok := err.(ScaleError) - if err == nil || !ok || e.FailureType != ScaleUpdateInvalidFailure { + if err == nil || !ok || e.FailureType != ScaleUpdateFailure { t.Errorf("Expected error on invalid update failure, got %v", err) } } @@ -250,12 +259,16 @@ func TestValidateReplicationController(t *testing.T) { type ErrorJobs struct { testclient.FakeJobsV1 - invalid bool + conflict bool + invalid bool } func (c *ErrorJobs) Update(job *batch.Job) (*batch.Job, error) { - if c.invalid { - return nil, kerrors.NewInvalid(batch.Kind(job.Kind), job.Name, nil) + switch { + case c.invalid: + return nil, kerrors.NewInvalid(api.Kind(job.Kind), job.Name, nil) + case c.conflict: + return nil, kerrors.NewConflict(api.Resource(job.Kind), job.Name, nil) } return nil, errors.New("Job update failure") } @@ -271,15 +284,20 @@ func (c *ErrorJobs) Get(name string) (*batch.Job, error) { type ErrorJobClient struct { testclient.FakeBatch - invalid bool + conflict bool + invalid bool } func (c *ErrorJobClient) Jobs(namespace string) client.JobInterface { - return &ErrorJobs{testclient.FakeJobsV1{Fake: &c.FakeBatch, Namespace: namespace}, c.invalid} + return &ErrorJobs{ + FakeJobsV1: testclient.FakeJobsV1{Fake: &c.FakeBatch, Namespace: namespace}, + conflict: c.conflict, + invalid: c.invalid, + } } func TestJobScaleRetry(t *testing.T) { - fake := &ErrorJobClient{FakeBatch: testclient.FakeBatch{}, invalid: false} + fake := &ErrorJobClient{FakeBatch: testclient.FakeBatch{}, conflict: true} scaler := JobScaler{fake} preconditions := ScalePrecondition{-1, ""} count := uint(3) @@ -336,7 +354,7 @@ func TestJobScaleInvalid(t *testing.T) { t.Errorf("Expected an update failure to return pass = false, got pass = %v", pass) } e, ok := err.(ScaleError) - if err == nil || !ok || e.FailureType != ScaleUpdateInvalidFailure { + if err == nil || !ok || e.FailureType != ScaleUpdateFailure { t.Errorf("Expected error on invalid update failure, got %v", err) } } @@ -491,12 +509,16 @@ func TestValidateJob(t *testing.T) { type ErrorDeployments struct { testclient.FakeDeployments - invalid bool + conflict bool + invalid bool } func (c *ErrorDeployments) Update(deployment *extensions.Deployment) (*extensions.Deployment, error) { - if c.invalid { - return nil, kerrors.NewInvalid(extensions.Kind(deployment.Kind), deployment.Name, nil) + switch { + case c.invalid: + return nil, kerrors.NewInvalid(api.Kind(deployment.Kind), deployment.Name, nil) + case c.conflict: + return nil, kerrors.NewConflict(api.Resource(deployment.Kind), deployment.Name, nil) } return nil, errors.New("deployment update failure") } @@ -511,15 +533,20 @@ func (c *ErrorDeployments) Get(name string) (*extensions.Deployment, error) { type ErrorDeploymentClient struct { testclient.FakeExperimental - invalid bool + conflict bool + invalid bool } func (c *ErrorDeploymentClient) Deployments(namespace string) client.DeploymentInterface { - return &ErrorDeployments{testclient.FakeDeployments{Fake: &c.FakeExperimental, Namespace: namespace}, c.invalid} + return &ErrorDeployments{ + FakeDeployments: testclient.FakeDeployments{Fake: &c.FakeExperimental, Namespace: namespace}, + invalid: c.invalid, + conflict: c.conflict, + } } func TestDeploymentScaleRetry(t *testing.T) { - fake := &ErrorDeploymentClient{FakeExperimental: testclient.FakeExperimental{Fake: &testclient.Fake{}}, invalid: false} + fake := &ErrorDeploymentClient{FakeExperimental: testclient.FakeExperimental{}, conflict: true} scaler := &DeploymentScaler{fake} preconditions := &ScalePrecondition{-1, ""} count := uint(3) @@ -563,7 +590,7 @@ func TestDeploymentScale(t *testing.T) { } func TestDeploymentScaleInvalid(t *testing.T) { - fake := &ErrorDeploymentClient{FakeExperimental: testclient.FakeExperimental{Fake: &testclient.Fake{}}, invalid: true} + fake := &ErrorDeploymentClient{FakeExperimental: testclient.FakeExperimental{}, invalid: true} scaler := DeploymentScaler{fake} preconditions := ScalePrecondition{-1, ""} count := uint(3) @@ -576,7 +603,7 @@ func TestDeploymentScaleInvalid(t *testing.T) { t.Errorf("Expected an update failure to return pass = false, got pass = %v", pass) } e, ok := err.(ScaleError) - if err == nil || !ok || e.FailureType != ScaleUpdateInvalidFailure { + if err == nil || !ok || e.FailureType != ScaleUpdateFailure { t.Errorf("Expected error on invalid update failure, got %v", err) } } From c7140b374904ddbdf9a463a118dc63d4beba3e8b Mon Sep 17 00:00:00 2001 From: Michail Kargakis <mkargaki@redhat.com> Date: Wed, 8 Jun 2016 17:44:38 +0200 Subject: [PATCH 036/339] kubectl: return more meaningful timeout errors --- pkg/kubectl/scale.go | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/pkg/kubectl/scale.go b/pkg/kubectl/scale.go index 480592f467..f8aba07e8f 100644 --- a/pkg/kubectl/scale.go +++ b/pkg/kubectl/scale.go @@ -179,8 +179,11 @@ func (scaler *ReplicationControllerScaler) Scale(namespace, name string, newSize if err != nil { return err } - return wait.Poll(waitForReplicas.Interval, waitForReplicas.Timeout, - client.ControllerHasDesiredReplicas(scaler.c, rc)) + err = wait.Poll(waitForReplicas.Interval, waitForReplicas.Timeout, client.ControllerHasDesiredReplicas(scaler.c, rc)) + if err == wait.ErrWaitTimeout { + return fmt.Errorf("timed out waiting for %q to be synced", name) + } + return err } return nil } @@ -240,8 +243,11 @@ func (scaler *ReplicaSetScaler) Scale(namespace, name string, newSize uint, prec if err != nil { return err } - return wait.Poll(waitForReplicas.Interval, waitForReplicas.Timeout, - client.ReplicaSetHasDesiredReplicas(scaler.c, rs)) + err = wait.Poll(waitForReplicas.Interval, waitForReplicas.Timeout, client.ReplicaSetHasDesiredReplicas(scaler.c, rs)) + if err == wait.ErrWaitTimeout { + return fmt.Errorf("timed out waiting for %q to be synced", name) + } + return err } return nil } @@ -306,8 +312,11 @@ func (scaler *JobScaler) Scale(namespace, name string, newSize uint, preconditio if err != nil { return err } - return wait.Poll(waitForReplicas.Interval, waitForReplicas.Timeout, - client.JobHasDesiredParallelism(scaler.c, job)) + err = wait.Poll(waitForReplicas.Interval, waitForReplicas.Timeout, client.JobHasDesiredParallelism(scaler.c, job)) + if err == wait.ErrWaitTimeout { + return fmt.Errorf("timed out waiting for %q to be synced", name) + } + return err } return nil } @@ -370,8 +379,11 @@ func (scaler *DeploymentScaler) Scale(namespace, name string, newSize uint, prec if err != nil { return err } - return wait.Poll(waitForReplicas.Interval, waitForReplicas.Timeout, - client.DeploymentHasDesiredReplicas(scaler.c, deployment)) + err = wait.Poll(waitForReplicas.Interval, waitForReplicas.Timeout, client.DeploymentHasDesiredReplicas(scaler.c, deployment)) + if err == wait.ErrWaitTimeout { + return fmt.Errorf("timed out waiting for %q to be synced", name) + } + return err } return nil } From e5c0daf4ede73f608a5a437ec8d6936b687961e7 Mon Sep 17 00:00:00 2001 From: Avesh Agarwal <avagarwa@redhat.com> Date: Thu, 2 Jun 2016 11:13:41 -0400 Subject: [PATCH 037/339] Fix byte terminology --- docs/design/downward_api_resources_limits_requests.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/design/downward_api_resources_limits_requests.md b/docs/design/downward_api_resources_limits_requests.md index 60ec4787d4..4afb974ab9 100644 --- a/docs/design/downward_api_resources_limits_requests.md +++ b/docs/design/downward_api_resources_limits_requests.md @@ -408,8 +408,8 @@ to specify the output format of values of exposed resources. The default value o is `1` which means cores for cpu and bytes for memory. For cpu, divisor's valid values are `1m` (millicores), `1`(cores), and for memory, the valid values in fixed point integer (decimal) are `1`(bytes), `1k`(kilobytes), `1M`(megabytes), `1G`(gigabytes), -`1T`(terabytes), `1P`(petabytes), `1E`(exabytes), and in their power-of-two equivalents `1Ki(kilobytes)`, -`1Mi`(megabytes), `1Gi`(gigabytes), `1Ti`(terabytes), `1Pi`(petabytes), `1Ei`(exabytes). +`1T`(terabytes), `1P`(petabytes), `1E`(exabytes), and in their power-of-two equivalents `1Ki(kibibytes)`, +`1Mi`(mebibytes), `1Gi`(gibibytes), `1Ti`(tebibytes), `1Pi`(pebibytes), `1Ei`(exbibytes). For more information about these resource formats, [see details](resources.md). Also, the exposed values will be `ceiling` of the actual values in the requestd format in divisor. From c8ca49ec886cc86a96cd3ddf1e2a1eecaeade138 Mon Sep 17 00:00:00 2001 From: Eric Chiang <eric.chiang@coreos.com> Date: Thu, 26 May 2016 11:49:24 -0700 Subject: [PATCH 038/339] plugin/pkg/auth/authorizer/webhook: log request errors Currently the API server only checks the errors returned by an authorizer plugin, it doesn't return or log them[0]. This makes incorrectly configuring the wehbook authorizer plugin extremely difficult to debug. Add a logging statement if the request to the remove service fails as this indicates misconfiguration. [0] https://goo.gl/9zZFv4 --- plugin/pkg/auth/authorizer/webhook/webhook.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/pkg/auth/authorizer/webhook/webhook.go b/plugin/pkg/auth/authorizer/webhook/webhook.go index eeaf2af1d3..2010eaaf39 100644 --- a/plugin/pkg/auth/authorizer/webhook/webhook.go +++ b/plugin/pkg/auth/authorizer/webhook/webhook.go @@ -22,6 +22,8 @@ import ( "errors" "time" + "github.com/golang/glog" + "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" "k8s.io/kubernetes/pkg/auth/authorizer" @@ -149,6 +151,8 @@ func (w *WebhookAuthorizer) Authorize(attr authorizer.Attributes) (err error) { } else { result := w.RestClient.Post().Body(r).Do() if err := result.Error(); err != nil { + // An error here indicates bad configuration or an outage. Log for debugging. + glog.Errorf("Failed to make webhook authorizer request: %v", err) return err } if err := result.Into(r); err != nil { From e89e26219635a53a952f747123392d59d5316013 Mon Sep 17 00:00:00 2001 From: Jeff Grafton <jgrafton@google.com> Date: Thu, 9 Jun 2016 17:37:25 -0700 Subject: [PATCH 039/339] Pass --keepalive-time 2 to curl to fix unexpected EOF flakes --- hack/jenkins/dockerized-e2e-runner.sh | 2 +- hack/jenkins/e2e-runner.sh | 6 +++--- hack/jenkins/upload-finished.sh | 2 +- hack/jenkins/upload-started.sh | 2 +- hack/lib/etcd.sh | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hack/jenkins/dockerized-e2e-runner.sh b/hack/jenkins/dockerized-e2e-runner.sh index 3fe4f6b97f..d3e0bb2708 100755 --- a/hack/jenkins/dockerized-e2e-runner.sh +++ b/hack/jenkins/dockerized-e2e-runner.sh @@ -63,4 +63,4 @@ docker run --rm=true -i \ "${docker_extra_args[@]:+${docker_extra_args[@]}}" \ "${METADATA_SERVER_ADD_HOST_ARGS[@]:+${METADATA_SERVER_ADD_HOST_ARGS[@]}}" \ gcr.io/google_containers/kubekins-test:0.11 \ - bash -c "bash <(curl -fsS --retry 3 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/e2e-runner.sh')" + bash -c "bash <(curl -fsS --retry 3 --keepalive-time 2 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/e2e-runner.sh')" diff --git a/hack/jenkins/e2e-runner.sh b/hack/jenkins/e2e-runner.sh index 4470633246..3413346071 100755 --- a/hack/jenkins/e2e-runner.sh +++ b/hack/jenkins/e2e-runner.sh @@ -162,7 +162,7 @@ function dump_cluster_logs() { ### Pre Set Up ### if running_in_docker; then - curl -fsSL --retry 3 -o "${WORKSPACE}/google-cloud-sdk.tar.gz" 'https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz' + curl -fsSL --retry 3 --keepalive-time 2 -o "${WORKSPACE}/google-cloud-sdk.tar.gz" 'https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz' install_google_cloud_sdk_tarball "${WORKSPACE}/google-cloud-sdk.tar.gz" / fi @@ -286,7 +286,7 @@ cd kubernetes # Upload build start time and k8s version to GCS, but not on PR Jenkins. # On PR Jenkins this is done before the build. if [[ ! "${JOB_NAME}" =~ -pull- ]]; then - JENKINS_BUILD_STARTED=true bash <(curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh") + JENKINS_BUILD_STARTED=true bash <(curl -fsS --retry 3 --keepalive-time 2 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh") fi # Have cmd/e2e run by goe2e.sh generate JUnit report in ${WORKSPACE}/junit*.xml @@ -304,7 +304,7 @@ if [[ ( ${KUBERNETES_PROVIDER} == "gce" || ${KUBERNETES_PROVIDER} == "gke" ) && gcp_list_resources="true" # Always pull the script from HEAD, overwriting the local one if it exists. # We do this to pick up fixes if we are running tests from a branch or tag. - curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/cluster/gce/list-resources.sh" > "${gcp_list_resources_script}" + curl -fsS --retry 3 --keepalive-time 2 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/cluster/gce/list-resources.sh" > "${gcp_list_resources_script}" else gcp_list_resources="false" fi diff --git a/hack/jenkins/upload-finished.sh b/hack/jenkins/upload-finished.sh index e76f7908d8..153121117b 100755 --- a/hack/jenkins/upload-finished.sh +++ b/hack/jenkins/upload-finished.sh @@ -39,5 +39,5 @@ echo if [[ -x ./hack/jenkins/upload-to-gcs.sh ]]; then ./hack/jenkins/upload-to-gcs.sh else - curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh" | bash - + curl -fsS --retry 3 --keepalive-time 2 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh" | bash - fi diff --git a/hack/jenkins/upload-started.sh b/hack/jenkins/upload-started.sh index fe2adf1c61..b253f3b7ce 100755 --- a/hack/jenkins/upload-started.sh +++ b/hack/jenkins/upload-started.sh @@ -34,5 +34,5 @@ echo if [[ -x ./hack/jenkins/upload-to-gcs.sh ]]; then ./hack/jenkins/upload-to-gcs.sh else - curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh" | bash - + curl -fsS --retry 3 --keepalive-time 2 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh" | bash - fi diff --git a/hack/lib/etcd.sh b/hack/lib/etcd.sh index 026f4addab..9bfe45dbec 100644 --- a/hack/lib/etcd.sh +++ b/hack/lib/etcd.sh @@ -74,12 +74,12 @@ kube::etcd::install() { cd "${KUBE_ROOT}/third_party" if [[ $(uname) == "Darwin" ]]; then download_file="etcd-v${ETCD_VERSION}-darwin-amd64.zip" - curl -fsSLO --retry 3 https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/"${download_file}" + curl -fsSLO --retry 3 --keepalive-time 2 https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/"${download_file}" unzip -o "${download_file}" ln -fns "etcd-v${ETCD_VERSION}-darwin-amd64" etcd rm "${download_file}" else - curl -fsSL --retry 3 https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz | tar xzf - + curl -fsSL --retry 3 --keepalive-time 2 https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz | tar xzf - ln -fns "etcd-v${ETCD_VERSION}-linux-amd64" etcd fi kube::log::info "etcd v${ETCD_VERSION} installed. To use:" From d6f69c0f227c058c7cf9f16dd77cc7559fc074f0 Mon Sep 17 00:00:00 2001 From: Boaz Shuster <ripcurld.github@gmail.com> Date: Mon, 30 May 2016 19:34:14 +0300 Subject: [PATCH 040/339] Update the jsonpath template URL --- pkg/kubectl/cmd/util/printing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubectl/cmd/util/printing.go b/pkg/kubectl/cmd/util/printing.go index f1153b6cd6..a5faaee524 100644 --- a/pkg/kubectl/cmd/util/printing.go +++ b/pkg/kubectl/cmd/util/printing.go @@ -30,7 +30,7 @@ import ( // AddPrinterFlags adds printing related flags to a command (e.g. output format, no headers, template path) func AddPrinterFlags(cmd *cobra.Command) { - cmd.Flags().StringP("output", "o", "", "Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].") + cmd.Flags().StringP("output", "o", "", "Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://kubernetes.io/docs/user-guide/jsonpath].") cmd.Flags().String("output-version", "", "Output the formatted object with the given group version (for ex: 'extensions/v1beta1').") cmd.Flags().Bool("no-headers", false, "When using the default output, don't print headers.") cmd.Flags().Bool("show-labels", false, "When printing, show all labels as the last column (default hide labels column)") From 158d852104be17c130d8766c2437b62c0e00f256 Mon Sep 17 00:00:00 2001 From: Clayton Coleman <ccoleman@redhat.com> Date: Sat, 11 Jun 2016 19:14:58 -0400 Subject: [PATCH 041/339] Make discovery client parameterizable to legacy prefix OpenShift needs to be able to use a discovery client against a different prefix. Make LegacyPrefix optional and parameterizable to the client. No change to existing interfaces. --- pkg/client/typed/discovery/discovery_client.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkg/client/typed/discovery/discovery_client.go b/pkg/client/typed/discovery/discovery_client.go index 283dd5a63e..635ca4a9e1 100644 --- a/pkg/client/typed/discovery/discovery_client.go +++ b/pkg/client/typed/discovery/discovery_client.go @@ -81,6 +81,8 @@ type SwaggerSchemaInterface interface { // versions and resources. type DiscoveryClient struct { *restclient.RESTClient + + LegacyPrefix string } // Convert unversioned.APIVersions to unversioned.APIGroup. APIVersions is used by legacy v1, so @@ -105,7 +107,7 @@ func apiVersionsToAPIGroup(apiVersions *unversioned.APIVersions) (apiGroup unver func (d *DiscoveryClient) ServerGroups() (apiGroupList *unversioned.APIGroupList, err error) { // Get the groupVersions exposed at /api v := &unversioned.APIVersions{} - err = d.Get().AbsPath("/api").Do().Into(v) + err = d.Get().AbsPath(d.LegacyPrefix).Do().Into(v) apiGroup := unversioned.APIGroup{} if err == nil { apiGroup = apiVersionsToAPIGroup(v) @@ -135,8 +137,9 @@ func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (r url := url.URL{} if len(groupVersion) == 0 { return nil, fmt.Errorf("groupVersion shouldn't be empty") - } else if groupVersion == "v1" { - url.Path = "/api/" + groupVersion + } + if len(d.LegacyPrefix) > 0 && groupVersion == "v1" { + url.Path = d.LegacyPrefix + "/" + groupVersion } else { url.Path = "/apis/" + groupVersion } @@ -245,8 +248,8 @@ func (d *DiscoveryClient) SwaggerSchema(version unversioned.GroupVersion) (*swag return nil, fmt.Errorf("API version: %v is not supported by the server. Use one of: %v", version, groupVersions) } var path string - if version == v1.SchemeGroupVersion { - path = "/swaggerapi/api/" + version.Version + if len(d.LegacyPrefix) > 0 && version == v1.SchemeGroupVersion { + path = "/swaggerapi" + d.LegacyPrefix + "/" + version.Version } else { path = "/swaggerapi/apis/" + version.Group + "/" + version.Version } @@ -285,7 +288,7 @@ func NewDiscoveryClientForConfig(c *restclient.Config) (*DiscoveryClient, error) return nil, err } client, err := restclient.UnversionedRESTClientFor(&config) - return &DiscoveryClient{client}, err + return &DiscoveryClient{RESTClient: client, LegacyPrefix: "/api"}, err } // NewDiscoveryClientForConfig creates a new DiscoveryClient for the given config. If @@ -301,7 +304,7 @@ func NewDiscoveryClientForConfigOrDie(c *restclient.Config) *DiscoveryClient { // New creates a new DiscoveryClient for the given RESTClient. func NewDiscoveryClient(c *restclient.RESTClient) *DiscoveryClient { - return &DiscoveryClient{c} + return &DiscoveryClient{RESTClient: c, LegacyPrefix: "/api"} } func stringDoesntExistIn(str string, slice []string) bool { From a883d6c1546f282ed4f0cddf223fe66c63a4d383 Mon Sep 17 00:00:00 2001 From: dalanlan <dalanlan925@gmail.com> Date: Sun, 12 Jun 2016 10:29:41 +0800 Subject: [PATCH 042/339] honor original docker_opts --- cluster/ubuntu/reconfDocker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/ubuntu/reconfDocker.sh b/cluster/ubuntu/reconfDocker.sh index 009b871d6f..6022710898 100755 --- a/cluster/ubuntu/reconfDocker.sh +++ b/cluster/ubuntu/reconfDocker.sh @@ -58,7 +58,7 @@ function restart_docker { sudo brctl delbr docker0 source /run/flannel/subnet.env - + source /etc/default/docker echo DOCKER_OPTS=\"${DOCKER_OPTS} -H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock \ --bip=${FLANNEL_SUBNET} --mtu=${FLANNEL_MTU}\" > /etc/default/docker sudo service docker restart From 33039c2883daf3ca07be2a58f4641d9d381a5e2b Mon Sep 17 00:00:00 2001 From: Xiangpeng Zhao <zhao.xiangpeng@zte.com.cn> Date: Mon, 2 May 2016 02:38:26 +0800 Subject: [PATCH 043/339] Fix typos in docker.go --- pkg/kubelet/dockertools/docker.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/kubelet/dockertools/docker.go b/pkg/kubelet/dockertools/docker.go index 157fd1b460..f1efb571b6 100644 --- a/pkg/kubelet/dockertools/docker.go +++ b/pkg/kubelet/dockertools/docker.go @@ -51,8 +51,8 @@ const ( milliCPUToCPU = 1000 // 100000 is equivalent to 100ms - quotaPeriod = 100000 - minQuotaPerod = 1000 + quotaPeriod = 100000 + minQuotaPeriod = 1000 ) // DockerInterface is an abstract interface for testability. It abstracts the interface of docker.Client. @@ -324,8 +324,8 @@ func milliCPUToQuota(milliCPU int64) (quota int64, period int64) { quota = (milliCPU * quotaPeriod) / milliCPUToCPU // quota needs to be a minimum of 1ms. - if quota < minQuotaPerod { - quota = minQuotaPerod + if quota < minQuotaPeriod { + quota = minQuotaPeriod } return From 038bb130b8071dc6dc4df6fbacdd5036cca89c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Ole=C5=9B?= <lukaszoles@gmail.com> Date: Thu, 9 Jun 2016 14:08:43 +0200 Subject: [PATCH 044/339] Include init containers in error messages fixes: #27040 --- pkg/registry/pod/strategy.go | 22 ++++++++++++++++------ pkg/registry/pod/strategy_test.go | 16 ++++++++++++++++ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/pkg/registry/pod/strategy.go b/pkg/registry/pod/strategy.go index 98d551322b..4846d4e418 100644 --- a/pkg/registry/pod/strategy.go +++ b/pkg/registry/pod/strategy.go @@ -246,9 +246,9 @@ func ResourceLocation(getter ResourceGetter, rt http.RoundTripper, ctx api.Conte } // getContainerNames returns a formatted string containing the container names -func getContainerNames(pod *api.Pod) string { +func getContainerNames(containers []api.Container) string { names := []string{} - for _, c := range pod.Spec.Containers { + for _, c := range containers { names = append(names, c.Name) } return strings.Join(names, " ") @@ -278,8 +278,13 @@ func LogLocation( case 0: return nil, nil, errors.NewBadRequest(fmt.Sprintf("a container name must be specified for pod %s", name)) default: - containerNames := getContainerNames(pod) - return nil, nil, errors.NewBadRequest(fmt.Sprintf("a container name must be specified for pod %s, choose one of: [%s]", name, containerNames)) + containerNames := getContainerNames(pod.Spec.Containers) + initContainerNames := getContainerNames(pod.Spec.InitContainers) + err := fmt.Sprintf("a container name must be specified for pod %s, choose one of: [%s]", name, containerNames) + if len(initContainerNames) > 0 { + err += fmt.Sprintf(" or one of the init containers: [%s]", initContainerNames) + } + return nil, nil, errors.NewBadRequest(err) } } else { if !podHasContainerWithName(pod, container) { @@ -424,8 +429,13 @@ func streamLocation( case 0: return nil, nil, errors.NewBadRequest(fmt.Sprintf("a container name must be specified for pod %s", name)) default: - containerNames := getContainerNames(pod) - return nil, nil, errors.NewBadRequest(fmt.Sprintf("a container name must be specified for pod %s, choose one of: [%s]", name, containerNames)) + containerNames := getContainerNames(pod.Spec.Containers) + initContainerNames := getContainerNames(pod.Spec.InitContainers) + err := fmt.Sprintf("a container name must be specified for pod %s, choose one of: [%s]", name, containerNames) + if len(initContainerNames) > 0 { + err += fmt.Sprintf(" or one of the init containers: [%s]", initContainerNames) + } + return nil, nil, errors.NewBadRequest(err) } } else { if !podHasContainerWithName(pod, container) { diff --git a/pkg/registry/pod/strategy_test.go b/pkg/registry/pod/strategy_test.go index 77d343b521..7f03fd655e 100644 --- a/pkg/registry/pod/strategy_test.go +++ b/pkg/registry/pod/strategy_test.go @@ -192,6 +192,22 @@ func TestCheckLogLocation(t *testing.T) { opts: &api.PodLogOptions{}, expectedErr: errors.NewBadRequest("a container name must be specified for pod test, choose one of: [container1 container2]"), }, + { + in: &api.Pod{ + Spec: api.PodSpec{ + Containers: []api.Container{ + {Name: "container1"}, + {Name: "container2"}, + }, + InitContainers: []api.Container{ + {Name: "initcontainer1"}, + }, + }, + Status: api.PodStatus{}, + }, + opts: &api.PodLogOptions{}, + expectedErr: errors.NewBadRequest("a container name must be specified for pod test, choose one of: [container1 container2] or one of the init containers: [initcontainer1]"), + }, { in: &api.Pod{ Spec: api.PodSpec{ From 0ced1ddaeefdaa0095a5d141b47ffba7a7c6fadd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Martins?= <aanm90@gmail.com> Date: Fri, 27 May 2016 20:38:44 +0100 Subject: [PATCH 045/339] Make local-up-cluster.sh IPv6 friendly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a new environment variable API_HOST_IP. API_HOST_IP allows the user to specify an IPv6 address that is parsable by Golang. API_HOST on the other hand allows the user to specify the IPv6 address to be used in a URL's format as described in RFC2732. Example: API_HOST_IP="FEDC:BA98:7654:3210:FEDC:BA98:7654:3210" API_HOST="[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210] or API_HOST_IP="FEDC:BA98:7654:3210:FEDC:BA98:7654:3210" API_HOST="[${API_HOST_IP}]" Signed-off-by: André Martins <aanm90@gmail.com> --- hack/local-up-cluster.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 11b473ade8..f9fcba1af2 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -105,6 +105,8 @@ set +e API_PORT=${API_PORT:-8080} API_HOST=${API_HOST:-127.0.0.1} +API_HOST_IP=${API_HOST_IP:-${API_HOST}} +API_BIND_ADDR=${API_HOST_IP:-"0.0.0.0"} KUBELET_HOST=${KUBELET_HOST:-"127.0.0.1"} # By default only allow CORS for requests on localhost API_CORS_ALLOWED_ORIGINS=${API_CORS_ALLOWED_ORIGINS:-"/127.0.0.1(:[0-9]+)?$,/localhost(:[0-9]+)?$"} @@ -121,7 +123,7 @@ CLAIM_BINDER_SYNC_PERIOD=${CLAIM_BINDER_SYNC_PERIOD:-"10m"} # current k8s defaul function test_apiserver_off { # For the common local scenario, fail fast if server is already running. # this can happen if you run local-up-cluster.sh twice and kill etcd in between. - curl $API_HOST:$API_PORT + curl -g $API_HOST:$API_PORT if [ ! $? -eq 0 ]; then echo "API SERVER port is free, proceeding..." else @@ -275,9 +277,10 @@ function start_apiserver { --service-account-key-file="${SERVICE_ACCOUNT_KEY}" \ --service-account-lookup="${SERVICE_ACCOUNT_LOOKUP}" \ --admission-control="${ADMISSION_CONTROL}" \ - --insecure-bind-address="${API_HOST}" \ + --bind-address="${API_BIND_ADDR}" \ + --insecure-bind-address="${API_HOST_IP}" \ --insecure-port="${API_PORT}" \ - --advertise-address="${API_HOST}" \ + --advertise-address="${API_HOST_IP}" \ --etcd-servers="http://${ETCD_HOST}:${ETCD_PORT}" \ --service-cluster-ip-range="10.0.0.0/24" \ --cloud-provider="${CLOUD_PROVIDER}" \ From 70ac7abb109e0fc3168e9e3ec381abb901387c95 Mon Sep 17 00:00:00 2001 From: Jing Dong <me@jing.io> Date: Mon, 13 Jun 2016 15:02:14 +0100 Subject: [PATCH 046/339] kube-up.sh should allow using existing DHCP option set without making changes to existing VPC configuration. --- cluster/aws/util.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index 80170c5f27..440bfce772 100755 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -612,22 +612,24 @@ function ensure-master-ip { fi } -# Creates a new DHCP option set configured correctly for Kubernetes +# Creates a new DHCP option set configured correctly for Kubernetes when DHCP_OPTION_SET_ID is not specified # Sets DHCP_OPTION_SET_ID function create-dhcp-option-set () { - case "${AWS_REGION}" in - us-east-1) - OPTION_SET_DOMAIN=ec2.internal - ;; + if [[ -z ${DHCP_OPTION_SET_ID-} ]]; then + case "${AWS_REGION}" in + us-east-1) + OPTION_SET_DOMAIN=ec2.internal + ;; - *) - OPTION_SET_DOMAIN="${AWS_REGION}.compute.internal" - esac + *) + OPTION_SET_DOMAIN="${AWS_REGION}.compute.internal" + esac - DHCP_OPTION_SET_ID=$($AWS_CMD create-dhcp-options --dhcp-configuration Key=domain-name,Values=${OPTION_SET_DOMAIN} Key=domain-name-servers,Values=AmazonProvidedDNS --query DhcpOptions.DhcpOptionsId) + DHCP_OPTION_SET_ID=$($AWS_CMD create-dhcp-options --dhcp-configuration Key=domain-name,Values=${OPTION_SET_DOMAIN} Key=domain-name-servers,Values=AmazonProvidedDNS --query DhcpOptions.DhcpOptionsId) - add-tag ${DHCP_OPTION_SET_ID} Name kubernetes-dhcp-option-set - add-tag ${DHCP_OPTION_SET_ID} KubernetesCluster ${CLUSTER_ID} + add-tag ${DHCP_OPTION_SET_ID} Name kubernetes-dhcp-option-set + add-tag ${DHCP_OPTION_SET_ID} KubernetesCluster ${CLUSTER_ID} + fi $AWS_CMD associate-dhcp-options --dhcp-options-id ${DHCP_OPTION_SET_ID} --vpc-id ${VPC_ID} > $LOG From 65e2e63170584e3bdb65891fa06c5fd2ccae4505 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" <sttts@redhat.com> Date: Mon, 13 Jun 2016 10:00:39 +0200 Subject: [PATCH 047/339] Set AttachOptions.CommandName from kubectl run using corba CommandPath This sets AttachOptions.CommandName dynamically depending on the corba Command hierarchy. If the root command is named e.g. "oc" (for the OpenShift cli) this will result in "oc attach" instead of the static "kubectl attach" before this patch. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1341450 --- pkg/kubectl/cmd/attach.go | 6 ++++-- pkg/kubectl/cmd/run.go | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/kubectl/cmd/attach.go b/pkg/kubectl/cmd/attach.go index 3150bccaee..d406fa087d 100644 --- a/pkg/kubectl/cmd/attach.go +++ b/pkg/kubectl/cmd/attach.go @@ -53,8 +53,6 @@ func NewCmdAttach(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) Out: cmdOut, Err: cmdErr, - CommandName: "kubectl attach", - Attach: &DefaultRemoteAttach{}, } cmd := &cobra.Command{ @@ -142,6 +140,10 @@ func (p *AttachOptions) Complete(f *cmdutil.Factory, cmd *cobra.Command, argsIn } p.Client = client + if p.CommandName == "" { + p.CommandName = cmd.CommandPath() + } + return nil } diff --git a/pkg/kubectl/cmd/run.go b/pkg/kubectl/cmd/run.go index 371dcdf3a3..915c61d83f 100644 --- a/pkg/kubectl/cmd/run.go +++ b/pkg/kubectl/cmd/run.go @@ -227,6 +227,8 @@ func Run(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer, cmd *cob Stdin: interactive, TTY: tty, + CommandName: cmd.Parent().CommandPath() + " attach", + Attach: &DefaultRemoteAttach{}, } config, err := f.ClientConfig() @@ -346,7 +348,6 @@ func handleAttachPod(f *cmdutil.Factory, c *client.Client, pod *api.Pod, opts *A opts.Client = c opts.PodName = pod.Name opts.Namespace = pod.Namespace - opts.CommandName = "kubectl attach" if err := opts.Run(); err != nil { fmt.Fprintf(opts.Out, "Error attaching, falling back to logs: %v\n", err) req, err := f.LogsForObject(pod, &api.PodLogOptions{Container: opts.GetContainerName(pod)}) From c7a60fd99a6618290d0ddf60bef0c2aceed47c31 Mon Sep 17 00:00:00 2001 From: Euan Kemp <euank@coreos.com> Date: Mon, 13 Jun 2016 14:02:07 -0700 Subject: [PATCH 048/339] kubelet: Remove stack alloc Presumably this was accidental leftover debug info --- pkg/kubelet/server/stats/summary.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/kubelet/server/stats/summary.go b/pkg/kubelet/server/stats/summary.go index 4b8f326dca..a74e7f4398 100644 --- a/pkg/kubelet/server/stats/summary.go +++ b/pkg/kubelet/server/stats/summary.go @@ -18,7 +18,6 @@ package stats import ( "fmt" - "runtime" "strings" "time" @@ -53,8 +52,6 @@ var _ SummaryProvider = &summaryProviderImpl{} // NewSummaryProvider returns a new SummaryProvider func NewSummaryProvider(statsProvider StatsProvider, fsResourceAnalyzer fsResourceAnalyzerInterface, cruntime container.Runtime) SummaryProvider { - stackBuff := []byte{} - runtime.Stack(stackBuff, false) return &summaryProviderImpl{statsProvider, fsResourceAnalyzer, cruntime} } From 5dbf21aa13ae8fc3eb31a70c9cab1263f0e42629 Mon Sep 17 00:00:00 2001 From: Ke Zhang <zhangke909@qq.com> Date: Tue, 14 Jun 2016 09:21:44 +0800 Subject: [PATCH 049/339] optimize deleteFromIndices method in thread_safe_store.go --- pkg/client/cache/thread_safe_store.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/client/cache/thread_safe_store.go b/pkg/client/cache/thread_safe_store.go index 11077e25b2..e6a0eea336 100644 --- a/pkg/client/cache/thread_safe_store.go +++ b/pkg/client/cache/thread_safe_store.go @@ -261,12 +261,13 @@ func (c *threadSafeMap) deleteFromIndices(obj interface{}, key string) error { } index := c.indices[name] + if index == nil { + continue + } for _, indexValue := range indexValues { - if index != nil { - set := index[indexValue] - if set != nil { - set.Delete(key) - } + set := index[indexValue] + if set != nil { + set.Delete(key) } } } From d9f3e3c3ad70343ba76bd95d374e7a6b8f13d5b4 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka <jchaloup@redhat.com> Date: Fri, 6 May 2016 11:58:35 +0200 Subject: [PATCH 050/339] e2e.framework.util.StartPods: The number of pods to start must be non-zero. Otherwise the function waits for pods forever if waitForRunning is true. It the number of replicas is zero, panic so the mistake is heard all over the e2e realm. Update all callers of StartPods to test for non-zero number of replicas. --- test/e2e/framework/util.go | 6 +-- test/e2e/scheduler_predicates.go | 86 ++++++++++++++++++-------------- test/e2e/ubernetes_lite.go | 5 ++ 3 files changed, 56 insertions(+), 41 deletions(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 0071406da7..9852c9d387 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -2471,12 +2471,12 @@ func (config *RCConfig) start() error { } // Simplified version of RunRC, that does not create RC, but creates plain Pods. -// optionally waits for pods to start running (if waitForRunning == true) +// Optionally waits for pods to start running (if waitForRunning == true). +// The number of replicas must be non-zero. func StartPods(c *client.Client, replicas int, namespace string, podNamePrefix string, pod api.Pod, waitForRunning bool) { // no pod to start if replicas < 1 { - Logf("No pod to start, skipping...") - return + panic("StartPods: number of replicas must be non-zero") } startPodsID := string(util.NewUUID()) // So that we can label and find them for i := 0; i < replicas; i++ { diff --git a/test/e2e/scheduler_predicates.go b/test/e2e/scheduler_predicates.go index a822c4be6e..0849cb1fc6 100644 --- a/test/e2e/scheduler_predicates.go +++ b/test/e2e/scheduler_predicates.go @@ -235,24 +235,29 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { By(fmt.Sprintf("Starting additional %v Pods to fully saturate the cluster max pods and trying to start another one", podsNeededForSaturation)) - framework.StartPods(c, podsNeededForSaturation, ns, "maxp", api.Pod{ - TypeMeta: unversioned.TypeMeta{ - Kind: "Pod", - }, - ObjectMeta: api.ObjectMeta{ - Name: "", - Labels: map[string]string{"name": ""}, - }, - Spec: api.PodSpec{ - Containers: []api.Container{ - { - Name: "", - Image: framework.GetPauseImageName(f.Client), + // As the pods are distributed randomly among nodes, + // it can easily happen that all nodes are satured + // and there is no need to create additional pods. + // StartPods requires at least one pod to replicate. + if podsNeededForSaturation > 0 { + framework.StartPods(c, podsNeededForSaturation, ns, "maxp", api.Pod{ + TypeMeta: unversioned.TypeMeta{ + Kind: "Pod", + }, + ObjectMeta: api.ObjectMeta{ + Name: "", + Labels: map[string]string{"name": ""}, + }, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: "", + Image: framework.GetPauseImageName(f.Client), + }, }, }, - }, - }, true) - + }, true) + } podName := "additional-pod" _, err := c.Pods(ns).Create(&api.Pod{ TypeMeta: unversioned.TypeMeta{ @@ -312,32 +317,37 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { By(fmt.Sprintf("Starting additional %v Pods to fully saturate the cluster CPU and trying to start another one", podsNeededForSaturation)) - framework.StartPods(c, podsNeededForSaturation, ns, "overcommit", api.Pod{ - TypeMeta: unversioned.TypeMeta{ - Kind: "Pod", - }, - ObjectMeta: api.ObjectMeta{ - Name: "", - Labels: map[string]string{"name": ""}, - }, - Spec: api.PodSpec{ - Containers: []api.Container{ - { - Name: "", - Image: framework.GetPauseImageName(f.Client), - Resources: api.ResourceRequirements{ - Limits: api.ResourceList{ - "cpu": *resource.NewMilliQuantity(milliCpuPerPod, "DecimalSI"), - }, - Requests: api.ResourceList{ - "cpu": *resource.NewMilliQuantity(milliCpuPerPod, "DecimalSI"), + // As the pods are distributed randomly among nodes, + // it can easily happen that all nodes are saturated + // and there is no need to create additional pods. + // StartPods requires at least one pod to replicate. + if podsNeededForSaturation > 0 { + framework.StartPods(c, podsNeededForSaturation, ns, "overcommit", api.Pod{ + TypeMeta: unversioned.TypeMeta{ + Kind: "Pod", + }, + ObjectMeta: api.ObjectMeta{ + Name: "", + Labels: map[string]string{"name": ""}, + }, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: "", + Image: framework.GetPauseImageName(f.Client), + Resources: api.ResourceRequirements{ + Limits: api.ResourceList{ + "cpu": *resource.NewMilliQuantity(milliCpuPerPod, "DecimalSI"), + }, + Requests: api.ResourceList{ + "cpu": *resource.NewMilliQuantity(milliCpuPerPod, "DecimalSI"), + }, }, }, }, }, - }, - }, true) - + }, true) + } podName := "additional-pod" _, err = c.Pods(ns).Create(&api.Pod{ TypeMeta: unversioned.TypeMeta{ diff --git a/test/e2e/ubernetes_lite.go b/test/e2e/ubernetes_lite.go index c3368c7970..5584a50794 100644 --- a/test/e2e/ubernetes_lite.go +++ b/test/e2e/ubernetes_lite.go @@ -93,6 +93,11 @@ func SpreadServiceOrFail(f *framework.Framework, replicaCount int, image string) }, }, } + + // Caution: StartPods requires at least one pod to replicate. + // Based on the callers, replicas is always positive number: zoneCount >= 0 implies (2*zoneCount)+1 > 0. + // Thus, no need to test for it. Once the precondition changes to zero number of replicas, + // test for replicaCount > 0. Otherwise, StartPods panics. framework.StartPods(f.Client, replicaCount, f.Namespace.Name, serviceName, *podSpec, false) // Wait for all of them to be scheduled From 11e1188dbe5587ab53f1c583e4eee04e408ef5eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Ole=C5=9B?= <lukaszoles@gmail.com> Date: Tue, 14 Jun 2016 14:33:51 +0200 Subject: [PATCH 051/339] Show restart count for init containers Coutner is reset for normal containers. fixes issue: #26892 --- pkg/kubectl/resource_printer.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/kubectl/resource_printer.go b/pkg/kubectl/resource_printer.go index 9237cee232..7a702fb916 100644 --- a/pkg/kubectl/resource_printer.go +++ b/pkg/kubectl/resource_printer.go @@ -616,6 +616,7 @@ func printPodBase(pod *api.Pod, w io.Writer, options PrintOptions) error { initializing := false for i := range pod.Status.InitContainerStatuses { container := pod.Status.InitContainerStatuses[i] + restarts += int(container.RestartCount) switch { case container.State.Terminated != nil && container.State.Terminated.ExitCode == 0: continue @@ -641,6 +642,7 @@ func printPodBase(pod *api.Pod, w io.Writer, options PrintOptions) error { break } if !initializing { + restarts = 0 for i := len(pod.Status.ContainerStatuses) - 1; i >= 0; i-- { container := pod.Status.ContainerStatuses[i] From ac64404d86190065ed71d9c864d1294c720fcad1 Mon Sep 17 00:00:00 2001 From: deads2k <deads@redhat.com> Date: Thu, 2 Jun 2016 13:50:52 -0400 Subject: [PATCH 052/339] let patch use local file content to mutate --- hack/test-cmd.sh | 3 ++ pkg/kubectl/cmd/patch.go | 106 ++++++++++++++++++++++++++++++++------- 2 files changed, 92 insertions(+), 17 deletions(-) diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 6cb0bf8fce..1c4d748c50 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -627,6 +627,9 @@ runTests() { # Post-condition: valid-pod POD is created kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" 'valid-pod:' + ## Patch can modify a local object + kubectl patch --local -f pkg/api/validation/testdata/v1/validPod.yaml --patch='{"spec": {"restartPolicy":"Never"}}' -o jsonpath='{.spec.restartPolicy}' | grep -q "Never" + ## Patch pod can change image # Command kubectl patch "${kube_flags[@]}" pod valid-pod --record -p='{"spec":{"containers":[{"name": "kubernetes-serve-hostname", "image": "nginx"}]}}' diff --git a/pkg/kubectl/cmd/patch.go b/pkg/kubectl/cmd/patch.go index 8959f32fdc..88b15b5baf 100644 --- a/pkg/kubectl/cmd/patch.go +++ b/pkg/kubectl/cmd/patch.go @@ -21,13 +21,16 @@ import ( "io" "strings" + "github.com/evanphx/json-patch" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/kubectl" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/kubectl/resource" + "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/util/sets" + "k8s.io/kubernetes/pkg/util/strategicpatch" "k8s.io/kubernetes/pkg/util/yaml" ) @@ -38,6 +41,9 @@ var patchTypes = map[string]api.PatchType{"json": api.JSONPatchType, "merge": ap type PatchOptions struct { Filenames []string Recursive bool + Local bool + + OutputFormat string } const ( @@ -78,9 +84,8 @@ func NewCmdPatch(f *cmdutil.Factory, out io.Writer) *cobra.Command { Long: patch_long, Example: patch_example, Run: func(cmd *cobra.Command, args []string) { - cmdutil.CheckErr(cmdutil.ValidateOutputArgs(cmd)) - shortOutput := cmdutil.GetFlagString(cmd, "output") == "name" - err := RunPatch(f, out, cmd, args, shortOutput, options) + options.OutputFormat = cmdutil.GetFlagString(cmd, "output") + err := RunPatch(f, out, cmd, args, options) cmdutil.CheckErr(err) }, ValidArgs: validArgs, @@ -89,17 +94,25 @@ func NewCmdPatch(f *cmdutil.Factory, out io.Writer) *cobra.Command { cmd.Flags().StringP("patch", "p", "", "The patch to be applied to the resource JSON file.") cmd.MarkFlagRequired("patch") cmd.Flags().String("type", "strategic", fmt.Sprintf("The type of patch being provided; one of %v", sets.StringKeySet(patchTypes).List())) - cmdutil.AddOutputFlagsForMutation(cmd) + cmdutil.AddPrinterFlags(cmd) cmdutil.AddRecordFlag(cmd) cmdutil.AddInclude3rdPartyFlags(cmd) usage := "Filename, directory, or URL to a file identifying the resource to update" kubectl.AddJsonFilenameFlag(cmd, &options.Filenames, usage) cmdutil.AddRecursiveFlag(cmd, &options.Recursive) + + cmd.Flags().BoolVar(&options.Local, "local", false, "If true, patch will operate on the content of the file, not the server-side resource.") + return cmd } -func RunPatch(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, shortOutput bool, options *PatchOptions) error { +func RunPatch(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *PatchOptions) error { + switch { + case options.Local && len(args) != 0: + return fmt.Errorf("cannot specify --local and server resources") + } + cmdNamespace, enforceNamespace, err := f.DefaultNamespace() if err != nil { return err @@ -149,22 +162,60 @@ func RunPatch(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []stri return err } - helper := resource.NewHelper(client, mapping) - patchedObject, err := helper.Patch(namespace, name, patchType, patchBytes) + if !options.Local { + helper := resource.NewHelper(client, mapping) + patchedObject, err := helper.Patch(namespace, name, patchType, patchBytes) + if err != nil { + return err + } + if cmdutil.ShouldRecord(cmd, info) { + if err := cmdutil.RecordChangeCause(patchedObject, f.Command()); err == nil { + // don't return an error on failure. The patch itself succeeded, its only the hint for that change that failed + // don't bother checking for failures of this replace, because a failure to indicate the hint doesn't fail the command + // also, don't force the replacement. If the replacement fails on a resourceVersion conflict, then it means this + // record hint is likely to be invalid anyway, so avoid the bad hint + resource.NewHelper(client, mapping).Replace(namespace, name, false, patchedObject) + } + } + count++ + + if options.OutputFormat == "name" || len(options.OutputFormat) == 0 { + cmdutil.PrintSuccess(mapper, options.OutputFormat == "name", out, "", name, "patched") + } + return nil + } + + count++ + + patchedObj, err := api.Scheme.DeepCopy(info.VersionedObject) if err != nil { return err } - if cmdutil.ShouldRecord(cmd, info) { - if err := cmdutil.RecordChangeCause(patchedObject, f.Command()); err == nil { - // don't return an error on failure. The patch itself succeeded, its only the hint for that change that failed - // don't bother checking for failures of this replace, because a failure to indicate the hint doesn't fail the command - // also, don't force the replacement. If the replacement fails on a resourceVersion conflict, then it means this - // record hint is likely to be invalid anyway, so avoid the bad hint - resource.NewHelper(client, mapping).Replace(namespace, name, false, patchedObject) - } + originalObjJS, err := runtime.Encode(api.Codecs.LegacyCodec(), info.VersionedObject.(runtime.Object)) + if err != nil { + return err } - count++ - cmdutil.PrintSuccess(mapper, shortOutput, out, "", name, "patched") + originalPatchedObjJS, err := getPatchedJSON(patchType, originalObjJS, patchBytes, patchedObj.(runtime.Object)) + if err != nil { + return err + } + targetObj, err := runtime.Decode(api.Codecs.UniversalDecoder(), originalPatchedObjJS) + if err != nil { + return err + } + // TODO: if we ever want to go generic, this allows a clean -o yaml without trying to print columns or anything + // rawExtension := &runtime.Unknown{ + // Raw: originalPatchedObjJS, + // } + + printer, err := f.PrinterForMapping(cmd, mapping, false) + if err != nil { + return err + } + if err := printer.PrintObj(targetObj, out); err != nil { + return err + } + return nil }) if err != nil { @@ -175,3 +226,24 @@ func RunPatch(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []stri } return nil } + +func getPatchedJSON(patchType api.PatchType, originalJS, patchJS []byte, obj runtime.Object) ([]byte, error) { + switch patchType { + case api.JSONPatchType: + patchObj, err := jsonpatch.DecodePatch(patchJS) + if err != nil { + return nil, err + } + return patchObj.Apply(originalJS) + + case api.MergePatchType: + return jsonpatch.MergePatch(originalJS, patchJS) + + case api.StrategicMergePatchType: + return strategicpatch.StrategicMergePatchData(originalJS, patchJS, obj) + + default: + // only here as a safety net - go-restful filters content-type + return nil, fmt.Errorf("unknown Content-Type header for patch: %v", patchType) + } +} From 1388efe6bb6599d8f59546431c82d50eda367295 Mon Sep 17 00:00:00 2001 From: deads2k <deads@redhat.com> Date: Wed, 25 May 2016 13:43:23 -0400 Subject: [PATCH 053/339] make quota validation re-useable --- pkg/api/validation/validation.go | 85 ++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index a24ef85ca3..d923e711ca 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -2413,7 +2413,7 @@ func validateContainerResourceName(value string, fldPath *field.Path) field.Erro // Validate resource names that can go in a resource quota // Refer to docs/design/resources.md for more details. -func validateResourceQuotaResourceName(value string, fldPath *field.Path) field.ErrorList { +func ValidateResourceQuotaResourceName(value string, fldPath *field.Path) field.ErrorList { allErrs := validateResourceName(value, fldPath) if len(strings.Split(value, "/")) == 1 { if !api.IsStandardQuotaResourceName(value) { @@ -2759,24 +2759,24 @@ func ValidateResourceRequirements(requirements *api.ResourceRequirements, fldPat } // validateResourceQuotaScopes ensures that each enumerated hard resource constraint is valid for set of scopes -func validateResourceQuotaScopes(resourceQuota *api.ResourceQuota) field.ErrorList { +func validateResourceQuotaScopes(resourceQuotaSpec *api.ResourceQuotaSpec, fld *field.Path) field.ErrorList { allErrs := field.ErrorList{} - if len(resourceQuota.Spec.Scopes) == 0 { + if len(resourceQuotaSpec.Scopes) == 0 { return allErrs } hardLimits := sets.NewString() - for k := range resourceQuota.Spec.Hard { + for k := range resourceQuotaSpec.Hard { hardLimits.Insert(string(k)) } - fldPath := field.NewPath("spec", "scopes") + fldPath := fld.Child("scopes") scopeSet := sets.NewString() - for _, scope := range resourceQuota.Spec.Scopes { + for _, scope := range resourceQuotaSpec.Scopes { if !api.IsStandardResourceQuotaScope(string(scope)) { - allErrs = append(allErrs, field.Invalid(fldPath, resourceQuota.Spec.Scopes, "unsupported scope")) + allErrs = append(allErrs, field.Invalid(fldPath, resourceQuotaSpec.Scopes, "unsupported scope")) } for _, k := range hardLimits.List() { if api.IsStandardQuotaResourceName(k) && !api.IsResourceQuotaScopeValidForResource(scope, k) { - allErrs = append(allErrs, field.Invalid(fldPath, resourceQuota.Spec.Scopes, "unsupported scope applied to resource")) + allErrs = append(allErrs, field.Invalid(fldPath, resourceQuotaSpec.Scopes, "unsupported scope applied to resource")) } } scopeSet.Insert(string(scope)) @@ -2787,7 +2787,7 @@ func validateResourceQuotaScopes(resourceQuota *api.ResourceQuota) field.ErrorLi } for _, invalidScopePair := range invalidScopePairs { if scopeSet.HasAll(invalidScopePair.List()...) { - allErrs = append(allErrs, field.Invalid(fldPath, resourceQuota.Spec.Scopes, "conflicting scopes")) + allErrs = append(allErrs, field.Invalid(fldPath, resourceQuotaSpec.Scopes, "conflicting scopes")) } } return allErrs @@ -2797,32 +2797,47 @@ func validateResourceQuotaScopes(resourceQuota *api.ResourceQuota) field.ErrorLi func ValidateResourceQuota(resourceQuota *api.ResourceQuota) field.ErrorList { allErrs := ValidateObjectMeta(&resourceQuota.ObjectMeta, true, ValidateResourceQuotaName, field.NewPath("metadata")) - fldPath := field.NewPath("spec", "hard") - for k, v := range resourceQuota.Spec.Hard { - resPath := fldPath.Key(string(k)) - allErrs = append(allErrs, validateResourceQuotaResourceName(string(k), resPath)...) - allErrs = append(allErrs, validateResourceQuantityValue(string(k), v, resPath)...) - } - allErrs = append(allErrs, validateResourceQuotaScopes(resourceQuota)...) + allErrs = append(allErrs, ValidateResourceQuotaSpec(&resourceQuota.Spec, field.NewPath("spec"))...) + allErrs = append(allErrs, ValidateResourceQuotaStatus(&resourceQuota.Status, field.NewPath("status"))...) - fldPath = field.NewPath("status", "hard") - for k, v := range resourceQuota.Status.Hard { + return allErrs +} + +func ValidateResourceQuotaStatus(status *api.ResourceQuotaStatus, fld *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + fldPath := fld.Child("hard") + for k, v := range status.Hard { resPath := fldPath.Key(string(k)) - allErrs = append(allErrs, validateResourceQuotaResourceName(string(k), resPath)...) - allErrs = append(allErrs, validateResourceQuantityValue(string(k), v, resPath)...) + allErrs = append(allErrs, ValidateResourceQuotaResourceName(string(k), resPath)...) + allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...) } - fldPath = field.NewPath("status", "used") - for k, v := range resourceQuota.Status.Used { + fldPath = fld.Child("used") + for k, v := range status.Used { resPath := fldPath.Key(string(k)) - allErrs = append(allErrs, validateResourceQuotaResourceName(string(k), resPath)...) - allErrs = append(allErrs, validateResourceQuantityValue(string(k), v, resPath)...) + allErrs = append(allErrs, ValidateResourceQuotaResourceName(string(k), resPath)...) + allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...) } return allErrs } -// validateResourceQuantityValue enforces that specified quantity is valid for specified resource -func validateResourceQuantityValue(resource string, value resource.Quantity, fldPath *field.Path) field.ErrorList { +func ValidateResourceQuotaSpec(resourceQuotaSpec *api.ResourceQuotaSpec, fld *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + fldPath := fld.Child("hard") + for k, v := range resourceQuotaSpec.Hard { + resPath := fldPath.Key(string(k)) + allErrs = append(allErrs, ValidateResourceQuotaResourceName(string(k), resPath)...) + allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...) + } + allErrs = append(allErrs, validateResourceQuotaScopes(resourceQuotaSpec, fld)...) + + return allErrs +} + +// ValidateResourceQuantityValue enforces that specified quantity is valid for specified resource +func ValidateResourceQuantityValue(resource string, value resource.Quantity, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} allErrs = append(allErrs, ValidateNonnegativeQuantity(value, fldPath)...) if api.IsIntegerResourceName(resource) { @@ -2837,15 +2852,10 @@ func validateResourceQuantityValue(resource string, value resource.Quantity, fld // newResourceQuota is updated with fields that cannot be changed. func ValidateResourceQuotaUpdate(newResourceQuota, oldResourceQuota *api.ResourceQuota) field.ErrorList { allErrs := ValidateObjectMetaUpdate(&newResourceQuota.ObjectMeta, &oldResourceQuota.ObjectMeta, field.NewPath("metadata")) - fldPath := field.NewPath("spec", "hard") - for k, v := range newResourceQuota.Spec.Hard { - resPath := fldPath.Key(string(k)) - allErrs = append(allErrs, validateResourceQuotaResourceName(string(k), resPath)...) - allErrs = append(allErrs, validateResourceQuantityValue(string(k), v, resPath)...) - } + allErrs = append(allErrs, ValidateResourceQuotaSpec(&newResourceQuota.Spec, field.NewPath("spec"))...) // ensure scopes cannot change, and that resources are still valid for scope - fldPath = field.NewPath("spec", "scopes") + fldPath := field.NewPath("spec", "scopes") oldScopes := sets.NewString() newScopes := sets.NewString() for _, scope := range newResourceQuota.Spec.Scopes { @@ -2857,7 +2867,6 @@ func ValidateResourceQuotaUpdate(newResourceQuota, oldResourceQuota *api.Resourc if !oldScopes.Equal(newScopes) { allErrs = append(allErrs, field.Invalid(fldPath, newResourceQuota.Spec.Scopes, "field is immutable")) } - allErrs = append(allErrs, validateResourceQuotaScopes(newResourceQuota)...) newResourceQuota.Status = oldResourceQuota.Status return allErrs @@ -2873,14 +2882,14 @@ func ValidateResourceQuotaStatusUpdate(newResourceQuota, oldResourceQuota *api.R fldPath := field.NewPath("status", "hard") for k, v := range newResourceQuota.Status.Hard { resPath := fldPath.Key(string(k)) - allErrs = append(allErrs, validateResourceQuotaResourceName(string(k), resPath)...) - allErrs = append(allErrs, validateResourceQuantityValue(string(k), v, resPath)...) + allErrs = append(allErrs, ValidateResourceQuotaResourceName(string(k), resPath)...) + allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...) } fldPath = field.NewPath("status", "used") for k, v := range newResourceQuota.Status.Used { resPath := fldPath.Key(string(k)) - allErrs = append(allErrs, validateResourceQuotaResourceName(string(k), resPath)...) - allErrs = append(allErrs, validateResourceQuantityValue(string(k), v, resPath)...) + allErrs = append(allErrs, ValidateResourceQuotaResourceName(string(k), resPath)...) + allErrs = append(allErrs, ValidateResourceQuantityValue(string(k), v, resPath)...) } newResourceQuota.Spec = oldResourceQuota.Spec return allErrs From fb56095683787744f6a2b86996fac0216d50a65f Mon Sep 17 00:00:00 2001 From: Euan Kemp <euank@coreos.com> Date: Wed, 15 Jun 2016 11:49:12 -0700 Subject: [PATCH 054/339] e2e: Add container runtime flag --- hack/ginkgo-e2e.sh | 1 + test/e2e/framework/test_context.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/hack/ginkgo-e2e.sh b/hack/ginkgo-e2e.sh index 87fd77276b..05bf48b5e7 100755 --- a/hack/ginkgo-e2e.sh +++ b/hack/ginkgo-e2e.sh @@ -119,6 +119,7 @@ export PATH=$(dirname "${e2e_test}"):"${PATH}" --node-instance-group="${NODE_INSTANCE_GROUP:-}" \ --prefix="${KUBE_GCE_INSTANCE_PREFIX:-e2e}" \ ${OS_DISTRIBUTION:+"--os-distro=${OS_DISTRIBUTION}"} \ + ${KUBE_CONTAINER_RUNTIME:+"--container-runtime=${KUBE_CONTAINER_RUNTIME}"} \ ${NUM_NODES:+"--num-nodes=${NUM_NODES}"} \ ${E2E_CLEAN_START:+"--clean-start=true"} \ ${E2E_MIN_STARTUP_PODS:+"--minStartupPods=${E2E_MIN_STARTUP_PODS}"} \ diff --git a/test/e2e/framework/test_context.go b/test/e2e/framework/test_context.go index a0790b3aaf..28d653f493 100644 --- a/test/e2e/framework/test_context.go +++ b/test/e2e/framework/test_context.go @@ -47,6 +47,7 @@ type TestContextType struct { UpgradeTarget string PrometheusPushGateway string OSDistro string + ContainerRuntime string VerifyServiceAccount bool DeleteNamespace bool CleanStart bool @@ -108,6 +109,7 @@ func RegisterFlags() { flag.StringVar(&TestContext.ReportPrefix, "report-prefix", "", "Optional prefix for JUnit XML reports. Default is empty, which doesn't prepend anything to the default name.") flag.StringVar(&TestContext.Prefix, "prefix", "e2e", "A prefix to be added to cloud resources created during testing.") flag.StringVar(&TestContext.OSDistro, "os-distro", "debian", "The OS distribution of cluster VM instances (debian, trusty, or coreos).") + flag.StringVar(&TestContext.ContainerRuntime, "container-runtime", "docker", "The container runtime of cluster VM instances (docker or rkt).") // TODO: Flags per provider? Rename gce-project/gce-zone? cloudConfig := &TestContext.CloudConfig From d8d63be2ddfe663b28da07a49ef27adab3910a6e Mon Sep 17 00:00:00 2001 From: Euan Kemp <euank@coreos.com> Date: Tue, 24 May 2016 15:40:49 -0700 Subject: [PATCH 055/339] e2e: Skip init container tests under rkt runtime --- test/e2e/framework/util.go | 8 ++++++++ test/e2e/pods.go | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 206311a4c3..947d5dc6ba 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -366,6 +366,14 @@ func SkipUnlessProviderIs(supportedProviders ...string) { } } +func SkipIfContainerRuntimeIs(runtimes ...string) { + for _, runtime := range runtimes { + if runtime == TestContext.ContainerRuntime { + Skipf("Not supported under container runtime %s", runtime) + } + } +} + func ProviderIs(providers ...string) bool { for _, provider := range providers { if strings.ToLower(provider) == strings.ToLower(TestContext.Provider) { diff --git a/test/e2e/pods.go b/test/e2e/pods.go index 7fb8249446..94eec318b5 100644 --- a/test/e2e/pods.go +++ b/test/e2e/pods.go @@ -664,6 +664,7 @@ var _ = framework.KubeDescribe("Pods", func() { }) It("should invoke init containers on a RestartNever pod", func() { + framework.SkipIfContainerRuntimeIs("rkt") // #25988 podClient := f.Client.Pods(f.Namespace.Name) By("creating the pod") @@ -729,6 +730,7 @@ var _ = framework.KubeDescribe("Pods", func() { }) It("should invoke init containers on a RestartAlways pod", func() { + framework.SkipIfContainerRuntimeIs("rkt") // #25988 podClient := f.Client.Pods(f.Namespace.Name) By("creating the pod") @@ -798,6 +800,7 @@ var _ = framework.KubeDescribe("Pods", func() { }) It("should not start app containers if init containers fail on a RestartAlways pod", func() { + framework.SkipIfContainerRuntimeIs("rkt") // #25988 podClient := f.Client.Pods(f.Namespace.Name) By("creating the pod") @@ -913,6 +916,7 @@ var _ = framework.KubeDescribe("Pods", func() { }) It("should not start app containers and fail the pod if init containers fail on a RestartNever pod", func() { + framework.SkipIfContainerRuntimeIs("rkt") // #25988 podClient := f.Client.Pods(f.Namespace.Name) By("creating the pod") From e50a821aa80f143b7379503a807af83f9b99d865 Mon Sep 17 00:00:00 2001 From: Euan Kemp <euank@coreos.com> Date: Tue, 24 May 2016 16:55:56 -0700 Subject: [PATCH 056/339] e2e: Skip attach tests for rkt runtime --- test/e2e/kubectl.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index 754309fa4e..91edf1ea5e 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -348,6 +348,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { }) It("should support inline execution and attach", func() { + framework.SkipIfContainerRuntimeIs("rkt") // #23335 framework.SkipUnlessServerVersionGTE(jobsVersion, c) nsFlag := fmt.Sprintf("--namespace=%v", ns) @@ -1044,6 +1045,8 @@ var _ = framework.KubeDescribe("Kubectl client", func() { jobName := "e2e-test-rm-busybox-job" It("should create a job from an image, then delete the job [Conformance]", func() { + // The rkt runtime doesn't support attach, see #23335 + framework.SkipIfContainerRuntimeIs("rkt") framework.SkipUnlessServerVersionGTE(jobsVersion, c) By("executing a command with run --rm and attach with stdin") From d95e767601e5fbe9e3ee5de8158c042437ef4127 Mon Sep 17 00:00:00 2001 From: dkalleg <daniel.allegood@hpe.com> Date: Mon, 13 Jun 2016 17:18:03 -0700 Subject: [PATCH 057/339] vSphere provider - Getting node data by ip instead of uuid To get the uuid we need the service to be running as root. This change allows us to run the controller-manager and api server as non-root. --- .../providers/vsphere/vsphere.go | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/pkg/cloudprovider/providers/vsphere/vsphere.go b/pkg/cloudprovider/providers/vsphere/vsphere.go index 7724149e59..673f7241e4 100644 --- a/pkg/cloudprovider/providers/vsphere/vsphere.go +++ b/pkg/cloudprovider/providers/vsphere/vsphere.go @@ -17,12 +17,11 @@ limitations under the License. package vsphere import ( - "bytes" "errors" "fmt" "io" + "net" "net/url" - "os/exec" "strings" "github.com/vmware/govmomi" @@ -96,14 +95,12 @@ func init() { } func readInstanceID(cfg *VSphereConfig) (string, error) { - cmd := exec.Command("bash", "-c", `dmidecode -t 1 | grep UUID | tr -d ' ' | cut -f 2 -d ':'`) - var out bytes.Buffer - cmd.Stdout = &out - err := cmd.Run() + addrs, err := net.InterfaceAddrs() if err != nil { return "", err } - if out.Len() == 0 { + + if len(addrs) == 0 { return "", fmt.Errorf("unable to retrieve Instance ID") } @@ -130,7 +127,22 @@ func readInstanceID(cfg *VSphereConfig) (string, error) { s := object.NewSearchIndex(c.Client) - svm, err := s.FindByUuid(ctx, dc, strings.ToLower(strings.TrimSpace(out.String())), true, nil) + var svm object.Reference + for _, v := range addrs { + ip, _, err := net.ParseCIDR(v.String()) + if err != nil { + return "", fmt.Errorf("unable to parse cidr from ip") + } + + svm, err = s.FindByIp(ctx, dc, ip.String(), true) + if err == nil && svm != nil { + break + } + } + if svm == nil { + return "", fmt.Errorf("unable to retrieve vm reference from vSphere") + } + var vm mo.VirtualMachine err = s.Properties(ctx, svm.Reference(), []string{"name"}, &vm) if err != nil { From 5c546a187b3733f341db209231149b345870e019 Mon Sep 17 00:00:00 2001 From: Quinton Hoole <quinton@google.com> Date: Wed, 15 Jun 2016 14:42:04 -0700 Subject: [PATCH 058/339] Build Darwin test binaries on OS X. --- hack/lib/golang.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index eb45223147..49e7b2ae19 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -53,13 +53,17 @@ readonly KUBE_SERVER_BINARIES=("${KUBE_SERVER_TARGETS[@]##*/}") if [[ "${KUBE_FASTBUILD:-}" == "true" ]]; then readonly KUBE_SERVER_PLATFORMS=(linux/amd64) - readonly KUBE_TEST_PLATFORMS=(linux/amd64) if [[ "${KUBE_BUILDER_OS:-}" == "darwin"* ]]; then + readonly KUBE_TEST_PLATFORMS=( + darwin/amd64 + linux/amd64 + ) readonly KUBE_CLIENT_PLATFORMS=( darwin/amd64 linux/amd64 ) else + readonly KUBE_TEST_PLATFORMS=(linux/amd64) readonly KUBE_CLIENT_PLATFORMS=(linux/amd64) fi else From 5ca0e0169052551b186c7b45c9ba9ed1b17fc113 Mon Sep 17 00:00:00 2001 From: Salvatore Dario Minonne <salvatore-dario.minonne@amadeus.com> Date: Thu, 16 Jun 2016 10:43:47 +0200 Subject: [PATCH 059/339] to remove workflow proposal --- docs/proposals/workflow.md | 300 ------------------------------------- 1 file changed, 300 deletions(-) delete mode 100644 docs/proposals/workflow.md diff --git a/docs/proposals/workflow.md b/docs/proposals/workflow.md deleted file mode 100644 index 11f0b59e38..0000000000 --- a/docs/proposals/workflow.md +++ /dev/null @@ -1,300 +0,0 @@ -<!-- BEGIN MUNGE: UNVERSIONED_WARNING --> - -<!-- BEGIN STRIP_FOR_RELEASE --> - -<img src="http://kubernetes.io/img/warning.png" alt="WARNING" - width="25" height="25"> -<img src="http://kubernetes.io/img/warning.png" alt="WARNING" - width="25" height="25"> -<img src="http://kubernetes.io/img/warning.png" alt="WARNING" - width="25" height="25"> -<img src="http://kubernetes.io/img/warning.png" alt="WARNING" - width="25" height="25"> -<img src="http://kubernetes.io/img/warning.png" alt="WARNING" - width="25" height="25"> - -<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2> - -If you are using a released version of Kubernetes, you should -refer to the docs that go with that version. - -<!-- TAG RELEASE_LINK, added by the munger automatically --> -<strong> -The latest release of this document can be found -[here](http://releases.k8s.io/release-1.3/docs/proposals/workflow.md). - -Documentation for other releases can be found at -[releases.k8s.io](http://releases.k8s.io). -</strong> --- - -<!-- END STRIP_FOR_RELEASE --> - -<!-- END MUNGE: UNVERSIONED_WARNING --> - - -## Abstract - -This proposal introduces [workflow](https://en.wikipedia.org/wiki/Workflow_management_system) -functionality in kubernetes. -Workflows (aka [DAG](https://en.wikipedia.org/wiki/Directed_acyclic_graph) workflows -since _tasks_ are organized in a Directed Acyclic Graph) are ubiquitous -in modern [job schedulers](https://en.wikipedia.org/wiki/Job_scheduler), see for example: - -* [luigi](https://github.com/spotify/luigi) -* [ozie](http://oozie.apache.org/) -* [azkaban](https://azkaban.github.io/) - -Most of the [job schedulers](https://en.wikipedia.org/wiki/List_of_job_scheduler_software) offer -workflow functionality to some extent. - - -## Use Cases - -* As a user, I want to create a _JobB_ which depends upon _JobA_ running to completion. -* As a user, I want workflow composability. I want to create a _JobA_ which will be triggered -as soon as an already running workflow runs to completion. -* As a user, I want to delete a workflow (eventually cascading to running _tasks_). -* As a user, I want to debug a workflow (ability to track failure): in case a _task_ -didn't run user should have a way to backtrack the reason of the failure, understanding which -dependency has not been satisified. - - -## Implementation - -In this proposal a new REST resource `Workflow` is introduced. A `Workflow` is represented as a -[graph](https://en.wikipedia.org/wiki/Graph_(mathematics)), more specifically as a DAG. -Vertices of the graph represent steps of the workflow. The workflow steps are represented via a -`WorkflowStep`<sup>1</sup> resource. -The edges of the graph represent _dependecies_. To represent edges there is no explicit resource -- rather they are stored as predecessors in each `WorkflowStep` (i.e. each node). -The basic idea of this proposal consists in creation of each step postponing execution -until all predecessors' steps run to completion. - -### Workflow - -A new resource will be introduced in the API. A `Workflow` is a graph. -In the simplest case it's a graph of `Job`s but it can also -be a graph of other entities (for example cross-cluster objects or other `Workflow`s). - -```go - -// Workflow is a DAG workflow -type Workflow struct { - unversioned.TypeMeta `json:",inline"` - - // Standard object's metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata. - api.ObjectMeta `json:"metadata,omitempty"` - - // Spec defines the expected behavior of a Workflow. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - Spec WorkflowSpec `json:"spec,omitempty"` - - // Status represents the current status of the Workflow. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - Status WorkflowStatus `json:"status,omitempty"` -} - -// WorkflowList implements list of Workflow. -type WorkflowList struct { - unversioned.TypeMeta `json:",inline"` - - // Standard list metadata - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - unversioned.ListMeta `json:"metadata,omitempty"` - - // Items is the list of Workflow - Items []Workflow `json:"items"` -} - -// WorkflowSpec contains Workflow specification -type WorkflowSpec struct { - // Standard object's metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - api.ObjectMeta `json:"metadata,omitempty"` - - //ActiveDealineSeconds contains - ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty"` - - // Steps is a map containing the workflow steps. Key of the - // map is a string which uniquely identifies the workflow step - Steps map[string]WorkflowStep `json:"steps,omitempty"` - - // Selector for created jobs (if any) - Selector *LabelSelector `json:"selector,omitempty"` -} - -// WorkflowStep contains necessary information to identifiy the node of the workflow graph -type WorkflowStep struct { - // JobTemplate contains the job specificaton that should be run in this Workflow. - // Only one between externalRef and jobTemplate can be set. - JobTemplate *JobTemplateSpec `json:"jobTemplate,omitempty"` - - // External contains a reference to another schedulable resource. - // Only one between ExternalRef and JobTemplate can be set. - ExternalRef *api.ObjectReference `json:"externalRef,omitempty"` - - // Dependecies represent dependecies of the current workflow step. - // Irrilevant for ExteranlRef step - Dependencies []string `json:"dependencies,omitempty"` -} - -type WorkflowConditionType string - -// These are valid conditions of a workflow. -const ( - // WorkflowComplete means the workflow has completed its execution. - WorkflowComplete WorkflowConditionType = "Complete" -) - -type WorkflowCondition struct { - // Type of workflow condition, currently only Complete. - Type WorkflowConditionType `json:"type"` - - // Status of the condition, one of True, False, Unknown. - Status api.ConditionStatus `json:"status"` - - // Last time the condition was checked. - LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty"` - - // Last time the condition transited from one status to another. - LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty"` - - // (brief) reason for the condition's last transition. - Reason string `json:"reason,omitempty"` - - // Human readable message indicating details about last transition. - Message string `json:"message,omitempty"` -} - -// WorkflowStatus represents the -type WorkflowStatus struct { - // Conditions represent the latest available observations of an object's current state. - Conditions []WorkflowCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` - - // StartTime represents time when the job was acknowledged by the Workflow controller - // It is not guaranteed to be set in happens-before order across separate operations. - // It is represented in RFC3339 form and is in UTC. - // StartTime doesn't consider startime of `ExternalReference` - StartTime *unversioned.Time `json:"startTime,omitempty"` - - // CompletionTime represents time when the workflow was completed. It is not guaranteed to - // be set in happens-before order across separate operations. - // It is represented in RFC3339 form and is in UTC. - CompletionTime *unversioned.Time `json:"completionTime,omitempty"` - - // Statuses represent status of different steps - Statuses map[string]WorkflowStepStatus `json:statuses` -} - -// WorkflowStepStatus contains necessary information for the step status -type WorkflowStepStatus struct { - //Complete is set to true when resource run to complete - Complete bool `json:"complete"` - - // Reference of the step resource - Reference api.ObjectReference `json:"reference"` -} -``` - -`JobTemplateSpec` is already introduced by -ScheduledJob controller proposal](https://github.com/kubernetes/kubernetes/pull/11980). -Reported for readability: - -```go -type JobTemplateSpec struct { - // Standard object's metadata. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - api.ObjectMeta - - // Spec is a structure defining the expected behavior of a job. - // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - Spec JobSpec -} -``` - -## Controller - -Workflow controller will watch `Workflow` objects and any `Job` objects created by the workflow. -the `Job`s objects created in each step. -Each step can contain either another `Workflow` referenced via `workflowStep.ExternalRef` -or a `Job` created via `workflowStep.jobTemplate`. -For each non finished workflow (similarly to Job, Workflow completion is detected iterating -over all the `status.conditions` condition) we check if deadline is not expired. -If deadline expired the workfow is terminated. -If deadline didn't expires the workflow controller iterates over all workflow steps: - - If step has a status (retrieved via step name (map key) in the `status.statuses` - map check whether the step is already completed. - - If step is completed nothing is done. - - If step is not completed two sub-cases should be analyzed: - * Step containing workflow: check wether workflow terminated and eventually update - the `status.statuses[name].complete` entry if applicable - * Step containing job: check whether job needs to be started or is already started. - - A step/job is started if it has no dependecies or all its dependencies are already - terminated. Workflow controller adds some labels to the Job. - This will permit to obtain the workflow each job belongs to (via `spec.Selector`). - The step name is equally inserted as a label in each job. - - If the job is already running, a completion check is performed. If the job terminated - (checked via conditions `job.status`) the field `status.statusues[name].complete` is updated. - - When all steps are complete: `complete` condition is added to `status.condition` and the - `status.completionTime` is updated. At this point, workflow is finished. - - -## Changing a Workflow - -### Updating - -User can modify a workflow only if the `step`s under modification are not already running. - - -### Deleting - -Users can cancel a workflow by deleting it before it's completed. All running jobs will be deleted. -Other workflows referenced in steps will not be deleted as they are not owned by the parent workflow. - - -## Events - -The events associated to `Workflow`s will be: - -* WorkflowCreated -* WorkflowStarted -* WorkflowEnded -* WorkflowDeleted - -## Kubectl - -Kubectl will be modified to display workflows. More particularly the `describe` command -will display all the steps with their status. Steps will be topologically sorted and -each dependency will be decorated with its status (wether or not step is waitin for -dependency). - -## Future evolution - -In the future we may want to extend _Workflow_ with other kinds of resources, modifying `WorkflowStep` to -support a more general template to create other resources. -One of the major functionalities missing here is the ability to set a recurring `Workflow` (cron-like), -similar to the `ScheduledJob` [#11980](https://github.com/kubernetes/kubernetes/pull/11980) for `Job`. -If the scheduled job is able to support -[various resources](https://github.com/kubernetes/kubernetes/pull/11980#discussion_r46729699) -`Workflow` will benefit from the _schedule_ functionality of `Job`. - -### Relevant use cases out of scope of this proposal - -* As an admin I want to set quota on workflow resources -[#13567](https://github.com/kubernetes/kubernetes/issues/13567). -* As an admin I want to re-assign a workflow resource to another namespace/user<sup>2</sup>. -* As a user I want to set an action when a workflow ends/start -[#3585](https://github.com/kubernetes/kubernetes/issues/3585) - - -<sup>1</sup>Something about naming: literature is full of different names, a commonly used -name is _task_, but since we plan to compose `Workflow`s (i.e. a task can execute -another whole `Workflow`) we have chosen the more generic word `Step`. - - -<sup>2</sup>A very common feature in industrial strength workflow tools. - - -<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> -[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/proposals/workflow.md?pixel)]() -<!-- END MUNGE: GENERATED_ANALYTICS --> From 27b6c1b4f88563d7109abf4e8f49fe210199e5e3 Mon Sep 17 00:00:00 2001 From: Rajdeep Dua <dua_rajdeep@yahoo.com> Date: Sun, 5 Jun 2016 04:10:33 -0700 Subject: [PATCH 060/339] Test cases for Rest Client --- pkg/client/restclient/client_test.go | 212 +++++++++++++++++++-------- 1 file changed, 150 insertions(+), 62 deletions(-) diff --git a/pkg/client/restclient/client_test.go b/pkg/client/restclient/client_test.go index e1cc1f9fae..826d8d47ad 100644 --- a/pkg/client/restclient/client_test.go +++ b/pkg/client/restclient/client_test.go @@ -25,6 +25,8 @@ import ( "testing" "time" + "fmt" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/unversioned" @@ -33,43 +35,29 @@ import ( utiltesting "k8s.io/kubernetes/pkg/util/testing" ) +type TestParam struct { + actualError error + expectingError bool + actualCreated bool + expCreated bool + expStatus *unversioned.Status + testBody bool + testBodyErrorIsNotNil bool +} + func TestDoRequestSuccess(t *testing.T) { - status := &unversioned.Status{Status: unversioned.StatusSuccess} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), status) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 200, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) + testServer, fakeHandler, status := testServerEnv(t, 200) defer testServer.Close() - c, err := RESTClientFor(&Config{ - Host: testServer.URL, - ContentConfig: ContentConfig{ - GroupVersion: testapi.Default.GroupVersion(), - NegotiatedSerializer: testapi.Default.NegotiatedSerializer(), - }, - Username: "user", - Password: "pass", - }) + + c, err := restClient(testServer) if err != nil { t.Fatalf("unexpected error: %v", err) } body, err := c.Get().Prefix("test").Do().Raw() - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - if fakeHandler.RequestReceived.Header["Authorization"] == nil { - t.Errorf("Request is missing authorization header: %#v", fakeHandler.RequestReceived) - } - statusOut, err := runtime.Decode(testapi.Default.Codec(), body) - if err != nil { - t.Errorf("Unexpected error %#v", err) - } - if !reflect.DeepEqual(status, statusOut) { - t.Errorf("Unexpected mis-match. Expected %#v. Saw %#v", status, statusOut) - } - fakeHandler.ValidateRequest(t, "/"+testapi.Default.GroupVersion().String()+"/test", "GET", nil) + + testParam := TestParam{actualError: err, expectingError: false, expCreated: true, + expStatus: status, testBody: true, testBodyErrorIsNotNil: false} + validate(testParam, t, body, fakeHandler) } func TestDoRequestFailed(t *testing.T) { @@ -88,17 +76,13 @@ func TestDoRequestFailed(t *testing.T) { } testServer := httptest.NewServer(&fakeHandler) defer testServer.Close() - c, err := RESTClientFor(&Config{ - Host: testServer.URL, - ContentConfig: ContentConfig{ - GroupVersion: testapi.Default.GroupVersion(), - NegotiatedSerializer: testapi.Default.NegotiatedSerializer(), - }, - }) + + c, err := restClient(testServer) if err != nil { t.Fatalf("unexpected error: %v", err) } body, err := c.Get().Do().Raw() + if err == nil || body != nil { t.Errorf("unexpected non-error: %#v", body) } @@ -117,43 +101,122 @@ func TestDoRequestFailed(t *testing.T) { } func TestDoRequestCreated(t *testing.T) { - status := &unversioned.Status{Status: unversioned.StatusSuccess} - expectedBody, _ := runtime.Encode(testapi.Default.Codec(), status) - fakeHandler := utiltesting.FakeHandler{ - StatusCode: 201, - ResponseBody: string(expectedBody), - T: t, - } - testServer := httptest.NewServer(&fakeHandler) + testServer, fakeHandler, status := testServerEnv(t, 201) defer testServer.Close() - c, err := RESTClientFor(&Config{ - Host: testServer.URL, - ContentConfig: ContentConfig{ - GroupVersion: testapi.Default.GroupVersion(), - NegotiatedSerializer: testapi.Default.NegotiatedSerializer(), - }, - Username: "user", - Password: "pass", - }) + + c, err := restClient(testServer) if err != nil { t.Fatalf("unexpected error: %v", err) } created := false body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() + + testParam := TestParam{actualError: err, expectingError: false, expCreated: true, + expStatus: status, testBody: false} + validate(testParam, t, body, fakeHandler) +} + +func TestDoRequestNotCreated(t *testing.T) { + testServer, fakeHandler, expectedStatus := testServerEnv(t, 202) + defer testServer.Close() + c, err := restClient(testServer) if err != nil { - t.Errorf("Unexpected error %#v", err) + t.Fatalf("unexpected error: %v", err) } - if !created { - t.Errorf("Expected object to be created") + created := false + body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() + testParam := TestParam{actualError: err, expectingError: false, expCreated: false, + expStatus: expectedStatus, testBody: false} + validate(testParam, t, body, fakeHandler) +} + +func TestDoRequestAcceptedNoContentReturned(t *testing.T) { + testServer, fakeHandler, _ := testServerEnv(t, 204) + defer testServer.Close() + + c, err := restClient(testServer) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + created := false + body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() + testParam := TestParam{actualError: err, expectingError: false, expCreated: false, + testBody: false} + validate(testParam, t, body, fakeHandler) +} + +func TestBadRequest(t *testing.T) { + testServer, fakeHandler, _ := testServerEnv(t, 400) + defer testServer.Close() + c, err := restClient(testServer) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + created := false + body, err := c.Get().Prefix("test").Do().WasCreated(&created).Raw() + testParam := TestParam{actualError: err, expectingError: true, expCreated: false, + testBody: true} + validate(testParam, t, body, fakeHandler) +} + +func validate(testParam TestParam, t *testing.T, body []byte, fakeHandler *utiltesting.FakeHandler) { + if testParam.expectingError { + if testParam.actualError == nil { + t.Errorf("Expected error") + } + } + if !testParam.expCreated { + if testParam.actualCreated { + t.Errorf("Expected object not to be created") + } } statusOut, err := runtime.Decode(testapi.Default.Codec(), body) - if err != nil { - t.Errorf("Unexpected error %#v", err) + if testParam.testBody { + if testParam.testBodyErrorIsNotNil { + if err == nil { + t.Errorf("Expected Error") + } + } } - if !reflect.DeepEqual(status, statusOut) { - t.Errorf("Unexpected mis-match. Expected %#v. Saw %#v", status, statusOut) + + if testParam.expStatus != nil { + if !reflect.DeepEqual(testParam.expStatus, statusOut) { + t.Errorf("Unexpected mis-match. Expected %#v. Saw %#v", testParam.expStatus, statusOut) + } } fakeHandler.ValidateRequest(t, "/"+testapi.Default.GroupVersion().String()+"/test", "GET", nil) + +} + +func TestHttpMethods(t *testing.T) { + testServer, _, _ := testServerEnv(t, 200) + defer testServer.Close() + c, _ := restClient(testServer) + + request := c.Post() + if request == nil { + t.Errorf("Post : Object returned should not be nil") + } + + request = c.Get() + if request == nil { + t.Errorf("Get: Object returned should not be nil") + } + + request = c.Put() + if request == nil { + t.Errorf("Put : Object returned should not be nil") + } + + request = c.Delete() + if request == nil { + t.Errorf("Delete : Object returned should not be nil") + } + + request = c.Patch(api.JSONPatchType) + if request == nil { + t.Errorf("Patch : Object returned should not be nil") + } } func TestCreateBackoffManager(t *testing.T) { @@ -191,3 +254,28 @@ func TestCreateBackoffManager(t *testing.T) { } } + +func testServerEnv(t *testing.T, statusCode int) (*httptest.Server, *utiltesting.FakeHandler, *unversioned.Status) { + status := &unversioned.Status{Status: fmt.Sprintf("%s", unversioned.StatusSuccess)} + expectedBody, _ := runtime.Encode(testapi.Default.Codec(), status) + fakeHandler := utiltesting.FakeHandler{ + StatusCode: statusCode, + ResponseBody: string(expectedBody), + T: t, + } + testServer := httptest.NewServer(&fakeHandler) + return testServer, &fakeHandler, status +} + +func restClient(testServer *httptest.Server) (*RESTClient, error) { + c, err := RESTClientFor(&Config{ + Host: testServer.URL, + ContentConfig: ContentConfig{ + GroupVersion: testapi.Default.GroupVersion(), + NegotiatedSerializer: testapi.Default.NegotiatedSerializer(), + }, + Username: "user", + Password: "pass", + }) + return c, err +} From 0ed3bd63e488b152103ea31f3d24865df0cf8d3c Mon Sep 17 00:00:00 2001 From: Phillip Wittrock <pwittroc@google.com> Date: Tue, 14 Jun 2016 14:49:21 -0700 Subject: [PATCH 061/339] Remove bgrant from pkg/OWNERS and pkg/kubectl/OWNERS since he has plenty to do. --- pkg/OWNERS | 1 - pkg/kubectl/OWNERS | 1 - 2 files changed, 2 deletions(-) diff --git a/pkg/OWNERS b/pkg/OWNERS index b55c4799aa..c79bb80fff 100644 --- a/pkg/OWNERS +++ b/pkg/OWNERS @@ -1,5 +1,4 @@ assignees: - - bgrant0607 - brendandburns - dchen1107 - lavalamp diff --git a/pkg/kubectl/OWNERS b/pkg/kubectl/OWNERS index 60bc436d44..26e3e7540e 100644 --- a/pkg/kubectl/OWNERS +++ b/pkg/kubectl/OWNERS @@ -1,5 +1,4 @@ assignees: - - bgrant0607 - brendandburns - deads2k - janetkuo From d8eedd5404e131d86b9489dc59faf69178c63836 Mon Sep 17 00:00:00 2001 From: Jing Xu <jinxu@google.com> Date: Tue, 14 Jun 2016 14:46:47 -0700 Subject: [PATCH 062/339] Increase timeout for testing PD create/delete. fix #26795 for releasev1.1 --- test/e2e/pd.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/e2e/pd.go b/test/e2e/pd.go index ac9be7791e..49e7ea61fc 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -46,6 +46,8 @@ const ( gcePDDetachPollTime = 10 * time.Second nodeStatusTimeout = 1 * time.Minute nodeStatusPollTime = 1 * time.Second + gcePDRetryTimeout = 5 * time.Minute + gcePDRetryPollTime = 5 * time.Second ) var _ = framework.KubeDescribe("Pod Disks", func() { @@ -286,7 +288,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { func createPDWithRetry() (string, error) { newDiskName := "" var err error - for start := time.Now(); time.Since(start) < 180*time.Second; time.Sleep(5 * time.Second) { + for start := time.Now(); time.Since(start) < gcePDRetryTimeout; time.Sleep(gcePDRetryPollTime) { if newDiskName, err = createPD(); err != nil { framework.Logf("Couldn't create a new PD. Sleeping 5 seconds (%v)", err) continue @@ -299,7 +301,7 @@ func createPDWithRetry() (string, error) { func deletePDWithRetry(diskName string) { var err error - for start := time.Now(); time.Since(start) < 180*time.Second; time.Sleep(5 * time.Second) { + for start := time.Now(); time.Since(start) < gcePDRetryTimeout; time.Sleep(gcePDRetryPollTime) { if err = deletePD(diskName); err != nil { framework.Logf("Couldn't delete PD %q. Sleeping 5 seconds (%v)", diskName, err) continue From 734f05057edc874aa19d0421eb6fa0cd648c7f99 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" <sttts@redhat.com> Date: Tue, 14 Jun 2016 14:50:39 +0200 Subject: [PATCH 063/339] Add pod-terminated check to kubectl-exec Fixes https://github.com/openshift/origin/issues/8472#event-681794952 --- pkg/kubectl/cmd/exec.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/kubectl/cmd/exec.go b/pkg/kubectl/cmd/exec.go index 7484afa219..522aec181f 100644 --- a/pkg/kubectl/cmd/exec.go +++ b/pkg/kubectl/cmd/exec.go @@ -174,6 +174,10 @@ func (p *ExecOptions) Run() error { return err } + if pod.Status.Phase == api.PodSucceeded || pod.Status.Phase == api.PodFailed { + return fmt.Errorf("cannot exec into a container in a completed pod; current phase is %s", pod.Status.Phase) + } + containerName := p.ContainerName if len(containerName) == 0 { glog.V(4).Infof("defaulting container name to %s", pod.Spec.Containers[0].Name) From 78e833e7bc9d1404cfcd255c6c277a3f956b7d66 Mon Sep 17 00:00:00 2001 From: Avesh Agarwal <avagarwa@redhat.com> Date: Thu, 16 Jun 2016 14:09:24 -0400 Subject: [PATCH 064/339] Add pod status and reason when there are remaining pods. --- test/e2e/framework/util.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 206311a4c3..d1123a5785 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -992,17 +992,24 @@ func deleteNS(c *client.Client, namespace string, timeout time.Duration) error { // check for pods that were not deleted remaining := []string{} + remainingPods := []api.Pod{} missingTimestamp := false if pods, perr := c.Pods(namespace).List(api.ListOptions{}); perr == nil { for _, pod := range pods.Items { Logf("Pod %s %s on node %s remains, has deletion timestamp %s", namespace, pod.Name, pod.Spec.NodeName, pod.DeletionTimestamp) - remaining = append(remaining, pod.Name) + remaining = append(remaining, fmt.Sprintf("%s{Reason=%s}", pod.Name, pod.Status.Reason)) + remainingPods = append(remainingPods, pod) if pod.DeletionTimestamp == nil { missingTimestamp = true } } } + // log pod status + if len(remainingPods) > 0 { + logPodStates(remainingPods) + } + // a timeout occurred if err != nil { if missingTimestamp { From 28286d689007165c82e22521c5608e9abc9b4e6b Mon Sep 17 00:00:00 2001 From: xiangpengzhao <zhao.xiangpeng@zte.com.cn> Date: Thu, 16 Jun 2016 21:36:07 -0400 Subject: [PATCH 065/339] Refactor func canRunPod --- pkg/kubelet/util.go | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/pkg/kubelet/util.go b/pkg/kubelet/util.go index ae2d94bfa1..dba4269a82 100644 --- a/pkg/kubelet/util.go +++ b/pkg/kubelet/util.go @@ -27,7 +27,24 @@ import ( // Check whether we have the capabilities to run the specified pod. func canRunPod(pod *api.Pod) error { - if pod.Spec.SecurityContext != nil && pod.Spec.SecurityContext.HostNetwork { + if !capabilities.Get().AllowPrivileged { + for _, container := range pod.Spec.Containers { + if securitycontext.HasPrivilegedRequest(&container) { + return fmt.Errorf("pod with UID %q specified privileged container, but is disallowed", pod.UID) + } + } + for _, container := range pod.Spec.InitContainers { + if securitycontext.HasPrivilegedRequest(&container) { + return fmt.Errorf("pod with UID %q specified privileged init container, but is disallowed", pod.UID) + } + } + } + + if pod.Spec.SecurityContext == nil { + return nil + } + + if pod.Spec.SecurityContext.HostNetwork { allowed, err := allowHostNetwork(pod) if err != nil { return err @@ -37,7 +54,7 @@ func canRunPod(pod *api.Pod) error { } } - if pod.Spec.SecurityContext != nil && pod.Spec.SecurityContext.HostPID { + if pod.Spec.SecurityContext.HostPID { allowed, err := allowHostPID(pod) if err != nil { return err @@ -47,7 +64,7 @@ func canRunPod(pod *api.Pod) error { } } - if pod.Spec.SecurityContext != nil && pod.Spec.SecurityContext.HostIPC { + if pod.Spec.SecurityContext.HostIPC { allowed, err := allowHostIPC(pod) if err != nil { return err @@ -57,18 +74,6 @@ func canRunPod(pod *api.Pod) error { } } - if !capabilities.Get().AllowPrivileged { - for _, container := range pod.Spec.Containers { - if securitycontext.HasPrivilegedRequest(&container) { - return fmt.Errorf("pod with UID %q specified privileged container, but is disallowed", pod.UID) - } - } - for _, container := range pod.Spec.InitContainers { - if securitycontext.HasPrivilegedRequest(&container) { - return fmt.Errorf("pod with UID %q specified privileged container, but is disallowed", pod.UID) - } - } - } return nil } From a29f6aa8ae936a81e1ff8eaf51ef167a9624d786 Mon Sep 17 00:00:00 2001 From: Chao Xu <xuchao@google.com> Date: Mon, 13 Jun 2016 11:42:46 -0700 Subject: [PATCH 066/339] add Patch to clientsets --- .../fake/generator_fake_for_type.go | 18 ++++++++++++++- .../generators/generator_for_type.go | 20 ++++++++++++++++- .../unversioned/fake/fake_testtype.go | 11 ++++++++++ .../unversioned/testgroup_test.go | 22 +++++++++++++++++++ .../testgroup.k8s.io/unversioned/testtype.go | 14 ++++++++++++ .../core/unversioned/fake/fake_service.go | 11 ++++++++++ .../typed/core/unversioned/service.go | 14 ++++++++++++ .../typed/federation/unversioned/cluster.go | 13 +++++++++++ .../unversioned/fake/fake_cluster.go | 10 +++++++++ .../typed/core/v1/fake/fake_service.go | 11 ++++++++++ .../typed/core/v1/service.go | 14 ++++++++++++ .../typed/federation/v1alpha1/cluster.go | 13 +++++++++++ .../federation/v1alpha1/fake/fake_cluster.go | 10 +++++++++ .../fake/fake_horizontalpodautoscaler.go | 11 ++++++++++ .../unversioned/horizontalpodautoscaler.go | 14 ++++++++++++ .../typed/batch/unversioned/fake/fake_job.go | 11 ++++++++++ .../unversioned/fake/fake_scheduledjob.go | 11 ++++++++++ .../typed/batch/unversioned/job.go | 14 ++++++++++++ .../typed/batch/unversioned/scheduledjob.go | 14 ++++++++++++ .../typed/core/unversioned/componentstatus.go | 13 +++++++++++ .../typed/core/unversioned/configmap.go | 14 ++++++++++++ .../typed/core/unversioned/endpoints.go | 14 ++++++++++++ .../typed/core/unversioned/event.go | 14 ++++++++++++ .../typed/core/unversioned/event_expansion.go | 16 +++++++++----- .../unversioned/fake/fake_componentstatus.go | 10 +++++++++ .../core/unversioned/fake/fake_configmap.go | 11 ++++++++++ .../core/unversioned/fake/fake_endpoints.go | 11 ++++++++++ .../typed/core/unversioned/fake/fake_event.go | 11 ++++++++++ .../unversioned/fake/fake_event_expansion.go | 8 +++---- .../core/unversioned/fake/fake_limitrange.go | 11 ++++++++++ .../core/unversioned/fake/fake_namespace.go | 10 +++++++++ .../typed/core/unversioned/fake/fake_node.go | 10 +++++++++ .../unversioned/fake/fake_persistentvolume.go | 10 +++++++++ .../fake/fake_persistentvolumeclaim.go | 11 ++++++++++ .../typed/core/unversioned/fake/fake_pod.go | 11 ++++++++++ .../core/unversioned/fake/fake_podtemplate.go | 11 ++++++++++ .../fake/fake_replicationcontroller.go | 11 ++++++++++ .../unversioned/fake/fake_resourcequota.go | 11 ++++++++++ .../core/unversioned/fake/fake_secret.go | 11 ++++++++++ .../core/unversioned/fake/fake_service.go | 11 ++++++++++ .../unversioned/fake/fake_serviceaccount.go | 11 ++++++++++ .../typed/core/unversioned/limitrange.go | 14 ++++++++++++ .../typed/core/unversioned/namespace.go | 13 +++++++++++ .../typed/core/unversioned/node.go | 13 +++++++++++ .../core/unversioned/persistentvolume.go | 13 +++++++++++ .../core/unversioned/persistentvolumeclaim.go | 14 ++++++++++++ .../typed/core/unversioned/pod.go | 14 ++++++++++++ .../typed/core/unversioned/podtemplate.go | 14 ++++++++++++ .../core/unversioned/replicationcontroller.go | 14 ++++++++++++ .../typed/core/unversioned/resourcequota.go | 14 ++++++++++++ .../typed/core/unversioned/secret.go | 14 ++++++++++++ .../typed/core/unversioned/service.go | 14 ++++++++++++ .../typed/core/unversioned/serviceaccount.go | 14 ++++++++++++ .../typed/extensions/unversioned/daemonset.go | 14 ++++++++++++ .../extensions/unversioned/deployment.go | 14 ++++++++++++ .../unversioned/fake/fake_daemonset.go | 11 ++++++++++ .../unversioned/fake/fake_deployment.go | 11 ++++++++++ .../unversioned/fake/fake_ingress.go | 11 ++++++++++ .../fake/fake_podsecuritypolicy.go | 10 +++++++++ .../unversioned/fake/fake_replicaset.go | 11 ++++++++++ .../fake/fake_thirdpartyresource.go | 10 +++++++++ .../typed/extensions/unversioned/ingress.go | 14 ++++++++++++ .../unversioned/podsecuritypolicy.go | 13 +++++++++++ .../extensions/unversioned/replicaset.go | 14 ++++++++++++ .../unversioned/thirdpartyresource.go | 13 +++++++++++ .../typed/rbac/unversioned/clusterrole.go | 13 +++++++++++ .../rbac/unversioned/clusterrolebinding.go | 13 +++++++++++ .../rbac/unversioned/fake/fake_clusterrole.go | 10 +++++++++ .../fake/fake_clusterrolebinding.go | 10 +++++++++ .../typed/rbac/unversioned/fake/fake_role.go | 11 ++++++++++ .../rbac/unversioned/fake/fake_rolebinding.go | 11 ++++++++++ .../typed/rbac/unversioned/role.go | 14 ++++++++++++ .../typed/rbac/unversioned/rolebinding.go | 14 ++++++++++++ .../v1/fake/fake_horizontalpodautoscaler.go | 11 ++++++++++ .../autoscaling/v1/horizontalpodautoscaler.go | 14 ++++++++++++ .../typed/batch/v1/fake/fake_job.go | 11 ++++++++++ .../release_1_3/typed/batch/v1/job.go | 14 ++++++++++++ .../typed/core/v1/componentstatus.go | 13 +++++++++++ .../release_1_3/typed/core/v1/configmap.go | 14 ++++++++++++ .../release_1_3/typed/core/v1/endpoints.go | 14 ++++++++++++ .../release_1_3/typed/core/v1/event.go | 14 ++++++++++++ .../typed/core/v1/event_expansion.go | 16 +++++++++----- .../core/v1/fake/fake_componentstatus.go | 10 +++++++++ .../typed/core/v1/fake/fake_configmap.go | 11 ++++++++++ .../typed/core/v1/fake/fake_endpoints.go | 11 ++++++++++ .../typed/core/v1/fake/fake_event.go | 11 ++++++++++ .../core/v1/fake/fake_event_expansion.go | 8 +++---- .../typed/core/v1/fake/fake_limitrange.go | 11 ++++++++++ .../typed/core/v1/fake/fake_namespace.go | 10 +++++++++ .../typed/core/v1/fake/fake_node.go | 10 +++++++++ .../core/v1/fake/fake_persistentvolume.go | 10 +++++++++ .../typed/core/v1/fake/fake_pod.go | 11 ++++++++++ .../typed/core/v1/fake/fake_podtemplate.go | 11 ++++++++++ .../v1/fake/fake_replicationcontroller.go | 11 ++++++++++ .../typed/core/v1/fake/fake_resourcequota.go | 11 ++++++++++ .../typed/core/v1/fake/fake_secret.go | 11 ++++++++++ .../typed/core/v1/fake/fake_service.go | 11 ++++++++++ .../typed/core/v1/fake/fake_serviceaccount.go | 11 ++++++++++ .../release_1_3/typed/core/v1/limitrange.go | 14 ++++++++++++ .../release_1_3/typed/core/v1/namespace.go | 13 +++++++++++ .../release_1_3/typed/core/v1/node.go | 13 +++++++++++ .../typed/core/v1/persistentvolume.go | 13 +++++++++++ .../release_1_3/typed/core/v1/pod.go | 14 ++++++++++++ .../release_1_3/typed/core/v1/podtemplate.go | 14 ++++++++++++ .../typed/core/v1/replicationcontroller.go | 14 ++++++++++++ .../typed/core/v1/resourcequota.go | 14 ++++++++++++ .../release_1_3/typed/core/v1/secret.go | 14 ++++++++++++ .../release_1_3/typed/core/v1/service.go | 14 ++++++++++++ .../typed/core/v1/serviceaccount.go | 14 ++++++++++++ .../typed/extensions/v1beta1/daemonset.go | 14 ++++++++++++ .../typed/extensions/v1beta1/deployment.go | 14 ++++++++++++ .../extensions/v1beta1/fake/fake_daemonset.go | 11 ++++++++++ .../v1beta1/fake/fake_deployment.go | 11 ++++++++++ .../fake/fake_horizontalpodautoscaler.go | 11 ++++++++++ .../extensions/v1beta1/fake/fake_ingress.go | 11 ++++++++++ .../typed/extensions/v1beta1/fake/fake_job.go | 11 ++++++++++ .../v1beta1/fake/fake_podsecuritypolicy.go | 10 +++++++++ .../v1beta1/fake/fake_replicaset.go | 11 ++++++++++ .../v1beta1/fake/fake_thirdpartyresource.go | 10 +++++++++ .../v1beta1/horizontalpodautoscaler.go | 14 ++++++++++++ .../typed/extensions/v1beta1/ingress.go | 14 ++++++++++++ .../typed/extensions/v1beta1/job.go | 14 ++++++++++++ .../extensions/v1beta1/podsecuritypolicy.go | 13 +++++++++++ .../typed/extensions/v1beta1/replicaset.go | 14 ++++++++++++ .../extensions/v1beta1/thirdpartyresource.go | 13 +++++++++++ pkg/client/testing/core/actions.go | 21 ++++++++++++------ pkg/controller/node/nodecontroller_test.go | 4 ++++ 127 files changed, 1547 insertions(+), 29 deletions(-) diff --git a/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_type.go b/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_type.go index fa06852410..943e70088d 100644 --- a/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_type.go +++ b/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_type.go @@ -115,6 +115,7 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. "apiDeleteOptions": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "DeleteOptions"}), "apiListOptions": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ListOptions"}), "GroupVersionResource": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/unversioned", Name: "GroupVersionResource"}), + "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "PatchType"}), "Everything": c.Universe.Function(types.Name{Package: "k8s.io/kubernetes/pkg/labels", Name: "Everything"}), "NewRootListAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewRootListAction"}), @@ -133,6 +134,8 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. "NewWatchAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewWatchAction"}), "NewUpdateSubresourceAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewUpdateSubresourceAction"}), "NewRootUpdateSubresourceAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewRootUpdateSubresourceAction"}), + "NewRootPatchAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewRootPatchAction"}), + "NewPatchAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewPatchAction"}), } noMethods := types.ExtractCommentTags("+", t.SecondClosestCommentLines)["noMethods"] == "true" @@ -160,7 +163,7 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. sw.Do(listTemplate, m) } sw.Do(watchTemplate, m) - + sw.Do(patchTemplate, m) } return sw.Error() @@ -297,3 +300,16 @@ func (c *Fake$.type|publicPlural$) Watch(opts $.apiListOptions|raw$) ($.watchInt $else$InvokesWatch($.NewRootWatchAction|raw$($.type|allLowercasePlural$Resource, opts))$end$ } ` + +var patchTemplate = ` +// Patch applies the patch and returns the patched $.type|private$. +func (c *Fake$.type|publicPlural$) Patch(name string, pt $.PatchType|raw$, data []byte) (result *$.type|raw$, err error) { + obj, err := c.Fake. + $if .namespaced$Invokes($.NewPatchAction|raw$($.type|allLowercasePlural$Resource, c.ns, name, data), &$.type|raw${}) + $else$Invokes($.NewRootPatchAction|raw$($.type|allLowercasePlural$Resource, name, data), &$.type|raw${})$end$ + if obj == nil { + return nil, err + } + return obj.(*$.type|raw$), err +} +` diff --git a/cmd/libs/go2idl/client-gen/generators/generator_for_type.go b/cmd/libs/go2idl/client-gen/generators/generator_for_type.go index b8068ee95f..a59c2ce9db 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator_for_type.go +++ b/cmd/libs/go2idl/client-gen/generators/generator_for_type.go @@ -76,6 +76,7 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i "apiDeleteOptions": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "DeleteOptions"}), "apiListOptions": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ListOptions"}), "apiParameterCodec": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ParameterCodec"}), + "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "PatchType"}), "namespaced": namespaced, } @@ -118,6 +119,7 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i sw.Do(getTemplate, m) sw.Do(listTemplate, m) sw.Do(watchTemplate, m) + sw.Do(patchTemplate, m) } return sw.Error() @@ -158,7 +160,8 @@ var interfaceTemplate3 = ` DeleteCollection(options *$.apiDeleteOptions|raw$, listOptions $.apiListOptions|raw$) error Get(name string) (*$.type|raw$, error) List(opts $.apiListOptions|raw$) (*$.type|raw$List, error) - Watch(opts $.apiListOptions|raw$) ($.watchInterface|raw$, error)` + Watch(opts $.apiListOptions|raw$) ($.watchInterface|raw$, error) + Patch(name string, pt $.PatchType|raw$, data []byte) (result *$.type|raw$, err error)` var interfaceTemplate4 = ` $.type|public$Expansion @@ -309,3 +312,18 @@ func (c *$.type|privatePlural$) Watch(opts $.apiListOptions|raw$) ($.watchInterf Watch() } ` + +var patchTemplate = ` +// Patch applies the patch and returns the patched $.type|private$. +func (c *$.type|privatePlural$) Patch(name string, pt $.PatchType|raw$, data []byte) (result *$.type|raw$, err error) { + result = &$.type|raw${} + err = c.client.Patch(pt). + $if .namespaced$Namespace(c.ns).$end$ + Resource("$.type|allLowercasePlural$"). + Name(name). + Body(data). + Do(). + Into(result) + return +} +` diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testtype.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testtype.go index 355c73a173..604603e770 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testtype.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testtype.go @@ -114,3 +114,14 @@ func (c *FakeTestTypes) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(testtypesResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched testType. +func (c *FakeTestTypes) Patch(name string, pt api.PatchType, data []byte) (result *testgroup_k8s_io.TestType, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(testtypesResource, c.ns, name, data), &testgroup_k8s_io.TestType{}) + + if obj == nil { + return nil, err + } + return obj.(*testgroup_k8s_io.TestType), err +} diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testgroup_test.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testgroup_test.go index 04817c91f1..e53102b485 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testgroup_test.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testgroup_test.go @@ -245,3 +245,25 @@ func TestExpansionInterface(t *testing.T) { t.Errorf("expansion failed") } } + +func TestPatchTestType(t *testing.T) { + ns := api.NamespaceDefault + requestTestType := &testgroup.TestType{ + ObjectMeta: api.ObjectMeta{ + Name: "foo", + ResourceVersion: "1", + Labels: map[string]string{ + "foo": "bar", + "name": "baz", + }, + }, + } + c := DecoratedSimpleClient{ + simpleClient: simple.Client{ + Request: simple.Request{Method: "PATCH", Path: testHelper.ResourcePath("testtypes", ns, "foo"), Query: simple.BuildQueryValues(nil)}, + Response: simple.Response{StatusCode: http.StatusOK, Body: requestTestType}, + }, + } + receivedTestType, err := c.Setup(t).TestTypes(ns).Patch(requestTestType.Name, api.StrategicMergePatchType, []byte{}) + c.simpleClient.Validate(t, receivedTestType, err) +} diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testtype.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testtype.go index 812f13a0a7..2b9283efa1 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testtype.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testtype.go @@ -38,6 +38,7 @@ type TestTypeInterface interface { Get(name string) (*testgroup_k8s_io.TestType, error) List(opts api.ListOptions) (*testgroup_k8s_io.TestTypeList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *testgroup_k8s_io.TestType, err error) TestTypeExpansion } @@ -148,3 +149,16 @@ func (c *testTypes) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched testType. +func (c *testTypes) Patch(name string, pt api.PatchType, data []byte) (result *testgroup_k8s_io.TestType, err error) { + result = &testgroup_k8s_io.TestType{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("testtypes"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/fake_service.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/fake_service.go index 62eae6481e..a926435989 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/fake_service.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/fake_service.go @@ -113,3 +113,14 @@ func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched service. +func (c *FakeServices) Patch(name string, pt api.PatchType, data []byte) (result *api.Service, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(servicesResource, c.ns, name, data), &api.Service{}) + + if obj == nil { + return nil, err + } + return obj.(*api.Service), err +} diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/service.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/service.go index 006f601c27..e1f6c75a49 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/service.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/service.go @@ -37,6 +37,7 @@ type ServiceInterface interface { Get(name string) (*api.Service, error) List(opts api.ListOptions) (*api.ServiceList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.Service, err error) ServiceExpansion } @@ -147,3 +148,16 @@ func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched service. +func (c *services) Patch(name string, pt api.PatchType, data []byte) (result *api.Service, err error) { + result = &api.Service{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("services"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/cluster.go b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/cluster.go index e270951455..a631e5962b 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/cluster.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/cluster.go @@ -38,6 +38,7 @@ type ClusterInterface interface { Get(name string) (*federation.Cluster, error) List(opts api.ListOptions) (*federation.ClusterList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *federation.Cluster, err error) ClusterExpansion } @@ -138,3 +139,15 @@ func (c *clusters) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched cluster. +func (c *clusters) Patch(name string, pt api.PatchType, data []byte) (result *federation.Cluster, err error) { + result = &federation.Cluster{} + err = c.client.Patch(pt). + Resource("clusters"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/fake_cluster.go b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/fake_cluster.go index e5ef0d7bc6..53fd32d18e 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/fake_cluster.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/fake_cluster.go @@ -106,3 +106,13 @@ func (c *FakeClusters) Watch(opts api.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(clustersResource, opts)) } + +// Patch applies the patch and returns the patched cluster. +func (c *FakeClusters) Patch(name string, pt api.PatchType, data []byte) (result *federation.Cluster, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(clustersResource, name, data), &federation.Cluster{}) + if obj == nil { + return nil, err + } + return obj.(*federation.Cluster), err +} diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/fake_service.go b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/fake_service.go index 3355aa94e1..cbc358e6a3 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/fake_service.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/fake_service.go @@ -114,3 +114,14 @@ func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched service. +func (c *FakeServices) Patch(name string, pt api.PatchType, data []byte) (result *v1.Service, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(servicesResource, c.ns, name, data), &v1.Service{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.Service), err +} diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/service.go b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/service.go index cd62b5d94f..ca533d1f2f 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/service.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/service.go @@ -38,6 +38,7 @@ type ServiceInterface interface { Get(name string) (*v1.Service, error) List(opts api.ListOptions) (*v1.ServiceList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.Service, err error) ServiceExpansion } @@ -148,3 +149,16 @@ func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched service. +func (c *services) Patch(name string, pt api.PatchType, data []byte) (result *v1.Service, err error) { + result = &v1.Service{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("services"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/cluster.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/cluster.go index 1a94323e01..e09ca93fb5 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/cluster.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/cluster.go @@ -38,6 +38,7 @@ type ClusterInterface interface { Get(name string) (*v1alpha1.Cluster, error) List(opts api.ListOptions) (*v1alpha1.ClusterList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1alpha1.Cluster, err error) ClusterExpansion } @@ -138,3 +139,15 @@ func (c *clusters) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched cluster. +func (c *clusters) Patch(name string, pt api.PatchType, data []byte) (result *v1alpha1.Cluster, err error) { + result = &v1alpha1.Cluster{} + err = c.client.Patch(pt). + Resource("clusters"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/fake_cluster.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/fake_cluster.go index a524e9c8e6..4e466aecb4 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/fake_cluster.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/fake_cluster.go @@ -106,3 +106,13 @@ func (c *FakeClusters) Watch(opts api.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(clustersResource, opts)) } + +// Patch applies the patch and returns the patched cluster. +func (c *FakeClusters) Patch(name string, pt api.PatchType, data []byte) (result *v1alpha1.Cluster, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(clustersResource, name, data), &v1alpha1.Cluster{}) + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.Cluster), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/fake_horizontalpodautoscaler.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/fake_horizontalpodautoscaler.go index fb889a446a..78a8b974f1 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/fake_horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/fake_horizontalpodautoscaler.go @@ -114,3 +114,14 @@ func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interf InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte) (result *autoscaling.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(horizontalpodautoscalersResource, c.ns, name, data), &autoscaling.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*autoscaling.HorizontalPodAutoscaler), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/horizontalpodautoscaler.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/horizontalpodautoscaler.go index ae185ad7fb..d90527f3e7 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/horizontalpodautoscaler.go @@ -38,6 +38,7 @@ type HorizontalPodAutoscalerInterface interface { Get(name string) (*autoscaling.HorizontalPodAutoscaler, error) List(opts api.ListOptions) (*autoscaling.HorizontalPodAutoscalerList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *autoscaling.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } @@ -148,3 +149,16 @@ func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *horizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte) (result *autoscaling.HorizontalPodAutoscaler, err error) { + result = &autoscaling.HorizontalPodAutoscaler{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_job.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_job.go index 701c102b41..396ca281f9 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_job.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_job.go @@ -114,3 +114,14 @@ func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched job. +func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte) (result *batch.Job, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(jobsResource, c.ns, name, data), &batch.Job{}) + + if obj == nil { + return nil, err + } + return obj.(*batch.Job), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_scheduledjob.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_scheduledjob.go index db09aa9bc9..3e0cee8517 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_scheduledjob.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_scheduledjob.go @@ -114,3 +114,14 @@ func (c *FakeScheduledJobs) Watch(opts api.ListOptions) (watch.Interface, error) InvokesWatch(core.NewWatchAction(scheduledjobsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched scheduledJob. +func (c *FakeScheduledJobs) Patch(name string, pt api.PatchType, data []byte) (result *batch.ScheduledJob, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(scheduledjobsResource, c.ns, name, data), &batch.ScheduledJob{}) + + if obj == nil { + return nil, err + } + return obj.(*batch.ScheduledJob), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/job.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/job.go index 680c50654c..a829a8e3f5 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/job.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/job.go @@ -38,6 +38,7 @@ type JobInterface interface { Get(name string) (*batch.Job, error) List(opts api.ListOptions) (*batch.JobList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *batch.Job, err error) JobExpansion } @@ -148,3 +149,16 @@ func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched job. +func (c *jobs) Patch(name string, pt api.PatchType, data []byte) (result *batch.Job, err error) { + result = &batch.Job{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("jobs"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/scheduledjob.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/scheduledjob.go index 2675d11c48..d276071c50 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/scheduledjob.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/scheduledjob.go @@ -38,6 +38,7 @@ type ScheduledJobInterface interface { Get(name string) (*batch.ScheduledJob, error) List(opts api.ListOptions) (*batch.ScheduledJobList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *batch.ScheduledJob, err error) ScheduledJobExpansion } @@ -148,3 +149,16 @@ func (c *scheduledJobs) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched scheduledJob. +func (c *scheduledJobs) Patch(name string, pt api.PatchType, data []byte) (result *batch.ScheduledJob, err error) { + result = &batch.ScheduledJob{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("scheduledjobs"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/componentstatus.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/componentstatus.go index 0ef0667dad..74965a1090 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/componentstatus.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/componentstatus.go @@ -36,6 +36,7 @@ type ComponentStatusInterface interface { Get(name string) (*api.ComponentStatus, error) List(opts api.ListOptions) (*api.ComponentStatusList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.ComponentStatus, err error) ComponentStatusExpansion } @@ -124,3 +125,15 @@ func (c *componentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched componentStatus. +func (c *componentStatuses) Patch(name string, pt api.PatchType, data []byte) (result *api.ComponentStatus, err error) { + result = &api.ComponentStatus{} + err = c.client.Patch(pt). + Resource("componentstatuses"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/configmap.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/configmap.go index b43e53d6c4..f537ba0b39 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/configmap.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/configmap.go @@ -36,6 +36,7 @@ type ConfigMapInterface interface { Get(name string) (*api.ConfigMap, error) List(opts api.ListOptions) (*api.ConfigMapList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.ConfigMap, err error) ConfigMapExpansion } @@ -133,3 +134,16 @@ func (c *configMaps) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched configMap. +func (c *configMaps) Patch(name string, pt api.PatchType, data []byte) (result *api.ConfigMap, err error) { + result = &api.ConfigMap{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("configmaps"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/endpoints.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/endpoints.go index 78e2a08783..eec9924b7c 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/endpoints.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/endpoints.go @@ -36,6 +36,7 @@ type EndpointsInterface interface { Get(name string) (*api.Endpoints, error) List(opts api.ListOptions) (*api.EndpointsList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.Endpoints, err error) EndpointsExpansion } @@ -133,3 +134,16 @@ func (c *endpoints) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched endpoints. +func (c *endpoints) Patch(name string, pt api.PatchType, data []byte) (result *api.Endpoints, err error) { + result = &api.Endpoints{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("endpoints"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event.go index 5627690a6a..54e370de84 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event.go @@ -36,6 +36,7 @@ type EventInterface interface { Get(name string) (*api.Event, error) List(opts api.ListOptions) (*api.EventList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.Event, err error) EventExpansion } @@ -133,3 +134,16 @@ func (c *events) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched event. +func (c *events) Patch(name string, pt api.PatchType, data []byte) (result *api.Event, err error) { + result = &api.Event{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("events"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event_expansion.go index abdf89aa1c..66831bdca1 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event_expansion.go @@ -30,7 +30,7 @@ type EventExpansion interface { CreateWithEventNamespace(event *api.Event) (*api.Event, error) // UpdateWithEventNamespace is the same as a Update, except that it sends the request to the event.Namespace. UpdateWithEventNamespace(event *api.Event) (*api.Event, error) - Patch(event *api.Event, data []byte) (*api.Event, error) + PatchWithEventNamespace(event *api.Event, data []byte) (*api.Event, error) // Search finds events about the specified object Search(objOrRef runtime.Object) (*api.EventList, error) // Returns the appropriate field selector based on the API version being used to communicate with the server. @@ -73,11 +73,15 @@ func (e *events) UpdateWithEventNamespace(event *api.Event) (*api.Event, error) return result, err } -// Patch modifies an existing event. It returns the copy of the event that the server returns, or an -// error. The namespace and name of the target event is deduced from the incompleteEvent. The -// namespace must either match this event client's namespace, or this event client must have been +// PatchWithEventNamespace modifies an existing event. It returns the copy of +// the event that the server returns, or an error. The namespace and name of the +// target event is deduced from the incompleteEvent. The namespace must either +// match this event client's namespace, or this event client must have been // created with the "" namespace. -func (e *events) Patch(incompleteEvent *api.Event, data []byte) (*api.Event, error) { +func (e *events) PatchWithEventNamespace(incompleteEvent *api.Event, data []byte) (*api.Event, error) { + if e.ns != "" && incompleteEvent.Namespace != e.ns { + return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", incompleteEvent.Namespace, e.ns) + } result := &api.Event{} err := e.client.Patch(api.StrategicMergePatchType). NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0). @@ -153,5 +157,5 @@ func (e *EventSinkImpl) Update(event *api.Event) (*api.Event, error) { } func (e *EventSinkImpl) Patch(event *api.Event, data []byte) (*api.Event, error) { - return e.Interface.Patch(event, data) + return e.Interface.PatchWithEventNamespace(event, data) } diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_componentstatus.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_componentstatus.go index 84dca9984e..75e3117292 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_componentstatus.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_componentstatus.go @@ -96,3 +96,13 @@ func (c *FakeComponentStatuses) Watch(opts api.ListOptions) (watch.Interface, er return c.Fake. InvokesWatch(core.NewRootWatchAction(componentstatusesResource, opts)) } + +// Patch applies the patch and returns the patched componentStatus. +func (c *FakeComponentStatuses) Patch(name string, pt api.PatchType, data []byte) (result *api.ComponentStatus, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(componentstatusesResource, name, data), &api.ComponentStatus{}) + if obj == nil { + return nil, err + } + return obj.(*api.ComponentStatus), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_configmap.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_configmap.go index 8908c26a36..f2342eaefc 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_configmap.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_configmap.go @@ -103,3 +103,14 @@ func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched configMap. +func (c *FakeConfigMaps) Patch(name string, pt api.PatchType, data []byte) (result *api.ConfigMap, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(configmapsResource, c.ns, name, data), &api.ConfigMap{}) + + if obj == nil { + return nil, err + } + return obj.(*api.ConfigMap), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_endpoints.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_endpoints.go index b888d89c0b..6bf956a8e5 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_endpoints.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_endpoints.go @@ -103,3 +103,14 @@ func (c *FakeEndpoints) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(endpointsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched endpoints. +func (c *FakeEndpoints) Patch(name string, pt api.PatchType, data []byte) (result *api.Endpoints, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(endpointsResource, c.ns, name, data), &api.Endpoints{}) + + if obj == nil { + return nil, err + } + return obj.(*api.Endpoints), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event.go index d86b05a7bd..346ba298e1 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event.go @@ -103,3 +103,14 @@ func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched event. +func (c *FakeEvents) Patch(name string, pt api.PatchType, data []byte) (result *api.Event, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(eventsResource, c.ns, name, data), &api.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*api.Event), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event_expansion.go index b76be860d6..84f562033d 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event_expansion.go @@ -50,11 +50,11 @@ func (c *FakeEvents) UpdateWithEventNamespace(event *api.Event) (*api.Event, err return obj.(*api.Event), err } -// Patch patches an existing event. Returns the copy of the event the server returns, or an error. -func (c *FakeEvents) Patch(event *api.Event, data []byte) (*api.Event, error) { - action := core.NewRootPatchAction(eventsResource, event) +// PatchWithEventNamespace patches an existing event. Returns the copy of the event the server returns, or an error. +func (c *FakeEvents) PatchWithEventNamespace(event *api.Event, data []byte) (*api.Event, error) { + action := core.NewRootPatchAction(eventsResource, event.Name, data) if c.ns != "" { - action = core.NewPatchAction(eventsResource, c.ns, event) + action = core.NewPatchAction(eventsResource, c.ns, event.Name, data) } obj, err := c.Fake.Invokes(action, event) if obj == nil { diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_limitrange.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_limitrange.go index b46f5eba4b..9a6b963fb2 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_limitrange.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_limitrange.go @@ -103,3 +103,14 @@ func (c *FakeLimitRanges) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(limitrangesResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched limitRange. +func (c *FakeLimitRanges) Patch(name string, pt api.PatchType, data []byte) (result *api.LimitRange, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(limitrangesResource, c.ns, name, data), &api.LimitRange{}) + + if obj == nil { + return nil, err + } + return obj.(*api.LimitRange), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_namespace.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_namespace.go index 233dd8ff9a..ed88074177 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_namespace.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_namespace.go @@ -105,3 +105,13 @@ func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(namespacesResource, opts)) } + +// Patch applies the patch and returns the patched namespace. +func (c *FakeNamespaces) Patch(name string, pt api.PatchType, data []byte) (result *api.Namespace, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(namespacesResource, name, data), &api.Namespace{}) + if obj == nil { + return nil, err + } + return obj.(*api.Namespace), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_node.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_node.go index 7370e5a2a4..e2eb4efa24 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_node.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_node.go @@ -105,3 +105,13 @@ func (c *FakeNodes) Watch(opts api.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(nodesResource, opts)) } + +// Patch applies the patch and returns the patched node. +func (c *FakeNodes) Patch(name string, pt api.PatchType, data []byte) (result *api.Node, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(nodesResource, name, data), &api.Node{}) + if obj == nil { + return nil, err + } + return obj.(*api.Node), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolume.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolume.go index fd0ae18ae6..fe40deb355 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolume.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolume.go @@ -105,3 +105,13 @@ func (c *FakePersistentVolumes) Watch(opts api.ListOptions) (watch.Interface, er return c.Fake. InvokesWatch(core.NewRootWatchAction(persistentvolumesResource, opts)) } + +// Patch applies the patch and returns the patched persistentVolume. +func (c *FakePersistentVolumes) Patch(name string, pt api.PatchType, data []byte) (result *api.PersistentVolume, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(persistentvolumesResource, name, data), &api.PersistentVolume{}) + if obj == nil { + return nil, err + } + return obj.(*api.PersistentVolume), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolumeclaim.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolumeclaim.go index bd10e834d3..f3ee1c27f3 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolumeclaim.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolumeclaim.go @@ -113,3 +113,14 @@ func (c *FakePersistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interfac InvokesWatch(core.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched persistentVolumeClaim. +func (c *FakePersistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte) (result *api.PersistentVolumeClaim, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(persistentvolumeclaimsResource, c.ns, name, data), &api.PersistentVolumeClaim{}) + + if obj == nil { + return nil, err + } + return obj.(*api.PersistentVolumeClaim), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_pod.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_pod.go index 98c0b8e3f7..3871798104 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_pod.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_pod.go @@ -113,3 +113,14 @@ func (c *FakePods) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(podsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched pod. +func (c *FakePods) Patch(name string, pt api.PatchType, data []byte) (result *api.Pod, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(podsResource, c.ns, name, data), &api.Pod{}) + + if obj == nil { + return nil, err + } + return obj.(*api.Pod), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_podtemplate.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_podtemplate.go index c08d06bea0..e3da0bc4ad 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_podtemplate.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_podtemplate.go @@ -103,3 +103,14 @@ func (c *FakePodTemplates) Watch(opts api.ListOptions) (watch.Interface, error) InvokesWatch(core.NewWatchAction(podtemplatesResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched podTemplate. +func (c *FakePodTemplates) Patch(name string, pt api.PatchType, data []byte) (result *api.PodTemplate, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(podtemplatesResource, c.ns, name, data), &api.PodTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*api.PodTemplate), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_replicationcontroller.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_replicationcontroller.go index 0a7faddbc4..4b8b4be3eb 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_replicationcontroller.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_replicationcontroller.go @@ -113,3 +113,14 @@ func (c *FakeReplicationControllers) Watch(opts api.ListOptions) (watch.Interfac InvokesWatch(core.NewWatchAction(replicationcontrollersResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched replicationController. +func (c *FakeReplicationControllers) Patch(name string, pt api.PatchType, data []byte) (result *api.ReplicationController, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(replicationcontrollersResource, c.ns, name, data), &api.ReplicationController{}) + + if obj == nil { + return nil, err + } + return obj.(*api.ReplicationController), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_resourcequota.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_resourcequota.go index d91ee2685b..e5b2b573ee 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_resourcequota.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_resourcequota.go @@ -113,3 +113,14 @@ func (c *FakeResourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error InvokesWatch(core.NewWatchAction(resourcequotasResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched resourceQuota. +func (c *FakeResourceQuotas) Patch(name string, pt api.PatchType, data []byte) (result *api.ResourceQuota, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(resourcequotasResource, c.ns, name, data), &api.ResourceQuota{}) + + if obj == nil { + return nil, err + } + return obj.(*api.ResourceQuota), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_secret.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_secret.go index 0caaa47cf7..959edbe9bb 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_secret.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_secret.go @@ -103,3 +103,14 @@ func (c *FakeSecrets) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched secret. +func (c *FakeSecrets) Patch(name string, pt api.PatchType, data []byte) (result *api.Secret, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(secretsResource, c.ns, name, data), &api.Secret{}) + + if obj == nil { + return nil, err + } + return obj.(*api.Secret), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_service.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_service.go index 62eae6481e..a926435989 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_service.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_service.go @@ -113,3 +113,14 @@ func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched service. +func (c *FakeServices) Patch(name string, pt api.PatchType, data []byte) (result *api.Service, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(servicesResource, c.ns, name, data), &api.Service{}) + + if obj == nil { + return nil, err + } + return obj.(*api.Service), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_serviceaccount.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_serviceaccount.go index fbce964a12..fae9459e9d 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_serviceaccount.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_serviceaccount.go @@ -103,3 +103,14 @@ func (c *FakeServiceAccounts) Watch(opts api.ListOptions) (watch.Interface, erro InvokesWatch(core.NewWatchAction(serviceaccountsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched serviceAccount. +func (c *FakeServiceAccounts) Patch(name string, pt api.PatchType, data []byte) (result *api.ServiceAccount, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(serviceaccountsResource, c.ns, name, data), &api.ServiceAccount{}) + + if obj == nil { + return nil, err + } + return obj.(*api.ServiceAccount), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/limitrange.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/limitrange.go index 86cc9b07fa..6681b9d7c0 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/limitrange.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/limitrange.go @@ -36,6 +36,7 @@ type LimitRangeInterface interface { Get(name string) (*api.LimitRange, error) List(opts api.ListOptions) (*api.LimitRangeList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.LimitRange, err error) LimitRangeExpansion } @@ -133,3 +134,16 @@ func (c *limitRanges) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched limitRange. +func (c *limitRanges) Patch(name string, pt api.PatchType, data []byte) (result *api.LimitRange, err error) { + result = &api.LimitRange{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("limitranges"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/namespace.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/namespace.go index c1c8b45069..83c28bb289 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/namespace.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/namespace.go @@ -37,6 +37,7 @@ type NamespaceInterface interface { Get(name string) (*api.Namespace, error) List(opts api.ListOptions) (*api.NamespaceList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.Namespace, err error) NamespaceExpansion } @@ -137,3 +138,15 @@ func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched namespace. +func (c *namespaces) Patch(name string, pt api.PatchType, data []byte) (result *api.Namespace, err error) { + result = &api.Namespace{} + err = c.client.Patch(pt). + Resource("namespaces"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/node.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/node.go index b0c53ef1d4..8b11a0f244 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/node.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/node.go @@ -37,6 +37,7 @@ type NodeInterface interface { Get(name string) (*api.Node, error) List(opts api.ListOptions) (*api.NodeList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.Node, err error) NodeExpansion } @@ -137,3 +138,15 @@ func (c *nodes) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched node. +func (c *nodes) Patch(name string, pt api.PatchType, data []byte) (result *api.Node, err error) { + result = &api.Node{} + err = c.client.Patch(pt). + Resource("nodes"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolume.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolume.go index 6b4d0f017f..f9988705d0 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolume.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolume.go @@ -37,6 +37,7 @@ type PersistentVolumeInterface interface { Get(name string) (*api.PersistentVolume, error) List(opts api.ListOptions) (*api.PersistentVolumeList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.PersistentVolume, err error) PersistentVolumeExpansion } @@ -137,3 +138,15 @@ func (c *persistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched persistentVolume. +func (c *persistentVolumes) Patch(name string, pt api.PatchType, data []byte) (result *api.PersistentVolume, err error) { + result = &api.PersistentVolume{} + err = c.client.Patch(pt). + Resource("persistentvolumes"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolumeclaim.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolumeclaim.go index 2f5b174373..c2ecde9252 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolumeclaim.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolumeclaim.go @@ -37,6 +37,7 @@ type PersistentVolumeClaimInterface interface { Get(name string) (*api.PersistentVolumeClaim, error) List(opts api.ListOptions) (*api.PersistentVolumeClaimList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.PersistentVolumeClaim, err error) PersistentVolumeClaimExpansion } @@ -147,3 +148,16 @@ func (c *persistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, e VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched persistentVolumeClaim. +func (c *persistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte) (result *api.PersistentVolumeClaim, err error) { + result = &api.PersistentVolumeClaim{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("persistentvolumeclaims"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/pod.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/pod.go index 1cdfc8e714..8bec03eee5 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/pod.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/pod.go @@ -37,6 +37,7 @@ type PodInterface interface { Get(name string) (*api.Pod, error) List(opts api.ListOptions) (*api.PodList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.Pod, err error) PodExpansion } @@ -147,3 +148,16 @@ func (c *pods) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched pod. +func (c *pods) Patch(name string, pt api.PatchType, data []byte) (result *api.Pod, err error) { + result = &api.Pod{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("pods"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/podtemplate.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/podtemplate.go index cccef29f71..2776d58d2b 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/podtemplate.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/podtemplate.go @@ -36,6 +36,7 @@ type PodTemplateInterface interface { Get(name string) (*api.PodTemplate, error) List(opts api.ListOptions) (*api.PodTemplateList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.PodTemplate, err error) PodTemplateExpansion } @@ -133,3 +134,16 @@ func (c *podTemplates) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched podTemplate. +func (c *podTemplates) Patch(name string, pt api.PatchType, data []byte) (result *api.PodTemplate, err error) { + result = &api.PodTemplate{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("podtemplates"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/replicationcontroller.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/replicationcontroller.go index 6f9f06625a..2935196fe2 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/replicationcontroller.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/replicationcontroller.go @@ -37,6 +37,7 @@ type ReplicationControllerInterface interface { Get(name string) (*api.ReplicationController, error) List(opts api.ListOptions) (*api.ReplicationControllerList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.ReplicationController, err error) ReplicationControllerExpansion } @@ -147,3 +148,16 @@ func (c *replicationControllers) Watch(opts api.ListOptions) (watch.Interface, e VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched replicationController. +func (c *replicationControllers) Patch(name string, pt api.PatchType, data []byte) (result *api.ReplicationController, err error) { + result = &api.ReplicationController{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("replicationcontrollers"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/resourcequota.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/resourcequota.go index 2d0da73fb3..0669bffdff 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/resourcequota.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/resourcequota.go @@ -37,6 +37,7 @@ type ResourceQuotaInterface interface { Get(name string) (*api.ResourceQuota, error) List(opts api.ListOptions) (*api.ResourceQuotaList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.ResourceQuota, err error) ResourceQuotaExpansion } @@ -147,3 +148,16 @@ func (c *resourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched resourceQuota. +func (c *resourceQuotas) Patch(name string, pt api.PatchType, data []byte) (result *api.ResourceQuota, err error) { + result = &api.ResourceQuota{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("resourcequotas"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/secret.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/secret.go index 101fbdb54e..14c38eb14a 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/secret.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/secret.go @@ -36,6 +36,7 @@ type SecretInterface interface { Get(name string) (*api.Secret, error) List(opts api.ListOptions) (*api.SecretList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.Secret, err error) SecretExpansion } @@ -133,3 +134,16 @@ func (c *secrets) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched secret. +func (c *secrets) Patch(name string, pt api.PatchType, data []byte) (result *api.Secret, err error) { + result = &api.Secret{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("secrets"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service.go index 006f601c27..e1f6c75a49 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service.go @@ -37,6 +37,7 @@ type ServiceInterface interface { Get(name string) (*api.Service, error) List(opts api.ListOptions) (*api.ServiceList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.Service, err error) ServiceExpansion } @@ -147,3 +148,16 @@ func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched service. +func (c *services) Patch(name string, pt api.PatchType, data []byte) (result *api.Service, err error) { + result = &api.Service{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("services"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/serviceaccount.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/serviceaccount.go index 65f7df2638..eae85a25c5 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/serviceaccount.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/serviceaccount.go @@ -36,6 +36,7 @@ type ServiceAccountInterface interface { Get(name string) (*api.ServiceAccount, error) List(opts api.ListOptions) (*api.ServiceAccountList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *api.ServiceAccount, err error) ServiceAccountExpansion } @@ -133,3 +134,16 @@ func (c *serviceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched serviceAccount. +func (c *serviceAccounts) Patch(name string, pt api.PatchType, data []byte) (result *api.ServiceAccount, err error) { + result = &api.ServiceAccount{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("serviceaccounts"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/daemonset.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/daemonset.go index 96dae5835a..a9d4003934 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/daemonset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/daemonset.go @@ -38,6 +38,7 @@ type DaemonSetInterface interface { Get(name string) (*extensions.DaemonSet, error) List(opts api.ListOptions) (*extensions.DaemonSetList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *extensions.DaemonSet, err error) DaemonSetExpansion } @@ -148,3 +149,16 @@ func (c *daemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched daemonSet. +func (c *daemonSets) Patch(name string, pt api.PatchType, data []byte) (result *extensions.DaemonSet, err error) { + result = &extensions.DaemonSet{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("daemonsets"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/deployment.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/deployment.go index 3b995c0216..ce689c2b1a 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/deployment.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/deployment.go @@ -38,6 +38,7 @@ type DeploymentInterface interface { Get(name string) (*extensions.Deployment, error) List(opts api.ListOptions) (*extensions.DeploymentList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *extensions.Deployment, err error) DeploymentExpansion } @@ -148,3 +149,16 @@ func (c *deployments) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched deployment. +func (c *deployments) Patch(name string, pt api.PatchType, data []byte) (result *extensions.Deployment, err error) { + result = &extensions.Deployment{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("deployments"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_daemonset.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_daemonset.go index d53fa797aa..dc9f84a016 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_daemonset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_daemonset.go @@ -114,3 +114,14 @@ func (c *FakeDaemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(daemonsetsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched daemonSet. +func (c *FakeDaemonSets) Patch(name string, pt api.PatchType, data []byte) (result *extensions.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(daemonsetsResource, c.ns, name, data), &extensions.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*extensions.DaemonSet), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_deployment.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_deployment.go index c70a3a81d5..3c148b8f5c 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_deployment.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_deployment.go @@ -114,3 +114,14 @@ func (c *FakeDeployments) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(deploymentsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched deployment. +func (c *FakeDeployments) Patch(name string, pt api.PatchType, data []byte) (result *extensions.Deployment, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(deploymentsResource, c.ns, name, data), &extensions.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*extensions.Deployment), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_ingress.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_ingress.go index 68578ce120..c3f90aca65 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_ingress.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_ingress.go @@ -114,3 +114,14 @@ func (c *FakeIngresses) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(ingressesResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched ingress. +func (c *FakeIngresses) Patch(name string, pt api.PatchType, data []byte) (result *extensions.Ingress, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(ingressesResource, c.ns, name, data), &extensions.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*extensions.Ingress), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_podsecuritypolicy.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_podsecuritypolicy.go index 52b6f3acd1..693e99504a 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_podsecuritypolicy.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_podsecuritypolicy.go @@ -97,3 +97,13 @@ func (c *FakePodSecurityPolicies) Watch(opts api.ListOptions) (watch.Interface, return c.Fake. InvokesWatch(core.NewRootWatchAction(podsecuritypoliciesResource, opts)) } + +// Patch applies the patch and returns the patched podSecurityPolicy. +func (c *FakePodSecurityPolicies) Patch(name string, pt api.PatchType, data []byte) (result *extensions.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(podsecuritypoliciesResource, name, data), &extensions.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*extensions.PodSecurityPolicy), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_replicaset.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_replicaset.go index 9d7241ca49..cb4f9e643b 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_replicaset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_replicaset.go @@ -114,3 +114,14 @@ func (c *FakeReplicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(replicasetsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched replicaSet. +func (c *FakeReplicaSets) Patch(name string, pt api.PatchType, data []byte) (result *extensions.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(replicasetsResource, c.ns, name, data), &extensions.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*extensions.ReplicaSet), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_thirdpartyresource.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_thirdpartyresource.go index 37cbca979c..e4a029c7c0 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_thirdpartyresource.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_thirdpartyresource.go @@ -97,3 +97,13 @@ func (c *FakeThirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, return c.Fake. InvokesWatch(core.NewRootWatchAction(thirdpartyresourcesResource, opts)) } + +// Patch applies the patch and returns the patched thirdPartyResource. +func (c *FakeThirdPartyResources) Patch(name string, pt api.PatchType, data []byte) (result *extensions.ThirdPartyResource, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(thirdpartyresourcesResource, name, data), &extensions.ThirdPartyResource{}) + if obj == nil { + return nil, err + } + return obj.(*extensions.ThirdPartyResource), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/ingress.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/ingress.go index a9d950eae8..5ca53fc941 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/ingress.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/ingress.go @@ -38,6 +38,7 @@ type IngressInterface interface { Get(name string) (*extensions.Ingress, error) List(opts api.ListOptions) (*extensions.IngressList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *extensions.Ingress, err error) IngressExpansion } @@ -148,3 +149,16 @@ func (c *ingresses) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched ingress. +func (c *ingresses) Patch(name string, pt api.PatchType, data []byte) (result *extensions.Ingress, err error) { + result = &extensions.Ingress{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("ingresses"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/podsecuritypolicy.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/podsecuritypolicy.go index 06a7908f46..6c57caa577 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/podsecuritypolicy.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/podsecuritypolicy.go @@ -37,6 +37,7 @@ type PodSecurityPolicyInterface interface { Get(name string) (*extensions.PodSecurityPolicy, error) List(opts api.ListOptions) (*extensions.PodSecurityPolicyList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *extensions.PodSecurityPolicy, err error) PodSecurityPolicyExpansion } @@ -125,3 +126,15 @@ func (c *podSecurityPolicies) Watch(opts api.ListOptions) (watch.Interface, erro VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched podSecurityPolicy. +func (c *podSecurityPolicies) Patch(name string, pt api.PatchType, data []byte) (result *extensions.PodSecurityPolicy, err error) { + result = &extensions.PodSecurityPolicy{} + err = c.client.Patch(pt). + Resource("podsecuritypolicies"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/replicaset.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/replicaset.go index 6257fd8981..7a68acf0fd 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/replicaset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/replicaset.go @@ -38,6 +38,7 @@ type ReplicaSetInterface interface { Get(name string) (*extensions.ReplicaSet, error) List(opts api.ListOptions) (*extensions.ReplicaSetList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *extensions.ReplicaSet, err error) ReplicaSetExpansion } @@ -148,3 +149,16 @@ func (c *replicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched replicaSet. +func (c *replicaSets) Patch(name string, pt api.PatchType, data []byte) (result *extensions.ReplicaSet, err error) { + result = &extensions.ReplicaSet{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("replicasets"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/thirdpartyresource.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/thirdpartyresource.go index a64ffb62c4..1ba36803b4 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/thirdpartyresource.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/thirdpartyresource.go @@ -37,6 +37,7 @@ type ThirdPartyResourceInterface interface { Get(name string) (*extensions.ThirdPartyResource, error) List(opts api.ListOptions) (*extensions.ThirdPartyResourceList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *extensions.ThirdPartyResource, err error) ThirdPartyResourceExpansion } @@ -125,3 +126,15 @@ func (c *thirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, erro VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched thirdPartyResource. +func (c *thirdPartyResources) Patch(name string, pt api.PatchType, data []byte) (result *extensions.ThirdPartyResource, err error) { + result = &extensions.ThirdPartyResource{} + err = c.client.Patch(pt). + Resource("thirdpartyresources"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrole.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrole.go index 5d0b3912a5..b4495fe2a3 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrole.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrole.go @@ -37,6 +37,7 @@ type ClusterRoleInterface interface { Get(name string) (*rbac.ClusterRole, error) List(opts api.ListOptions) (*rbac.ClusterRoleList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *rbac.ClusterRole, err error) ClusterRoleExpansion } @@ -125,3 +126,15 @@ func (c *clusterRoles) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched clusterRole. +func (c *clusterRoles) Patch(name string, pt api.PatchType, data []byte) (result *rbac.ClusterRole, err error) { + result = &rbac.ClusterRole{} + err = c.client.Patch(pt). + Resource("clusterroles"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrolebinding.go index f2102592af..b909d409df 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrolebinding.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrolebinding.go @@ -37,6 +37,7 @@ type ClusterRoleBindingInterface interface { Get(name string) (*rbac.ClusterRoleBinding, error) List(opts api.ListOptions) (*rbac.ClusterRoleBindingList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *rbac.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } @@ -125,3 +126,15 @@ func (c *clusterRoleBindings) Watch(opts api.ListOptions) (watch.Interface, erro VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched clusterRoleBinding. +func (c *clusterRoleBindings) Patch(name string, pt api.PatchType, data []byte) (result *rbac.ClusterRoleBinding, err error) { + result = &rbac.ClusterRoleBinding{} + err = c.client.Patch(pt). + Resource("clusterrolebindings"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrole.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrole.go index c86ec5f705..8939a9255e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrole.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrole.go @@ -97,3 +97,13 @@ func (c *FakeClusterRoles) Watch(opts api.ListOptions) (watch.Interface, error) return c.Fake. InvokesWatch(core.NewRootWatchAction(clusterrolesResource, opts)) } + +// Patch applies the patch and returns the patched clusterRole. +func (c *FakeClusterRoles) Patch(name string, pt api.PatchType, data []byte) (result *rbac.ClusterRole, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(clusterrolesResource, name, data), &rbac.ClusterRole{}) + if obj == nil { + return nil, err + } + return obj.(*rbac.ClusterRole), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrolebinding.go index bf16661b17..10b2bc9955 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrolebinding.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrolebinding.go @@ -97,3 +97,13 @@ func (c *FakeClusterRoleBindings) Watch(opts api.ListOptions) (watch.Interface, return c.Fake. InvokesWatch(core.NewRootWatchAction(clusterrolebindingsResource, opts)) } + +// Patch applies the patch and returns the patched clusterRoleBinding. +func (c *FakeClusterRoleBindings) Patch(name string, pt api.PatchType, data []byte) (result *rbac.ClusterRoleBinding, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(clusterrolebindingsResource, name, data), &rbac.ClusterRoleBinding{}) + if obj == nil { + return nil, err + } + return obj.(*rbac.ClusterRoleBinding), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_role.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_role.go index eacccc39ac..9d369ab581 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_role.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_role.go @@ -104,3 +104,14 @@ func (c *FakeRoles) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(rolesResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched role. +func (c *FakeRoles) Patch(name string, pt api.PatchType, data []byte) (result *rbac.Role, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(rolesResource, c.ns, name, data), &rbac.Role{}) + + if obj == nil { + return nil, err + } + return obj.(*rbac.Role), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_rolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_rolebinding.go index ff75766175..336d929487 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_rolebinding.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_rolebinding.go @@ -104,3 +104,14 @@ func (c *FakeRoleBindings) Watch(opts api.ListOptions) (watch.Interface, error) InvokesWatch(core.NewWatchAction(rolebindingsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched roleBinding. +func (c *FakeRoleBindings) Patch(name string, pt api.PatchType, data []byte) (result *rbac.RoleBinding, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(rolebindingsResource, c.ns, name, data), &rbac.RoleBinding{}) + + if obj == nil { + return nil, err + } + return obj.(*rbac.RoleBinding), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/role.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/role.go index 68e7ebe93b..94f8d2e0ce 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/role.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/role.go @@ -37,6 +37,7 @@ type RoleInterface interface { Get(name string) (*rbac.Role, error) List(opts api.ListOptions) (*rbac.RoleList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *rbac.Role, err error) RoleExpansion } @@ -134,3 +135,16 @@ func (c *roles) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched role. +func (c *roles) Patch(name string, pt api.PatchType, data []byte) (result *rbac.Role, err error) { + result = &rbac.Role{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("roles"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/rolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/rolebinding.go index c73318c979..1a99e8190c 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/rolebinding.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/rolebinding.go @@ -37,6 +37,7 @@ type RoleBindingInterface interface { Get(name string) (*rbac.RoleBinding, error) List(opts api.ListOptions) (*rbac.RoleBindingList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *rbac.RoleBinding, err error) RoleBindingExpansion } @@ -134,3 +135,16 @@ func (c *roleBindings) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched roleBinding. +func (c *roleBindings) Patch(name string, pt api.PatchType, data []byte) (result *rbac.RoleBinding, err error) { + result = &rbac.RoleBinding{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("rolebindings"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go index 497b0f575e..7373b0416c 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go @@ -114,3 +114,14 @@ func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interf InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte) (result *v1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(horizontalpodautoscalersResource, c.ns, name, data), &v1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.HorizontalPodAutoscaler), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/horizontalpodautoscaler.go b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/horizontalpodautoscaler.go index 3b9f61e0a4..3e7e72ce07 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -38,6 +38,7 @@ type HorizontalPodAutoscalerInterface interface { Get(name string) (*v1.HorizontalPodAutoscaler, error) List(opts api.ListOptions) (*v1.HorizontalPodAutoscalerList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } @@ -148,3 +149,16 @@ func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *horizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte) (result *v1.HorizontalPodAutoscaler, err error) { + result = &v1.HorizontalPodAutoscaler{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/fake_job.go b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/fake_job.go index 163745bfa7..010119be17 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/fake_job.go +++ b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/fake_job.go @@ -114,3 +114,14 @@ func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched job. +func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte) (result *v1.Job, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(jobsResource, c.ns, name, data), &v1.Job{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.Job), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/job.go b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/job.go index f369642836..33287a00f2 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/job.go +++ b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/job.go @@ -38,6 +38,7 @@ type JobInterface interface { Get(name string) (*v1.Job, error) List(opts api.ListOptions) (*v1.JobList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.Job, err error) JobExpansion } @@ -148,3 +149,16 @@ func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched job. +func (c *jobs) Patch(name string, pt api.PatchType, data []byte) (result *v1.Job, err error) { + result = &v1.Job{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("jobs"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/componentstatus.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/componentstatus.go index 23363f530d..7f1f792d5c 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/componentstatus.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/componentstatus.go @@ -37,6 +37,7 @@ type ComponentStatusInterface interface { Get(name string) (*v1.ComponentStatus, error) List(opts api.ListOptions) (*v1.ComponentStatusList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.ComponentStatus, err error) ComponentStatusExpansion } @@ -125,3 +126,15 @@ func (c *componentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched componentStatus. +func (c *componentStatuses) Patch(name string, pt api.PatchType, data []byte) (result *v1.ComponentStatus, err error) { + result = &v1.ComponentStatus{} + err = c.client.Patch(pt). + Resource("componentstatuses"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/configmap.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/configmap.go index 4fbb31328a..336dbfc682 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/configmap.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/configmap.go @@ -37,6 +37,7 @@ type ConfigMapInterface interface { Get(name string) (*v1.ConfigMap, error) List(opts api.ListOptions) (*v1.ConfigMapList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.ConfigMap, err error) ConfigMapExpansion } @@ -134,3 +135,16 @@ func (c *configMaps) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched configMap. +func (c *configMaps) Patch(name string, pt api.PatchType, data []byte) (result *v1.ConfigMap, err error) { + result = &v1.ConfigMap{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("configmaps"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/endpoints.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/endpoints.go index 409b044c72..3b2d53e2c4 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/endpoints.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/endpoints.go @@ -37,6 +37,7 @@ type EndpointsInterface interface { Get(name string) (*v1.Endpoints, error) List(opts api.ListOptions) (*v1.EndpointsList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.Endpoints, err error) EndpointsExpansion } @@ -134,3 +135,16 @@ func (c *endpoints) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched endpoints. +func (c *endpoints) Patch(name string, pt api.PatchType, data []byte) (result *v1.Endpoints, err error) { + result = &v1.Endpoints{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("endpoints"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/event.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/event.go index 92266c98b6..a8b08353ff 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/event.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/event.go @@ -37,6 +37,7 @@ type EventInterface interface { Get(name string) (*v1.Event, error) List(opts api.ListOptions) (*v1.EventList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.Event, err error) EventExpansion } @@ -134,3 +135,16 @@ func (c *events) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched event. +func (c *events) Patch(name string, pt api.PatchType, data []byte) (result *v1.Event, err error) { + result = &v1.Event{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("events"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/event_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/event_expansion.go index 971c850c7a..508cc39fde 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/event_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/event_expansion.go @@ -31,7 +31,7 @@ type EventExpansion interface { CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) // UpdateWithEventNamespace is the same as a Update, except that it sends the request to the event.Namespace. UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) - Patch(event *v1.Event, data []byte) (*v1.Event, error) + PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.Event, error) // Search finds events about the specified object Search(objOrRef runtime.Object) (*v1.EventList, error) // Returns the appropriate field selector based on the API version being used to communicate with the server. @@ -74,11 +74,15 @@ func (e *events) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) { return result, err } -// Patch modifies an existing event. It returns the copy of the event that the server returns, or an -// error. The namespace and name of the target event is deduced from the incompleteEvent. The -// namespace must either match this event client's namespace, or this event client must have been +// PatchWithEventNamespace modifies an existing event. It returns the copy of +// the event that the server returns, or an error. The namespace and name of the +// target event is deduced from the incompleteEvent. The namespace must either +// match this event client's namespace, or this event client must have been // created with the "" namespace. -func (e *events) Patch(incompleteEvent *v1.Event, data []byte) (*v1.Event, error) { +func (e *events) PatchWithEventNamespace(incompleteEvent *v1.Event, data []byte) (*v1.Event, error) { + if e.ns != "" && incompleteEvent.Namespace != e.ns { + return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", incompleteEvent.Namespace, e.ns) + } result := &v1.Event{} err := e.client.Patch(api.StrategicMergePatchType). NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0). @@ -154,5 +158,5 @@ func (e *EventSinkImpl) Update(event *v1.Event) (*v1.Event, error) { } func (e *EventSinkImpl) Patch(event *v1.Event, data []byte) (*v1.Event, error) { - return e.Interface.Patch(event, data) + return e.Interface.PatchWithEventNamespace(event, data) } diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_componentstatus.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_componentstatus.go index 6a86ac5690..91e0e9b097 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_componentstatus.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_componentstatus.go @@ -97,3 +97,13 @@ func (c *FakeComponentStatuses) Watch(opts api.ListOptions) (watch.Interface, er return c.Fake. InvokesWatch(core.NewRootWatchAction(componentstatusesResource, opts)) } + +// Patch applies the patch and returns the patched componentStatus. +func (c *FakeComponentStatuses) Patch(name string, pt api.PatchType, data []byte) (result *v1.ComponentStatus, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(componentstatusesResource, name, data), &v1.ComponentStatus{}) + if obj == nil { + return nil, err + } + return obj.(*v1.ComponentStatus), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_configmap.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_configmap.go index 81dcc633ad..57ce1c3d15 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_configmap.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_configmap.go @@ -104,3 +104,14 @@ func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched configMap. +func (c *FakeConfigMaps) Patch(name string, pt api.PatchType, data []byte) (result *v1.ConfigMap, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(configmapsResource, c.ns, name, data), &v1.ConfigMap{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.ConfigMap), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_endpoints.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_endpoints.go index f5c570ffd2..0b5b5a8943 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_endpoints.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_endpoints.go @@ -104,3 +104,14 @@ func (c *FakeEndpoints) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(endpointsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched endpoints. +func (c *FakeEndpoints) Patch(name string, pt api.PatchType, data []byte) (result *v1.Endpoints, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(endpointsResource, c.ns, name, data), &v1.Endpoints{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.Endpoints), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event.go index 5dd7e08b8d..7a8dee2e5a 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event.go @@ -104,3 +104,14 @@ func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched event. +func (c *FakeEvents) Patch(name string, pt api.PatchType, data []byte) (result *v1.Event, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(eventsResource, c.ns, name, data), &v1.Event{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.Event), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event_expansion.go index 173032b60c..436918a933 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event_expansion.go @@ -51,11 +51,11 @@ func (c *FakeEvents) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error return obj.(*v1.Event), err } -// Patch patches an existing event. Returns the copy of the event the server returns, or an error. -func (c *FakeEvents) Patch(event *v1.Event, data []byte) (*v1.Event, error) { - action := core.NewRootPatchAction(eventsResource, event) +// PatchWithEventNamespace patches an existing event. Returns the copy of the event the server returns, or an error. +func (c *FakeEvents) PatchWithEventNamespace(event *v1.Event, data []byte) (*v1.Event, error) { + action := core.NewRootPatchAction(eventsResource, event.Name, data) if c.ns != "" { - action = core.NewPatchAction(eventsResource, c.ns, event) + action = core.NewPatchAction(eventsResource, c.ns, event.Name, data) } obj, err := c.Fake.Invokes(action, event) if obj == nil { diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_limitrange.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_limitrange.go index f5755a87b6..ca29716f26 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_limitrange.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_limitrange.go @@ -104,3 +104,14 @@ func (c *FakeLimitRanges) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(limitrangesResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched limitRange. +func (c *FakeLimitRanges) Patch(name string, pt api.PatchType, data []byte) (result *v1.LimitRange, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(limitrangesResource, c.ns, name, data), &v1.LimitRange{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.LimitRange), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_namespace.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_namespace.go index b81ca5c52e..f0b05b82aa 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_namespace.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_namespace.go @@ -106,3 +106,13 @@ func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(namespacesResource, opts)) } + +// Patch applies the patch and returns the patched namespace. +func (c *FakeNamespaces) Patch(name string, pt api.PatchType, data []byte) (result *v1.Namespace, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(namespacesResource, name, data), &v1.Namespace{}) + if obj == nil { + return nil, err + } + return obj.(*v1.Namespace), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_node.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_node.go index 320f80364f..e84c06798d 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_node.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_node.go @@ -106,3 +106,13 @@ func (c *FakeNodes) Watch(opts api.ListOptions) (watch.Interface, error) { return c.Fake. InvokesWatch(core.NewRootWatchAction(nodesResource, opts)) } + +// Patch applies the patch and returns the patched node. +func (c *FakeNodes) Patch(name string, pt api.PatchType, data []byte) (result *v1.Node, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(nodesResource, name, data), &v1.Node{}) + if obj == nil { + return nil, err + } + return obj.(*v1.Node), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_persistentvolume.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_persistentvolume.go index 0aa61b830d..11a4a7614d 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_persistentvolume.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_persistentvolume.go @@ -106,3 +106,13 @@ func (c *FakePersistentVolumes) Watch(opts api.ListOptions) (watch.Interface, er return c.Fake. InvokesWatch(core.NewRootWatchAction(persistentvolumesResource, opts)) } + +// Patch applies the patch and returns the patched persistentVolume. +func (c *FakePersistentVolumes) Patch(name string, pt api.PatchType, data []byte) (result *v1.PersistentVolume, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(persistentvolumesResource, name, data), &v1.PersistentVolume{}) + if obj == nil { + return nil, err + } + return obj.(*v1.PersistentVolume), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_pod.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_pod.go index 0273bb9b07..5460bdbe06 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_pod.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_pod.go @@ -114,3 +114,14 @@ func (c *FakePods) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(podsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched pod. +func (c *FakePods) Patch(name string, pt api.PatchType, data []byte) (result *v1.Pod, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(podsResource, c.ns, name, data), &v1.Pod{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.Pod), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_podtemplate.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_podtemplate.go index 89302ae8c4..7dee5b1ed1 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_podtemplate.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_podtemplate.go @@ -104,3 +104,14 @@ func (c *FakePodTemplates) Watch(opts api.ListOptions) (watch.Interface, error) InvokesWatch(core.NewWatchAction(podtemplatesResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched podTemplate. +func (c *FakePodTemplates) Patch(name string, pt api.PatchType, data []byte) (result *v1.PodTemplate, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(podtemplatesResource, c.ns, name, data), &v1.PodTemplate{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.PodTemplate), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_replicationcontroller.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_replicationcontroller.go index 3599a46e22..8c229b8b99 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_replicationcontroller.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_replicationcontroller.go @@ -114,3 +114,14 @@ func (c *FakeReplicationControllers) Watch(opts api.ListOptions) (watch.Interfac InvokesWatch(core.NewWatchAction(replicationcontrollersResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched replicationController. +func (c *FakeReplicationControllers) Patch(name string, pt api.PatchType, data []byte) (result *v1.ReplicationController, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(replicationcontrollersResource, c.ns, name, data), &v1.ReplicationController{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.ReplicationController), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_resourcequota.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_resourcequota.go index 2def4eec54..f467df35ee 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_resourcequota.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_resourcequota.go @@ -114,3 +114,14 @@ func (c *FakeResourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error InvokesWatch(core.NewWatchAction(resourcequotasResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched resourceQuota. +func (c *FakeResourceQuotas) Patch(name string, pt api.PatchType, data []byte) (result *v1.ResourceQuota, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(resourcequotasResource, c.ns, name, data), &v1.ResourceQuota{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.ResourceQuota), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_secret.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_secret.go index 921da249aa..ff9142cf37 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_secret.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_secret.go @@ -104,3 +104,14 @@ func (c *FakeSecrets) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched secret. +func (c *FakeSecrets) Patch(name string, pt api.PatchType, data []byte) (result *v1.Secret, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(secretsResource, c.ns, name, data), &v1.Secret{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.Secret), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_service.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_service.go index 3355aa94e1..cbc358e6a3 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_service.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_service.go @@ -114,3 +114,14 @@ func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched service. +func (c *FakeServices) Patch(name string, pt api.PatchType, data []byte) (result *v1.Service, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(servicesResource, c.ns, name, data), &v1.Service{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.Service), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_serviceaccount.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_serviceaccount.go index fa10a5353c..86757a6628 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_serviceaccount.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_serviceaccount.go @@ -104,3 +104,14 @@ func (c *FakeServiceAccounts) Watch(opts api.ListOptions) (watch.Interface, erro InvokesWatch(core.NewWatchAction(serviceaccountsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched serviceAccount. +func (c *FakeServiceAccounts) Patch(name string, pt api.PatchType, data []byte) (result *v1.ServiceAccount, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(serviceaccountsResource, c.ns, name, data), &v1.ServiceAccount{}) + + if obj == nil { + return nil, err + } + return obj.(*v1.ServiceAccount), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/limitrange.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/limitrange.go index a44c61fa22..435ac0949b 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/limitrange.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/limitrange.go @@ -37,6 +37,7 @@ type LimitRangeInterface interface { Get(name string) (*v1.LimitRange, error) List(opts api.ListOptions) (*v1.LimitRangeList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.LimitRange, err error) LimitRangeExpansion } @@ -134,3 +135,16 @@ func (c *limitRanges) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched limitRange. +func (c *limitRanges) Patch(name string, pt api.PatchType, data []byte) (result *v1.LimitRange, err error) { + result = &v1.LimitRange{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("limitranges"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/namespace.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/namespace.go index 3d2cff1446..592517a7ce 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/namespace.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/namespace.go @@ -38,6 +38,7 @@ type NamespaceInterface interface { Get(name string) (*v1.Namespace, error) List(opts api.ListOptions) (*v1.NamespaceList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.Namespace, err error) NamespaceExpansion } @@ -138,3 +139,15 @@ func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched namespace. +func (c *namespaces) Patch(name string, pt api.PatchType, data []byte) (result *v1.Namespace, err error) { + result = &v1.Namespace{} + err = c.client.Patch(pt). + Resource("namespaces"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/node.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/node.go index 464eb8d6d6..ad3fc1bc1f 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/node.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/node.go @@ -38,6 +38,7 @@ type NodeInterface interface { Get(name string) (*v1.Node, error) List(opts api.ListOptions) (*v1.NodeList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.Node, err error) NodeExpansion } @@ -138,3 +139,15 @@ func (c *nodes) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched node. +func (c *nodes) Patch(name string, pt api.PatchType, data []byte) (result *v1.Node, err error) { + result = &v1.Node{} + err = c.client.Patch(pt). + Resource("nodes"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/persistentvolume.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/persistentvolume.go index 85ddf060e2..1573833e56 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/persistentvolume.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/persistentvolume.go @@ -38,6 +38,7 @@ type PersistentVolumeInterface interface { Get(name string) (*v1.PersistentVolume, error) List(opts api.ListOptions) (*v1.PersistentVolumeList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.PersistentVolume, err error) PersistentVolumeExpansion } @@ -138,3 +139,15 @@ func (c *persistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched persistentVolume. +func (c *persistentVolumes) Patch(name string, pt api.PatchType, data []byte) (result *v1.PersistentVolume, err error) { + result = &v1.PersistentVolume{} + err = c.client.Patch(pt). + Resource("persistentvolumes"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/pod.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/pod.go index d2ed5faaa8..de1ee946b1 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/pod.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/pod.go @@ -38,6 +38,7 @@ type PodInterface interface { Get(name string) (*v1.Pod, error) List(opts api.ListOptions) (*v1.PodList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.Pod, err error) PodExpansion } @@ -148,3 +149,16 @@ func (c *pods) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched pod. +func (c *pods) Patch(name string, pt api.PatchType, data []byte) (result *v1.Pod, err error) { + result = &v1.Pod{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("pods"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/podtemplate.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/podtemplate.go index 1b95106d17..6a7a898499 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/podtemplate.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/podtemplate.go @@ -37,6 +37,7 @@ type PodTemplateInterface interface { Get(name string) (*v1.PodTemplate, error) List(opts api.ListOptions) (*v1.PodTemplateList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.PodTemplate, err error) PodTemplateExpansion } @@ -134,3 +135,16 @@ func (c *podTemplates) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched podTemplate. +func (c *podTemplates) Patch(name string, pt api.PatchType, data []byte) (result *v1.PodTemplate, err error) { + result = &v1.PodTemplate{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("podtemplates"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/replicationcontroller.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/replicationcontroller.go index 20bcc90c37..dfa75e485c 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/replicationcontroller.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/replicationcontroller.go @@ -38,6 +38,7 @@ type ReplicationControllerInterface interface { Get(name string) (*v1.ReplicationController, error) List(opts api.ListOptions) (*v1.ReplicationControllerList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.ReplicationController, err error) ReplicationControllerExpansion } @@ -148,3 +149,16 @@ func (c *replicationControllers) Watch(opts api.ListOptions) (watch.Interface, e VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched replicationController. +func (c *replicationControllers) Patch(name string, pt api.PatchType, data []byte) (result *v1.ReplicationController, err error) { + result = &v1.ReplicationController{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("replicationcontrollers"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/resourcequota.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/resourcequota.go index 466e963d6c..36c1f548e0 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/resourcequota.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/resourcequota.go @@ -38,6 +38,7 @@ type ResourceQuotaInterface interface { Get(name string) (*v1.ResourceQuota, error) List(opts api.ListOptions) (*v1.ResourceQuotaList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.ResourceQuota, err error) ResourceQuotaExpansion } @@ -148,3 +149,16 @@ func (c *resourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched resourceQuota. +func (c *resourceQuotas) Patch(name string, pt api.PatchType, data []byte) (result *v1.ResourceQuota, err error) { + result = &v1.ResourceQuota{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("resourcequotas"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/secret.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/secret.go index a95aa84f44..712048cee7 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/secret.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/secret.go @@ -37,6 +37,7 @@ type SecretInterface interface { Get(name string) (*v1.Secret, error) List(opts api.ListOptions) (*v1.SecretList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.Secret, err error) SecretExpansion } @@ -134,3 +135,16 @@ func (c *secrets) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched secret. +func (c *secrets) Patch(name string, pt api.PatchType, data []byte) (result *v1.Secret, err error) { + result = &v1.Secret{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("secrets"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/service.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/service.go index cd62b5d94f..ca533d1f2f 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/service.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/service.go @@ -38,6 +38,7 @@ type ServiceInterface interface { Get(name string) (*v1.Service, error) List(opts api.ListOptions) (*v1.ServiceList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.Service, err error) ServiceExpansion } @@ -148,3 +149,16 @@ func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched service. +func (c *services) Patch(name string, pt api.PatchType, data []byte) (result *v1.Service, err error) { + result = &v1.Service{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("services"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/serviceaccount.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/serviceaccount.go index eb0b258fa9..39804da3ba 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/serviceaccount.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/serviceaccount.go @@ -37,6 +37,7 @@ type ServiceAccountInterface interface { Get(name string) (*v1.ServiceAccount, error) List(opts api.ListOptions) (*v1.ServiceAccountList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1.ServiceAccount, err error) ServiceAccountExpansion } @@ -134,3 +135,16 @@ func (c *serviceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched serviceAccount. +func (c *serviceAccounts) Patch(name string, pt api.PatchType, data []byte) (result *v1.ServiceAccount, err error) { + result = &v1.ServiceAccount{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("serviceaccounts"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/daemonset.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/daemonset.go index ecbece591b..26b402c1e9 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/daemonset.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/daemonset.go @@ -38,6 +38,7 @@ type DaemonSetInterface interface { Get(name string) (*v1beta1.DaemonSet, error) List(opts api.ListOptions) (*v1beta1.DaemonSetList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.DaemonSet, err error) DaemonSetExpansion } @@ -148,3 +149,16 @@ func (c *daemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched daemonSet. +func (c *daemonSets) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.DaemonSet, err error) { + result = &v1beta1.DaemonSet{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("daemonsets"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/deployment.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/deployment.go index 7cc3ff9d3f..ad5de86e45 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/deployment.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/deployment.go @@ -38,6 +38,7 @@ type DeploymentInterface interface { Get(name string) (*v1beta1.Deployment, error) List(opts api.ListOptions) (*v1beta1.DeploymentList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.Deployment, err error) DeploymentExpansion } @@ -148,3 +149,16 @@ func (c *deployments) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched deployment. +func (c *deployments) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.Deployment, err error) { + result = &v1beta1.Deployment{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("deployments"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_daemonset.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_daemonset.go index 26187506e5..ca4ffe1f0b 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_daemonset.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_daemonset.go @@ -114,3 +114,14 @@ func (c *FakeDaemonSets) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(daemonsetsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched daemonSet. +func (c *FakeDaemonSets) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.DaemonSet, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(daemonsetsResource, c.ns, name, data), &v1beta1.DaemonSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.DaemonSet), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_deployment.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_deployment.go index dc6e55db69..b827448b0c 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_deployment.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_deployment.go @@ -114,3 +114,14 @@ func (c *FakeDeployments) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(deploymentsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched deployment. +func (c *FakeDeployments) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.Deployment, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(deploymentsResource, c.ns, name, data), &v1beta1.Deployment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Deployment), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_horizontalpodautoscaler.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_horizontalpodautoscaler.go index 8517996527..5ccf47d7b2 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_horizontalpodautoscaler.go @@ -114,3 +114,14 @@ func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interf InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.HorizontalPodAutoscaler, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(horizontalpodautoscalersResource, c.ns, name, data), &v1beta1.HorizontalPodAutoscaler{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.HorizontalPodAutoscaler), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_ingress.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_ingress.go index e1c46d4272..840d0c27ad 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_ingress.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_ingress.go @@ -114,3 +114,14 @@ func (c *FakeIngresses) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(ingressesResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched ingress. +func (c *FakeIngresses) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.Ingress, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(ingressesResource, c.ns, name, data), &v1beta1.Ingress{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Ingress), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_job.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_job.go index e7819d36aa..6a4949186e 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_job.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_job.go @@ -114,3 +114,14 @@ func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched job. +func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.Job, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(jobsResource, c.ns, name, data), &v1beta1.Job{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Job), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go index c40b04a118..7ea9b88f2e 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go @@ -97,3 +97,13 @@ func (c *FakePodSecurityPolicies) Watch(opts api.ListOptions) (watch.Interface, return c.Fake. InvokesWatch(core.NewRootWatchAction(podsecuritypoliciesResource, opts)) } + +// Patch applies the patch and returns the patched podSecurityPolicy. +func (c *FakePodSecurityPolicies) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(podsecuritypoliciesResource, name, data), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_replicaset.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_replicaset.go index 85aa5b87fa..31fd676b8e 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_replicaset.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_replicaset.go @@ -114,3 +114,14 @@ func (c *FakeReplicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { InvokesWatch(core.NewWatchAction(replicasetsResource, c.ns, opts)) } + +// Patch applies the patch and returns the patched replicaSet. +func (c *FakeReplicaSets) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.ReplicaSet, err error) { + obj, err := c.Fake. + Invokes(core.NewPatchAction(replicasetsResource, c.ns, name, data), &v1beta1.ReplicaSet{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ReplicaSet), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go index 4cfe0ec50c..7fbf25397e 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go @@ -97,3 +97,13 @@ func (c *FakeThirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, return c.Fake. InvokesWatch(core.NewRootWatchAction(thirdpartyresourcesResource, opts)) } + +// Patch applies the patch and returns the patched thirdPartyResource. +func (c *FakeThirdPartyResources) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.ThirdPartyResource, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(thirdpartyresourcesResource, name, data), &v1beta1.ThirdPartyResource{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.ThirdPartyResource), err +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/horizontalpodautoscaler.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/horizontalpodautoscaler.go index 93b486b894..16c874a82f 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/horizontalpodautoscaler.go @@ -38,6 +38,7 @@ type HorizontalPodAutoscalerInterface interface { Get(name string) (*v1beta1.HorizontalPodAutoscaler, error) List(opts api.ListOptions) (*v1beta1.HorizontalPodAutoscalerList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } @@ -148,3 +149,16 @@ func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched horizontalPodAutoscaler. +func (c *horizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.HorizontalPodAutoscaler, err error) { + result = &v1beta1.HorizontalPodAutoscaler{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("horizontalpodautoscalers"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/ingress.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/ingress.go index 96b4d04396..feb5c2bd25 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/ingress.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/ingress.go @@ -38,6 +38,7 @@ type IngressInterface interface { Get(name string) (*v1beta1.Ingress, error) List(opts api.ListOptions) (*v1beta1.IngressList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.Ingress, err error) IngressExpansion } @@ -148,3 +149,16 @@ func (c *ingresses) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched ingress. +func (c *ingresses) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.Ingress, err error) { + result = &v1beta1.Ingress{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("ingresses"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/job.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/job.go index c518c5abda..9f3782f324 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/job.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/job.go @@ -38,6 +38,7 @@ type JobInterface interface { Get(name string) (*v1beta1.Job, error) List(opts api.ListOptions) (*v1beta1.JobList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.Job, err error) JobExpansion } @@ -148,3 +149,16 @@ func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched job. +func (c *jobs) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.Job, err error) { + result = &v1beta1.Job{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("jobs"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/podsecuritypolicy.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/podsecuritypolicy.go index 2f5dadabce..d139ef7886 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/podsecuritypolicy.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/podsecuritypolicy.go @@ -37,6 +37,7 @@ type PodSecurityPolicyInterface interface { Get(name string) (*v1beta1.PodSecurityPolicy, error) List(opts api.ListOptions) (*v1beta1.PodSecurityPolicyList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.PodSecurityPolicy, err error) PodSecurityPolicyExpansion } @@ -125,3 +126,15 @@ func (c *podSecurityPolicies) Watch(opts api.ListOptions) (watch.Interface, erro VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched podSecurityPolicy. +func (c *podSecurityPolicies) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.PodSecurityPolicy, err error) { + result = &v1beta1.PodSecurityPolicy{} + err = c.client.Patch(pt). + Resource("podsecuritypolicies"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/replicaset.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/replicaset.go index 1822f052c9..73ecd29875 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/replicaset.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/replicaset.go @@ -38,6 +38,7 @@ type ReplicaSetInterface interface { Get(name string) (*v1beta1.ReplicaSet, error) List(opts api.ListOptions) (*v1beta1.ReplicaSetList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.ReplicaSet, err error) ReplicaSetExpansion } @@ -148,3 +149,16 @@ func (c *replicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched replicaSet. +func (c *replicaSets) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.ReplicaSet, err error) { + result = &v1beta1.ReplicaSet{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("replicasets"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/thirdpartyresource.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/thirdpartyresource.go index 81d73d32e2..30ec768aab 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/thirdpartyresource.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/thirdpartyresource.go @@ -37,6 +37,7 @@ type ThirdPartyResourceInterface interface { Get(name string) (*v1beta1.ThirdPartyResource, error) List(opts api.ListOptions) (*v1beta1.ThirdPartyResourceList, error) Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.ThirdPartyResource, err error) ThirdPartyResourceExpansion } @@ -125,3 +126,15 @@ func (c *thirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, erro VersionedParams(&opts, api.ParameterCodec). Watch() } + +// Patch applies the patch and returns the patched thirdPartyResource. +func (c *thirdPartyResources) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.ThirdPartyResource, err error) { + result = &v1beta1.ThirdPartyResource{} + err = c.client.Patch(pt). + Resource("thirdpartyresources"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/testing/core/actions.go b/pkg/client/testing/core/actions.go index 24a707c8a9..5d38d96972 100644 --- a/pkg/client/testing/core/actions.go +++ b/pkg/client/testing/core/actions.go @@ -118,21 +118,23 @@ func NewUpdateAction(resource unversioned.GroupVersionResource, namespace string return action } -func NewRootPatchAction(resource unversioned.GroupVersionResource, object runtime.Object) PatchActionImpl { +func NewRootPatchAction(resource unversioned.GroupVersionResource, name string, patch []byte) PatchActionImpl { action := PatchActionImpl{} action.Verb = "patch" action.Resource = resource - action.Object = object + action.Name = name + action.Patch = patch return action } -func NewPatchAction(resource unversioned.GroupVersionResource, namespace string, object runtime.Object) PatchActionImpl { +func NewPatchAction(resource unversioned.GroupVersionResource, namespace string, name string, patch []byte) PatchActionImpl { action := PatchActionImpl{} action.Verb = "patch" action.Resource = resource action.Namespace = namespace - action.Object = object + action.Name = name + action.Patch = patch return action } @@ -392,11 +394,16 @@ func (a UpdateActionImpl) GetObject() runtime.Object { type PatchActionImpl struct { ActionImpl - Object runtime.Object + Name string + Patch []byte } -func (a PatchActionImpl) GetObject() runtime.Object { - return a.Object +func (a PatchActionImpl) GetName() string { + return a.Name +} + +func (a PatchActionImpl) GetPatch() []byte { + return a.Patch } type DeleteActionImpl struct { diff --git a/pkg/controller/node/nodecontroller_test.go b/pkg/controller/node/nodecontroller_test.go index e386004c88..dff265eb17 100644 --- a/pkg/controller/node/nodecontroller_test.go +++ b/pkg/controller/node/nodecontroller_test.go @@ -161,6 +161,10 @@ func (m *FakeNodeHandler) Watch(opts api.ListOptions) (watch.Interface, error) { return nil, nil } +func (m *FakeNodeHandler) Patch(name string, pt api.PatchType, data []byte) (*api.Node, error) { + return nil, nil +} + func TestMonitorNodeStatusEvictPods(t *testing.T) { fakeNow := unversioned.Date(2015, 1, 1, 12, 0, 0, 0, time.UTC) evictionTimeout := 10 * time.Minute From b9c8c0fc2319bae13d212a030daa6ad4307a7878 Mon Sep 17 00:00:00 2001 From: Hongchao Deng <hongchaodeng1@gmail.com> Date: Fri, 17 Jun 2016 12:16:15 -0700 Subject: [PATCH 067/339] RC: rename wait -> wg We already have a package called "wait". We should make the name different. --- .../replication/replication_controller.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/controller/replication/replication_controller.go b/pkg/controller/replication/replication_controller.go index 6fda7ce896..ddc4e92f54 100644 --- a/pkg/controller/replication/replication_controller.go +++ b/pkg/controller/replication/replication_controller.go @@ -471,12 +471,12 @@ func (rm *ReplicationManager) manageReplicas(filteredPods []*api.Pod, rc *api.Re // into a performance bottleneck. We should generate a UID for the pod // beforehand and store it via ExpectCreations. rm.expectations.ExpectCreations(rcKey, diff) - wait := sync.WaitGroup{} - wait.Add(diff) + var wg sync.WaitGroup + wg.Add(diff) glog.V(2).Infof("Too few %q/%q replicas, need %d, creating %d", rc.Namespace, rc.Name, rc.Spec.Replicas, diff) for i := 0; i < diff; i++ { go func() { - defer wait.Done() + defer wg.Done() if err := rm.podControl.CreatePods(rc.Namespace, rc.Spec.Template, rc); err != nil { // Decrement the expected number of creates because the informer won't observe this pod glog.V(2).Infof("Failed creation, decrementing expectations for controller %q/%q", rc.Namespace, rc.Name) @@ -486,7 +486,7 @@ func (rm *ReplicationManager) manageReplicas(filteredPods []*api.Pod, rc *api.Re } }() } - wait.Wait() + wg.Wait() } else if diff > 0 { if diff > rm.burstReplicas { diff = rm.burstReplicas @@ -513,11 +513,11 @@ func (rm *ReplicationManager) manageReplicas(filteredPods []*api.Pod, rc *api.Re // labels on a pod/rc change in a way that the pod gets orphaned, the // rc will only wake up after the expectation has expired. rm.expectations.ExpectDeletions(rcKey, deletedPodKeys) - wait := sync.WaitGroup{} - wait.Add(diff) + var wg sync.WaitGroup + wg.Add(diff) for i := 0; i < diff; i++ { go func(ix int) { - defer wait.Done() + defer wg.Done() if err := rm.podControl.DeletePod(rc.Namespace, filteredPods[ix].Name, rc); err != nil { // Decrement the expected number of deletes because the informer won't observe this deletion podKey := controller.PodKey(filteredPods[ix]) @@ -528,7 +528,7 @@ func (rm *ReplicationManager) manageReplicas(filteredPods []*api.Pod, rc *api.Re } }(i) } - wait.Wait() + wg.Wait() } } From 6e6b825097c921020f345ca56719a47b888af0ab Mon Sep 17 00:00:00 2001 From: enj <mkhan@redhat.com> Date: Fri, 17 Jun 2016 16:15:16 -0400 Subject: [PATCH 068/339] Use preferred group version when discovery fails due to 403 --- pkg/client/typed/discovery/client_test.go | 19 +++++++++++ pkg/client/unversioned/helper.go | 5 +++ .../unversioned/helper_blackbox_test.go | 32 +++++++++++++++++-- 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/pkg/client/typed/discovery/client_test.go b/pkg/client/typed/discovery/client_test.go index 674b92f0f6..0563a83d84 100644 --- a/pkg/client/typed/discovery/client_test.go +++ b/pkg/client/typed/discovery/client_test.go @@ -95,6 +95,25 @@ func TestGetServerGroupsWithV1Server(t *testing.T) { } } +func TestGetServerGroupsWithBrokenServer(t *testing.T) { + for _, statusCode := range []int{http.StatusNotFound, http.StatusForbidden} { + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + w.WriteHeader(statusCode) + })) + defer server.Close() + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + // ServerGroups should not return an error even if server returns Not Found or Forbidden error at all end points + apiGroupList, err := client.ServerGroups() + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + groupVersions := unversioned.ExtractGroupVersions(apiGroupList) + if len(groupVersions) != 0 { + t.Errorf("expected empty list, got: %q", groupVersions) + } + } +} + func TestGetServerResourcesWithV1Server(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { var obj interface{} diff --git a/pkg/client/unversioned/helper.go b/pkg/client/unversioned/helper.go index 020bb01c26..e664125ff8 100644 --- a/pkg/client/unversioned/helper.go +++ b/pkg/client/unversioned/helper.go @@ -193,6 +193,11 @@ func NegotiateVersion(client *Client, c *restclient.Config, requestedGV *unversi return nil, fmt.Errorf("client does not support API version %q; client supported API versions: %v", preferredGV, clientVersions) } + // If the server supports no versions, then we should just use the preferredGV + // This can happen because discovery fails due to 403 Forbidden errors + if len(serverVersions) == 0 { + return preferredGV, nil + } if serverVersions.Has(preferredGV.String()) { return preferredGV, nil } diff --git a/pkg/client/unversioned/helper_blackbox_test.go b/pkg/client/unversioned/helper_blackbox_test.go index ce517530c1..9567339894 100644 --- a/pkg/client/unversioned/helper_blackbox_test.go +++ b/pkg/client/unversioned/helper_blackbox_test.go @@ -52,6 +52,7 @@ func TestNegotiateVersion(t *testing.T) { config *restclient.Config expectErr func(err error) bool sendErr error + statusCode int }{ { name: "server supports client default", @@ -60,6 +61,7 @@ func TestNegotiateVersion(t *testing.T) { serverVersions: []string{"version1", testapi.Default.GroupVersion().String()}, clientVersions: []uapi.GroupVersion{{Version: "version1"}, *testapi.Default.GroupVersion()}, expectedVersion: &uapi.GroupVersion{Version: "version1"}, + statusCode: http.StatusOK, }, { name: "server falls back to client supported", @@ -68,6 +70,7 @@ func TestNegotiateVersion(t *testing.T) { serverVersions: []string{"version1"}, clientVersions: []uapi.GroupVersion{{Version: "version1"}, *testapi.Default.GroupVersion()}, expectedVersion: &uapi.GroupVersion{Version: "version1"}, + statusCode: http.StatusOK, }, { name: "explicit version supported", @@ -75,6 +78,7 @@ func TestNegotiateVersion(t *testing.T) { serverVersions: []string{"/version1", testapi.Default.GroupVersion().String()}, clientVersions: []uapi.GroupVersion{{Version: "version1"}, *testapi.Default.GroupVersion()}, expectedVersion: testapi.Default.GroupVersion(), + statusCode: http.StatusOK, }, { name: "explicit version not supported", @@ -82,6 +86,7 @@ func TestNegotiateVersion(t *testing.T) { serverVersions: []string{"version1"}, clientVersions: []uapi.GroupVersion{{Version: "version1"}, *testapi.Default.GroupVersion()}, expectErr: func(err error) bool { return strings.Contains(err.Error(), `server does not support API version "v1"`) }, + statusCode: http.StatusOK, }, { name: "connection refused error", @@ -90,6 +95,29 @@ func TestNegotiateVersion(t *testing.T) { clientVersions: []uapi.GroupVersion{{Version: "version1"}, *testapi.Default.GroupVersion()}, sendErr: errors.New("connection refused"), expectErr: func(err error) bool { return strings.Contains(err.Error(), "connection refused") }, + statusCode: http.StatusOK, + }, + { + name: "discovery fails due to 403 Forbidden errors and thus serverVersions is empty, use default GroupVersion", + config: &restclient.Config{ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}, + clientVersions: []uapi.GroupVersion{{Version: "version1"}, *testapi.Default.GroupVersion()}, + expectedVersion: testapi.Default.GroupVersion(), + statusCode: http.StatusForbidden, + }, + { + name: "discovery fails due to 404 Not Found errors and thus serverVersions is empty, use requested GroupVersion", + version: &uapi.GroupVersion{Version: "version1"}, + config: &restclient.Config{ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}, + clientVersions: []uapi.GroupVersion{{Version: "version1"}, *testapi.Default.GroupVersion()}, + expectedVersion: &uapi.GroupVersion{Version: "version1"}, + statusCode: http.StatusNotFound, + }, + { + name: "discovery fails due to 403 Forbidden errors and thus serverVersions is empty, no fallback GroupVersion", + config: &restclient.Config{}, + clientVersions: []uapi.GroupVersion{{Version: "version1"}, *testapi.Default.GroupVersion()}, + expectErr: func(err error) bool { return strings.Contains(err.Error(), "failed to negotiate an api version;") }, + statusCode: http.StatusForbidden, }, } codec := testapi.Default.Codec() @@ -98,7 +126,7 @@ func TestNegotiateVersion(t *testing.T) { fakeClient := &fake.RESTClient{ Codec: codec, Resp: &http.Response{ - StatusCode: 200, + StatusCode: test.statusCode, Body: objBody(&uapi.APIVersions{Versions: test.serverVersions}), }, Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { @@ -107,7 +135,7 @@ func TestNegotiateVersion(t *testing.T) { } header := http.Header{} header.Set("Content-Type", runtime.ContentTypeJSON) - return &http.Response{StatusCode: 200, Header: header, Body: objBody(&uapi.APIVersions{Versions: test.serverVersions})}, nil + return &http.Response{StatusCode: test.statusCode, Header: header, Body: objBody(&uapi.APIVersions{Versions: test.serverVersions})}, nil }), } c := unversioned.NewOrDie(test.config) From e711cbf912e0867995f587ce5ef283ca1f58beb7 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara <justin@fathomdb.com> Date: Thu, 16 Jun 2016 13:36:55 -0400 Subject: [PATCH 069/339] GCE/AWS: Spread PetSet volume creation across zones Long term we plan on integrating this into the scheduler, but in the short term we use the volume name to place it onto a zone. We hash the volume name so we don't bias to the first few zones. If the volume name "looks like" a PetSet volume name (ending with -<number>) then we use the number as an offset. In that case we hash the base name. Fixes #27256 --- pkg/cloudprovider/providers/aws/aws.go | 53 +++++++++++++++++-- pkg/cloudprovider/providers/gce/gce.go | 32 +++++++++++ pkg/controller/persistentvolume/controller.go | 1 + pkg/volume/aws_ebs/aws_util.go | 1 + pkg/volume/gce_pd/gce_util.go | 6 ++- pkg/volume/plugins.go | 2 + pkg/volume/util.go | 49 +++++++++++++++++ 7 files changed, 138 insertions(+), 6 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index f836abf901..ee53528e9d 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -49,6 +49,7 @@ import ( aws_credentials "k8s.io/kubernetes/pkg/credentialprovider/aws" "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util/sets" + "k8s.io/kubernetes/pkg/volume" ) const ProviderName = "aws" @@ -198,6 +199,7 @@ type EC2Metadata interface { type VolumeOptions struct { CapacityGB int Tags map[string]string + PVCName string } // Volumes is an interface for managing cloud-provisioned volumes @@ -914,6 +916,46 @@ func (aws *AWSCloud) List(filter string) ([]string, error) { return aws.getInstancesByRegex(filter) } +// getAllZones retrieves a list of all the zones in which nodes are running +// It currently involves querying all instances +func (c *AWSCloud) getAllZones() (sets.String, error) { + // TODO: Caching, although we currently only use this in volume creation + // TODO: We could also query for subnets, I think + + filters := []*ec2.Filter{newEc2Filter("instance-state-name", "running")} + filters = c.addFilters(filters) + request := &ec2.DescribeInstancesInput{ + Filters: filters, + } + + instances, err := c.ec2.DescribeInstances(request) + if err != nil { + return nil, err + } + if len(instances) == 0 { + return nil, fmt.Errorf("no instances returned") + } + + zones := sets.NewString() + + for _, instance := range instances { + // Only return fully-ready instances when listing instances + // (vs a query by name, where we will return it if we find it) + if orEmpty(instance.State.Name) == "pending" { + glog.V(2).Infof("Skipping EC2 instance (pending): %s", *instance.InstanceId) + continue + } + + if instance.Placement != nil { + zone := aws.StringValue(instance.Placement.AvailabilityZone) + zones.Insert(zone) + } + } + + glog.V(2).Infof("Found instances in zones %s", zones) + return zones, nil +} + // GetZone implements Zones.GetZone func (c *AWSCloud) GetZone() (cloudprovider.Zone, error) { return cloudprovider.Zone{ @@ -1387,11 +1429,14 @@ func (aws *AWSCloud) DetachDisk(diskName string, instanceName string) (string, e return hostDevicePath, err } -// Implements Volumes.CreateVolume +// CreateDisk implements Volumes.CreateDisk func (s *AWSCloud) CreateDisk(volumeOptions *VolumeOptions) (string, error) { - // Default to creating in the current zone - // TODO: Spread across zones? - createAZ := s.selfAWSInstance.availabilityZone + allZones, err := s.getAllZones() + if err != nil { + return "", fmt.Errorf("error querying for all zones: %v", err) + } + + createAZ := volume.ChooseZoneForVolume(allZones, volumeOptions.PVCName) // TODO: Should we tag this with the cluster id (so it gets deleted when the cluster does?) request := &ec2.CreateVolumeInput{} diff --git a/pkg/cloudprovider/providers/gce/gce.go b/pkg/cloudprovider/providers/gce/gce.go index a45912fecb..ad4afe55d1 100644 --- a/pkg/cloudprovider/providers/gce/gce.go +++ b/pkg/cloudprovider/providers/gce/gce.go @@ -2066,6 +2066,38 @@ func (gce *GCECloud) List(filter string) ([]string, error) { return instances, nil } +// GetAllZones returns all the zones in which nodes are running +func (gce *GCECloud) GetAllZones() (sets.String, error) { + if len(gce.managedZones) == 1 { + return sets.NewString(gce.managedZones...), nil + } + + // TODO: Caching, but this is currently only called when we are creating a volume, + // which is a relatively infrequent operation, and this is only # zones API calls + zones := sets.NewString() + + // TODO: Parallelize, although O(zones) so not too bad (N <= 3 typically) + for _, zone := range gce.managedZones { + // We only retrieve one page in each zone - we only care about existence + listCall := gce.service.Instances.List(gce.projectID, zone) + + // No filter: We assume that a zone is either used or unused + + // Just a minimal set of fields - we only care about existence + listCall = listCall.Fields("items(name)") + + res, err := listCall.Do() + if err != nil { + return nil, err + } + if len(res.Items) != 0 { + zones.Insert(zone) + } + } + + return zones, nil +} + func getMetadataValue(metadata *compute.Metadata, key string) (string, bool) { for _, item := range metadata.Items { if item.Key == key { diff --git a/pkg/controller/persistentvolume/controller.go b/pkg/controller/persistentvolume/controller.go index d17f35cb23..3bf1c1ac1c 100644 --- a/pkg/controller/persistentvolume/controller.go +++ b/pkg/controller/persistentvolume/controller.go @@ -1125,6 +1125,7 @@ func (ctrl *PersistentVolumeController) provisionClaimOperation(claimObj interfa CloudTags: &tags, ClusterName: ctrl.clusterName, PVName: pvName, + PVCName: claim.Name, } // Provision the volume diff --git a/pkg/volume/aws_ebs/aws_util.go b/pkg/volume/aws_ebs/aws_util.go index fba3f00703..c3097f31c0 100644 --- a/pkg/volume/aws_ebs/aws_util.go +++ b/pkg/volume/aws_ebs/aws_util.go @@ -82,6 +82,7 @@ func (util *AWSDiskUtil) CreateVolume(c *awsElasticBlockStoreProvisioner) (strin volumeOptions := &aws.VolumeOptions{ CapacityGB: requestGB, Tags: tags, + PVCName: c.options.PVCName, } name, err := cloud.CreateDisk(volumeOptions) diff --git a/pkg/volume/gce_pd/gce_util.go b/pkg/volume/gce_pd/gce_util.go index bb8b31da4b..e77817dbea 100644 --- a/pkg/volume/gce_pd/gce_util.go +++ b/pkg/volume/gce_pd/gce_util.go @@ -82,13 +82,15 @@ func (gceutil *GCEDiskUtil) CreateVolume(c *gcePersistentDiskProvisioner) (strin // The disk will be created in the zone in which this code is currently running // TODO: We should support auto-provisioning volumes in multiple/specified zones - zone, err := cloud.GetZone() + zones, err := cloud.GetAllZones() if err != nil { glog.V(2).Infof("error getting zone information from GCE: %v", err) return "", 0, nil, err } - err = cloud.CreateDisk(name, zone.FailureDomain, int64(requestGB), *c.options.CloudTags) + zone := volume.ChooseZoneForVolume(zones, c.options.PVCName) + + err = cloud.CreateDisk(name, zone, int64(requestGB), *c.options.CloudTags) if err != nil { glog.V(2).Infof("Error creating GCE PD volume: %v", err) return "", 0, nil, err diff --git a/pkg/volume/plugins.go b/pkg/volume/plugins.go index 717dd13808..70760133f4 100644 --- a/pkg/volume/plugins.go +++ b/pkg/volume/plugins.go @@ -49,6 +49,8 @@ type VolumeOptions struct { // PV.Name of the appropriate PersistentVolume. Used to generate cloud // volume name. PVName string + // PVC.Name of the PersistentVolumeClaim, if we are auto-provisioning. + PVCName string // Unique name of Kubernetes cluster. ClusterName string // Tags to attach to the real volume in the cloud provider - e.g. AWS EBS diff --git a/pkg/volume/util.go b/pkg/volume/util.go index 696f9254b0..40d6c872f8 100644 --- a/pkg/volume/util.go +++ b/pkg/volume/util.go @@ -28,8 +28,13 @@ import ( "k8s.io/kubernetes/pkg/watch" "github.com/golang/glog" + "hash/fnv" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/resource" + "k8s.io/kubernetes/pkg/util/sets" + "math/rand" + "strconv" + "strings" ) // RecycleVolumeByWatchingPodUntilCompletion is intended for use with volume @@ -187,3 +192,47 @@ func GenerateVolumeName(clusterName, pvName string, maxLength int) string { } return prefix + "-" + pvName } + +// ChooseZone implements our heuristics for choosing a zone for volume creation based on the volume name +func ChooseZoneForVolume(zones sets.String, pvcName string) string { + // We create the volume in a zone determined by the name + // Eventually the scheduler will coordinate placement into an available zone + var hash uint32 + var index uint32 + + if pvcName == "" { + // We should always be called with a name; this shouldn't happen + glog.Warningf("No Name defined during volume create; choosing random zone") + + hash = rand.Uint32() + } else { + hashString := pvcName + + // Heuristic to make sure that volumes in a PetSet are spread across zones + // PetSet PVCs are (currently) named ClaimName-PetSetName-Id, + // where Id is an integer index + lastDash := strings.LastIndexByte(pvcName, '-') + if lastDash != -1 { + petIDString := pvcName[lastDash+1:] + petID, err := strconv.ParseUint(petIDString, 10, 32) + if err == nil { + // Offset by the pet id, so we round-robin across zones + index = uint32(petID) + // We still hash the volume name, but only the base + hashString = pvcName[:lastDash] + glog.V(2).Infof("Detected PetSet-style volume name %q; index=%d", pvcName, index) + } + } + + // We hash the (base) volume name, so we don't bias towards the first N zones + h := fnv.New32() + h.Write([]byte(hashString)) + hash = h.Sum32() + } + + zoneSlice := zones.List() + zone := zoneSlice[(hash+index)%uint32(len(zoneSlice))] + + glog.V(2).Infof("Creating volume for PVC %q; chose zone=%q from zones=%q", pvcName, zone, zoneSlice) + return zone +} From 9c2566572d3d8c72688d624b872b3171aaf446a6 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara <justin@fathomdb.com> Date: Fri, 17 Jun 2016 23:16:07 -0400 Subject: [PATCH 070/339] GCE Multizone: Allow volumes to be created in non-master zone We had a long-lasting bug which prevented creation of volumes in non-master zones, because the cloudprovider in the volume label admission controller is not initialized with the multizone setting (issue #27656). This implements a simple workaround: if the volume is created with the failure-domain zone label, we look for the volume in that zone. This is more efficient, avoids introducing a new semantic, and allows users (and the dynamic provisioner) to create volumes in non-master zones. Fixes #27657 --- pkg/cloudprovider/providers/gce/gce.go | 30 ++++++++++++++----- pkg/volume/gce_pd/attacher_test.go | 2 +- pkg/volume/gce_pd/gce_util.go | 2 +- .../persistentvolume/label/admission.go | 6 +++- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/pkg/cloudprovider/providers/gce/gce.go b/pkg/cloudprovider/providers/gce/gce.go index ad4afe55d1..a2d3f5c577 100644 --- a/pkg/cloudprovider/providers/gce/gce.go +++ b/pkg/cloudprovider/providers/gce/gce.go @@ -120,9 +120,11 @@ type Disks interface { // DeleteDisk deletes PD. DeleteDisk(diskToDelete string) error - // GetAutoLabelsForPD returns labels to apply to PeristentVolume + // GetAutoLabelsForPD returns labels to apply to PersistentVolume // representing this PD, namely failure domain and zone. - GetAutoLabelsForPD(name string) (map[string]string, error) + // zone can be provided to specify the zone for the PD, + // if empty all managed zones will be searched. + GetAutoLabelsForPD(name string, zone string) (map[string]string, error) } type instRefSlice []*compute.InstanceReference @@ -2250,13 +2252,27 @@ func (gce *GCECloud) DeleteDisk(diskToDelete string) error { // Builds the labels that should be automatically added to a PersistentVolume backed by a GCE PD // Specifically, this builds FailureDomain (zone) and Region labels. // The PersistentVolumeLabel admission controller calls this and adds the labels when a PV is created. -func (gce *GCECloud) GetAutoLabelsForPD(name string) (map[string]string, error) { - disk, err := gce.getDiskByNameUnknownZone(name) - if err != nil { - return nil, err +// If zone is specified, the volume will only be found in the specified zone, +// otherwise all managed zones will be searched. +func (gce *GCECloud) GetAutoLabelsForPD(name string, zone string) (map[string]string, error) { + var disk *gceDisk + var err error + if zone == "" { + disk, err = gce.getDiskByNameUnknownZone(name) + if err != nil { + return nil, err + } + zone = disk.Zone + } else { + // We could assume the disks exists; we have all the information we need + // However it is more consistent to ensure the disk exists, + // and in future we may gather addition information (e.g. disk type, IOPS etc) + disk, err = gce.getDiskByName(name, zone) + if err != nil { + return nil, err + } } - zone := disk.Zone region, err := GetGCERegion(zone) if err != nil { return nil, err diff --git a/pkg/volume/gce_pd/attacher_test.go b/pkg/volume/gce_pd/attacher_test.go index 7a690fb80b..0551fb15ad 100644 --- a/pkg/volume/gce_pd/attacher_test.go +++ b/pkg/volume/gce_pd/attacher_test.go @@ -342,6 +342,6 @@ func (testcase *testcase) DeleteDisk(diskToDelete string) error { return errors.New("Not implemented") } -func (testcase *testcase) GetAutoLabelsForPD(name string) (map[string]string, error) { +func (testcase *testcase) GetAutoLabelsForPD(name string, zone string) (map[string]string, error) { return map[string]string{}, errors.New("Not implemented") } diff --git a/pkg/volume/gce_pd/gce_util.go b/pkg/volume/gce_pd/gce_util.go index e77817dbea..717b9b0df1 100644 --- a/pkg/volume/gce_pd/gce_util.go +++ b/pkg/volume/gce_pd/gce_util.go @@ -97,7 +97,7 @@ func (gceutil *GCEDiskUtil) CreateVolume(c *gcePersistentDiskProvisioner) (strin } glog.V(2).Infof("Successfully created GCE PD volume %s", name) - labels, err := cloud.GetAutoLabelsForPD(name) + labels, err := cloud.GetAutoLabelsForPD(name, zone) if err != nil { // We don't really want to leak the volume here... glog.Errorf("error getting labels for volume %q: %v", name, err) diff --git a/plugin/pkg/admission/persistentvolume/label/admission.go b/plugin/pkg/admission/persistentvolume/label/admission.go index f3b4fd86b5..67648058ed 100644 --- a/plugin/pkg/admission/persistentvolume/label/admission.go +++ b/plugin/pkg/admission/persistentvolume/label/admission.go @@ -25,6 +25,7 @@ import ( "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/cloudprovider/providers/aws" "k8s.io/kubernetes/pkg/cloudprovider/providers/gce" @@ -159,7 +160,10 @@ func (l *persistentVolumeLabel) findGCEPDLabels(volume *api.PersistentVolume) (m return nil, fmt.Errorf("unable to build GCE cloud provider for PD") } - labels, err := provider.GetAutoLabelsForPD(volume.Spec.GCEPersistentDisk.PDName) + // If the zone is already labeled, honor the hint + zone := volume.Labels[unversioned.LabelZoneFailureDomain] + + labels, err := provider.GetAutoLabelsForPD(volume.Spec.GCEPersistentDisk.PDName, zone) if err != nil { return nil, err } From 4523429b207e5a781a06d6cdb65de64daa162987 Mon Sep 17 00:00:00 2001 From: Weixu Zhuang <weixu@appformix.com> Date: Mon, 11 Jan 2016 19:11:52 -0800 Subject: [PATCH 071/339] Azure/ubuntu/saltstack support re-instated This first reverts commit 8e8437dad8531da1c7b87aded12d9fbbcf41f1d4. Also resolves conflicts with docs on f334fc41 And resolves conflicts with https://github.com/kubernetes/kubernetes/pull/22231/commits to make people switching between two different methods of setting up by setting env variables. Conflicts: cluster/get-kube.sh cluster/saltbase/salt/README.md cluster/saltbase/salt/kube-proxy/default cluster/saltbase/salt/top.sls --- cluster/azure-legacy/.gitignore | 2 + cluster/azure-legacy/config-default.sh | 58 ++ cluster/azure-legacy/templates/common.sh | 58 ++ .../templates/create-dynamic-salt-files.sh | 30 ++ .../templates/download-release.sh | 35 ++ cluster/azure-legacy/templates/salt-master.sh | 68 +++ cluster/azure-legacy/templates/salt-minion.sh | 57 ++ cluster/azure-legacy/util.sh | 501 ++++++++++++++++++ cluster/get-kube.sh | 2 + cluster/saltbase/README.md | 6 +- cluster/saltbase/salt/README.md | 39 +- cluster/saltbase/salt/generate-cert/init.sls | 3 + .../salt/generate-cert/make-ca-cert.sh | 5 + cluster/saltbase/salt/kube-proxy/default | 35 ++ .../saltbase/salt/openvpn-client/client.conf | 53 ++ cluster/saltbase/salt/openvpn-client/init.sls | 16 + cluster/saltbase/salt/openvpn/init.sls | 31 ++ cluster/saltbase/salt/openvpn/server.conf | 123 +++++ cluster/saltbase/salt/top.sls | 6 + 19 files changed, 1107 insertions(+), 21 deletions(-) create mode 100644 cluster/azure-legacy/.gitignore create mode 100644 cluster/azure-legacy/config-default.sh create mode 100644 cluster/azure-legacy/templates/common.sh create mode 100644 cluster/azure-legacy/templates/create-dynamic-salt-files.sh create mode 100644 cluster/azure-legacy/templates/download-release.sh create mode 100644 cluster/azure-legacy/templates/salt-master.sh create mode 100644 cluster/azure-legacy/templates/salt-minion.sh create mode 100644 cluster/azure-legacy/util.sh create mode 100644 cluster/saltbase/salt/kube-proxy/default create mode 100644 cluster/saltbase/salt/openvpn-client/client.conf create mode 100644 cluster/saltbase/salt/openvpn-client/init.sls create mode 100644 cluster/saltbase/salt/openvpn/init.sls create mode 100644 cluster/saltbase/salt/openvpn/server.conf diff --git a/cluster/azure-legacy/.gitignore b/cluster/azure-legacy/.gitignore new file mode 100644 index 0000000000..c9c7458b07 --- /dev/null +++ b/cluster/azure-legacy/.gitignore @@ -0,0 +1,2 @@ +_deployments +config-real.sh diff --git a/cluster/azure-legacy/config-default.sh b/cluster/azure-legacy/config-default.sh new file mode 100644 index 0000000000..aa86c0c679 --- /dev/null +++ b/cluster/azure-legacy/config-default.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# Copyright 2014 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +INSTANCE_PREFIX=kubernetes +AZ_LOCATION='West US' +TAG=testing +AZ_CS_PREFIX=kube +AZ_VNET=MyVnet +AZ_SUBNET=Subnet-1 +AZ_IMAGE=b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_1-LTS-amd64-server-20140927-en-us-30GB +AZ_CS="" # is set in azure/util.sh verify-prereqs + +AZ_SSH_KEY=$HOME/.ssh/azure_rsa +AZ_SSH_CERT=$HOME/.ssh/azure.pem + +NUM_MINIONS=4 + +MASTER_NAME="${INSTANCE_PREFIX}-master" +MASTER_TAG="${INSTANCE_PREFIX}-master" +MINION_TAG="${INSTANCE_PREFIX}-minion" +MINION_NAMES=($(eval echo ${INSTANCE_PREFIX}-minion-{1..${NUM_MINIONS}})) +MINION_IP_RANGES=($(eval echo "10.244.{1..${NUM_MINIONS}}.0/24")) +MINION_SCOPES="" + +SERVICE_CLUSTER_IP_RANGE="10.250.0.0/16" # formerly PORTAL_NET + +# Optional: Install node logging +ENABLE_NODE_LOGGING=false +LOGGING_DESTINATION=elasticsearch # options: elasticsearch, gcp + +# Optional: When set to true, Elasticsearch and Kibana will be setup as part of the cluster bring up. +ENABLE_CLUSTER_LOGGING=false +ELASTICSEARCH_LOGGING_REPLICAS=1 + +# Optional: Cluster monitoring to setup as part of the cluster bring up: +# none - No cluster monitoring setup +# influxdb - Heapster, InfluxDB, and Grafana +# google - Heapster, Google Cloud Monitoring, and Google Cloud Logging +ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}" + +# Optional: Install Kubernetes UI +ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}" + +# Admission Controllers to invoke prior to persisting objects in cluster +ADMISSION_CONTROL=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota diff --git a/cluster/azure-legacy/templates/common.sh b/cluster/azure-legacy/templates/common.sh new file mode 100644 index 0000000000..da6de499b1 --- /dev/null +++ b/cluster/azure-legacy/templates/common.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# Copyright 2014 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Retry a download until we get it. +# +# $1 is the URL to download +download-or-bust() { + local -r url="$1" + local -r file="${url##*/}" + rm -f "$file" + until [[ -e "${file}" ]]; do + curl --ipv4 -Lo "$file" --connect-timeout 20 --retry 6 --retry-delay 10 "$url" + md5sum "$file" + done +} + +# Install salt from GCS. See README.md for instructions on how to update these +# debs. +# +# $1 If set to --master, also install the master +install-salt() { + apt-get update + + mkdir -p /var/cache/salt-install + cd /var/cache/salt-install + + TARS=( + libzmq3_3.2.3+dfsg-1~bpo70~dst+1_amd64.deb + python-zmq_13.1.0-1~bpo70~dst+1_amd64.deb + salt-common_2014.1.13+ds-1~bpo70+1_all.deb + salt-minion_2014.1.13+ds-1~bpo70+1_all.deb + ) + if [[ ${1-} == '--master' ]]; then + TARS+=(salt-master_2014.1.13+ds-1~bpo70+1_all.deb) + fi + URL_BASE="https://storage.googleapis.com/kubernetes-release/salt" + + for tar in "${TARS[@]}"; do + download-or-bust "${URL_BASE}/${tar}" + dpkg -i "${tar}" + done + + # This will install any of the unmet dependencies from above. + apt-get install -f -y +} diff --git a/cluster/azure-legacy/templates/create-dynamic-salt-files.sh b/cluster/azure-legacy/templates/create-dynamic-salt-files.sh new file mode 100644 index 0000000000..d946fa1957 --- /dev/null +++ b/cluster/azure-legacy/templates/create-dynamic-salt-files.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Copyright 2014 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Create the overlay files for the salt tree. We create these in a separate +# place so that we can blow away the rest of the salt configs on a kube-push and +# re-apply these. + +mkdir -p /srv/salt-overlay/pillar +cat <<EOF >/srv/salt-overlay/pillar/cluster-params.sls +instance_prefix: '$(echo "$INSTANCE_PREFIX" | sed -e "s/'/''/g")' +node_instance_prefix: $NODE_INSTANCE_PREFIX +service_cluster_ip_range: $SERVICE_CLUSTER_IP_RANGE +admission_control: '$(echo "$ADMISSION_CONTROL" | sed -e "s/'/''/g")' +EOF + +mkdir -p /srv/salt-overlay/salt/nginx +echo $MASTER_HTPASSWD > /srv/salt-overlay/salt/nginx/htpasswd diff --git a/cluster/azure-legacy/templates/download-release.sh b/cluster/azure-legacy/templates/download-release.sh new file mode 100644 index 0000000000..463c5b862c --- /dev/null +++ b/cluster/azure-legacy/templates/download-release.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Copyright 2014 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Download and install release + +# This script assumes that the environment variable MASTER_RELEASE_TAR contains +# the release tar to download and unpack. It is meant to be pushed to the +# master and run. + + +echo "Downloading binary release tar ($SERVER_BINARY_TAR_URL)" +download-or-bust "$SERVER_BINARY_TAR_URL" + +echo "Downloading binary release tar ($SALT_TAR_URL)" +download-or-bust "$SALT_TAR_URL" + +echo "Unpacking Salt tree" +rm -rf kubernetes +tar xzf "${SALT_TAR_URL##*/}" + +echo "Running release install script" +sudo kubernetes/saltbase/install.sh "${SERVER_BINARY_TAR_URL##*/}" diff --git a/cluster/azure-legacy/templates/salt-master.sh b/cluster/azure-legacy/templates/salt-master.sh new file mode 100644 index 0000000000..201bfc61e2 --- /dev/null +++ b/cluster/azure-legacy/templates/salt-master.sh @@ -0,0 +1,68 @@ +#!/bin/bash + +# Copyright 2014 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Prepopulate the name of the Master +mkdir -p /etc/salt/minion.d +echo "master: $MASTER_NAME" > /etc/salt/minion.d/master.conf + +cat <<EOF >/etc/salt/minion.d/grains.conf +grains: + roles: + - kubernetes-master + cloud: azure +EOF + +# Auto accept all keys from minions that try to join +mkdir -p /etc/salt/master.d +cat <<EOF >/etc/salt/master.d/auto-accept.conf +auto_accept: True +EOF + +cat <<EOF >/etc/salt/master.d/reactor.conf +# React to new minions starting by running highstate on them. +reactor: + - 'salt/minion/*/start': + - /srv/reactor/highstate-new.sls +EOF + +mkdir -p /srv/salt/nginx +echo $MASTER_HTPASSWD > /srv/salt/nginx/htpasswd + +mkdir -p /etc/openvpn +umask=$(umask) +umask 0066 +echo "$CA_CRT" > /etc/openvpn/ca.crt +echo "$SERVER_CRT" > /etc/openvpn/server.crt +echo "$SERVER_KEY" > /etc/openvpn/server.key +umask $umask + +cat <<EOF >/etc/salt/minion.d/log-level-debug.conf +log_level: debug +log_level_logfile: debug +EOF + +cat <<EOF >/etc/salt/master.d/log-level-debug.conf +log_level: debug +log_level_logfile: debug +EOF + +install-salt --master + +# Wait a few minutes and trigger another Salt run to better recover from +# any transient errors. +echo "Sleeping 180" +sleep 180 +salt-call state.highstate || true diff --git a/cluster/azure-legacy/templates/salt-minion.sh b/cluster/azure-legacy/templates/salt-minion.sh new file mode 100644 index 0000000000..7eeaa17a16 --- /dev/null +++ b/cluster/azure-legacy/templates/salt-minion.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# Copyright 2014 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +mkdir -p /etc/openvpn +umask=$(umask) +umask 0066 +echo "$CA_CRT" > /etc/openvpn/ca.crt +echo "$CLIENT_CRT" > /etc/openvpn/client.crt +echo "$CLIENT_KEY" > /etc/openvpn/client.key +umask $umask + +# Prepopulate the name of the Master +mkdir -p /etc/salt/minion.d +echo "master: $MASTER_NAME" > /etc/salt/minion.d/master.conf + +cat <<EOF >/etc/salt/minion.d/log-level-debug.conf +log_level: debug +log_level_logfile: debug +EOF + +hostnamef=$(uname -n) +apt-get install -y ipcalc +netmask=$(ipcalc $MINION_IP_RANGE | grep Netmask | awk '{ print $2 }') +network=$(ipcalc $MINION_IP_RANGE | grep Address | awk '{ print $2 }') +cbrstring="$network $netmask" + +# Our minions will have a pool role to distinguish them from the master. +cat <<EOF >/etc/salt/minion.d/grains.conf +grains: + roles: + - kubernetes-pool + cbr-cidr: $MINION_IP_RANGE + cloud: azure + hostnamef: $hostnamef + cbr-string: $cbrstring +EOF + +install-salt + +# Wait a few minutes and trigger another Salt run to better recover from +# any transient errors. +echo "Sleeping 180" +sleep 180 +salt-call state.highstate || true diff --git a/cluster/azure-legacy/util.sh b/cluster/azure-legacy/util.sh new file mode 100644 index 0000000000..96b870a042 --- /dev/null +++ b/cluster/azure-legacy/util.sh @@ -0,0 +1,501 @@ +#!/bin/bash + +# Copyright 2014 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# A library of helper functions and constant for the local config. + +# Use the config file specified in $KUBE_CONFIG_FILE, or default to +# config-default.sh. + +set -e + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + +KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. +source "${KUBE_ROOT}/cluster/azure-legacy/${KUBE_CONFIG_FILE-"config-default.sh"}" +source "${KUBE_ROOT}/cluster/common.sh" + + +function azure_call { + local -a params=() + local param + # the '... in "$@"' is implicit on a for, so doesn't need to be stated. + for param; do + params+=("${param}") + done + local rc=0 + local stderr + local count=0 + while [[ count -lt 10 ]]; do + stderr=$(azure "${params[@]}" 2>&1 >&3) && break + rc=$? + if [[ "${stderr}" != *"getaddrinfo ENOTFOUND"* ]]; then + break + fi + count=$(($count + 1)) + done 3>&1 + if [[ "${rc}" -ne 0 ]]; then + echo "${stderr}" >&2 + return "${rc}" + fi +} + +function json_val () { + python -c 'import json,sys;obj=json.load(sys.stdin);print obj'$1''; +} + +# Verify prereqs +function verify-prereqs { + if [[ -z "$(which azure)" ]]; then + echo "Couldn't find azure in PATH" + echo " please install with 'npm install azure-cli'" + exit 1 + fi + + if [[ -z "$(azure_call account list | grep true)" ]]; then + echo "Default azure account not set" + echo " please set with 'azure account set'" + exit 1 + fi + + account=$(azure_call account list | grep true) + if which md5 > /dev/null 2>&1; then + AZ_HSH=$(md5 -q -s "$account") + else + AZ_HSH=$(echo -n "$account" | md5sum) + fi + + AZ_HSH=${AZ_HSH:0:7} + AZ_STG=kube$AZ_HSH + echo "==> AZ_STG: $AZ_STG" + + AZ_CS="$AZ_CS_PREFIX-$AZ_HSH" + echo "==> AZ_CS: $AZ_CS" + + CONTAINER=kube-$TAG + echo "==> CONTAINER: $CONTAINER" +} + +# Create a temp dir that'll be deleted at the end of this bash session. +# +# Vars set: +# KUBE_TEMP +function ensure-temp-dir { + if [[ -z ${KUBE_TEMP-} ]]; then + KUBE_TEMP=$(mktemp -d -t kubernetes.XXXXXX) + trap 'rm -rf "${KUBE_TEMP}"' EXIT + fi +} + +# Take the local tar files and upload them to Azure Storage. They will then be +# downloaded by the master as part of the start up script for the master. +# +# Assumed vars: +# SERVER_BINARY_TAR +# SALT_TAR +# Vars set: +# SERVER_BINARY_TAR_URL +# SALT_TAR_URL +function upload-server-tars() { + SERVER_BINARY_TAR_URL= + SALT_TAR_URL= + + echo "==> SERVER_BINARY_TAR: $SERVER_BINARY_TAR" + echo "==> SALT_TAR: $SALT_TAR" + + echo "+++ Staging server tars to Azure Storage: $AZ_STG" + local server_binary_url="${SERVER_BINARY_TAR##*/}" + local salt_url="${SALT_TAR##*/}" + + SERVER_BINARY_TAR_URL="https://${AZ_STG}.blob.core.windows.net/$CONTAINER/$server_binary_url" + SALT_TAR_URL="https://${AZ_STG}.blob.core.windows.net/$CONTAINER/$salt_url" + + echo "==> SERVER_BINARY_TAR_URL: $SERVER_BINARY_TAR_URL" + echo "==> SALT_TAR_URL: $SALT_TAR_URL" + + echo "--> Checking storage exists..." + if [[ -z "$(azure_call storage account show $AZ_STG 2>/dev/null | \ + grep data)" ]]; then + echo "--> Creating storage..." + azure_call storage account create -l "$AZ_LOCATION" $AZ_STG --type LRS + fi + + echo "--> Getting storage key..." + stg_key=$(azure_call storage account keys list $AZ_STG --json | \ + json_val '["primaryKey"]') + + echo "--> Checking storage container exists..." + if [[ -z "$(azure_call storage container show -a $AZ_STG -k "$stg_key" \ + $CONTAINER 2>/dev/null | grep data)" ]]; then + echo "--> Creating storage container..." + azure_call storage container create \ + -a $AZ_STG \ + -k "$stg_key" \ + -p Blob \ + $CONTAINER + fi + + echo "--> Checking server binary exists in the container..." + if [[ -n "$(azure_call storage blob show -a $AZ_STG -k "$stg_key" \ + $CONTAINER $server_binary_url 2>/dev/null | grep data)" ]]; then + echo "--> Deleting server binary in the container..." + azure_call storage blob delete \ + -a $AZ_STG \ + -k "$stg_key" \ + $CONTAINER \ + $server_binary_url + fi + + echo "--> Uploading server binary to the container..." + azure_call storage blob upload \ + -a $AZ_STG \ + -k "$stg_key" \ + $SERVER_BINARY_TAR \ + $CONTAINER \ + $server_binary_url + + echo "--> Checking salt data exists in the container..." + if [[ -n "$(azure_call storage blob show -a $AZ_STG -k "$stg_key" \ + $CONTAINER $salt_url 2>/dev/null | grep data)" ]]; then + echo "--> Deleting salt data in the container..." + azure_call storage blob delete \ + -a $AZ_STG \ + -k "$stg_key" \ + $CONTAINER \ + $salt_url + fi + + echo "--> Uploading salt data to the container..." + azure_call storage blob upload \ + -a $AZ_STG \ + -k "$stg_key" \ + $SALT_TAR \ + $CONTAINER \ + $salt_url +} + +# Detect the information about the minions +# +# Assumed vars: +# MINION_NAMES +# ZONE +# Vars set: +# +function detect-minions () { + if [[ -z "$AZ_CS" ]]; then + verify-prereqs-local + fi + ssh_ports=($(eval echo "2200{1..$NUM_MINIONS}")) + for (( i=0; i<${#MINION_NAMES[@]}; i++)); do + MINION_NAMES[$i]=$(ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p ${ssh_ports[$i]} $AZ_CS.cloudapp.net hostname -f) + done +} + +# Detect the IP for the master +# +# Assumed vars: +# MASTER_NAME +# ZONE +# Vars set: +# KUBE_MASTER +# KUBE_MASTER_IP +function detect-master () { + if [[ -z "$AZ_CS" ]]; then + verify-prereqs-local + fi + + KUBE_MASTER=${MASTER_NAME} + KUBE_MASTER_IP="${AZ_CS}.cloudapp.net" + echo "Using master: $KUBE_MASTER (external IP: $KUBE_MASTER_IP)" +} + +# Instantiate a kubernetes cluster +# +# Assumed vars +# KUBE_ROOT +# <Various vars set in config file> +function kube-up { + # Make sure we have the tar files staged on Azure Storage + find-release-tars + upload-server-tars + + ensure-temp-dir + + gen-kube-basicauth + python "${KUBE_ROOT}/third_party/htpasswd/htpasswd.py" \ + -b -c "${KUBE_TEMP}/htpasswd" "$KUBE_USER" "$KUBE_PASSWORD" + local htpasswd + htpasswd=$(cat "${KUBE_TEMP}/htpasswd") + + # Generate openvpn certs + echo "--> Generating openvpn certs" + echo 01 > ${KUBE_TEMP}/ca.srl + openssl genrsa -out ${KUBE_TEMP}/ca.key + openssl req -new -x509 -days 1095 \ + -key ${KUBE_TEMP}/ca.key \ + -out ${KUBE_TEMP}/ca.crt \ + -subj "/CN=openvpn-ca" + openssl genrsa -out ${KUBE_TEMP}/server.key + openssl req -new \ + -key ${KUBE_TEMP}/server.key \ + -out ${KUBE_TEMP}/server.csr \ + -subj "/CN=server" + openssl x509 -req -days 1095 \ + -in ${KUBE_TEMP}/server.csr \ + -CA ${KUBE_TEMP}/ca.crt \ + -CAkey ${KUBE_TEMP}/ca.key \ + -CAserial ${KUBE_TEMP}/ca.srl \ + -out ${KUBE_TEMP}/server.crt + for (( i=0; i<${#MINION_NAMES[@]}; i++)); do + openssl genrsa -out ${KUBE_TEMP}/${MINION_NAMES[$i]}.key + openssl req -new \ + -key ${KUBE_TEMP}/${MINION_NAMES[$i]}.key \ + -out ${KUBE_TEMP}/${MINION_NAMES[$i]}.csr \ + -subj "/CN=${MINION_NAMES[$i]}" + openssl x509 -req -days 1095 \ + -in ${KUBE_TEMP}/${MINION_NAMES[$i]}.csr \ + -CA ${KUBE_TEMP}/ca.crt \ + -CAkey ${KUBE_TEMP}/ca.key \ + -CAserial ${KUBE_TEMP}/ca.srl \ + -out ${KUBE_TEMP}/${MINION_NAMES[$i]}.crt + done + + # Build up start up script for master + echo "--> Building up start up script for master" + ( + echo "#!/bin/bash" + echo "CA_CRT=\"$(cat ${KUBE_TEMP}/ca.crt)\"" + echo "SERVER_CRT=\"$(cat ${KUBE_TEMP}/server.crt)\"" + echo "SERVER_KEY=\"$(cat ${KUBE_TEMP}/server.key)\"" + echo "mkdir -p /var/cache/kubernetes-install" + echo "cd /var/cache/kubernetes-install" + echo "readonly MASTER_NAME='${MASTER_NAME}'" + echo "readonly INSTANCE_PREFIX='${INSTANCE_PREFIX}'" + echo "readonly NODE_INSTANCE_PREFIX='${INSTANCE_PREFIX}-minion'" + echo "readonly SERVER_BINARY_TAR_URL='${SERVER_BINARY_TAR_URL}'" + echo "readonly SALT_TAR_URL='${SALT_TAR_URL}'" + echo "readonly MASTER_HTPASSWD='${htpasswd}'" + echo "readonly SERVICE_CLUSTER_IP_RANGE='${SERVICE_CLUSTER_IP_RANGE}'" + echo "readonly ADMISSION_CONTROL='${ADMISSION_CONTROL:-}'" + grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/common.sh" + grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/create-dynamic-salt-files.sh" + grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/download-release.sh" + grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/salt-master.sh" + ) > "${KUBE_TEMP}/master-start.sh" + + if [[ ! -f $AZ_SSH_KEY ]]; then + ssh-keygen -f $AZ_SSH_KEY -N '' + fi + + if [[ ! -f $AZ_SSH_CERT ]]; then + openssl req -new -x509 -days 1095 -key $AZ_SSH_KEY -out $AZ_SSH_CERT \ + -subj "/CN=azure-ssh-key" + fi + + if [[ -z "$(azure_call network vnet show "$AZ_VNET" 2>/dev/null | grep data)" ]]; then + echo error create vnet $AZ_VNET with subnet $AZ_SUBNET + exit 1 + fi + + echo "--> Starting VM" + azure_call vm create \ + -w "$AZ_VNET" \ + -n $MASTER_NAME \ + -l "$AZ_LOCATION" \ + -t $AZ_SSH_CERT \ + -e 22000 -P \ + -d ${KUBE_TEMP}/master-start.sh \ + -b $AZ_SUBNET \ + $AZ_CS $AZ_IMAGE $USER + + ssh_ports=($(eval echo "2200{1..$NUM_MINIONS}")) + + #Build up start up script for minions + echo "--> Building up start up script for minions" + for (( i=0; i<${#MINION_NAMES[@]}; i++)); do + ( + echo "#!/bin/bash" + echo "MASTER_NAME='${MASTER_NAME}'" + echo "CA_CRT=\"$(cat ${KUBE_TEMP}/ca.crt)\"" + echo "CLIENT_CRT=\"$(cat ${KUBE_TEMP}/${MINION_NAMES[$i]}.crt)\"" + echo "CLIENT_KEY=\"$(cat ${KUBE_TEMP}/${MINION_NAMES[$i]}.key)\"" + echo "MINION_IP_RANGE='${MINION_IP_RANGES[$i]}'" + grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/common.sh" + grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/salt-minion.sh" + ) > "${KUBE_TEMP}/minion-start-${i}.sh" + + echo "--> Starting VM" + azure_call vm create \ + -c -w "$AZ_VNET" \ + -n ${MINION_NAMES[$i]} \ + -l "$AZ_LOCATION" \ + -t $AZ_SSH_CERT \ + -e ${ssh_ports[$i]} -P \ + -d ${KUBE_TEMP}/minion-start-${i}.sh \ + -b $AZ_SUBNET \ + $AZ_CS $AZ_IMAGE $USER + done + + echo "--> Creating endpoint" + azure_call vm endpoint create $MASTER_NAME 443 + + detect-master > /dev/null + + echo "==> KUBE_MASTER_IP: ${KUBE_MASTER_IP}" + + echo "Waiting for cluster initialization." + echo + echo " This will continually check to see if the API for kubernetes is reachable." + echo " This might loop forever if there was some uncaught error during start" + echo " up." + echo + + until curl --insecure --user "${KUBE_USER}:${KUBE_PASSWORD}" --max-time 5 \ + --fail --output /dev/null --silent "https://${KUBE_MASTER_IP}/healthz"; do + printf "." + sleep 2 + done + + printf "\n" + echo "Kubernetes cluster created." + + export KUBE_CERT="/tmp/$RANDOM-kubecfg.crt" + export KUBE_KEY="/tmp/$RANDOM-kubecfg.key" + export CA_CERT="/tmp/$RANDOM-kubernetes.ca.crt" + export CONTEXT="azure_${INSTANCE_PREFIX}" + + # TODO: generate ADMIN (and KUBELET) tokens and put those in the master's + # config file. Distribute the same way the htpasswd is done. +(umask 077 + ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p 22000 $AZ_CS.cloudapp.net \ + sudo cat /srv/kubernetes/kubecfg.crt >"${KUBE_CERT}" 2>/dev/null + ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p 22000 $AZ_CS.cloudapp.net \ + sudo cat /srv/kubernetes/kubecfg.key >"${KUBE_KEY}" 2>/dev/null + ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p 22000 $AZ_CS.cloudapp.net \ + sudo cat /srv/kubernetes/ca.crt >"${CA_CERT}" 2>/dev/null + + create-kubeconfig +) + + echo "Sanity checking cluster..." + echo + echo " This will continually check the minions to ensure docker is" + echo " installed. This is usually a good indicator that salt has" + echo " successfully provisioned. This might loop forever if there was" + echo " some uncaught error during start up." + echo + # Basic sanity checking + for (( i=0; i<${#MINION_NAMES[@]}; i++)); do + # Make sure docker is installed + echo "--> Making sure docker is installed on ${MINION_NAMES[$i]}." + until ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p ${ssh_ports[$i]} \ + $AZ_CS.cloudapp.net which docker > /dev/null 2>&1; do + printf "." + sleep 2 + done + done + + # ensures KUBECONFIG is set + get-kubeconfig-basicauth + echo + echo "Kubernetes cluster is running. The master is running at:" + echo + echo " https://${KUBE_MASTER_IP}" + echo + echo "The user name and password to use is located in ${KUBECONFIG}." + echo +} + +# Delete a kubernetes cluster +function kube-down { + echo "Bringing down cluster" + + set +e + azure_call vm delete $MASTER_NAME -b -q + for (( i=0; i<${#MINION_NAMES[@]}; i++)); do + azure_call vm delete ${MINION_NAMES[$i]} -b -q + done + + wait +} + +# Update a kubernetes cluster with latest source +#function kube-push { +# detect-project +# detect-master + +# Make sure we have the tar files staged on Azure Storage +# find-release-tars +# upload-server-tars + +# ( +# echo "#! /bin/bash" +# echo "mkdir -p /var/cache/kubernetes-install" +# echo "cd /var/cache/kubernetes-install" +# echo "readonly SERVER_BINARY_TAR_URL='${SERVER_BINARY_TAR_URL}'" +# echo "readonly SALT_TAR_URL='${SALT_TAR_URL}'" +# grep -v "^#" "${KUBE_ROOT}/cluster/azure/templates/common.sh" +# grep -v "^#" "${KUBE_ROOT}/cluster/azure/templates/download-release.sh" +# echo "echo Executing configuration" +# echo "sudo salt '*' mine.update" +# echo "sudo salt --force-color '*' state.highstate" +# ) | gcutil ssh --project "$PROJECT" --zone "$ZONE" "$KUBE_MASTER" sudo bash + +# get-kubeconfig-basicauth + +# echo +# echo "Kubernetes cluster is running. The master is running at:" +# echo +# echo " https://${KUBE_MASTER_IP}" +# echo +# echo "The user name and password to use is located in ${KUBECONFIG:-$DEFAULT_KUBECONFIG}." +# echo + +#} + +# ----------------------------------------------------------------------------- +# Cluster specific test helpers used from hack/e2e-test.sh + +# Execute prior to running tests to build a release if required for env. +# +# Assumed Vars: +# KUBE_ROOT +function test-build-release { + # Make a release + "${KUBE_ROOT}/build/release.sh" +} + +# SSH to a node by name ($1) and run a command ($2). +function ssh-to-node { + local node="$1" + local cmd="$2" + ssh --ssh_arg "-o LogLevel=quiet" "${node}" "${cmd}" +} + +# Restart the kube-proxy on a node ($1) +function restart-kube-proxy { + ssh-to-node "$1" "sudo /etc/init.d/kube-proxy restart" +} + +# Restart the kube-proxy on the master ($1) +function restart-apiserver { + ssh-to-node "$1" "sudo /etc/init.d/kube-apiserver restart" +} diff --git a/cluster/get-kube.sh b/cluster/get-kube.sh index 546e27658b..616d2c6f02 100755 --- a/cluster/get-kube.sh +++ b/cluster/get-kube.sh @@ -30,6 +30,8 @@ # * export KUBERNETES_PROVIDER=aws; wget -q -O - https://get.k8s.io | bash # Libvirt (with CoreOS as a guest operating system) # * export KUBERNETES_PROVIDER=libvirt-coreos; wget -q -O - https://get.k8s.io | bash +# Microsoft Azure +# * export KUBERNETES_PROVIDER=azure; wget -q -O - https://get.k8s.io | bash # Vagrant (local virtual machines) # * export KUBERNETES_PROVIDER=vagrant; wget -q -O - https://get.k8s.io | bash # VMWare VSphere diff --git a/cluster/saltbase/README.md b/cluster/saltbase/README.md index 8bc506d0c4..f60bd429a9 100644 --- a/cluster/saltbase/README.md +++ b/cluster/saltbase/README.md @@ -4,11 +4,11 @@ This is the root of the SaltStack configuration for Kubernetes. A high level overview for the Kubernetes SaltStack configuration can be found [in the docs tree.](../../docs/admin/salt.md) This SaltStack configuration currently applies to default -configurations for Debian-on-GCE, Fedora-on-Vagrant, and Ubuntu-on-AWS. -(That doesn't mean it can't be made to apply to an +configurations for Debian-on-GCE, Fedora-on-Vagrant, Ubuntu-on-AWS and +Ubuntu-on-Azure. (That doesn't mean it can't be made to apply to an arbitrary configuration, but those are only the in-tree OS/IaaS combinations supported today.) As you peruse the configuration, these -are shorthanded as `gce`, `vagrant`, `aws` in `grains.cloud`; +are shorthanded as `gce`, `vagrant`, `aws`, `azure` in `grains.cloud`; the documentation in this tree uses this same shorthand for convenience. See more: diff --git a/cluster/saltbase/salt/README.md b/cluster/saltbase/salt/README.md index 0c74b49a15..e7341bb2ca 100644 --- a/cluster/saltbase/salt/README.md +++ b/cluster/saltbase/salt/README.md @@ -8,24 +8,27 @@ and is only used for the [docker](docker/) config.) Key: M = Config applies to master, n = config applies to nodes -Config | GCE | Vagrant | AWS | -----------------------------------------------------|-------|---------|-----| -[debian-auto-upgrades](debian-auto-upgrades/) | M n | M n | M n | -[docker](docker/) | M n | M n | M n | -[etcd](etcd/) | M | M | M | -[fluentd-es](fluentd-es/) (pillar conditional) | M n | M n | M n | -[fluentd-gcp](fluentd-gcp/) (pillar conditional) | M n | M n | M n | -[generate-cert](generate-cert/) | M | M | M | -[kube-addons](kube-addons/) | M | M | M | -[kube-apiserver](kube-apiserver/) | M | M | M | -[kube-controller-manager](kube-controller-manager/) | M | M | M | -[kube-proxy](kube-proxy/) | n | n | n | -[kube-scheduler](kube-scheduler/) | M | M | M | -[kubelet](kubelet/) | M n | M n | M n | -[logrotate](logrotate/) | M n | n | M n | -[supervisord](supervisor/) | M n | M n | M n | -[base](base.sls) | M n | M n | M n | -[kube-client-tools](kube-client-tools.sls) | M | M | M | +Config | GCE | Vagrant | AWS | Azure +----------------------------------------------------|-------|---------|-----|------ +[debian-auto-upgrades](debian-auto-upgrades/) | M n | M n | M n | M n +[docker](docker/) | M n | M n | M n | M n +[etcd](etcd/) | M | M | M | M +[fluentd-es](fluentd-es/) (pillar conditional) | M n | M n | M n | M n +[fluentd-gcp](fluentd-gcp/) (pillar conditional) | M n | M n | M n | M n +[generate-cert](generate-cert/) | M | M | M | M +[kube-addons](kube-addons/) | M | M | M | M +[kube-apiserver](kube-apiserver/) | M | M | M | M +[kube-controller-manager](kube-controller-manager/) | M | M | M | M +[kube-proxy](kube-proxy/) | n | n | n | n +[kube-scheduler](kube-scheduler/) | M | M | M | M +[kubelet](kubelet/) | M n | M n | M n | M n +[logrotate](logrotate/) | M n | n | M n | M n +[supervisord](supervisor/) | M n | M n | M n | M n +[nginx](nginx/) | | | | M +[openvpn-client](openvpn-client/) | | | | n +[openvpn](openvpn/) | | | | M +[base](base.sls) | M n | M n | M n | M n +[kube-client-tools](kube-client-tools.sls) | M | M | M | M [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/saltbase/salt/README.md?pixel)]() diff --git a/cluster/saltbase/salt/generate-cert/init.sls b/cluster/saltbase/salt/generate-cert/init.sls index b70a1c2440..d16b2d3e95 100644 --- a/cluster/saltbase/salt/generate-cert/init.sls +++ b/cluster/saltbase/salt/generate-cert/init.sls @@ -6,6 +6,9 @@ {% if grains.cloud == 'aws' %} {% set cert_ip='_use_aws_external_ip_' %} {% endif %} + {% if grains.cloud == 'azure' %} + {% set cert_ip='_use_azure_dns_name_' %} + {% endif %} {% if grains.cloud == 'vsphere' or grains.cloud == 'photon-controller' %} {% set cert_ip=grains.ip_interfaces.eth0[0] %} {% endif %} diff --git a/cluster/saltbase/salt/generate-cert/make-ca-cert.sh b/cluster/saltbase/salt/generate-cert/make-ca-cert.sh index 575c9ed79b..8dd1e2484c 100755 --- a/cluster/saltbase/salt/generate-cert/make-ca-cert.sh +++ b/cluster/saltbase/salt/generate-cert/make-ca-cert.sh @@ -51,6 +51,11 @@ if [ "$cert_ip" == "_use_aws_external_ip_" ]; then fi fi +if [ "$cert_ip" == "_use_azure_dns_name_" ]; then + cert_ip=$(uname -n | awk -F. '{ print $2 }').cloudapp.net + use_cn=true +fi + sans="IP:${cert_ip}" if [[ -n "${extra_sans}" ]]; then sans="${sans},${extra_sans}" diff --git a/cluster/saltbase/salt/kube-proxy/default b/cluster/saltbase/salt/kube-proxy/default new file mode 100644 index 0000000000..f53bd2b211 --- /dev/null +++ b/cluster/saltbase/salt/kube-proxy/default @@ -0,0 +1,35 @@ +{% set daemon_args = "$DAEMON_ARGS" -%} +{% if grains['os_family'] == 'RedHat' -%} + {% set daemon_args = "" -%} +{% endif -%} +{# TODO(azure-maintainer): add support for distributing kubeconfig with token to kube-proxy #} +{# so it can use https #} +{% if grains['cloud'] is defined and grains['cloud'] == 'azure' -%} + {% set api_servers = "--master=http://" + ips[0][0] -%} + {% set api_servers_with_port = api_servers + ":7080" -%} + {% set kubeconfig = "" -%} +{% else -%} + {% set kubeconfig = "--kubeconfig=/var/lib/kube-proxy/kubeconfig" -%} + {% if grains.api_servers is defined -%} + {% set api_servers = "--master=https://" + grains.api_servers -%} + {% else -%} + {% set ips = salt['mine.get']('roles:kubernetes-master', 'network.ip_addrs', 'grain').values() -%} + {% set api_servers = "--master=https://" + ips[0][0] -%} + {% endif -%} + + # TODO: remove nginx for other cloud providers. + {% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant' ] %} + {% set api_servers_with_port = api_servers -%} + {% else -%} + {% set api_servers_with_port = api_servers + ":6443" -%} + {% endif -%} + +{% endif -%} + +{% set test_args = "" -%} +{% if pillar['kubeproxy_test_args'] is defined -%} + {% set test_args=pillar['kubeproxy_test_args'] %} +{% endif -%} + +# test_args has to be kept at the end, so they'll overwrite any prior configuration +DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{kubeconfig}} {{pillar['log_level']}} {{test_args}}" diff --git a/cluster/saltbase/salt/openvpn-client/client.conf b/cluster/saltbase/salt/openvpn-client/client.conf new file mode 100644 index 0000000000..a620762447 --- /dev/null +++ b/cluster/saltbase/salt/openvpn-client/client.conf @@ -0,0 +1,53 @@ +# Specify that we are a client and that we +# will be pulling certain config file directives +# from the server. +client + +# Use the same setting as you are using on +# the server. +# On most systems, the VPN will not function +# unless you partially or fully disable +# the firewall for the TUN/TAP interface. +dev tun + +# Are we connecting to a TCP or +# UDP server? Use the same setting as +# on the server. +proto udp + +# The hostname/IP and port of the server. +# You can have multiple remote entries +# to load balance between the servers. +remote {{ salt['mine.get']('roles:kubernetes-master', 'network.ip_addrs', 'grain').keys()[0] }} 1194 + +# Keep trying indefinitely to resolve the +# host name of the OpenVPN server. Very useful +# on machines which are not permanently connected +# to the internet such as laptops. +resolv-retry infinite + +# Most clients don't need to bind to +# a specific local port number. +nobind + +# Try to preserve some state across restarts. +persist-key +persist-tun + +# SSL/TLS parms. +# See the server config file for more +# description. It's best to use +# a separate .crt/.key file pair +# for each client. A single ca +# file can be used for all clients. +ca /etc/openvpn/ca.crt +cert /etc/openvpn/client.crt +key /etc/openvpn/client.key + +# Enable compression on the VPN link. +# Don't enable this unless it is also +# enabled in the server config file. +comp-lzo + +# Set log file verbosity. +verb 3 diff --git a/cluster/saltbase/salt/openvpn-client/init.sls b/cluster/saltbase/salt/openvpn-client/init.sls new file mode 100644 index 0000000000..c0dbc04b06 --- /dev/null +++ b/cluster/saltbase/salt/openvpn-client/init.sls @@ -0,0 +1,16 @@ +/etc/openvpn/client.conf: + file.managed: + - source: salt://openvpn-client/client.conf + - template: jinja + - user: root + - group: root + - mode: 644 + - makedirs: True + +openvpn: + pkg: + - latest + service.running: + - enable: True + - watch: + - file: /etc/openvpn/client.conf diff --git a/cluster/saltbase/salt/openvpn/init.sls b/cluster/saltbase/salt/openvpn/init.sls new file mode 100644 index 0000000000..585238ccf4 --- /dev/null +++ b/cluster/saltbase/salt/openvpn/init.sls @@ -0,0 +1,31 @@ +/etc/openvpn/server.conf: + file.managed: + - source: salt://openvpn/server.conf + - template: jinja + - user: root + - group: root + - mode: 644 + - makedirs: True + +{% for (minion, grains) in salt['mine.get']('roles:kubernetes-pool', 'grains.items', expr_form='grain').items() %} +/etc/openvpn/ccd/{{ minion }}: + file.managed: + - contents: "iroute {{ grains['cbr-string'] }}\n" + - user: root + - group: root + - mode: 644 + - makedirs: True +{% endfor %} + +openssl dhparam -out /etc/openvpn/dh1024.pem 1024: + cmd.run: + - creates: /etc/openvpn/dh1024.pem + - unless: file /etc/openvpn/dh1024.pem + +openvpn: + pkg: + - latest + service.running: + - enable: True + - watch: + - file: /etc/openvpn/server.conf diff --git a/cluster/saltbase/salt/openvpn/server.conf b/cluster/saltbase/salt/openvpn/server.conf new file mode 100644 index 0000000000..64ae567de8 --- /dev/null +++ b/cluster/saltbase/salt/openvpn/server.conf @@ -0,0 +1,123 @@ +# Which TCP/UDP port should OpenVPN listen on? +# If you want to run multiple OpenVPN instances +# on the same machine, use a different port +# number for each one. You will need to +# open up this port on your firewall. +port 1194 + +# TCP or UDP server? +proto udp + +# "dev tun" will create a routed IP tunnel, +# "dev tap" will create an ethernet tunnel. +# Use "dev tap0" if you are ethernet bridging +# and have precreated a tap0 virtual interface +# and bridged it with your ethernet interface. +# If you want to control access policies +# over the VPN, you must create firewall +# rules for the the TUN/TAP interface. +# On non-Windows systems, you can give +# an explicit unit number, such as tun0. +# On Windows, use "dev-node" for this. +# On most systems, the VPN will not function +# unless you partially or fully disable +# the firewall for the TUN/TAP interface. +dev tun + +# SSL/TLS root certificate (ca), certificate +# (cert), and private key (key). Each client +# and the server must have their own cert and +# key file. The server and all clients will +# use the same ca file. +# +# See the "easy-rsa" directory for a series +# of scripts for generating RSA certificates +# and private keys. Remember to use +# a unique Common Name for the server +# and each of the client certificates. +# +# Any X509 key management system can be used. +# OpenVPN can also use a PKCS #12 formatted key file +# (see "pkcs12" directive in man page). +ca /etc/openvpn/ca.crt +cert /etc/openvpn/server.crt +key /etc/openvpn/server.key # This file should be kept secret + +# Diffie hellman parameters. +# Generate your own with: +# openssl dhparam -out dh1024.pem 1024 +# Substitute 2048 for 1024 if you are using +# 2048 bit keys. +dh /etc/openvpn/dh1024.pem + +# Configure server mode and supply a VPN subnet +# for OpenVPN to draw client addresses from. +# The server will take 10.8.0.1 for itself, +# the rest will be made available to clients. +# Each client will be able to reach the server +# on 10.8.0.1. Comment this line out if you are +# ethernet bridging. See the man page for more info. +server 10.8.0.0 255.255.255.0 + +# Maintain a record of client <-> virtual IP address +# associations in this file. If OpenVPN goes down or +# is restarted, reconnecting clients can be assigned +# the same virtual IP address from the pool that was +# previously assigned. +ifconfig-pool-persist ipp.txt + +# To assign specific IP addresses to specific +# clients or if a connecting client has a private +# subnet behind it that should also have VPN access, +# use the subdirectory "ccd" for client-specific +# configuration files (see man page for more info). + +client-config-dir /etc/openvpn/ccd + +{% for minion in salt['mine.get']('roles:kubernetes-pool', 'grains.items', expr_form='grain').values() %} +push "route {{ minion['cbr-string'] }}" +route {{ minion['cbr-string'] }} +{% endfor %} + +# Uncomment this directive to allow different +# clients to be able to "see" each other. +# By default, clients will only see the server. +# To force clients to only see the server, you +# will also need to appropriately firewall the +# server's TUN/TAP interface. +client-to-client + +# The keepalive directive causes ping-like +# messages to be sent back and forth over +# the link so that each side knows when +# the other side has gone down. +# Ping every 10 seconds, assume that remote +# peer is down if no ping received during +# a 120 second time period. +keepalive 10 120 + +# Enable compression on the VPN link. +# If you enable it here, you must also +# enable it in the client config file. +comp-lzo + +# The persist options will try to avoid +# accessing certain resources on restart +# that may no longer be accessible because +# of the privilege downgrade. +persist-key +persist-tun + +# Output a short status file showing +# current connections, truncated +# and rewritten every minute. +status openvpn-status.log + +# Set the appropriate level of log +# file verbosity. +# +# 0 is silent, except for fatal errors +# 4 is reasonable for general usage +# 5 and 6 can help to debug connection problems +# 9 is extremely verbose +verb 3 diff --git a/cluster/saltbase/salt/top.sls b/cluster/saltbase/salt/top.sls index d5085ce194..83f099bdfc 100644 --- a/cluster/saltbase/salt/top.sls +++ b/cluster/saltbase/salt/top.sls @@ -19,6 +19,9 @@ base: - cni {% elif pillar.get('network_provider', '').lower() == 'cni' %} - cni +{% endif %} +{% if grains['cloud'] is defined and grains['cloud'] == 'azure' %} + - openvpn-client {% endif %} - helpers - kube-client-tools @@ -78,6 +81,9 @@ base: - logrotate {% endif %} - kube-addons +{% if grains['cloud'] is defined and grains['cloud'] == 'azure' %} + - openvpn +{% endif %} {% if grains['cloud'] is defined and grains['cloud'] in [ 'vagrant', 'gce', 'aws', 'vsphere', 'photon-controller', 'openstack'] %} - docker - kubelet From e35c1ccba24da88c48b116fb0acf1df390b31782 Mon Sep 17 00:00:00 2001 From: Weixu Zhuang <weixu@appformix.com> Date: Tue, 26 Jan 2016 13:46:02 -0800 Subject: [PATCH 072/339] Implement Azure cloud provider scripts Implement basic cloud provider functionality to deploy Kubernetes on Azure. SaltStack is used to deploy Kubernetes on top of Ubuntu virtual machines. OpenVpn provides network connectivity. For kubelet authentication, we use basic authentication (username and password). The scripts use the legacy Azure Service Management APIs. We have set up a nightly test job in our Jenkins server for federated testing to run the e2e test suite on Azure. With the cloud provider scripts in this commit, 14 e2e test cases pass in this environment. We plan to implement additional Azure functionality to support more test cases. --- cluster/azure-legacy/config-default.sh | 12 +-- .../templates/create-kubeconfig.sh | 77 ++++++++++++++++ cluster/azure-legacy/templates/salt-master.sh | 26 +++++- cluster/azure-legacy/templates/salt-minion.sh | 20 ++++- cluster/azure-legacy/util.sh | 58 +++++++++++- cluster/get-kube.sh | 2 +- cluster/saltbase/README.md | 2 +- cluster/saltbase/salt/docker/init.sls | 88 +++++++++++++++++++ cluster/saltbase/salt/generate-cert/init.sls | 2 +- .../kube-apiserver/kube-apiserver.manifest | 2 +- .../kube-controller-manager.manifest | 4 +- .../kube-master-addons/kube-master-addons.sh | 6 +- .../kube-node-unpacker/kube-node-unpacker.sh | 2 +- cluster/saltbase/salt/kube-proxy/default | 35 -------- .../salt/kube-proxy/kube-proxy.manifest | 2 +- cluster/saltbase/salt/kubelet/default | 6 +- cluster/saltbase/salt/nginx/init.sls | 64 ++++++++++++++ cluster/saltbase/salt/nginx/kubernetes-site | 66 ++++++++++++++ cluster/saltbase/salt/nginx/nginx.conf | 61 +++++++++++++ cluster/saltbase/salt/nginx/nginx.json | 60 +++++++++++++ cluster/saltbase/salt/openvpn/init.sls | 6 +- cluster/saltbase/salt/top.sls | 7 +- 22 files changed, 542 insertions(+), 66 deletions(-) create mode 100644 cluster/azure-legacy/templates/create-kubeconfig.sh delete mode 100644 cluster/saltbase/salt/kube-proxy/default create mode 100644 cluster/saltbase/salt/nginx/init.sls create mode 100644 cluster/saltbase/salt/nginx/kubernetes-site create mode 100644 cluster/saltbase/salt/nginx/nginx.conf create mode 100644 cluster/saltbase/salt/nginx/nginx.json diff --git a/cluster/azure-legacy/config-default.sh b/cluster/azure-legacy/config-default.sh index aa86c0c679..988b636ff5 100644 --- a/cluster/azure-legacy/config-default.sh +++ b/cluster/azure-legacy/config-default.sh @@ -18,15 +18,17 @@ INSTANCE_PREFIX=kubernetes AZ_LOCATION='West US' TAG=testing AZ_CS_PREFIX=kube -AZ_VNET=MyVnet -AZ_SUBNET=Subnet-1 +AZ_VNET=${AZ_VNET:-MyVnet} +AZ_SUBNET=${AZ_SUBNET:-Subnet-1} AZ_IMAGE=b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_1-LTS-amd64-server-20140927-en-us-30GB -AZ_CS="" # is set in azure/util.sh verify-prereqs +AZ_CS="" # is set in azure-legacy/util.sh verify-prereqs AZ_SSH_KEY=$HOME/.ssh/azure_rsa AZ_SSH_CERT=$HOME/.ssh/azure.pem -NUM_MINIONS=4 +NUM_MINIONS=${NUM_MINIONS:-4} +MASTER_SIZE='Medium' +MINION_SIZE='Medium' MASTER_NAME="${INSTANCE_PREFIX}-master" MASTER_TAG="${INSTANCE_PREFIX}-master" @@ -35,7 +37,7 @@ MINION_NAMES=($(eval echo ${INSTANCE_PREFIX}-minion-{1..${NUM_MINIONS}})) MINION_IP_RANGES=($(eval echo "10.244.{1..${NUM_MINIONS}}.0/24")) MINION_SCOPES="" -SERVICE_CLUSTER_IP_RANGE="10.250.0.0/16" # formerly PORTAL_NET +SERVICE_CLUSTER_IP_RANGE="10.244.244.0/16" # formerly PORTAL_NET # Optional: Install node logging ENABLE_NODE_LOGGING=false diff --git a/cluster/azure-legacy/templates/create-kubeconfig.sh b/cluster/azure-legacy/templates/create-kubeconfig.sh new file mode 100644 index 0000000000..dec14472fa --- /dev/null +++ b/cluster/azure-legacy/templates/create-kubeconfig.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +# Copyright 2014 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Create the kube config file for kubelet and kube-proxy in minions. +# password and username required + +function create-salt-kubelet-auth() { + local -r kubelet_kubeconfig_file="/srv/salt-overlay/salt/kubelet/kubeconfig" + mkdir -p /srv/salt-overlay/salt/kubelet + (umask 077; + cat > "${kubelet_kubeconfig_file}" <<EOF +apiVersion: v1 +clusters: +- cluster: + insecure-skip-tls-verify: true + server: https://${KUBE_MASTER_IP} + name: azure_kubernetes +contexts: +- context: + cluster: azure_kubernetes + user: kubelet + name: azure_kubernetes +current-context: azure_kubernetes +kind: Config +preferences: {} +users: +- name: kubelet + user: + password: ${KUBE_PASSWORD} + username: ${KUBE_USER} +EOF +) +} + +function create-salt-kube-proxy-auth() { + local -r kube_proxy_kubeconfig_file="/srv/salt-overlay/salt/kube-proxy/kubeconfig" + mkdir -p /srv/salt-overlay/salt/kube-proxy + (umask 077; + cat > "${kubelet_kubeconfig_file}" <<EOF +apiVersion: v1 +clusters: +- cluster: + insecure-skip-tls-verify: true + server: https://${KUBE_MASTER_IP} + name: azure_kubernetes +contexts: +- context: + cluster: azure_kubernetes + user: kube-proxy + name: azure_kubernetes +current-context: azure_kubernetes +kind: Config +preferences: {} +users: +- name: kube-proxy + user: + password: ${KUBE_PASSWORD} + username: ${KUBE_USER} +EOF +) +} + +create-salt-kubelet-auth +create-salt-kube-proxy-auth diff --git a/cluster/azure-legacy/templates/salt-master.sh b/cluster/azure-legacy/templates/salt-master.sh index 201bfc61e2..b939fe007b 100644 --- a/cluster/azure-legacy/templates/salt-master.sh +++ b/cluster/azure-legacy/templates/salt-master.sh @@ -22,9 +22,30 @@ cat <<EOF >/etc/salt/minion.d/grains.conf grains: roles: - kubernetes-master - cloud: azure + cloud: azure-legacy EOF + +# Helper that sets a salt grain in grains.conf, if the upper-cased key is a non-empty env +function env_to_salt { + local key=$1 + local env_key=`echo $key | tr '[:lower:]' '[:upper:]'` + local value=${!env_key} + if [[ -n "${value}" ]]; then + # Note this is yaml, so indentation matters + cat <<EOF >>/etc/salt/minion.d/grains.conf + ${key}: '$(echo "${value}" | sed -e "s/'/''/g")' +EOF + fi +} + +env_to_salt docker_opts +env_to_salt docker_root +env_to_salt kubelet_root +env_to_salt master_extra_sans +env_to_salt runtime_config + + # Auto accept all keys from minions that try to join mkdir -p /etc/salt/master.d cat <<EOF >/etc/salt/master.d/auto-accept.conf @@ -59,6 +80,9 @@ log_level: debug log_level_logfile: debug EOF +echo "Sleep 150 to wait minion to be up" +sleep 150 + install-salt --master # Wait a few minutes and trigger another Salt run to better recover from diff --git a/cluster/azure-legacy/templates/salt-minion.sh b/cluster/azure-legacy/templates/salt-minion.sh index 7eeaa17a16..98112f9930 100644 --- a/cluster/azure-legacy/templates/salt-minion.sh +++ b/cluster/azure-legacy/templates/salt-minion.sh @@ -43,11 +43,29 @@ grains: roles: - kubernetes-pool cbr-cidr: $MINION_IP_RANGE - cloud: azure + cloud: azure-legacy hostnamef: $hostnamef cbr-string: $cbrstring EOF +if [[ -n "${DOCKER_OPTS}" ]]; then + cat <<EOF >>/etc/salt/minion.d/grains.conf + docker_opts: '$(echo "$DOCKER_OPTS" | sed -e "s/'/''/g")' +EOF +fi + +if [[ -n "${DOCKER_ROOT}" ]]; then + cat <<EOF >>/etc/salt/minion.d/grains.conf + docker_root: '$(echo "$DOCKER_ROOT" | sed -e "s/'/''/g")' +EOF +fi + +if [[ -n "${KUBELET_ROOT}" ]]; then + cat <<EOF >>/etc/salt/minion.d/grains.conf + kubelet_root: '$(echo "$KUBELET_ROOT" | sed -e "s/'/''/g")' +EOF +fi + install-salt # Wait a few minutes and trigger another Salt run to better recover from diff --git a/cluster/azure-legacy/util.sh b/cluster/azure-legacy/util.sh index 96b870a042..6fd3ad5e5e 100644 --- a/cluster/azure-legacy/util.sh +++ b/cluster/azure-legacy/util.sh @@ -34,6 +34,12 @@ source "${KUBE_ROOT}/cluster/azure-legacy/${KUBE_CONFIG_FILE-"config-default.sh" source "${KUBE_ROOT}/cluster/common.sh" +function prepare-e2e() { + # (e2e script runs detect-project, I don't think we need to anything) + # Note: we can't print anything here, or else the test tools will break with the extra output + return +} + function azure_call { local -a params=() local param @@ -278,6 +284,8 @@ function kube-up { -out ${KUBE_TEMP}/${MINION_NAMES[$i]}.crt done + KUBE_MASTER_IP="${AZ_CS}.cloudapp.net" + # Build up start up script for master echo "--> Building up start up script for master" ( @@ -294,9 +302,13 @@ function kube-up { echo "readonly SALT_TAR_URL='${SALT_TAR_URL}'" echo "readonly MASTER_HTPASSWD='${htpasswd}'" echo "readonly SERVICE_CLUSTER_IP_RANGE='${SERVICE_CLUSTER_IP_RANGE}'" - echo "readonly ADMISSION_CONTROL='${ADMISSION_CONTROL:-}'" + echo "readonly ADMISSION_CONTROL='${ADMISSION_CONTROL:-}'" + echo "readonly KUBE_USER='${KUBE_USER}'" + echo "readonly KUBE_PASSWORD='${KUBE_PASSWORD}'" + echo "readonly KUBE_MASTER_IP='${KUBE_MASTER_IP}'" grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/common.sh" grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/create-dynamic-salt-files.sh" + grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/create-kubeconfig.sh" grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/download-release.sh" grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/salt-master.sh" ) > "${KUBE_TEMP}/master-start.sh" @@ -317,6 +329,7 @@ function kube-up { echo "--> Starting VM" azure_call vm create \ + -z "$MASTER_SIZE" \ -w "$AZ_VNET" \ -n $MASTER_NAME \ -l "$AZ_LOCATION" \ @@ -338,12 +351,17 @@ function kube-up { echo "CLIENT_CRT=\"$(cat ${KUBE_TEMP}/${MINION_NAMES[$i]}.crt)\"" echo "CLIENT_KEY=\"$(cat ${KUBE_TEMP}/${MINION_NAMES[$i]}.key)\"" echo "MINION_IP_RANGE='${MINION_IP_RANGES[$i]}'" + echo "readonly KUBE_USER='${KUBE_USER}'" + echo "readonly KUBE_PASSWORD='${KUBE_PASSWORD}'" + echo "readonly KUBE_MASTER_IP='${KUBE_MASTER_IP}'" grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/common.sh" + grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/create-kubeconfig.sh" grep -v "^#" "${KUBE_ROOT}/cluster/azure-legacy/templates/salt-minion.sh" ) > "${KUBE_TEMP}/minion-start-${i}.sh" echo "--> Starting VM" azure_call vm create \ + -z "$MINION_SIZE" \ -c -w "$AZ_VNET" \ -n ${MINION_NAMES[$i]} \ -l "$AZ_LOCATION" \ @@ -377,10 +395,11 @@ function kube-up { printf "\n" echo "Kubernetes cluster created." + export CONTEXT="azure_${INSTANCE_PREFIX}" + create-kubeconfig export KUBE_CERT="/tmp/$RANDOM-kubecfg.crt" export KUBE_KEY="/tmp/$RANDOM-kubecfg.key" export CA_CERT="/tmp/$RANDOM-kubernetes.ca.crt" - export CONTEXT="azure_${INSTANCE_PREFIX}" # TODO: generate ADMIN (and KUBELET) tokens and put those in the master's # config file. Distribute the same way the htpasswd is done. @@ -391,8 +410,6 @@ function kube-up { sudo cat /srv/kubernetes/kubecfg.key >"${KUBE_KEY}" 2>/dev/null ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p 22000 $AZ_CS.cloudapp.net \ sudo cat /srv/kubernetes/ca.crt >"${CA_CERT}" 2>/dev/null - - create-kubeconfig ) echo "Sanity checking cluster..." @@ -413,6 +430,31 @@ function kube-up { done done + sleep 60 + KUBECONFIG_NAME="kubeconfig" + KUBECONFIG="${HOME}/.kube/config" + echo "Distributing kubeconfig for kubelet to master kubelet" + scp -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -P 22000 ${KUBECONFIG} \ + $AZ_CS.cloudapp.net:${KUBECONFIG_NAME} + ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p 22000 $AZ_CS.cloudapp.net \ + sudo cp ${KUBECONFIG_NAME} /var/lib/kubelet/${KUBECONFIG_NAME} + ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p 22000 $AZ_CS.cloudapp.net \ + sudo service kubelet restart + + echo "Distributing kubeconfig for kubelet to all minions" + for (( i=0; i<${#MINION_NAMES[@]}; i++)); do + scp -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -P ${ssh_ports[$i]} ${KUBECONFIG} \ + $AZ_CS.cloudapp.net:${KUBECONFIG_NAME} + ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p ${ssh_ports[$i]} $AZ_CS.cloudapp.net \ + sudo cp ${KUBECONFIG_NAME} /var/lib/kubelet/${KUBECONFIG_NAME} + ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p ${ssh_ports[$i]} $AZ_CS.cloudapp.net \ + sudo cp ${KUBECONFIG_NAME} /var/lib/kube-proxy/${KUBECONFIG_NAME} + ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p ${ssh_ports[$i]} $AZ_CS.cloudapp.net \ + sudo service kubelet restart + ssh -oStrictHostKeyChecking=no -i $AZ_SSH_KEY -p ${ssh_ports[$i]} $AZ_CS.cloudapp.net \ + sudo killall kube-proxy + done + # ensures KUBECONFIG is set get-kubeconfig-basicauth echo @@ -499,3 +541,11 @@ function restart-kube-proxy { function restart-apiserver { ssh-to-node "$1" "sudo /etc/init.d/kube-apiserver restart" } + +function test-setup { + "${KUBE_ROOT}/cluster/kube-up.sh" +} + +function test-teardown { + "${KUBE_ROOT}/cluster/kube-down.sh" +} diff --git a/cluster/get-kube.sh b/cluster/get-kube.sh index 616d2c6f02..d08d1b1e29 100755 --- a/cluster/get-kube.sh +++ b/cluster/get-kube.sh @@ -31,7 +31,7 @@ # Libvirt (with CoreOS as a guest operating system) # * export KUBERNETES_PROVIDER=libvirt-coreos; wget -q -O - https://get.k8s.io | bash # Microsoft Azure -# * export KUBERNETES_PROVIDER=azure; wget -q -O - https://get.k8s.io | bash +# * export KUBERNETES_PROVIDER=azure-legacy; wget -q -O - https://get.k8s.io | bash # Vagrant (local virtual machines) # * export KUBERNETES_PROVIDER=vagrant; wget -q -O - https://get.k8s.io | bash # VMWare VSphere diff --git a/cluster/saltbase/README.md b/cluster/saltbase/README.md index f60bd429a9..d85a9c15da 100644 --- a/cluster/saltbase/README.md +++ b/cluster/saltbase/README.md @@ -8,7 +8,7 @@ configurations for Debian-on-GCE, Fedora-on-Vagrant, Ubuntu-on-AWS and Ubuntu-on-Azure. (That doesn't mean it can't be made to apply to an arbitrary configuration, but those are only the in-tree OS/IaaS combinations supported today.) As you peruse the configuration, these -are shorthanded as `gce`, `vagrant`, `aws`, `azure` in `grains.cloud`; +are shorthanded as `gce`, `vagrant`, `aws`, `azure-legacy` in `grains.cloud`; the documentation in this tree uses this same shorthand for convenience. See more: diff --git a/cluster/saltbase/salt/docker/init.sls b/cluster/saltbase/salt/docker/init.sls index fa1174fbd8..5c49e77a6a 100644 --- a/cluster/saltbase/salt/docker/init.sls +++ b/cluster/saltbase/salt/docker/init.sls @@ -47,6 +47,93 @@ docker: - pkg: docker-io {% endif %} +{% elif grains.cloud is defined and grains.cloud == 'azure-legacy' %} + +{% if pillar.get('is_systemd') %} + +{{ pillar.get('systemd_system_path') }}/docker.service: + file.managed: + - source: salt://docker/docker.service + - template: jinja + - user: root + - group: root + - mode: 644 + - defaults: + environment_file: {{ environment_file }} + +# The docker service.running block below doesn't work reliably +# Instead we run our script which e.g. does a systemd daemon-reload +# But we keep the service block below, so it can be used by dependencies +# TODO: Fix this +fix-service-docker: + cmd.wait: + - name: /opt/kubernetes/helpers/services bounce docker + - watch: + - file: {{ pillar.get('systemd_system_path') }}/docker.service + - file: {{ environment_file }} +{% endif %} + +{{ environment_file }}: + file.managed: + - source: salt://docker/docker-defaults + - template: jinja + - user: root + - group: root + - mode: 644 + - makedirs: true + - require: + - pkg: docker-engine + +apt-key: + pkgrepo.managed: + - humanname: Dotdeb + - name: deb https://apt.dockerproject.org/repo ubuntu-trusty main + - dist: ubuntu-trusty + - file: /etc/apt/sources.list.d/docker.list + - keyid: 58118E89F3A912897C070ADBF76221572C52609D + - keyserver: hkp://p80.pool.sks-keyservers.net:80 + +lxc-docker: + pkg: + - purged + +docker-io: + pkg: + - purged + +cbr0: + network.managed: + - enabled: True + - type: bridge +{% if grains['roles'][0] == 'kubernetes-pool' %} + - proto: none +{% else %} + - proto: dhcp +{% endif %} + - ports: none + - bridge: cbr0 +{% if grains['roles'][0] == 'kubernetes-pool' %} + - ipaddr: {{ grains['cbr-cidr'] }} +{% endif %} + - delay: 0 + - bypassfirewall: True + - require_in: + - service: docker + +docker-engine: + pkg: + - installed + - require: + - pkgrepo: 'apt-key' + +docker: + service.running: + - enable: True + - require: + - file: {{ environment_file }} + - watch: + - file: {{ environment_file }} + {% elif grains.cloud is defined and grains.cloud in ['vsphere', 'photon-controller'] and grains.os == 'Debian' and grains.osrelease_info[0] >=8 %} {% if pillar.get('is_systemd') %} @@ -304,6 +391,7 @@ docker-upgrade: - name: /opt/kubernetes/helpers/pkg install-no-start {{ docker_pkg_name }} {{ override_docker_ver }} /var/cache/docker-install/{{ override_deb }} - require: - file: /var/cache/docker-install/{{ override_deb }} + {% endif %} # end override_docker_ver != '' {% if pillar.get('is_systemd') %} diff --git a/cluster/saltbase/salt/generate-cert/init.sls b/cluster/saltbase/salt/generate-cert/init.sls index d16b2d3e95..1374a54a39 100644 --- a/cluster/saltbase/salt/generate-cert/init.sls +++ b/cluster/saltbase/salt/generate-cert/init.sls @@ -6,7 +6,7 @@ {% if grains.cloud == 'aws' %} {% set cert_ip='_use_aws_external_ip_' %} {% endif %} - {% if grains.cloud == 'azure' %} + {% if grains.cloud == 'azure-legacy' %} {% set cert_ip='_use_azure_dns_name_' %} {% endif %} {% if grains.cloud == 'vsphere' or grains.cloud == 'photon-controller' %} diff --git a/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest b/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest index cac649a498..8012dd8b89 100644 --- a/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest +++ b/cluster/saltbase/salt/kube-apiserver/kube-apiserver.manifest @@ -14,7 +14,7 @@ {% set srv_sshproxy_path = "/srv/sshproxy" -%} {% if grains.cloud is defined -%} - {% if grains.cloud not in ['vagrant', 'vsphere', 'photon-controller'] -%} + {% if grains.cloud not in ['vagrant', 'vsphere', 'photon-controller', 'azure-legacy'] -%} {% set cloud_provider = "--cloud-provider=" + grains.cloud -%} {% endif -%} diff --git a/cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest b/cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest index 57ddf07dde..218e793f4d 100644 --- a/cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest +++ b/cluster/saltbase/salt/kube-controller-manager/kube-controller-manager.manifest @@ -36,7 +36,7 @@ {% set srv_kube_path = "/srv/kubernetes" -%} {% if grains.cloud is defined -%} - {% if grains.cloud not in ['vagrant', 'vsphere', 'photon-controller'] -%} + {% if grains.cloud not in ['vagrant', 'vsphere', 'photon-controller', 'azure-legacy'] -%} {% set cloud_provider = "--cloud-provider=" + grains.cloud -%} {% endif -%} {% set service_account_key = "--service-account-private-key-file=/srv/kubernetes/server.key" -%} @@ -54,7 +54,7 @@ {% set root_ca_file = "" -%} -{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere', 'photon-controller', 'openstack'] %} +{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere', 'photon-controller', 'openstack', 'azure-legacy'] %} {% set root_ca_file = "--root-ca-file=/srv/kubernetes/ca.crt" -%} {% endif -%} diff --git a/cluster/saltbase/salt/kube-master-addons/kube-master-addons.sh b/cluster/saltbase/salt/kube-master-addons/kube-master-addons.sh index a91ecb77db..cde513a9c6 100755 --- a/cluster/saltbase/salt/kube-master-addons/kube-master-addons.sh +++ b/cluster/saltbase/salt/kube-master-addons/kube-master-addons.sh @@ -24,7 +24,7 @@ function load-docker-images() { if which docker 1>/dev/null 2>&1; then - timeout 30 docker load -i /srv/salt/kube-bins/kube-apiserver.tar 1>/dev/null 2>&1 + timeout 120 docker load -i /srv/salt/kube-bins/kube-apiserver.tar 1>/dev/null 2>&1 rc=$? if [[ $rc == 0 ]]; then let loadedImageFlags="$loadedImageFlags|1" @@ -32,7 +32,7 @@ function load-docker-images() { restart_docker=true fi - timeout 30 docker load -i /srv/salt/kube-bins/kube-scheduler.tar 1>/dev/null 2>&1 + timeout 120 docker load -i /srv/salt/kube-bins/kube-scheduler.tar 1>/dev/null 2>&1 rc=$? if [[ $rc == 0 ]]; then let loadedImageFlags="$loadedImageFlags|2" @@ -40,7 +40,7 @@ function load-docker-images() { restart_docker=true fi - timeout 30 docker load -i /srv/salt/kube-bins/kube-controller-manager.tar 1>/dev/null 2>&1 + timeout 120 docker load -i /srv/salt/kube-bins/kube-controller-manager.tar 1>/dev/null 2>&1 rc=$? if [[ $rc == 0 ]]; then let loadedImageFlags="$loadedImageFlags|4" diff --git a/cluster/saltbase/salt/kube-node-unpacker/kube-node-unpacker.sh b/cluster/saltbase/salt/kube-node-unpacker/kube-node-unpacker.sh index 38e2aeebd4..18e10957c2 100755 --- a/cluster/saltbase/salt/kube-node-unpacker/kube-node-unpacker.sh +++ b/cluster/saltbase/salt/kube-node-unpacker/kube-node-unpacker.sh @@ -22,7 +22,7 @@ while true; do if which docker 1>/dev/null 2>&1; then - timeout 30 docker load -i /srv/salt/kube-bins/kube-proxy.tar 1>/dev/null 2>&1 + timeout 120 docker load -i /srv/salt/kube-bins/kube-proxy.tar 1>/dev/null 2>&1 rc=$? if [[ "${rc}" == 0 ]]; then let loadedImageFlags="${loadedImageFlags}|1" diff --git a/cluster/saltbase/salt/kube-proxy/default b/cluster/saltbase/salt/kube-proxy/default deleted file mode 100644 index f53bd2b211..0000000000 --- a/cluster/saltbase/salt/kube-proxy/default +++ /dev/null @@ -1,35 +0,0 @@ -{% set daemon_args = "$DAEMON_ARGS" -%} -{% if grains['os_family'] == 'RedHat' -%} - {% set daemon_args = "" -%} -{% endif -%} -{# TODO(azure-maintainer): add support for distributing kubeconfig with token to kube-proxy #} -{# so it can use https #} -{% if grains['cloud'] is defined and grains['cloud'] == 'azure' -%} - {% set api_servers = "--master=http://" + ips[0][0] -%} - {% set api_servers_with_port = api_servers + ":7080" -%} - {% set kubeconfig = "" -%} -{% else -%} - {% set kubeconfig = "--kubeconfig=/var/lib/kube-proxy/kubeconfig" -%} - {% if grains.api_servers is defined -%} - {% set api_servers = "--master=https://" + grains.api_servers -%} - {% else -%} - {% set ips = salt['mine.get']('roles:kubernetes-master', 'network.ip_addrs', 'grain').values() -%} - {% set api_servers = "--master=https://" + ips[0][0] -%} - {% endif -%} - - # TODO: remove nginx for other cloud providers. - {% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant' ] %} - {% set api_servers_with_port = api_servers -%} - {% else -%} - {% set api_servers_with_port = api_servers + ":6443" -%} - {% endif -%} - -{% endif -%} - -{% set test_args = "" -%} -{% if pillar['kubeproxy_test_args'] is defined -%} - {% set test_args=pillar['kubeproxy_test_args'] %} -{% endif -%} - -# test_args has to be kept at the end, so they'll overwrite any prior configuration -DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{kubeconfig}} {{pillar['log_level']}} {{test_args}}" diff --git a/cluster/saltbase/salt/kube-proxy/kube-proxy.manifest b/cluster/saltbase/salt/kube-proxy/kube-proxy.manifest index e49491b67c..6640bea5b5 100644 --- a/cluster/saltbase/salt/kube-proxy/kube-proxy.manifest +++ b/cluster/saltbase/salt/kube-proxy/kube-proxy.manifest @@ -5,7 +5,7 @@ {% set ips = salt['mine.get']('roles:kubernetes-master', 'network.ip_addrs', 'grain').values() -%} {% set api_servers = "--master=https://" + ips[0][0] -%} {% endif -%} -{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere', 'photon-controller', 'openstack' ] %} +{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere', 'photon-controller', 'openstack', 'azure-legacy' ] %} {% set api_servers_with_port = api_servers -%} {% else -%} {% set api_servers_with_port = api_servers + ":6443" -%} diff --git a/cluster/saltbase/salt/kubelet/default b/cluster/saltbase/salt/kubelet/default index b72e1a6e98..be6db4f7f7 100644 --- a/cluster/saltbase/salt/kubelet/default +++ b/cluster/saltbase/salt/kubelet/default @@ -16,7 +16,7 @@ {% endif -%} # TODO: remove nginx for other cloud providers. -{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere', 'photon-controller', 'openstack'] %} +{% if grains['cloud'] is defined and grains.cloud in [ 'aws', 'gce', 'vagrant', 'vsphere', 'photon-controller', 'openstack', 'azure-legacy'] %} {% set api_servers_with_port = api_servers -%} {% else -%} {% set api_servers_with_port = api_servers + ":6443" -%} @@ -28,7 +28,7 @@ {% set reconcile_cidr_args = "" -%} {% if grains['roles'][0] == 'kubernetes-master' -%} - {% if grains.cloud in ['aws', 'gce', 'vagrant', 'vsphere', 'photon-controller', 'openstack'] -%} + {% if grains.cloud in ['aws', 'gce', 'vagrant', 'vsphere', 'photon-controller', 'openstack', 'azure-legacy'] -%} # Unless given a specific directive, disable registration for the kubelet # running on the master. @@ -48,7 +48,7 @@ {% endif -%} {% set cloud_provider = "" -%} -{% if grains.cloud is defined and grains.cloud not in ['vagrant', 'vsphere', 'photon-controller'] -%} +{% if grains.cloud is defined and grains.cloud not in ['vagrant', 'vsphere', 'photon-controller', 'azure-legacy'] -%} {% set cloud_provider = "--cloud-provider=" + grains.cloud -%} {% endif -%} diff --git a/cluster/saltbase/salt/nginx/init.sls b/cluster/saltbase/salt/nginx/init.sls new file mode 100644 index 0000000000..201371755d --- /dev/null +++ b/cluster/saltbase/salt/nginx/init.sls @@ -0,0 +1,64 @@ +nginx: + pkg: + - installed + +/etc/nginx/nginx.conf: + file: + - managed + - source: salt://nginx/nginx.conf + - template: jinja + - user: root + - group: root + - mode: 644 + +/etc/nginx/sites-enabled/default: + file: + - managed + - makedirs: true + - source: salt://nginx/kubernetes-site + - user: root + - group: root + - mode: 644 + +/usr/share/nginx/htpasswd: + file: + - managed + - source: salt://nginx/htpasswd + - user: root + - group: root + - mode: 644 + +{% if grains.cloud is defined and grains.cloud in ['gce'] %} +/etc/kubernetes/manifests/nginx.json: + file: + - managed + - source: salt://nginx/nginx.json + - user: root + - group: root + - mode: 644 + - require: + - file: /etc/nginx/nginx.conf + - file: /etc/nginx/sites-enabled/default + - file: /usr/share/nginx/htpasswd + - cmd: kubernetes-cert + + +#stop legacy nginx_service +stop_nginx-service: + service.dead: + - name: nginx + - enable: None + +{% else %} +nginx-service: + service: + - running + - name: nginx + - watch: + - pkg: nginx + - file: /etc/nginx/nginx.conf + - file: /etc/nginx/sites-enabled/default + - file: /usr/share/nginx/htpasswd + - cmd: kubernetes-cert +{% endif %} + diff --git a/cluster/saltbase/salt/nginx/kubernetes-site b/cluster/saltbase/salt/nginx/kubernetes-site new file mode 100644 index 0000000000..818a487110 --- /dev/null +++ b/cluster/saltbase/salt/nginx/kubernetes-site @@ -0,0 +1,66 @@ +#server { + #listen 80; ## listen for ipv4; this line is default and implied + #listen [::]:80 default_server ipv6only=on; ## listen for ipv6 + +# root /usr/share/nginx/www; +# index index.html index.htm; + + # Make site accessible from http://localhost/ +# server_name localhost; +# location / { +# auth_basic "Restricted"; +# auth_basic_user_file /usr/share/nginx/htpasswd; + + # Proxy settings. +# proxy_pass http://localhost:8080/; +# proxy_connect_timeout 159s; +# proxy_send_timeout 600s; +# proxy_read_timeout 600s; +# proxy_buffer_size 64k; +# proxy_buffers 16 32k; +# proxy_busy_buffers_size 64k; +# proxy_temp_file_write_size 64k; +# } +#} + +# HTTPS server +# +server { + listen 443; + server_name localhost; + + root html; + index index.html index.htm; + + ssl on; + ssl_certificate /srv/kubernetes/server.cert; + ssl_certificate_key /srv/kubernetes/server.key; + + ssl_session_timeout 5m; + + # don't use SSLv3 because of POODLE + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; + ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS; + ssl_prefer_server_ciphers on; + + location / { + auth_basic "Restricted"; + auth_basic_user_file /usr/share/nginx/htpasswd; + + # Proxy settings + # disable buffering so that watch works + proxy_buffering off; + proxy_pass http://127.0.0.1:8080/; + proxy_connect_timeout 159s; + proxy_send_timeout 600s; + proxy_read_timeout 600s; + + # Disable retry + proxy_next_upstream off; + + # Support web sockets + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } +} diff --git a/cluster/saltbase/salt/nginx/nginx.conf b/cluster/saltbase/salt/nginx/nginx.conf new file mode 100644 index 0000000000..00b1961ab6 --- /dev/null +++ b/cluster/saltbase/salt/nginx/nginx.conf @@ -0,0 +1,61 @@ +{% if grains['os_family'] == 'RedHat' %} +user nginx; +{% else %} +user www-data; +{% endif %} + +worker_processes 4; +pid /var/run/nginx.pid; + +events { + worker_connections 768; + # multi_accept on; +} + +http { + + ## + # Basic Settings + ## + + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + # server_tokens off; + + # server_names_hash_bucket_size 64; + # server_name_in_redirect off; + + include /etc/nginx/mime.types; + default_type application/octet-stream; + + ## + # Logging Settings + ## + + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + ## + # Gzip Settings + ## + + gzip on; + gzip_disable "msie6"; + + # gzip_vary on; + # gzip_proxied any; + # gzip_comp_level 6; + # gzip_buffers 16 8k; + # gzip_http_version 1.1; + # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; + + ## + # Virtual Host Configs + ## + + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; +} diff --git a/cluster/saltbase/salt/nginx/nginx.json b/cluster/saltbase/salt/nginx/nginx.json new file mode 100644 index 0000000000..44c41c27d1 --- /dev/null +++ b/cluster/saltbase/salt/nginx/nginx.json @@ -0,0 +1,60 @@ +{ +"apiVersion": "v1", +"kind": "Pod", +"metadata": {"name":"nginx"}, +"spec":{ +"hostNetwork": true, +"containers":[ + { + "name": "nginx", + "image": "gcr.io/google-containers/nginx:v1", + "resources": { + "limits": { + "cpu": "200m" + } + }, + "command": [ + "nginx", + "-g", + "daemon off;" + ], + "ports":[ + { "name": "https", + "containerPort": 443, + "hostPort": 443} + ], + "volumeMounts": [ + { "name": "nginx", + "mountPath": "/etc/nginx", + "readOnly": true}, + { "name": "k8s", + "mountPath": "/srv/kubernetes", + "readOnly": true}, + { "name": "logs", + "mountPath": "/var/log/nginx", + "readOnly": false}, + { "name": "passwd", + "mountPath": "/usr/share/nginx", + "readOnly": true} + ] + } +], +"volumes":[ + { "name": "nginx", + "hostPath": { + "path": "/etc/nginx"} + }, + { "name": "k8s", + "hostPath": { + "path": "/srv/kubernetes"} + }, + { "name": "passwd", + "hostPath": { + "path": "/usr/share/nginx"} + }, + { "name": "logs", + "hostPath": { + "path": "/var/logs/nginx"} + } +] +}} diff --git a/cluster/saltbase/salt/openvpn/init.sls b/cluster/saltbase/salt/openvpn/init.sls index 585238ccf4..ab6bed4198 100644 --- a/cluster/saltbase/salt/openvpn/init.sls +++ b/cluster/saltbase/salt/openvpn/init.sls @@ -7,10 +7,10 @@ - mode: 644 - makedirs: True -{% for (minion, grains) in salt['mine.get']('roles:kubernetes-pool', 'grains.items', expr_form='grain').items() %} -/etc/openvpn/ccd/{{ minion }}: +{% for minion in salt['mine.get']('roles:kubernetes-pool', 'grains.items', expr_form='grain').values() %} +/etc/openvpn/ccd/{{ minion['hostnamef'] }}: file.managed: - - contents: "iroute {{ grains['cbr-string'] }}\n" + - contents: "iroute {{ minion['cbr-string'] }}\n" - user: root - group: root - mode: 644 diff --git a/cluster/saltbase/salt/top.sls b/cluster/saltbase/salt/top.sls index 83f099bdfc..9658d9d361 100644 --- a/cluster/saltbase/salt/top.sls +++ b/cluster/saltbase/salt/top.sls @@ -20,7 +20,7 @@ base: {% elif pillar.get('network_provider', '').lower() == 'cni' %} - cni {% endif %} -{% if grains['cloud'] is defined and grains['cloud'] == 'azure' %} +{% if grains['cloud'] is defined and grains['cloud'] == 'azure-legacy' %} - openvpn-client {% endif %} - helpers @@ -81,10 +81,11 @@ base: - logrotate {% endif %} - kube-addons -{% if grains['cloud'] is defined and grains['cloud'] == 'azure' %} +{% if grains['cloud'] is defined and grains['cloud'] == 'azure-legacy' %} - openvpn + - nginx {% endif %} -{% if grains['cloud'] is defined and grains['cloud'] in [ 'vagrant', 'gce', 'aws', 'vsphere', 'photon-controller', 'openstack'] %} +{% if grains['cloud'] is defined and grains['cloud'] in [ 'vagrant', 'gce', 'aws', 'vsphere', 'photon-controller', 'openstack', 'azure-legacy'] %} - docker - kubelet {% endif %} From 57df873216512045c8aef462eea294f89718fc01 Mon Sep 17 00:00:00 2001 From: xiangpengzhao <zhao.xiangpeng@zte.com.cn> Date: Sat, 18 Jun 2016 13:00:49 -0400 Subject: [PATCH 073/339] Fix typos in pre-commit --- hooks/pre-commit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hooks/pre-commit b/hooks/pre-commit index 9bff62756f..600f21afc9 100755 --- a/hooks/pre-commit +++ b/hooks/pre-commit @@ -29,7 +29,7 @@ if [[ "${#files[@]}" -ne 0 ]]; then fi echo "${reset}" - echo -ne "Check if Godep licesnses are up to date..." + echo -ne "Check if Godep licenses are up to date..." if ! OUT=$("hack/verify-godep-licenses.sh" 2>&1); then echo echo "${red}${OUT}" @@ -53,8 +53,8 @@ done if [[ "${#files_need_gofmt[@]}" -ne 0 ]]; then echo "${red}ERROR!" - echo "Some files have not been gofmt'd. To fix these errors, " - echo "cut and paste the following:" + echo "Some files have not been gofmt'd. To fix these errors, " + echo "copy and paste the following:" echo " gofmt -s -w ${files_need_gofmt[@]}" exit_code=1 else @@ -88,7 +88,7 @@ echo -ne "Checking for problems with flag names... " invalid_flag_lines=$(hack/verify-flags-underscore.py "${files[@]}") if [[ "${invalid_flag_lines:-}" != "" ]]; then echo "${red}ERROR!" - echo "There appear to be problems with the following" + echo "There appear to be problems with the following:" for line in "${invalid_flag_lines[@]}"; do echo " ${line}" done From bad8b6dde4315b86438b3512388e0659e66640af Mon Sep 17 00:00:00 2001 From: Michail Kargakis <mkargaki@redhat.com> Date: Fri, 26 Feb 2016 14:34:33 +0100 Subject: [PATCH 074/339] integer: add utility for proper integer rounding --- pkg/util/integer/integer.go | 8 +++++++ pkg/util/integer/integer_test.go | 39 ++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/pkg/util/integer/integer.go b/pkg/util/integer/integer.go index c51cd952d1..81e28cfbf4 100644 --- a/pkg/util/integer/integer.go +++ b/pkg/util/integer/integer.go @@ -43,3 +43,11 @@ func Int64Min(a, b int64) int64 { } return a } + +// RoundToInt32 rounds floats into integer numbers. +func RoundToInt32(a float64) int32 { + if a < 0 { + return int32(a - 0.5) + } + return int32(a + 0.5) +} diff --git a/pkg/util/integer/integer_test.go b/pkg/util/integer/integer_test.go index 0f88567382..2000a45705 100644 --- a/pkg/util/integer/integer_test.go +++ b/pkg/util/integer/integer_test.go @@ -141,3 +141,42 @@ func TestInt64Min(t *testing.T) { } } } + +func TestRoundToInt32(t *testing.T) { + tests := []struct { + num float64 + exp int32 + }{ + { + num: 5.5, + exp: 6, + }, + { + num: -3.7, + exp: -4, + }, + { + num: 3.49, + exp: 3, + }, + { + num: -7.9, + exp: -8, + }, + { + num: -4.499999, + exp: -4, + }, + { + num: 0, + exp: 0, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if got := RoundToInt32(test.num); got != test.exp { + t.Errorf("expected %d, got %d", test.exp, got) + } + } +} From a098d9fd2476503cf10dff05d331c02307ae9ed4 Mon Sep 17 00:00:00 2001 From: Michail Kargakis <mkargaki@redhat.com> Date: Thu, 16 Jun 2016 14:53:25 +0200 Subject: [PATCH 075/339] integer: add int32 min/max helpers --- pkg/util/integer/integer.go | 14 ++++++++ pkg/util/integer/integer_test.go | 62 ++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/pkg/util/integer/integer.go b/pkg/util/integer/integer.go index 81e28cfbf4..99cde5d363 100644 --- a/pkg/util/integer/integer.go +++ b/pkg/util/integer/integer.go @@ -30,6 +30,20 @@ func IntMin(a, b int) int { return a } +func Int32Max(a, b int32) int32 { + if b > a { + return b + } + return a +} + +func Int32Min(a, b int32) int32 { + if b < a { + return b + } + return a +} + func Int64Max(a, b int64) int64 { if b > a { return b diff --git a/pkg/util/integer/integer_test.go b/pkg/util/integer/integer_test.go index 2000a45705..93ae44c4aa 100644 --- a/pkg/util/integer/integer_test.go +++ b/pkg/util/integer/integer_test.go @@ -80,6 +80,68 @@ func TestIntMin(t *testing.T) { } } +func TestInt32Max(t *testing.T) { + tests := []struct { + nums []int32 + expectedMax int32 + }{ + { + nums: []int32{-1, 0}, + expectedMax: 0, + }, + { + nums: []int32{-1, -2}, + expectedMax: -1, + }, + { + nums: []int32{0, 1}, + expectedMax: 1, + }, + { + nums: []int32{1, 2}, + expectedMax: 2, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if max := Int32Max(test.nums[0], test.nums[1]); max != test.expectedMax { + t.Errorf("expected %v, got %v", test.expectedMax, max) + } + } +} + +func TestInt32Min(t *testing.T) { + tests := []struct { + nums []int32 + expectedMin int32 + }{ + { + nums: []int32{-1, 0}, + expectedMin: -1, + }, + { + nums: []int32{-1, -2}, + expectedMin: -2, + }, + { + nums: []int32{0, 1}, + expectedMin: 0, + }, + { + nums: []int32{1, 2}, + expectedMin: 1, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + if min := Int32Min(test.nums[0], test.nums[1]); min != test.expectedMin { + t.Errorf("expected %v, got %v", test.expectedMin, min) + } + } +} + func TestInt64Max(t *testing.T) { tests := []struct { nums []int64 From f3d2e3ff2203da20053f9a104f3cce6571dbe293 Mon Sep 17 00:00:00 2001 From: Michail Kargakis <mkargaki@redhat.com> Date: Thu, 28 Jan 2016 17:35:14 +0100 Subject: [PATCH 076/339] controller: proportionally scale paused and rolling deployments Enable paused and rolling deployments to be proportionally scaled. Also have cleanup policy work for paused deployments. --- hack/test-cmd.sh | 20 +- hack/testdata/deployment-revision1.yaml | 8 +- hack/testdata/deployment-revision2.yaml | 8 +- pkg/apis/extensions/validation/validation.go | 9 +- pkg/controller/controller_utils.go | 34 ++- .../deployment/deployment_controller.go | 284 ++++++++++++----- .../deployment/deployment_controller_test.go | 289 +++++++++++++++++- pkg/controller/deployment/util.go | 161 ++++++++++ pkg/util/deployment/deployment.go | 23 ++ pkg/util/intstr/intstr.go | 2 +- test/e2e/deployment.go | 89 +++++- 11 files changed, 798 insertions(+), 129 deletions(-) create mode 100644 pkg/controller/deployment/util.go diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 78ae3843d0..a0b412564f 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -1772,35 +1772,35 @@ __EOF__ # Command # Create a deployment (revision 1) kubectl create -f hack/testdata/deployment-revision1.yaml "${kube_flags[@]}" - kube::test::get_object_assert deployment "{{range.items}}{{$id_field}}:{{end}}" 'nginx-deployment:' + kube::test::get_object_assert deployment "{{range.items}}{{$id_field}}:{{end}}" 'nginx:' kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" "${IMAGE_DEPLOYMENT_R1}:" # Rollback to revision 1 - should be no-op - kubectl rollout undo deployment nginx-deployment --to-revision=1 "${kube_flags[@]}" + kubectl rollout undo deployment nginx --to-revision=1 "${kube_flags[@]}" kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" "${IMAGE_DEPLOYMENT_R1}:" # Update the deployment (revision 2) kubectl apply -f hack/testdata/deployment-revision2.yaml "${kube_flags[@]}" kube::test::get_object_assert deployment.extensions "{{range.items}}{{$deployment_image_field}}:{{end}}" "${IMAGE_DEPLOYMENT_R2}:" # Rollback to revision 1 - kubectl rollout undo deployment nginx-deployment --to-revision=1 "${kube_flags[@]}" + kubectl rollout undo deployment nginx --to-revision=1 "${kube_flags[@]}" sleep 1 kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" "${IMAGE_DEPLOYMENT_R1}:" # Rollback to revision 1000000 - should be no-op - kubectl rollout undo deployment nginx-deployment --to-revision=1000000 "${kube_flags[@]}" + kubectl rollout undo deployment nginx --to-revision=1000000 "${kube_flags[@]}" kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" "${IMAGE_DEPLOYMENT_R1}:" # Rollback to last revision - kubectl rollout undo deployment nginx-deployment "${kube_flags[@]}" + kubectl rollout undo deployment nginx "${kube_flags[@]}" sleep 1 kube::test::get_object_assert deployment "{{range.items}}{{$deployment_image_field}}:{{end}}" "${IMAGE_DEPLOYMENT_R2}:" # Pause the deployment - kubectl-with-retry rollout pause deployment nginx-deployment "${kube_flags[@]}" + kubectl-with-retry rollout pause deployment nginx "${kube_flags[@]}" # A paused deployment cannot be rolled back - ! kubectl rollout undo deployment nginx-deployment "${kube_flags[@]}" + ! kubectl rollout undo deployment nginx "${kube_flags[@]}" # Resume the deployment - kubectl-with-retry rollout resume deployment nginx-deployment "${kube_flags[@]}" + kubectl-with-retry rollout resume deployment nginx "${kube_flags[@]}" # The resumed deployment can now be rolled back - kubectl rollout undo deployment nginx-deployment "${kube_flags[@]}" + kubectl rollout undo deployment nginx "${kube_flags[@]}" # Clean up - kubectl delete deployment nginx-deployment "${kube_flags[@]}" + kubectl delete deployment nginx "${kube_flags[@]}" ### Set image of a deployment # Pre-condition: no deployment exists diff --git a/hack/testdata/deployment-revision1.yaml b/hack/testdata/deployment-revision1.yaml index 75daa6703f..cfbec36c45 100644 --- a/hack/testdata/deployment-revision1.yaml +++ b/hack/testdata/deployment-revision1.yaml @@ -1,18 +1,18 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: nginx-deployment + name: nginx labels: - name: nginx-deployment + name: nginx-undo spec: replicas: 3 selector: matchLabels: - name: nginx + name: nginx-undo template: metadata: labels: - name: nginx + name: nginx-undo spec: containers: - name: nginx diff --git a/hack/testdata/deployment-revision2.yaml b/hack/testdata/deployment-revision2.yaml index 092dfb7659..4b171f604b 100644 --- a/hack/testdata/deployment-revision2.yaml +++ b/hack/testdata/deployment-revision2.yaml @@ -1,18 +1,18 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: nginx-deployment + name: nginx labels: - name: nginx-deployment + name: nginx-undo spec: replicas: 3 selector: matchLabels: - name: nginx + name: nginx-undo template: metadata: labels: - name: nginx + name: nginx-undo spec: containers: - name: nginx diff --git a/pkg/apis/extensions/validation/validation.go b/pkg/apis/extensions/validation/validation.go index d0405c3770..564ff6e413 100644 --- a/pkg/apis/extensions/validation/validation.go +++ b/pkg/apis/extensions/validation/validation.go @@ -147,12 +147,15 @@ var ValidateDeploymentName = apivalidation.NameIsDNSSubdomain func ValidatePositiveIntOrPercent(intOrPercent intstr.IntOrString, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} - if intOrPercent.Type == intstr.String { + switch intOrPercent.Type { + case intstr.String: if !validation.IsValidPercent(intOrPercent.StrVal) { - allErrs = append(allErrs, field.Invalid(fldPath, intOrPercent, "must be an integer or percentage (e.g '5%')")) + allErrs = append(allErrs, field.Invalid(fldPath, intOrPercent, "must be an integer or percentage (e.g '5%%')")) } - } else if intOrPercent.Type == intstr.Int { + case intstr.Int: allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(intOrPercent.IntValue()), fldPath)...) + default: + allErrs = append(allErrs, field.Invalid(fldPath, intOrPercent, "must be an integer or percentage (e.g '5%%')")) } return allErrs } diff --git a/pkg/controller/controller_utils.go b/pkg/controller/controller_utils.go index a7aba40bec..a9886568d7 100644 --- a/pkg/controller/controller_utils.go +++ b/pkg/controller/controller_utils.go @@ -619,7 +619,9 @@ func IsPodActive(p api.Pod) bool { func FilterActiveReplicaSets(replicaSets []*extensions.ReplicaSet) []*extensions.ReplicaSet { active := []*extensions.ReplicaSet{} for i := range replicaSets { - if replicaSets[i].Spec.Replicas > 0 { + rs := replicaSets[i] + + if rs != nil && rs.Spec.Replicas > 0 { active = append(active, replicaSets[i]) } } @@ -639,7 +641,6 @@ type ControllersByCreationTimestamp []*api.ReplicationController func (o ControllersByCreationTimestamp) Len() int { return len(o) } func (o ControllersByCreationTimestamp) Swap(i, j int) { o[i], o[j] = o[j], o[i] } - func (o ControllersByCreationTimestamp) Less(i, j int) bool { if o[i].CreationTimestamp.Equal(o[j].CreationTimestamp) { return o[i].Name < o[j].Name @@ -647,15 +648,40 @@ func (o ControllersByCreationTimestamp) Less(i, j int) bool { return o[i].CreationTimestamp.Before(o[j].CreationTimestamp) } -// ReplicaSetsByCreationTimestamp sorts a list of ReplicationSets by creation timestamp, using their names as a tie breaker. +// ReplicaSetsByCreationTimestamp sorts a list of ReplicaSet by creation timestamp, using their names as a tie breaker. type ReplicaSetsByCreationTimestamp []*extensions.ReplicaSet func (o ReplicaSetsByCreationTimestamp) Len() int { return len(o) } func (o ReplicaSetsByCreationTimestamp) Swap(i, j int) { o[i], o[j] = o[j], o[i] } - func (o ReplicaSetsByCreationTimestamp) Less(i, j int) bool { if o[i].CreationTimestamp.Equal(o[j].CreationTimestamp) { return o[i].Name < o[j].Name } return o[i].CreationTimestamp.Before(o[j].CreationTimestamp) } + +// ReplicaSetsBySizeOlder sorts a list of ReplicaSet by size in descending order, using their creation timestamp or name as a tie breaker. +// By using the creation timestamp, this sorts from old to new replica sets. +type ReplicaSetsBySizeOlder []*extensions.ReplicaSet + +func (o ReplicaSetsBySizeOlder) Len() int { return len(o) } +func (o ReplicaSetsBySizeOlder) Swap(i, j int) { o[i], o[j] = o[j], o[i] } +func (o ReplicaSetsBySizeOlder) Less(i, j int) bool { + if o[i].Spec.Replicas == o[j].Spec.Replicas { + return ReplicaSetsByCreationTimestamp(o).Less(i, j) + } + return o[i].Spec.Replicas > o[j].Spec.Replicas +} + +// ReplicaSetsBySizeNewer sorts a list of ReplicaSet by size in descending order, using their creation timestamp or name as a tie breaker. +// By using the creation timestamp, this sorts from new to old replica sets. +type ReplicaSetsBySizeNewer []*extensions.ReplicaSet + +func (o ReplicaSetsBySizeNewer) Len() int { return len(o) } +func (o ReplicaSetsBySizeNewer) Swap(i, j int) { o[i], o[j] = o[j], o[i] } +func (o ReplicaSetsBySizeNewer) Less(i, j int) bool { + if o[i].Spec.Replicas == o[j].Spec.Replicas { + return ReplicaSetsByCreationTimestamp(o).Less(j, i) + } + return o[i].Spec.Replicas > o[j].Spec.Replicas +} diff --git a/pkg/controller/deployment/deployment_controller.go b/pkg/controller/deployment/deployment_controller.go index 66dc993acf..ef6d7fa71a 100644 --- a/pkg/controller/deployment/deployment_controller.go +++ b/pkg/controller/deployment/deployment_controller.go @@ -438,13 +438,9 @@ func (dc *DeploymentController) syncDeployment(key string) error { } if d.Spec.Paused { - // TODO: Implement scaling for paused deployments. - // Don't take any action for paused deployment. - // But keep the status up-to-date. - // Ignore paused deployments - glog.V(4).Infof("Updating status only for paused deployment %s/%s", d.Namespace, d.Name) - return dc.syncPausedDeploymentStatus(d) + return dc.sync(d) } + if d.Spec.RollbackTo != nil { revision := d.Spec.RollbackTo.Revision if _, err = dc.rollback(d, &revision); err != nil { @@ -452,27 +448,135 @@ func (dc *DeploymentController) syncDeployment(key string) error { } } + if dc.isScalingEvent(d) { + return dc.sync(d) + } + switch d.Spec.Strategy.Type { case extensions.RecreateDeploymentStrategyType: - return dc.syncRecreateDeployment(d) + return dc.rolloutRecreate(d) case extensions.RollingUpdateDeploymentStrategyType: - return dc.syncRollingUpdateDeployment(d) + return dc.rolloutRolling(d) } return fmt.Errorf("unexpected deployment strategy type: %s", d.Spec.Strategy.Type) } -// Updates the status of a paused deployment -func (dc *DeploymentController) syncPausedDeploymentStatus(deployment *extensions.Deployment) error { +// sync is responsible for reconciling deployments on scaling events or when they +// are paused. +func (dc *DeploymentController) sync(deployment *extensions.Deployment) error { newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(deployment, false) if err != nil { return err } - allRSs := append(controller.FilterActiveReplicaSets(oldRSs), newRS) + if err := dc.scale(deployment, newRS, oldRSs); err != nil { + // If we get an error while trying to scale, the deployment will be requeued + // so we can abort this resync + return err + } + dc.cleanupDeployment(oldRSs, deployment) - // Sync deployment status + allRSs := append(oldRSs, newRS) return dc.syncDeploymentStatus(allRSs, newRS, deployment) } +// scale scales proportionally in order to mitigate risk. Otherwise, scaling up can increase the size +// of the new replica set and scaling down can decrease the sizes of the old ones, both of which would +// have the effect of hastening the rollout progress, which could produce a higher proportion of unavailable +// replicas in the event of a problem with the rolled out template. Should run only on scaling events or +// when a deployment is paused and not during the normal rollout process. +func (dc *DeploymentController) scale(deployment *extensions.Deployment, newRS *extensions.ReplicaSet, oldRSs []*extensions.ReplicaSet) error { + // If there is only one active replica set then we should scale that up to the full count of the + // deployment. If there is no active replica set, then we should scale up the newest replica set. + if activeOrLatest := findActiveOrLatest(newRS, oldRSs); activeOrLatest != nil { + if activeOrLatest.Spec.Replicas == deployment.Spec.Replicas { + return nil + } + _, _, err := dc.scaleReplicaSetAndRecordEvent(activeOrLatest, deployment.Spec.Replicas, deployment) + return err + } + + // If the new replica set is saturated, old replica sets should be fully scaled down. + // This case handles replica set adoption during a saturated new replica set. + if deploymentutil.IsSaturated(deployment, newRS) { + for _, old := range controller.FilterActiveReplicaSets(oldRSs) { + if _, _, err := dc.scaleReplicaSetAndRecordEvent(old, 0, deployment); err != nil { + return err + } + } + return nil + } + + // There are old replica sets with pods and the new replica set is not saturated. + // We need to proportionally scale all replica sets (new and old) in case of a + // rolling deployment. + if deploymentutil.IsRollingUpdate(deployment) { + allRSs := controller.FilterActiveReplicaSets(append(oldRSs, newRS)) + allRSsReplicas := deploymentutil.GetReplicaCountForReplicaSets(allRSs) + + allowedSize := int32(0) + if deployment.Spec.Replicas > 0 { + allowedSize = deployment.Spec.Replicas + maxSurge(*deployment) + } + + // Number of additional replicas that can be either added or removed from the total + // replicas count. These replicas should be distributed proportionally to the active + // replica sets. + deploymentReplicasToAdd := allowedSize - allRSsReplicas + + // The additional replicas should be distributed proportionally amongst the active + // replica sets from the larger to the smaller in size replica set. Scaling direction + // drives what happens in case we are trying to scale replica sets of the same size. + // In such a case when scaling up, we should scale up newer replica sets first, and + // when scaling down, we should scale down older replica sets first. + scalingOperation := "up" + switch { + case deploymentReplicasToAdd > 0: + sort.Sort(controller.ReplicaSetsBySizeNewer(allRSs)) + + case deploymentReplicasToAdd < 0: + sort.Sort(controller.ReplicaSetsBySizeOlder(allRSs)) + scalingOperation = "down" + + default: /* deploymentReplicasToAdd == 0 */ + // Nothing to add. + return nil + } + + // Iterate over all active replica sets and estimate proportions for each of them. + // The absolute value of deploymentReplicasAdded should never exceed the absolute + // value of deploymentReplicasToAdd. + deploymentReplicasAdded := int32(0) + for i := range allRSs { + rs := allRSs[i] + + proportion := getProportion(rs, *deployment, deploymentReplicasToAdd, deploymentReplicasAdded) + + rs.Spec.Replicas += proportion + deploymentReplicasAdded += proportion + } + + // Update all replica sets + for i := range allRSs { + rs := allRSs[i] + + // Add/remove any leftovers to the largest replica set. + if i == 0 { + leftover := deploymentReplicasToAdd - deploymentReplicasAdded + rs.Spec.Replicas += leftover + if rs.Spec.Replicas < 0 { + rs.Spec.Replicas = 0 + } + } + + if _, err := dc.scaleReplicaSet(rs, rs.Spec.Replicas, deployment, scalingOperation); err != nil { + // Return as soon as we fail, the deployment is requeued + return err + } + } + } + return nil +} + // Rolling back to a revision; no-op if the toRevision is deployment's current revision func (dc *DeploymentController) rollback(deployment *extensions.Deployment, toRevision *int64) (*extensions.Deployment, error) { newRS, allOldRSs, err := dc.getAllReplicaSetsAndSyncRevision(deployment, true) @@ -526,13 +630,13 @@ func (dc *DeploymentController) updateDeploymentAndClearRollbackTo(deployment *e return dc.updateDeployment(deployment) } -func (dc *DeploymentController) syncRecreateDeployment(deployment *extensions.Deployment) error { +func (dc *DeploymentController) rolloutRecreate(deployment *extensions.Deployment) error { // Don't create a new RS if not already existed, so that we avoid scaling up before scaling down newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(deployment, false) if err != nil { return err } - allRSs := append(controller.FilterActiveReplicaSets(oldRSs), newRS) + allRSs := append(oldRSs, newRS) // scale down old replica sets scaledDown, err := dc.scaleDownOldReplicaSetsForRecreate(controller.FilterActiveReplicaSets(oldRSs), deployment) @@ -564,21 +668,18 @@ func (dc *DeploymentController) syncRecreateDeployment(deployment *extensions.De return dc.updateDeploymentStatus(allRSs, newRS, deployment) } - if deployment.Spec.RevisionHistoryLimit != nil { - // Cleanup old replica sets - dc.cleanupOldReplicaSets(oldRSs, deployment) - } + dc.cleanupDeployment(oldRSs, deployment) // Sync deployment status return dc.syncDeploymentStatus(allRSs, newRS, deployment) } -func (dc *DeploymentController) syncRollingUpdateDeployment(deployment *extensions.Deployment) error { +func (dc *DeploymentController) rolloutRolling(deployment *extensions.Deployment) error { newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(deployment, true) if err != nil { return err } - allRSs := append(controller.FilterActiveReplicaSets(oldRSs), newRS) + allRSs := append(oldRSs, newRS) // Scale up, if we can. scaledUp, err := dc.reconcileNewReplicaSet(allRSs, newRS, deployment) @@ -600,10 +701,7 @@ func (dc *DeploymentController) syncRollingUpdateDeployment(deployment *extensio return dc.updateDeploymentStatus(allRSs, newRS, deployment) } - if deployment.Spec.RevisionHistoryLimit != nil { - // Cleanup old replicas sets - dc.cleanupOldReplicaSets(oldRSs, deployment) - } + dc.cleanupDeployment(oldRSs, deployment) // Sync deployment status return dc.syncDeploymentStatus(allRSs, newRS, deployment) @@ -611,11 +709,11 @@ func (dc *DeploymentController) syncRollingUpdateDeployment(deployment *extensio // syncDeploymentStatus checks if the status is up-to-date and sync it if necessary func (dc *DeploymentController) syncDeploymentStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, d *extensions.Deployment) error { - totalActualReplicas, updatedReplicas, availableReplicas, _, err := dc.calculateStatus(allRSs, newRS, d) + newStatus, err := dc.calculateStatus(allRSs, newRS, d) if err != nil { return err } - if d.Generation > d.Status.ObservedGeneration || d.Status.Replicas != totalActualReplicas || d.Status.UpdatedReplicas != updatedReplicas || d.Status.AvailableReplicas != availableReplicas { + if !reflect.DeepEqual(d.Status, newStatus) { return dc.updateDeploymentStatus(allRSs, newRS, d) } return nil @@ -626,6 +724,8 @@ func (dc *DeploymentController) syncDeploymentStatus(allRSs []*extensions.Replic // 2. Get new RS this deployment targets (whose pod template matches deployment's), and update new RS's revision number to (maxOldV + 1), // only if its revision number is smaller than (maxOldV + 1). If this step failed, we'll update it in the next deployment sync loop. // 3. Copy new RS's revision number to deployment (update deployment's revision). If this step failed, we'll update it in the next deployment sync loop. +// Note that currently the deployment controller is using caches to avoid querying the server for reads. +// This may lead to stale reads of replica sets, thus incorrect deployment status. func (dc *DeploymentController) getAllReplicaSetsAndSyncRevision(deployment *extensions.Deployment, createIfNotExisted bool) (*extensions.ReplicaSet, []*extensions.ReplicaSet, error) { // List the deployment's RSes & Pods and apply pod-template-hash info to deployment's adopted RSes/Pods rsList, podList, err := dc.rsAndPodsWithHashKeySynced(deployment) @@ -701,7 +801,7 @@ func (dc *DeploymentController) getNewReplicaSet(deployment *extensions.Deployme return nil, err } else if existingNewRS != nil { // Set existing new replica set's annotation - if setNewReplicaSetAnnotations(deployment, existingNewRS, newRevision) { + if setNewReplicaSetAnnotations(deployment, existingNewRS, newRevision, true) { return dc.client.Extensions().ReplicaSets(deployment.ObjectMeta.Namespace).Update(existingNewRS) } return existingNewRS, nil @@ -731,8 +831,6 @@ func (dc *DeploymentController) getNewReplicaSet(deployment *extensions.Deployme Template: newRSTemplate, }, } - // Set new replica set's annotation - setNewReplicaSetAnnotations(deployment, &newRS, newRevision) allRSs := append(oldRSs, &newRS) newReplicasCount, err := deploymentutil.NewRSNewReplicas(deployment, allRSs, &newRS) if err != nil { @@ -740,6 +838,8 @@ func (dc *DeploymentController) getNewReplicaSet(deployment *extensions.Deployme } newRS.Spec.Replicas = newReplicasCount + // Set new replica set's annotation + setNewReplicaSetAnnotations(deployment, &newRS, newRevision, false) createdRS, err := dc.client.Extensions().ReplicaSets(namespace).Create(&newRS) if err != nil { dc.enqueueDeployment(deployment) @@ -881,7 +981,7 @@ func (dc *DeploymentController) addHashKeyToRSAndPods(rs extensions.ReplicaSet) // setNewReplicaSetAnnotations sets new replica set's annotations appropriately by updating its revision and // copying required deployment annotations to it; it returns true if replica set's annotation is changed. -func setNewReplicaSetAnnotations(deployment *extensions.Deployment, newRS *extensions.ReplicaSet, newRevision string) bool { +func setNewReplicaSetAnnotations(deployment *extensions.Deployment, newRS *extensions.ReplicaSet, newRevision string, exists bool) bool { // First, copy deployment's annotations (except for apply and revision annotations) annotationChanged := copyDeploymentAnnotationsToReplicaSet(deployment, newRS) // Then, update replica set's revision annotation @@ -894,17 +994,26 @@ func setNewReplicaSetAnnotations(deployment *extensions.Deployment, newRS *exten if newRS.Annotations[deploymentutil.RevisionAnnotation] < newRevision { newRS.Annotations[deploymentutil.RevisionAnnotation] = newRevision annotationChanged = true - glog.V(4).Infof("updating replica set %q's revision to %s - %+v\n", newRS.Name, newRevision, newRS) + glog.V(4).Infof("Updating replica set %q revision to %s", newRS.Name, newRevision) + } + if !exists && setReplicasAnnotations(newRS, deployment.Spec.Replicas, deployment.Spec.Replicas+maxSurge(*deployment)) { + annotationChanged = true } return annotationChanged } +var annotationsToSkip = map[string]bool{ + annotations.LastAppliedConfigAnnotation: true, + deploymentutil.RevisionAnnotation: true, + deploymentutil.DesiredReplicasAnnotation: true, + deploymentutil.MaxReplicasAnnotation: true, +} + // skipCopyAnnotation returns true if we should skip copying the annotation with the given annotation key // TODO: How to decide which annotations should / should not be copied? // See https://github.com/kubernetes/kubernetes/pull/20035#issuecomment-179558615 func skipCopyAnnotation(key string) bool { - // Skip apply annotations and revision annotations. - return key == annotations.LastAppliedConfigAnnotation || key == deploymentutil.RevisionAnnotation + return annotationsToSkip[key] } func getSkippedAnnotations(annotations map[string]string) map[string]string { @@ -980,12 +1089,12 @@ func (dc *DeploymentController) reconcileNewReplicaSet(allRSs []*extensions.Repl return scaled, err } -func (dc *DeploymentController) getAvailablePodsForReplicaSets(deployment *extensions.Deployment, rss []*extensions.ReplicaSet, minReadySeconds int32) (int32, error) { +func (dc *DeploymentController) getAvailablePodsForReplicaSets(deployment *extensions.Deployment, rss []*extensions.ReplicaSet) (int32, error) { podList, err := dc.listPods(deployment) if err != nil { return 0, err } - return deploymentutil.CountAvailablePodsForReplicaSets(podList, rss, minReadySeconds) + return deploymentutil.CountAvailablePodsForReplicaSets(podList, rss, deployment.Spec.MinReadySeconds) } func (dc *DeploymentController) reconcileOldReplicaSets(allRSs []*extensions.ReplicaSet, oldRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment *extensions.Deployment) (bool, error) { @@ -1002,11 +1111,7 @@ func (dc *DeploymentController) reconcileOldReplicaSets(allRSs []*extensions.Rep if err != nil { return false, fmt.Errorf("could not find available pods: %v", err) } - - _, maxUnavailable, err := deploymentutil.ResolveFenceposts(&deployment.Spec.Strategy.RollingUpdate.MaxSurge, &deployment.Spec.Strategy.RollingUpdate.MaxUnavailable, deployment.Spec.Replicas) - if err != nil { - return false, err - } + maxUnavailable := maxUnavailable(*deployment) // Check if we can scale down. We can scale down in the following 2 cases: // * Some old replica sets have unhealthy replicas, we could safely scale down those unhealthy replicas since that won't further @@ -1108,10 +1213,7 @@ func (dc *DeploymentController) cleanupUnhealthyReplicas(oldRSs []*extensions.Re // scaleDownOldReplicaSetsForRollingUpdate scales down old replica sets when deployment strategy is "RollingUpdate". // Need check maxUnavailable to ensure availability func (dc *DeploymentController) scaleDownOldReplicaSetsForRollingUpdate(allRSs []*extensions.ReplicaSet, oldRSs []*extensions.ReplicaSet, deployment *extensions.Deployment) (int32, error) { - _, maxUnavailable, err := deploymentutil.ResolveFenceposts(&deployment.Spec.Strategy.RollingUpdate.MaxSurge, &deployment.Spec.Strategy.RollingUpdate.MaxUnavailable, deployment.Spec.Replicas) - if err != nil { - return 0, err - } + maxUnavailable := maxUnavailable(*deployment) // Check if we can scale down. minAvailable := deployment.Spec.Replicas - maxUnavailable @@ -1183,7 +1285,13 @@ func (dc *DeploymentController) scaleUpNewReplicaSetForRecreate(newRS *extension return scaled, err } -func (dc *DeploymentController) cleanupOldReplicaSets(oldRSs []*extensions.ReplicaSet, deployment *extensions.Deployment) error { +// cleanupDeployment is responsible for cleaning up a deployment ie. retains all but the latest N old replica sets +// where N=d.Spec.RevisionHistoryLimit. Old replica sets are older versions of the podtemplate of a deployment kept +// around by default 1) for historical reasons and 2) for the ability to rollback a deployment. +func (dc *DeploymentController) cleanupDeployment(oldRSs []*extensions.ReplicaSet, deployment *extensions.Deployment) error { + if deployment.Spec.RevisionHistoryLimit == nil { + return nil + } diff := int32(len(oldRSs)) - *deployment.Spec.RevisionHistoryLimit if diff <= 0 { return nil @@ -1209,39 +1317,31 @@ func (dc *DeploymentController) cleanupOldReplicaSets(oldRSs []*extensions.Repli } func (dc *DeploymentController) updateDeploymentStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment *extensions.Deployment) error { - totalActualReplicas, updatedReplicas, availableReplicas, unavailableReplicas, err := dc.calculateStatus(allRSs, newRS, deployment) + newStatus, err := dc.calculateStatus(allRSs, newRS, deployment) if err != nil { return err } - newDeployment := *deployment - // TODO: Reconcile this with API definition. API definition talks about ready pods, while this just computes created pods. - newDeployment.Status = extensions.DeploymentStatus{ - // TODO: Ensure that if we start retrying status updates, we won't pick up a new Generation value. - ObservedGeneration: deployment.Generation, - Replicas: totalActualReplicas, - UpdatedReplicas: updatedReplicas, - AvailableReplicas: availableReplicas, - UnavailableReplicas: unavailableReplicas, - } - _, err = dc.client.Extensions().Deployments(deployment.ObjectMeta.Namespace).UpdateStatus(&newDeployment) - if err == nil { - glog.V(4).Infof("Updated deployment %s status: %+v", deployment.Name, newDeployment.Status) - } + newDeployment := deployment + newDeployment.Status = newStatus + _, err = dc.client.Extensions().Deployments(deployment.Namespace).UpdateStatus(newDeployment) return err } -func (dc *DeploymentController) calculateStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment *extensions.Deployment) (totalActualReplicas, updatedReplicas, availableReplicas, unavailableReplicas int32, err error) { - totalActualReplicas = deploymentutil.GetActualReplicaCountForReplicaSets(allRSs) - updatedReplicas = deploymentutil.GetActualReplicaCountForReplicaSets([]*extensions.ReplicaSet{newRS}) - minReadySeconds := deployment.Spec.MinReadySeconds - availableReplicas, err = dc.getAvailablePodsForReplicaSets(deployment, allRSs, minReadySeconds) +func (dc *DeploymentController) calculateStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment *extensions.Deployment) (extensions.DeploymentStatus, error) { + availableReplicas, err := dc.getAvailablePodsForReplicaSets(deployment, allRSs) if err != nil { - err = fmt.Errorf("failed to count available pods: %v", err) - return + return deployment.Status, fmt.Errorf("failed to count available pods: %v", err) } totalReplicas := deploymentutil.GetReplicaCountForReplicaSets(allRSs) - unavailableReplicas = totalReplicas - availableReplicas - return + + return extensions.DeploymentStatus{ + // TODO: Ensure that if we start retrying status updates, we won't pick up a new Generation value. + ObservedGeneration: deployment.Generation, + Replicas: deploymentutil.GetActualReplicaCountForReplicaSets(allRSs), + UpdatedReplicas: deploymentutil.GetActualReplicaCountForReplicaSets([]*extensions.ReplicaSet{newRS}), + AvailableReplicas: availableReplicas, + UnavailableReplicas: totalReplicas - availableReplicas, + }, nil } func (dc *DeploymentController) scaleReplicaSetAndRecordEvent(rs *extensions.ReplicaSet, newScale int32, deployment *extensions.Deployment) (bool, *extensions.ReplicaSet, error) { @@ -1255,24 +1355,25 @@ func (dc *DeploymentController) scaleReplicaSetAndRecordEvent(rs *extensions.Rep } else { scalingOperation = "down" } - newRS, err := dc.scaleReplicaSet(rs, newScale) - if err == nil { - dc.eventRecorder.Eventf(deployment, api.EventTypeNormal, "ScalingReplicaSet", "Scaled %s replica set %s to %d", scalingOperation, rs.Name, newScale) - } else { - dc.enqueueDeployment(deployment) - } + newRS, err := dc.scaleReplicaSet(rs, newScale, deployment, scalingOperation) return true, newRS, err } -func (dc *DeploymentController) scaleReplicaSet(rs *extensions.ReplicaSet, newScale int32) (*extensions.ReplicaSet, error) { - // TODO: Using client for now, update to use store when it is ready. +func (dc *DeploymentController) scaleReplicaSet(rs *extensions.ReplicaSet, newScale int32, deployment *extensions.Deployment, scalingOperation string) (*extensions.ReplicaSet, error) { // NOTE: This mutates the ReplicaSet passed in. Not sure if that's a good idea. rs.Spec.Replicas = newScale - return dc.client.Extensions().ReplicaSets(rs.ObjectMeta.Namespace).Update(rs) + setReplicasAnnotations(rs, deployment.Spec.Replicas, deployment.Spec.Replicas+maxSurge(*deployment)) + rs, err := dc.client.Extensions().ReplicaSets(rs.ObjectMeta.Namespace).Update(rs) + if err == nil { + dc.eventRecorder.Eventf(deployment, api.EventTypeNormal, "ScalingReplicaSet", "Scaled %s replica set %s to %d", scalingOperation, rs.Name, newScale) + } else { + glog.Warningf("Cannot update replica set %q: %v", rs.Name, err) + dc.enqueueDeployment(deployment) + } + return rs, err } func (dc *DeploymentController) updateDeployment(deployment *extensions.Deployment) (*extensions.Deployment, error) { - // TODO: Using client for now, update to use store when it is ready. return dc.client.Extensions().Deployments(deployment.ObjectMeta.Namespace).Update(deployment) } @@ -1300,3 +1401,28 @@ func (dc *DeploymentController) rollbackToTemplate(deployment *extensions.Deploy d, err = dc.updateDeploymentAndClearRollbackTo(deployment) return } + +// isScalingEvent checks whether the provided deployment has been updated with a scaling event +// by looking at the desired-replicas annotation in the active replica sets of the deployment. +func (dc *DeploymentController) isScalingEvent(d *extensions.Deployment) bool { + newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(d, false) + if err != nil { + return false + } + // If there is no new replica set matching this deployment and the deployment isn't paused + // then there is a new rollout that waits to happen + if newRS == nil && !d.Spec.Paused { + return false + } + allRSs := append(oldRSs, newRS) + for _, rs := range controller.FilterActiveReplicaSets(allRSs) { + desired, ok := getDesiredReplicasAnnotation(rs) + if !ok { + continue + } + if desired != d.Spec.Replicas { + return true + } + } + return false +} diff --git a/pkg/controller/deployment/deployment_controller_test.go b/pkg/controller/deployment/deployment_controller_test.go index f9455979cd..025bbc7887 100644 --- a/pkg/controller/deployment/deployment_controller_test.go +++ b/pkg/controller/deployment/deployment_controller_test.go @@ -19,6 +19,7 @@ package deployment import ( "fmt" "testing" + "time" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" @@ -33,10 +34,16 @@ import ( "k8s.io/kubernetes/pkg/util/intstr" ) -func rs(name string, replicas int, selector map[string]string) *exp.ReplicaSet { +var ( + alwaysReady = func() bool { return true } + noTimestamp = unversioned.Time{} +) + +func rs(name string, replicas int, selector map[string]string, timestamp unversioned.Time) *exp.ReplicaSet { return &exp.ReplicaSet{ ObjectMeta: api.ObjectMeta{ - Name: name, + Name: name, + CreationTimestamp: timestamp, }, Spec: exp.ReplicaSetSpec{ Replicas: int32(replicas), @@ -47,7 +54,7 @@ func rs(name string, replicas int, selector map[string]string) *exp.ReplicaSet { } func newRSWithStatus(name string, specReplicas, statusReplicas int, selector map[string]string) *exp.ReplicaSet { - rs := rs(name, specReplicas, selector) + rs := rs(name, specReplicas, selector, noTimestamp) rs.Status = exp.ReplicaSetStatus{ Replicas: int32(statusReplicas), } @@ -73,8 +80,6 @@ func deployment(name string, replicas int, maxSurge, maxUnavailable intstr.IntOr } } -var alwaysReady = func() bool { return true } - func newDeployment(replicas int, revisionHistoryLimit *int) *exp.Deployment { var v *int32 if revisionHistoryLimit != nil { @@ -117,6 +122,13 @@ func newDeployment(replicas int, revisionHistoryLimit *int) *exp.Deployment { return &d } +// TODO: Consolidate all deployment helpers into one. +func newDeploymentEnhanced(replicas int, maxSurge intstr.IntOrString) *exp.Deployment { + d := newDeployment(replicas, nil) + d.Spec.Strategy.RollingUpdate.MaxSurge = maxSurge + return d +} + func newReplicaSet(d *exp.Deployment, name string, replicas int) *exp.ReplicaSet { return &exp.ReplicaSet{ ObjectMeta: api.ObjectMeta{ @@ -128,13 +140,262 @@ func newReplicaSet(d *exp.Deployment, name string, replicas int) *exp.ReplicaSet Template: d.Spec.Template, }, } - } func newListOptions() api.ListOptions { return api.ListOptions{} } +// TestScale tests proportional scaling of deployments. Note that fenceposts for +// rolling out (maxUnavailable, maxSurge) have no meaning for simple scaling other +// than recording maxSurge as part of the max-replicas annotation that is taken +// into account in the next scale event (max-replicas is used for calculating the +// proportion of a replica set). +func TestScale(t *testing.T) { + newTimestamp := unversioned.Date(2016, 5, 20, 2, 0, 0, 0, time.UTC) + oldTimestamp := unversioned.Date(2016, 5, 20, 1, 0, 0, 0, time.UTC) + olderTimestamp := unversioned.Date(2016, 5, 20, 0, 0, 0, 0, time.UTC) + + tests := []struct { + name string + deployment *exp.Deployment + oldDeployment *exp.Deployment + + newRS *exp.ReplicaSet + oldRSs []*exp.ReplicaSet + + expectedNew *exp.ReplicaSet + expectedOld []*exp.ReplicaSet + + desiredReplicasAnnotations map[string]int32 + }{ + { + name: "normal scaling event: 10 -> 12", + deployment: newDeployment(12, nil), + oldDeployment: newDeployment(10, nil), + + newRS: rs("foo-v1", 10, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{}, + + expectedNew: rs("foo-v1", 12, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{}, + }, + { + name: "normal scaling event: 10 -> 5", + deployment: newDeployment(5, nil), + oldDeployment: newDeployment(10, nil), + + newRS: rs("foo-v1", 10, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{}, + + expectedNew: rs("foo-v1", 5, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{}, + }, + { + name: "proportional scaling: 5 -> 10", + deployment: newDeployment(10, nil), + oldDeployment: newDeployment(5, nil), + + newRS: rs("foo-v2", 2, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v1", 3, nil, oldTimestamp)}, + + expectedNew: rs("foo-v2", 4, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v1", 6, nil, oldTimestamp)}, + }, + { + name: "proportional scaling: 5 -> 3", + deployment: newDeployment(3, nil), + oldDeployment: newDeployment(5, nil), + + newRS: rs("foo-v2", 2, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v1", 3, nil, oldTimestamp)}, + + expectedNew: rs("foo-v2", 1, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v1", 2, nil, oldTimestamp)}, + }, + { + name: "proportional scaling: 9 -> 4", + deployment: newDeployment(4, nil), + oldDeployment: newDeployment(9, nil), + + newRS: rs("foo-v2", 8, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v1", 1, nil, oldTimestamp)}, + + expectedNew: rs("foo-v2", 4, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v1", 0, nil, oldTimestamp)}, + }, + { + name: "proportional scaling: 7 -> 10", + deployment: newDeployment(10, nil), + oldDeployment: newDeployment(7, nil), + + newRS: rs("foo-v3", 2, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 3, nil, oldTimestamp), rs("foo-v1", 2, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 3, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 4, nil, oldTimestamp), rs("foo-v1", 3, nil, olderTimestamp)}, + }, + { + name: "proportional scaling: 13 -> 8", + deployment: newDeployment(8, nil), + oldDeployment: newDeployment(13, nil), + + newRS: rs("foo-v3", 2, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 8, nil, oldTimestamp), rs("foo-v1", 3, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 1, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 5, nil, oldTimestamp), rs("foo-v1", 2, nil, olderTimestamp)}, + }, + // Scales up the new replica set. + { + name: "leftover distribution: 3 -> 4", + deployment: newDeployment(4, nil), + oldDeployment: newDeployment(3, nil), + + newRS: rs("foo-v3", 1, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 2, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, + }, + // Scales down the older replica set. + { + name: "leftover distribution: 3 -> 2", + deployment: newDeployment(2, nil), + oldDeployment: newDeployment(3, nil), + + newRS: rs("foo-v3", 1, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 1, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 0, nil, olderTimestamp)}, + }, + // Scales up the latest replica set first. + { + name: "proportional scaling (no new rs): 4 -> 5", + deployment: newDeployment(5, nil), + oldDeployment: newDeployment(4, nil), + + newRS: nil, + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 2, nil, oldTimestamp), rs("foo-v1", 2, nil, olderTimestamp)}, + + expectedNew: nil, + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 3, nil, oldTimestamp), rs("foo-v1", 2, nil, olderTimestamp)}, + }, + // Scales down to zero + { + name: "proportional scaling: 6 -> 0", + deployment: newDeployment(0, nil), + oldDeployment: newDeployment(6, nil), + + newRS: rs("foo-v3", 3, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 2, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 0, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 0, nil, oldTimestamp), rs("foo-v1", 0, nil, olderTimestamp)}, + }, + // Scales up from zero + { + name: "proportional scaling: 0 -> 6", + deployment: newDeployment(6, nil), + oldDeployment: newDeployment(0, nil), + + newRS: rs("foo-v3", 0, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 0, nil, oldTimestamp), rs("foo-v1", 0, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 6, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 0, nil, oldTimestamp), rs("foo-v1", 0, nil, olderTimestamp)}, + }, + // Scenario: deployment.spec.replicas == 3 ( foo-v1.spec.replicas == foo-v2.spec.replicas == foo-v3.spec.replicas == 1 ) + // Deployment is scaled to 5. foo-v3.spec.replicas and foo-v2.spec.replicas should increment by 1 but foo-v2 fails to + // update. + { + name: "failed rs update", + deployment: newDeployment(5, nil), + oldDeployment: newDeployment(5, nil), + + newRS: rs("foo-v3", 2, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 2, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 2, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, + + desiredReplicasAnnotations: map[string]int32{"foo-v2": int32(3)}, + }, + { + name: "deployment with surge pods", + deployment: newDeploymentEnhanced(20, intstr.FromInt(2)), + oldDeployment: newDeploymentEnhanced(10, intstr.FromInt(2)), + + newRS: rs("foo-v2", 6, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v1", 6, nil, oldTimestamp)}, + + expectedNew: rs("foo-v2", 11, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v1", 11, nil, oldTimestamp)}, + }, + { + name: "change both surge and size", + deployment: newDeploymentEnhanced(50, intstr.FromInt(6)), + oldDeployment: newDeploymentEnhanced(10, intstr.FromInt(3)), + + newRS: rs("foo-v2", 5, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v1", 8, nil, oldTimestamp)}, + + expectedNew: rs("foo-v2", 22, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v1", 34, nil, oldTimestamp)}, + }, + } + + for _, test := range tests { + _ = olderTimestamp + t.Log(test.name) + fake := fake.Clientset{} + dc := &DeploymentController{ + client: &fake, + eventRecorder: &record.FakeRecorder{}, + } + + if test.newRS != nil { + desiredReplicas := test.oldDeployment.Spec.Replicas + if desired, ok := test.desiredReplicasAnnotations[test.newRS.Name]; ok { + desiredReplicas = desired + } + setReplicasAnnotations(test.newRS, desiredReplicas, desiredReplicas+maxSurge(*test.oldDeployment)) + } + for i := range test.oldRSs { + rs := test.oldRSs[i] + if rs == nil { + continue + } + desiredReplicas := test.oldDeployment.Spec.Replicas + if desired, ok := test.desiredReplicasAnnotations[rs.Name]; ok { + desiredReplicas = desired + } + setReplicasAnnotations(rs, desiredReplicas, desiredReplicas+maxSurge(*test.oldDeployment)) + } + + if err := dc.scale(test.deployment, test.newRS, test.oldRSs); err != nil { + t.Errorf("%s: unexpected error: %v", test.name, err) + continue + } + if test.expectedNew != nil && test.newRS != nil && test.expectedNew.Spec.Replicas != test.newRS.Spec.Replicas { + t.Errorf("%s: expected new replicas: %d, got: %d", test.name, test.expectedNew.Spec.Replicas, test.newRS.Spec.Replicas) + continue + } + if len(test.expectedOld) != len(test.oldRSs) { + t.Errorf("%s: expected %d old replica sets, got %d", test.name, len(test.expectedOld), len(test.oldRSs)) + continue + } + for n := range test.oldRSs { + rs := test.oldRSs[n] + exp := test.expectedOld[n] + if exp.Spec.Replicas != rs.Spec.Replicas { + t.Errorf("%s: expected old (%s) replicas: %d, got: %d", test.name, rs.Name, exp.Spec.Replicas, rs.Spec.Replicas) + } + } + } +} + func TestDeploymentController_reconcileNewReplicaSet(t *testing.T) { tests := []struct { deploymentReplicas int @@ -188,8 +449,8 @@ func TestDeploymentController_reconcileNewReplicaSet(t *testing.T) { for i, test := range tests { t.Logf("executing scenario %d", i) - newRS := rs("foo-v2", test.newReplicas, nil) - oldRS := rs("foo-v2", test.oldReplicas, nil) + newRS := rs("foo-v2", test.newReplicas, nil, noTimestamp) + oldRS := rs("foo-v2", test.oldReplicas, nil, noTimestamp) allRSs := []*exp.ReplicaSet{newRS, oldRS} deployment := deployment("foo", test.deploymentReplicas, test.maxSurge, intstr.FromInt(0), nil) fake := fake.Clientset{} @@ -289,8 +550,8 @@ func TestDeploymentController_reconcileOldReplicaSets(t *testing.T) { newSelector := map[string]string{"foo": "new"} oldSelector := map[string]string{"foo": "old"} - newRS := rs("foo-new", test.newReplicas, newSelector) - oldRS := rs("foo-old", test.oldReplicas, oldSelector) + newRS := rs("foo-new", test.newReplicas, newSelector, noTimestamp) + oldRS := rs("foo-old", test.oldReplicas, oldSelector, noTimestamp) oldRSs := []*exp.ReplicaSet{oldRS} allRSs := []*exp.ReplicaSet{oldRS, newRS} @@ -429,7 +690,7 @@ func TestDeploymentController_cleanupUnhealthyReplicas(t *testing.T) { for i, test := range tests { t.Logf("executing scenario %d", i) - oldRS := rs("foo-v2", test.oldReplicas, nil) + oldRS := rs("foo-v2", test.oldReplicas, nil, noTimestamp) oldRSs := []*exp.ReplicaSet{oldRS} deployment := deployment("foo", 10, intstr.FromInt(2), intstr.FromInt(2), nil) fakeClientset := fake.Clientset{} @@ -538,7 +799,7 @@ func TestDeploymentController_scaleDownOldReplicaSetsForRollingUpdate(t *testing for i, test := range tests { t.Logf("executing scenario %d", i) - oldRS := rs("foo-v2", test.oldReplicas, nil) + oldRS := rs("foo-v2", test.oldReplicas, nil, noTimestamp) allRSs := []*exp.ReplicaSet{oldRS} oldRSs := []*exp.ReplicaSet{oldRS} deployment := deployment("foo", test.deploymentReplicas, intstr.FromInt(0), test.maxUnavailable, map[string]string{"foo": "bar"}) @@ -610,7 +871,7 @@ func TestDeploymentController_scaleDownOldReplicaSetsForRollingUpdate(t *testing } } -func TestDeploymentController_cleanupOldReplicaSets(t *testing.T) { +func TestDeploymentController_cleanupDeployment(t *testing.T) { selector := map[string]string{"foo": "bar"} tests := []struct { @@ -669,7 +930,7 @@ func TestDeploymentController_cleanupOldReplicaSets(t *testing.T) { } d := newDeployment(1, &tests[i].revisionHistoryLimit) - controller.cleanupOldReplicaSets(test.oldRSs, d) + controller.cleanupDeployment(test.oldRSs, d) gotDeletions := 0 for _, action := range fake.Actions() { diff --git a/pkg/controller/deployment/util.go b/pkg/controller/deployment/util.go new file mode 100644 index 0000000000..b8c45c090d --- /dev/null +++ b/pkg/controller/deployment/util.go @@ -0,0 +1,161 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package deployment + +import ( + "fmt" + "sort" + "strconv" + + "github.com/golang/glog" + + "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/controller" + deploymentutil "k8s.io/kubernetes/pkg/util/deployment" + "k8s.io/kubernetes/pkg/util/integer" +) + +// findActiveOrLatest returns the only active or the latest replica set in case there is at most one active +// replica set. If there are more active replica sets, then we should proportionally scale them. +func findActiveOrLatest(newRS *extensions.ReplicaSet, oldRSs []*extensions.ReplicaSet) *extensions.ReplicaSet { + if newRS == nil && len(oldRSs) == 0 { + return nil + } + + sort.Sort(sort.Reverse(controller.ReplicaSetsByCreationTimestamp(oldRSs))) + allRSs := controller.FilterActiveReplicaSets(append(oldRSs, newRS)) + + switch len(allRSs) { + case 0: + // If there is no active replica set then we should return the newest. + if newRS != nil { + return newRS + } + return oldRSs[0] + case 1: + return allRSs[0] + default: + return nil + } +} + +func getDesiredReplicasAnnotation(rs *extensions.ReplicaSet) (int32, bool) { + return getIntFromAnnotation(rs, deploymentutil.DesiredReplicasAnnotation) +} + +func getMaxReplicasAnnotation(rs *extensions.ReplicaSet) (int32, bool) { + return getIntFromAnnotation(rs, deploymentutil.MaxReplicasAnnotation) +} + +func getIntFromAnnotation(rs *extensions.ReplicaSet, annotationKey string) (int32, bool) { + annotationValue, ok := rs.Annotations[annotationKey] + if !ok { + return int32(0), false + } + intValue, err := strconv.Atoi(annotationValue) + if err != nil { + glog.Warningf("Cannot convert the value %q with annotation key %q for the replica set %q", + annotationValue, annotationKey, rs.Name) + return int32(0), false + } + return int32(intValue), true +} + +func setReplicasAnnotations(rs *extensions.ReplicaSet, desiredReplicas, maxReplicas int32) bool { + updated := false + if rs.Annotations == nil { + rs.Annotations = make(map[string]string) + } + desiredString := fmt.Sprintf("%d", desiredReplicas) + if hasString := rs.Annotations[deploymentutil.DesiredReplicasAnnotation]; hasString != desiredString { + rs.Annotations[deploymentutil.DesiredReplicasAnnotation] = desiredString + updated = true + } + maxString := fmt.Sprintf("%d", maxReplicas) + if hasString := rs.Annotations[deploymentutil.MaxReplicasAnnotation]; hasString != maxString { + rs.Annotations[deploymentutil.MaxReplicasAnnotation] = maxString + updated = true + } + return updated +} + +// maxUnavailable returns the maximum unavailable pods a rolling deployment can take. +func maxUnavailable(deployment extensions.Deployment) int32 { + if !deploymentutil.IsRollingUpdate(&deployment) { + return int32(0) + } + // Error caught by validation + _, maxUnavailable, _ := deploymentutil.ResolveFenceposts(&deployment.Spec.Strategy.RollingUpdate.MaxSurge, &deployment.Spec.Strategy.RollingUpdate.MaxUnavailable, deployment.Spec.Replicas) + return maxUnavailable +} + +// maxSurge returns the maximum surge pods a rolling deployment can take. +func maxSurge(deployment extensions.Deployment) int32 { + if !deploymentutil.IsRollingUpdate(&deployment) { + return int32(0) + } + // Error caught by validation + maxSurge, _, _ := deploymentutil.ResolveFenceposts(&deployment.Spec.Strategy.RollingUpdate.MaxSurge, &deployment.Spec.Strategy.RollingUpdate.MaxUnavailable, deployment.Spec.Replicas) + return maxSurge +} + +// getProportion will estimate the proportion for the provided replica set using 1. the current size +// of the parent deployment, 2. the replica count that needs be added on the replica sets of the +// deployment, and 3. the total replicas added in the replica sets of the deployment so far. +func getProportion(rs *extensions.ReplicaSet, d extensions.Deployment, deploymentReplicasToAdd, deploymentReplicasAdded int32) int32 { + if rs == nil || rs.Spec.Replicas == 0 || deploymentReplicasToAdd == 0 || deploymentReplicasToAdd == deploymentReplicasAdded { + return int32(0) + } + + rsFraction := getReplicaSetFraction(*rs, d) + allowed := deploymentReplicasToAdd - deploymentReplicasAdded + + if deploymentReplicasToAdd > 0 { + // Use the minimum between the replica set fraction and the maximum allowed replicas + // when scaling up. This way we ensure we will not scale up more than the allowed + // replicas we can add. + return integer.Int32Min(rsFraction, allowed) + } + // Use the maximum between the replica set fraction and the maximum allowed replicas + // when scaling down. This way we ensure we will not scale down more than the allowed + // replicas we can remove. + return integer.Int32Max(rsFraction, allowed) +} + +// getReplicaSetFraction estimates the fraction of replicas a replica set can have in +// 1. a scaling event during a rollout or 2. when scaling a paused deployment. +func getReplicaSetFraction(rs extensions.ReplicaSet, d extensions.Deployment) int32 { + // If we are scaling down to zero then the fraction of this replica set is its whole size (negative) + if d.Spec.Replicas == int32(0) { + return -rs.Spec.Replicas + } + + deploymentReplicas := d.Spec.Replicas + maxSurge(d) + annotatedReplicas, ok := getMaxReplicasAnnotation(&rs) + if !ok { + // If we cannot find the annotation then fallback to the current deployment size. Note that this + // will not be an accurate proportion estimation in case other replica sets have different values + // which means that the deployment was scaled at some point but we at least will stay in limits + // due to the min-max comparisons in getProportion. + annotatedReplicas = d.Status.Replicas + } + + // We should never proportionally scale up from zero which means rs.spec.replicas and annotatedReplicas + // will never be zero here. + newRSsize := (float64(rs.Spec.Replicas * deploymentReplicas)) / float64(annotatedReplicas) + return integer.RoundToInt32(newRSsize) - rs.Spec.Replicas +} diff --git a/pkg/util/deployment/deployment.go b/pkg/util/deployment/deployment.go index 0442da4290..05b2a83df4 100644 --- a/pkg/util/deployment/deployment.go +++ b/pkg/util/deployment/deployment.go @@ -41,6 +41,14 @@ import ( const ( // The revision annotation of a deployment's replica sets which records its rollout sequence RevisionAnnotation = "deployment.kubernetes.io/revision" + // DesiredReplicasAnnotation is the desired replicas for a deployment recorded as an annotation + // in its replica sets. Helps in separating scaling events from the rollout process and for + // determining if the new replica set for a deployment is really saturated. + DesiredReplicasAnnotation = "deployment.kubernetes.io/desired-replicas" + // MaxReplicasAnnotation is the maximum replicas a deployment can have at a given point, which + // is deployment.spec.replicas + maxSurge. Used by the underlying replica sets to estimate their + // proportions in case the deployment has surge replicas. + MaxReplicasAnnotation = "deployment.kubernetes.io/max-replicas" // Here are the possible rollback event reasons RollbackRevisionNotFound = "DeploymentRollbackRevisionNotFound" @@ -434,6 +442,21 @@ func NewRSNewReplicas(deployment *extensions.Deployment, allRSs []*extensions.Re } } +// IsSaturated checks if the new replica set is saturated by comparing its size with its deployment size. +// Both the deployment and the replica set have to believe this replica set can own all of the desired +// replicas in the deployment and the annotation helps in achieving that. +func IsSaturated(deployment *extensions.Deployment, rs *extensions.ReplicaSet) bool { + if rs == nil { + return false + } + desiredString := rs.Annotations[DesiredReplicasAnnotation] + desired, err := strconv.Atoi(desiredString) + if err != nil { + return false + } + return rs.Spec.Replicas == deployment.Spec.Replicas && int32(desired) == deployment.Spec.Replicas +} + // Polls for deployment to be updated so that deployment.Status.ObservedGeneration >= desiredGeneration. // Returns error if polling timesout. func WaitForObservedDeployment(getDeploymentFunc func() (*extensions.Deployment, error), desiredGeneration int64, interval, timeout time.Duration) error { diff --git a/pkg/util/intstr/intstr.go b/pkg/util/intstr/intstr.go index 53bc0fc7e6..8f29f32c6f 100644 --- a/pkg/util/intstr/intstr.go +++ b/pkg/util/intstr/intstr.go @@ -144,5 +144,5 @@ func getIntOrPercentValue(intOrStr *IntOrString) (int, bool, error) { } return int(v), true, nil } - return 0, false, fmt.Errorf("invalid value: neither int nor percentage") + return 0, false, fmt.Errorf("invalid type: neither int nor percentage") } diff --git a/test/e2e/deployment.go b/test/e2e/deployment.go index e3ce387e68..d5f268ff10 100644 --- a/test/e2e/deployment.go +++ b/test/e2e/deployment.go @@ -80,6 +80,9 @@ var _ = framework.KubeDescribe("Deployment", func() { It("deployment should label adopted RSs and pods", func() { testDeploymentLabelAdopted(f) }) + It("paused deployment should be able to scale", func() { + testScalePausedDeployment(f) + }) }) func newRS(rsName string, replicas int32, rsPodLabels map[string]string, imageName string, image string) *extensions.ReplicaSet { @@ -569,6 +572,8 @@ func testPausedDeployment(f *framework.Framework) { podLabels := map[string]string{"name": nginxImageName} d := newDeployment(deploymentName, 1, podLabels, nginxImageName, nginxImage, extensions.RollingUpdateDeploymentStrategyType, nil) d.Spec.Paused = true + tgps := int64(20) + d.Spec.Template.Spec.TerminationGracePeriodSeconds = &tgps framework.Logf("Creating paused deployment %s", deploymentName) _, err := c.Extensions().Deployments(ns).Create(d) Expect(err).NotTo(HaveOccurred()) @@ -622,21 +627,34 @@ func testPausedDeployment(f *framework.Framework) { err = framework.WaitForObservedDeployment(c, ns, deploymentName, deployment.Generation) Expect(err).NotTo(HaveOccurred()) + // Update the deployment template - the new replicaset should stay the same + framework.Logf("Updating paused deployment %q", deploymentName) + newTGPS := int64(40) + deployment, err = framework.UpdateDeploymentWithRetries(c, ns, d.Name, func(update *extensions.Deployment) { + update.Spec.Template.Spec.TerminationGracePeriodSeconds = &newTGPS + }) + Expect(err).NotTo(HaveOccurred()) + + err = framework.WaitForObservedDeployment(c, ns, deploymentName, deployment.Generation) + Expect(err).NotTo(HaveOccurred()) + + framework.Logf("Looking for new replicaset for paused deployment %q (there should be none)", deploymentName) newRS, err := deploymentutil.GetNewReplicaSet(deployment, c) Expect(err).NotTo(HaveOccurred()) - Expect(framework.DeleteReplicaSet(unversionedClient, ns, newRS.Name)).NotTo(HaveOccurred()) - - deployment, err = c.Extensions().Deployments(ns).Get(deploymentName) - Expect(err).NotTo(HaveOccurred()) - - if !deployment.Spec.Paused { - err = fmt.Errorf("deployment %q should be paused", deployment.Name) + if newRS != nil { + err = fmt.Errorf("No replica set should match the deployment template but there is %q", newRS.Name) Expect(err).NotTo(HaveOccurred()) } - shouldBeNil, err := deploymentutil.GetNewReplicaSet(deployment, c) + + _, allOldRs, err := deploymentutil.GetOldReplicaSets(deployment, c) Expect(err).NotTo(HaveOccurred()) - if shouldBeNil != nil { - err = fmt.Errorf("deployment %q shouldn't have a replica set but there is %q", deployment.Name, shouldBeNil.Name) + if len(allOldRs) != 1 { + err = fmt.Errorf("expected an old replica set") + Expect(err).NotTo(HaveOccurred()) + } + framework.Logf("Comparing deployment diff with old replica set %q", allOldRs[0].Name) + if *allOldRs[0].Spec.Template.Spec.TerminationGracePeriodSeconds == newTGPS { + err = fmt.Errorf("TerminationGracePeriodSeconds on the replica set should be %d but is %d", tgps, newTGPS) Expect(err).NotTo(HaveOccurred()) } } @@ -944,3 +962,54 @@ func testDeploymentLabelAdopted(f *framework.Framework) { Expect(err).NotTo(HaveOccurred()) Expect(int32(len(pods.Items))).Should(Equal(replicas)) } + +func testScalePausedDeployment(f *framework.Framework) { + ns := f.Namespace.Name + c := adapter.FromUnversionedClient(f.Client) + + podLabels := map[string]string{"name": nginxImageName} + replicas := int32(3) + + // Create a nginx deployment. + deploymentName := "nginx-deployment" + d := newDeployment(deploymentName, replicas, podLabels, nginxImageName, nginxImage, extensions.RollingUpdateDeploymentStrategyType, nil) + framework.Logf("Creating deployment %q", deploymentName) + _, err := c.Extensions().Deployments(ns).Create(d) + Expect(err).NotTo(HaveOccurred()) + defer stopDeployment(c, f.Client, ns, deploymentName) + + // Check that deployment is created fine. + deployment, err := c.Extensions().Deployments(ns).Get(deploymentName) + Expect(err).NotTo(HaveOccurred()) + + err = framework.WaitForObservedDeployment(c, ns, deploymentName, deployment.Generation) + Expect(err).NotTo(HaveOccurred()) + + rs, err := deploymentutil.GetNewReplicaSet(deployment, c) + Expect(err).NotTo(HaveOccurred()) + + // Pause the deployment and try to scale it. + deployment, err = framework.UpdateDeploymentWithRetries(c, ns, d.Name, func(update *extensions.Deployment) { + update.Spec.Paused = true + }) + Expect(err).NotTo(HaveOccurred()) + + // Scale the paused deployment. + framework.Logf("Scaling up the paused deployment %q", deploymentName) + newReplicas := int32(5) + deployment, err = framework.UpdateDeploymentWithRetries(c, ns, deployment.Name, func(update *extensions.Deployment) { + update.Spec.Replicas = newReplicas + }) + Expect(err).NotTo(HaveOccurred()) + + err = framework.WaitForObservedDeployment(c, ns, deploymentName, deployment.Generation) + Expect(err).NotTo(HaveOccurred()) + + rs, err = deploymentutil.GetNewReplicaSet(deployment, c) + Expect(err).NotTo(HaveOccurred()) + + if rs.Spec.Replicas != newReplicas { + err = fmt.Errorf("Expected %d replicas for the new replica set, got %d", newReplicas, rs.Spec.Replicas) + Expect(err).NotTo(HaveOccurred()) + } +} From d61594b842902eac6d4cfa5e8627a5619da5491d Mon Sep 17 00:00:00 2001 From: wongma7 <mawong@redhat.com> Date: Thu, 16 Jun 2016 17:40:03 -0400 Subject: [PATCH 077/339] Add integration test for binding PVs using label selectors --- test/integration/persistent_volumes_test.go | 92 +++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/test/integration/persistent_volumes_test.go b/test/integration/persistent_volumes_test.go index faa262df02..c3c91720a9 100644 --- a/test/integration/persistent_volumes_test.go +++ b/test/integration/persistent_volumes_test.go @@ -340,6 +340,98 @@ func TestPersistentVolumeClaimLabelSelector(t *testing.T) { } } +// TestPersistentVolumeClaimLabelSelectorMatchExpressions test binding using +// MatchExpressions label selectors +func TestPersistentVolumeClaimLabelSelectorMatchExpressions(t *testing.T) { + _, s := framework.RunAMaster(t) + defer s.Close() + + deleteAllEtcdKeys() + testClient, controller, watchPV, watchPVC := createClients(t, s) + defer watchPV.Stop() + defer watchPVC.Stop() + + controller.Run() + defer controller.Stop() + + var ( + err error + modes = []api.PersistentVolumeAccessMode{api.ReadWriteOnce} + reclaim = api.PersistentVolumeReclaimRetain + + pv_true = createPV("pv-true", "/tmp/foo-label", "1G", modes, reclaim) + pv_false = createPV("pv-false", "/tmp/foo-label", "1G", modes, reclaim) + pvc = createPVC("pvc-ls-1", "1G", modes) + ) + + pv_true.ObjectMeta.SetLabels(map[string]string{"foo": "valA", "bar": ""}) + pv_false.ObjectMeta.SetLabels(map[string]string{"foo": "valB", "baz": ""}) + + _, err = testClient.PersistentVolumes().Create(pv_true) + if err != nil { + t.Fatalf("Failed to create PersistentVolume: %v", err) + } + _, err = testClient.PersistentVolumes().Create(pv_false) + if err != nil { + t.Fatalf("Failed to create PersistentVolume: %v", err) + } + t.Log("volumes created") + + pvc.Spec.Selector = &unversioned.LabelSelector{ + MatchExpressions: []unversioned.LabelSelectorRequirement{ + { + Key: "foo", + Operator: unversioned.LabelSelectorOpIn, + Values: []string{"valA"}, + }, + { + Key: "foo", + Operator: unversioned.LabelSelectorOpNotIn, + Values: []string{"valB"}, + }, + { + Key: "bar", + Operator: unversioned.LabelSelectorOpExists, + Values: []string{}, + }, + { + Key: "baz", + Operator: unversioned.LabelSelectorOpDoesNotExist, + Values: []string{}, + }, + }, + } + + _, err = testClient.PersistentVolumeClaims(api.NamespaceDefault).Create(pvc) + if err != nil { + t.Fatalf("Failed to create PersistentVolumeClaim: %v", err) + } + t.Log("claim created") + + waitForAnyPersistentVolumePhase(watchPV, api.VolumeBound) + t.Log("volume bound") + waitForPersistentVolumeClaimPhase(testClient, pvc.Name, watchPVC, api.ClaimBound) + t.Log("claim bound") + + pv, err := testClient.PersistentVolumes().Get("pv-false") + if err != nil { + t.Fatalf("Unexpected error getting pv: %v", err) + } + if pv.Spec.ClaimRef != nil { + t.Fatalf("False PV shouldn't be bound") + } + pv, err = testClient.PersistentVolumes().Get("pv-true") + if err != nil { + t.Fatalf("Unexpected error getting pv: %v", err) + } + if pv.Spec.ClaimRef == nil { + t.Fatalf("True PV should be bound") + } + if pv.Spec.ClaimRef.Namespace != pvc.Namespace || pv.Spec.ClaimRef.Name != pvc.Name { + t.Fatalf("Bind mismatch! Expected %s/%s but got %s/%s", pvc.Namespace, pvc.Name, pv.Spec.ClaimRef.Namespace, pv.Spec.ClaimRef.Name) + } +} + // TestPersistentVolumeMultiPVs tests binding of one PVC to 100 PVs with // different size. func TestPersistentVolumeMultiPVs(t *testing.T) { From 4a5ade213c0e24a41b6d8f5e8bd05b6f3b12c745 Mon Sep 17 00:00:00 2001 From: Abitha Palaniappan <abitha.palaniappan@hp.com> Date: Tue, 14 Jun 2016 15:20:11 -0700 Subject: [PATCH 078/339] Adding scsi controller type filter while attaching disks Hot attach of disk to a scsi controller will work only if the controller type is lsilogic-sas or paravirtual.This patch filters the existing controller for these types, if it doesn't find one it creates a new scsi controller. --- .../providers/vsphere/vsphere.go | 66 ++++++++++++++----- .../providers/vsphere/vsphere_test.go | 1 + .../vsphere_volume/vsphere_volume_util.go | 14 ---- 3 files changed, 51 insertions(+), 30 deletions(-) diff --git a/pkg/cloudprovider/providers/vsphere/vsphere.go b/pkg/cloudprovider/providers/vsphere/vsphere.go index 87577351c6..71f2a03c93 100644 --- a/pkg/cloudprovider/providers/vsphere/vsphere.go +++ b/pkg/cloudprovider/providers/vsphere/vsphere.go @@ -37,12 +37,20 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/cloudprovider" + "k8s.io/kubernetes/pkg/util/runtime" ) const ProviderName = "vsphere" const ActivePowerState = "poweredOn" const DefaultDiskController = "scsi" -const DefaultSCSIControllerType = "lsilogic" +const DefaultSCSIControllerType = "lsilogic-sas" + +// Controller types that are currently supported for hot attach of disks +// lsilogic driver type is currently not supported because,when a device gets detached +// it fails to remove the device from the /dev path (which should be manually done) +// making the subsequent attaches to the node to fail. +// TODO: Add support for lsilogic driver type +var supportedSCSIControllerType = []string{"lsilogic-sas", "pvscsi"} var ErrNoDiskUUIDFound = errors.New("No disk UUID found") var ErrNoDiskIDFound = errors.New("No vSphere disk ID found") @@ -70,7 +78,6 @@ type VSphereConfig struct { PublicNetwork string `gcfg:"public-network"` } Disk struct { - DiskController string `dcfg:"diskcontroller"` SCSIControllerType string `dcfg:"scsicontrollertype"` } } @@ -146,11 +153,11 @@ func newVSphere(cfg VSphereConfig) (*VSphere, error) { return nil, err } - if cfg.Disk.DiskController == "" { - cfg.Disk.DiskController = DefaultDiskController - } if cfg.Disk.SCSIControllerType == "" { cfg.Disk.SCSIControllerType = DefaultSCSIControllerType + } else if !checkControllerSupported(cfg.Disk.SCSIControllerType) { + glog.Errorf("%v is not a supported SCSI Controller type. Please configure 'lsilogic-sas' OR 'pvscsi'", cfg.Disk.SCSIControllerType) + return nil, errors.New("Controller type not supported. Please configure 'lsilogic-sas' OR 'pvscsi'") } vs := VSphere{ cfg: &cfg, @@ -159,6 +166,15 @@ func newVSphere(cfg VSphereConfig) (*VSphere, error) { return &vs, nil } +func checkControllerSupported(ctrlType string) bool { + for _, c := range supportedSCSIControllerType { + if ctrlType == c { + return true + } + } + return false +} + func vsphereLogin(cfg *VSphereConfig, ctx context.Context) (*govmomi.Client, error) { // Parse URL from string @@ -274,7 +290,7 @@ func (i *Instances) List(filter string) ([]string, error) { return nil, err } - glog.V(3).Infof("found %s instances matching %s: %s", + glog.V(3).Infof("Found %s instances matching %s: %s", len(vmList), filter, vmList) return vmList, nil @@ -518,15 +534,18 @@ func (vs *VSphere) AttachDisk(vmDiskPath string, nodeName string) (diskID string return "", "", err } - // find SCSI controller to attach the disk - var newSCSICreated bool = false + var diskControllerType = vs.cfg.Disk.SCSIControllerType + // find SCSI controller of particular type from VM devices + var diskController = getSCSIController(vmDevices, diskControllerType) + + var newSCSICreated = false var newSCSIController types.BaseVirtualDevice - diskController, err := vmDevices.FindDiskController(vs.cfg.Disk.DiskController) - if err != nil { - // create a scsi controller if there is not one - newSCSIController, err := vmDevices.CreateSCSIController(vs.cfg.Disk.SCSIControllerType) + // creating a scsi controller as there is none found of controller type defined + if diskController == nil { + glog.V(4).Infof("Creating a SCSI controller of %v type", diskControllerType) + newSCSIController, err := vmDevices.CreateSCSIController(diskControllerType) if err != nil { - glog.V(3).Infof("cannot create new SCSI controller - %v", err) + runtime.HandleError(fmt.Errorf("error creating new SCSI controller: %v", err)) return "", "", err } configNewSCSIController := newSCSIController.(types.BaseVirtualSCSIController).GetVirtualSCSIController() @@ -551,8 +570,10 @@ func (vs *VSphere) AttachDisk(vmDiskPath string, nodeName string) (diskID string //cannot cleanup if there is no device list return "", "", err } - if diskController, err = vmDevices.FindDiskController(vs.cfg.Disk.DiskController); err != nil { - glog.V(3).Infof("cannot find disk controller - %v", err) + + diskController = getSCSIController(vmDevices, vs.cfg.Disk.SCSIControllerType) + if diskController == nil { + glog.Errorf("cannot find SCSI controller in VM - %v", err) // attempt clean up of scsi controller cleanUpController(newSCSIController, vmDevices, vm, ctx) return "", "", err @@ -567,7 +588,7 @@ func (vs *VSphere) AttachDisk(vmDiskPath string, nodeName string) (diskID string // Attach disk to the VM err = vm.AddDevice(ctx, disk) if err != nil { - glog.V(3).Infof("cannot attach disk to the vm - %v", err) + glog.Errorf("cannot attach disk to the vm - %v", err) if newSCSICreated { cleanUpController(newSCSIController, vmDevices, vm, ctx) } @@ -606,6 +627,19 @@ func (vs *VSphere) AttachDisk(vmDiskPath string, nodeName string) (diskID string return deviceName, diskUUID, nil } +func getSCSIController(vmDevices object.VirtualDeviceList, scsiType string) *types.VirtualController { + // get virtual scsi controller of passed argument type + for _, device := range vmDevices { + devType := vmDevices.Type(device) + if devType == scsiType { + if c, ok := device.(types.BaseVirtualController); ok { + return c.GetVirtualController() + } + } + } + return nil +} + func getVirtualDiskUUID(newDevice types.BaseVirtualDevice) (string, error) { vd := newDevice.GetVirtualDevice() diff --git a/pkg/cloudprovider/providers/vsphere/vsphere_test.go b/pkg/cloudprovider/providers/vsphere/vsphere_test.go index 2f991db8b6..29fccd0a35 100644 --- a/pkg/cloudprovider/providers/vsphere/vsphere_test.go +++ b/pkg/cloudprovider/providers/vsphere/vsphere_test.go @@ -37,6 +37,7 @@ func configFromEnv() (cfg VSphereConfig, ok bool) { cfg.Global.Datacenter = os.Getenv("VSPHERE_DATACENTER") cfg.Network.PublicNetwork = os.Getenv("VSPHERE_PUBLIC_NETWORK") cfg.Global.Datastore = os.Getenv("VSPHERE_DATASTORE") + cfg.Disk.SCSIControllerType = os.Getenv("VSPHERE_SCSICONTROLLER_TYPE") if os.Getenv("VSPHERE_INSECURE") != "" { InsecureFlag, err = strconv.ParseBool(os.Getenv("VSPHERE_INSECURE")) } else { diff --git a/pkg/volume/vsphere_volume/vsphere_volume_util.go b/pkg/volume/vsphere_volume/vsphere_volume_util.go index cfc8bf4cce..f54d10d586 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume_util.go +++ b/pkg/volume/vsphere_volume/vsphere_volume_util.go @@ -68,8 +68,6 @@ func (util *VsphereDiskUtil) AttachDisk(vm *vsphereVolumeMounter, globalPDPath s numTries := 0 for { devicePath = verifyDevicePath(diskUUID) - // probe the attached vol so that symlink in /dev/disk/by-id is created - scsiHostRescan() _, err := os.Stat(devicePath) if err == nil { @@ -107,18 +105,6 @@ func (util *VsphereDiskUtil) AttachDisk(vm *vsphereVolumeMounter, globalPDPath s return nil } -// rescan scsi bus -func scsiHostRescan() { - scsi_path := "/sys/class/scsi_host/" - if dirs, err := ioutil.ReadDir(scsi_path); err == nil { - for _, f := range dirs { - name := scsi_path + f.Name() + "/scan" - data := []byte("- - -") - ioutil.WriteFile(name, data, 0666) - } - } -} - func verifyDevicePath(diskUUID string) string { files, _ := ioutil.ReadDir("/dev/disk/by-id/") for _, f := range files { From 8c04af7b73cbaefbb66fcb6eed743c8f3c2443c3 Mon Sep 17 00:00:00 2001 From: Aaron Levy <aaronjlevy@gmail.com> Date: Wed, 15 Jun 2016 16:28:37 -0700 Subject: [PATCH 079/339] Retrieve host IP in isolation from apiserver --- pkg/kubelet/kubelet.go | 2 +- pkg/kubelet/kubelet_getters.go | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 496176116b..7cd76570ea 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -3565,7 +3565,7 @@ func (kl *Kubelet) generateAPIPodStatus(pod *api.Pod, podStatus *kubecontainer.P }) if !kl.standaloneMode { - hostIP, err := kl.GetHostIP() + hostIP, err := kl.getHostIPAnyWay() if err != nil { glog.V(4).Infof("Cannot get host IP: %v", err) } else { diff --git a/pkg/kubelet/kubelet_getters.go b/pkg/kubelet/kubelet_getters.go index 6c594f5373..5032ebf80f 100644 --- a/pkg/kubelet/kubelet_getters.go +++ b/pkg/kubelet/kubelet_getters.go @@ -218,3 +218,12 @@ func (kl *Kubelet) GetHostIP() (net.IP, error) { } return nodeutil.GetNodeHostIP(node) } + +// getHostIPAnyway attempts to return the host IP from kubelet's nodeInfo, or the initialNodeStatus +func (kl *Kubelet) getHostIPAnyWay() (net.IP, error) { + node, err := kl.getNodeAnyWay() + if err != nil { + return nil, err + } + return nodeutil.GetNodeHostIP(node) +} From 4a62d8e86f269a7c8f6767a822adde839593162c Mon Sep 17 00:00:00 2001 From: Aaron Levy <aaronjlevy@gmail.com> Date: Mon, 20 Jun 2016 15:14:11 -0700 Subject: [PATCH 080/339] pkg/kubelet: mock stubs for cadvisor calls --- pkg/kubelet/kubelet_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index a9d42a8d25..04c42f6b22 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -3688,6 +3688,10 @@ func TestPrivilegeContainerAllowed(t *testing.T) { func TestPrivilegeContainerDisallowed(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) + testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) + testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) + testKubelet.fakeCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) kubelet := testKubelet.kubelet capabilities.SetForTests(capabilities.Capabilities{ @@ -4285,6 +4289,10 @@ func TestGetPodsToSync(t *testing.T) { func TestGenerateAPIPodStatusWithSortedContainers(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) + testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) + testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) + testKubelet.fakeCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) kubelet := testKubelet.kubelet numContainers := 10 expectedOrder := []string{} @@ -4349,6 +4357,10 @@ func TestGenerateAPIPodStatusWithReasonCache(t *testing.T) { testErrorReason := fmt.Errorf("test-error") emptyContainerID := (&kubecontainer.ContainerID{}).String() testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) + testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) + testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) + testKubelet.fakeCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) kubelet := testKubelet.kubelet pod := podWithUidNameNs("12345678", "foo", "new") pod.Spec = api.PodSpec{RestartPolicy: api.RestartPolicyOnFailure} @@ -4534,6 +4546,10 @@ func TestGenerateAPIPodStatusWithDifferentRestartPolicies(t *testing.T) { testErrorReason := fmt.Errorf("test-error") emptyContainerID := (&kubecontainer.ContainerID{}).String() testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) + testKubelet.fakeCadvisor.On("VersionInfo").Return(&cadvisorapi.VersionInfo{}, nil) + testKubelet.fakeCadvisor.On("MachineInfo").Return(&cadvisorapi.MachineInfo{}, nil) + testKubelet.fakeCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) + testKubelet.fakeCadvisor.On("RootFsInfo").Return(cadvisorapiv2.FsInfo{}, nil) kubelet := testKubelet.kubelet pod := podWithUidNameNs("12345678", "foo", "new") containers := []api.Container{{Name: "succeed"}, {Name: "failed"}} From 4329ba700fdbd4eb8913f9cd9b2842195747bc57 Mon Sep 17 00:00:00 2001 From: Yifan Gu <yifan.gu@coreos.com> Date: Mon, 20 Jun 2016 17:12:10 -0700 Subject: [PATCH 081/339] rkt: Refactor grace termination period. Add `TimeoutStopSec` service option to support grace termination. --- pkg/kubelet/rkt/rkt.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go index 31350127a3..7b72168d15 100644 --- a/pkg/kubelet/rkt/rkt.go +++ b/pkg/kubelet/rkt/rkt.go @@ -1135,6 +1135,7 @@ func (r *Runtime) preparePod(pod *api.Pod, podIP string, pullSecrets []api.Secre newUnitOption("Service", "ExecStopPost", markPodFinished), // This enables graceful stop. newUnitOption("Service", "KillMode", "mixed"), + newUnitOption("Service", "TimeoutStopSec", fmt.Sprintf("%ds", getPodTerminationGracePeriodInSecond(pod))), // Track pod info for garbage collection newUnitOption(unitKubernetesSection, unitPodUID, string(pod.UID)), newUnitOption(unitKubernetesSection, unitPodName, pod.Name), @@ -1554,14 +1555,22 @@ func (r *Runtime) GetPods(all bool) ([]*kubecontainer.Pod, error) { return result, nil } -func (r *Runtime) waitPreStopHooks(pod *api.Pod, runningPod *kubecontainer.Pod) { - gracePeriod := int64(minimumGracePeriodInSeconds) +func getPodTerminationGracePeriodInSecond(pod *api.Pod) int64 { + var gracePeriod int64 switch { case pod.DeletionGracePeriodSeconds != nil: gracePeriod = *pod.DeletionGracePeriodSeconds case pod.Spec.TerminationGracePeriodSeconds != nil: gracePeriod = *pod.Spec.TerminationGracePeriodSeconds } + if gracePeriod < minimumGracePeriodInSeconds { + gracePeriod = minimumGracePeriodInSeconds + } + return gracePeriod +} + +func (r *Runtime) waitPreStopHooks(pod *api.Pod, runningPod *kubecontainer.Pod) { + gracePeriod := getPodTerminationGracePeriodInSecond(pod) done := make(chan struct{}) go func() { From 93189dd5694f3b9d8dd5360f2a83dd954a101ead Mon Sep 17 00:00:00 2001 From: Daniel Wang <wonderfly@google.com> Date: Mon, 20 Jun 2016 17:49:15 -0700 Subject: [PATCH 082/339] e2e-runner: Improve the logic of detecting Docker releases Apparently it didn't handle GitHub prereleases well. Also switch from `JENKINS_GCI_IMAGE_TYPE` to `JENKINS_GCI_IMAGE_FAMILY` following up #27083. --- hack/jenkins/e2e-runner.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/hack/jenkins/e2e-runner.sh b/hack/jenkins/e2e-runner.sh index 699a4f3fcd..a08298a542 100755 --- a/hack/jenkins/e2e-runner.sh +++ b/hack/jenkins/e2e-runner.sh @@ -89,13 +89,19 @@ function get_latest_gci_image() { function get_latest_docker_release() { # Typical Docker release versions are like v1.11.2-rc1, v1.11.2, and etc. local -r version_re='.*\"tag_name\":[[:space:]]+\"v([0-9\.r|c-]+)\",.*' - local -r latest_release="$(curl -fsSL --retry 3 https://api.github.com/repos/docker/docker/releases/latest)" - if [[ "${latest_release}" =~ ${version_re} ]]; then - echo "${BASH_REMATCH[1]}" - else - echo "Malformed Docker API response for latest release: ${latest_release}" - exit 1 - fi + local -r releases="$(curl -fsSL --retry 3 https://api.github.com/repos/docker/docker/releases)" + # The GitHub API returns releases in descending order of creation time so the + # first one is always the latest. + # TODO: if we can install `jq` on the Jenkins nodes, we won't have to craft + # regular expressions here. + while read -r line; do + if [[ "${line}" =~ ${version_re} ]]; then + echo "${BASH_REMATCH[1]}" + return + fi + done <<< "${releases}" + echo "Failed to determine the latest Docker release." + exit 1 } function install_google_cloud_sdk_tarball() { @@ -165,7 +171,9 @@ if [[ -n "${JENKINS_GCI_IMAGE_FAMILY:-}" ]]; then export KUBE_GCE_MASTER_PROJECT="${GCI_STAGING_PROJECT}" export KUBE_GCE_MASTER_IMAGE="$(get_latest_gci_image "${GCI_STAGING_PROJECT}" "${JENKINS_GCI_IMAGE_FAMILY}")" export KUBE_OS_DISTRIBUTION="gci" - if [[ "${JENKINS_GCI_IMAGE_TYPE}" == preview-test ]]; then + if [[ "${JENKINS_GCI_IMAGE_FAMILY}" == "gci-preview-test" ]]; then + # The family "gci-preview-test" is reserved for a special type of GCI images + # that are used to continuously validate Docker releases. export KUBE_GCI_DOCKER_VERSION="$(get_latest_docker_release)" fi fi From 57011da0887cead18435420488699bd9a7948edc Mon Sep 17 00:00:00 2001 From: xiangpengzhao <zhao.xiangpeng@zte.com.cn> Date: Sun, 12 Jun 2016 00:01:46 -0400 Subject: [PATCH 083/339] Use host network for container gen-swagger-docs and set https_proxy if behind a proxy --- hack/update-api-reference-docs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/hack/update-api-reference-docs.sh b/hack/update-api-reference-docs.sh index 55108131bc..72cac90791 100755 --- a/hack/update-api-reference-docs.sh +++ b/hack/update-api-reference-docs.sh @@ -71,6 +71,7 @@ for ver in $VERSIONS; do --rm -v "${TMP_IN_HOST}":/output:z \ -v "${SWAGGER_PATH}":/swagger-source:z \ -v "${REGISTER_FILE}":/register.go:z \ + --net=host -e "https_proxy=${KUBERNETES_HTTPS_PROXY:-}" \ gcr.io/google_containers/gen-swagger-docs:v6 \ "${SWAGGER_JSON_NAME}" done From 080b49276ed94d161cbca120dfe447bd44e6792b Mon Sep 17 00:00:00 2001 From: Harry Zhang <harryzhang@zju.edu.cn> Date: Sun, 19 Jun 2016 10:59:13 -0400 Subject: [PATCH 084/339] Omit invalid affinity error in admission --- plugin/pkg/admission/antiaffinity/admission.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/pkg/admission/antiaffinity/admission.go b/plugin/pkg/admission/antiaffinity/admission.go index 832351c397..00c2ac71b1 100644 --- a/plugin/pkg/admission/antiaffinity/admission.go +++ b/plugin/pkg/admission/antiaffinity/admission.go @@ -20,6 +20,7 @@ import ( "fmt" "io" + "github.com/golang/glog" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" apierrors "k8s.io/kubernetes/pkg/api/errors" @@ -59,7 +60,8 @@ func (p *plugin) Admit(attributes admission.Attributes) (err error) { } affinity, err := api.GetAffinityFromPodAnnotations(pod.Annotations) if err != nil { - return err + glog.V(5).Infof("Invalid Affinity detected, but we will leave handling of this to validation phase") + return nil } if affinity.PodAntiAffinity != nil { var podAntiAffinityTerms []api.PodAffinityTerm From 1beb2b318c4f63a150bd81ed7bfd47964a9f8d7f Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" <sttts@redhat.com> Date: Tue, 21 Jun 2016 12:31:36 +0200 Subject: [PATCH 085/339] portforward e2e: extend log for flake hunting --- test/e2e/portforward.go | 75 +++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 33 deletions(-) diff --git a/test/e2e/portforward.go b/test/e2e/portforward.go index 6ba46eeffe..96a9d24c7a 100644 --- a/test/e2e/portforward.go +++ b/test/e2e/portforward.go @@ -183,6 +183,14 @@ var _ = framework.KubeDescribe("Port forwarding", func() { if err := f.WaitForPodRunning(pod.Name); err != nil { framework.Failf("Pod did not start running: %v", err) } + defer func() { + logs, err := framework.GetPodLogs(f.Client, f.Namespace.Name, pod.Name, "portforwardtester") + if err != nil { + framework.Logf("Error getting pod log: %v", err) + } else { + framework.Logf("Pod log:\n%s", logs) + } + }() By("Running 'kubectl port-forward'") cmd := runPortForward(f.Namespace.Name, pod.Name, 80) @@ -198,20 +206,15 @@ var _ = framework.KubeDescribe("Port forwarding", func() { conn.Close() By("Waiting for the target pod to stop running") - waitErr := f.WaitForPodNoLongerRunning(pod.Name) - - By("Retrieving logs from the target pod") - logOutput, err := framework.GetPodLogs(f.Client, f.Namespace.Name, pod.Name, "portforwardtester") - if err != nil { - framework.Failf("Error retrieving logs: %v", err) - } - - if waitErr != nil { - framework.Logf("Pod log:\n%s", logOutput) - framework.Failf("Pod did not stop running: %v", waitErr) + if err := f.WaitForPodNoLongerRunning(pod.Name); err != nil { + framework.Failf("Pod did not stop running: %v", err) } By("Verifying logs") + logOutput, err := framework.GetPodLogs(f.Client, f.Namespace.Name, pod.Name, "portforwardtester") + if err != nil { + framework.Failf("Error retrieving pod logs: %v", err) + } verifyLogMessage(logOutput, "Accepted client connection") verifyLogMessage(logOutput, "Expected to read 3 bytes from client, but got 0 instead") }) @@ -225,6 +228,14 @@ var _ = framework.KubeDescribe("Port forwarding", func() { if err := f.WaitForPodRunning(pod.Name); err != nil { framework.Failf("Pod did not start running: %v", err) } + defer func() { + logs, err := framework.GetPodLogs(f.Client, f.Namespace.Name, pod.Name, "portforwardtester") + if err != nil { + framework.Logf("Error getting pod log: %v", err) + } else { + framework.Logf("Pod log:\n%s", logs) + } + }() By("Running 'kubectl port-forward'") cmd := runPortForward(f.Namespace.Name, pod.Name, 80) @@ -261,20 +272,15 @@ var _ = framework.KubeDescribe("Port forwarding", func() { } By("Waiting for the target pod to stop running") - waitErr := f.WaitForPodNoLongerRunning(pod.Name) - - By("Retrieving logs from the target pod") - logOutput, err := framework.GetPodLogs(f.Client, f.Namespace.Name, pod.Name, "portforwardtester") - if err != nil { - framework.Failf("Error retrieving logs: %v", err) - } - - if waitErr != nil { - framework.Logf("Pod log:\n%s", logOutput) - framework.Failf("Pod did not stop running: %v", waitErr) + if err := f.WaitForPodNoLongerRunning(pod.Name); err != nil { + framework.Failf("Pod did not stop running: %v", err) } By("Verifying logs") + logOutput, err := framework.GetPodLogs(f.Client, f.Namespace.Name, pod.Name, "portforwardtester") + if err != nil { + framework.Failf("Error retrieving pod logs: %v", err) + } verifyLogMessage(logOutput, "^Accepted client connection$") verifyLogMessage(logOutput, "^Received expected client data$") verifyLogMessage(logOutput, "^Done$") @@ -290,6 +296,14 @@ var _ = framework.KubeDescribe("Port forwarding", func() { if err := f.WaitForPodRunning(pod.Name); err != nil { framework.Failf("Pod did not start running: %v", err) } + defer func() { + logs, err := framework.GetPodLogs(f.Client, f.Namespace.Name, pod.Name, "portforwardtester") + if err != nil { + framework.Logf("Error getting pod log: %v", err) + } else { + framework.Logf("Pod log:\n%s", logs) + } + }() By("Running 'kubectl port-forward'") cmd := runPortForward(f.Namespace.Name, pod.Name, 80) @@ -316,20 +330,15 @@ var _ = framework.KubeDescribe("Port forwarding", func() { } By("Waiting for the target pod to stop running") - waitErr := f.WaitForPodNoLongerRunning(pod.Name) - - By("Retrieving logs from the target pod") - logOutput, err := framework.GetPodLogs(f.Client, f.Namespace.Name, pod.Name, "portforwardtester") - if err != nil { - framework.Failf("Error retrieving logs: %v", err) - } - - if waitErr != nil { - framework.Logf("Pod log:\n%s", logOutput) - framework.Failf("Pod did not stop running: %v", waitErr) + if err := f.WaitForPodNoLongerRunning(pod.Name); err != nil { + framework.Failf("Pod did not stop running: %v", err) } By("Verifying logs") + logOutput, err := framework.GetPodLogs(f.Client, f.Namespace.Name, pod.Name, "portforwardtester") + if err != nil { + framework.Failf("Error retrieving pod logs: %v", err) + } verifyLogMessage(logOutput, "Accepted client connection") verifyLogMessage(logOutput, "Done") }) From c9a60e2d2c3f39aff5cbd136b3243187091aa40a Mon Sep 17 00:00:00 2001 From: Jan Safranek <jsafrane@redhat.com> Date: Tue, 21 Jun 2016 14:56:11 +0200 Subject: [PATCH 086/339] Rephrase 'pv not found in cache' warnings. When kubelet starts a pod that refers to non-existing PV, PVC or Node, it should clearly show that the requested element does not exist. Previous "PersistentVolumeClaim 'default/ceph-claim-wm' is not in cache" looks like random kubelet hiccup, while "PersistentVolumeClaim 'default/ceph-claim-wm' not found" suggests that the object may not exist at all and it might be an user error. Fixes #27523 --- pkg/client/cache/listers.go | 4 ++-- plugin/pkg/scheduler/algorithm/predicates/predicates.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/client/cache/listers.go b/pkg/client/cache/listers.go index 1ba0be3a6b..90c9c62f9b 100644 --- a/pkg/client/cache/listers.go +++ b/pkg/client/cache/listers.go @@ -582,7 +582,7 @@ func (s *StoreToPVFetcher) GetPersistentVolumeInfo(id string) (*api.PersistentVo } if !exists { - return nil, fmt.Errorf("PersistentVolume '%v' is not in cache", id) + return nil, fmt.Errorf("PersistentVolume '%v' not found", id) } return o.(*api.PersistentVolume), nil @@ -601,7 +601,7 @@ func (s *StoreToPVCFetcher) GetPersistentVolumeClaimInfo(namespace string, id st } if !exists { - return nil, fmt.Errorf("PersistentVolumeClaim '%s/%s' is not in cache", namespace, id) + return nil, fmt.Errorf("PersistentVolumeClaim '%s/%s' not found", namespace, id) } return o.(*api.PersistentVolumeClaim), nil diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates.go b/plugin/pkg/scheduler/algorithm/predicates/predicates.go index e91b1ecef7..ecc0caee90 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates.go @@ -59,7 +59,7 @@ func (c *CachedNodeInfo) GetNodeInfo(id string) (*api.Node, error) { } if !exists { - return nil, fmt.Errorf("node '%v' is not in cache", id) + return nil, fmt.Errorf("node '%v' not found", id) } return node.(*api.Node), nil From fadde38df650f98d4605f21844acfe6fdd3dd4e8 Mon Sep 17 00:00:00 2001 From: Hongchao Deng <hongchaodeng1@gmail.com> Date: Tue, 21 Jun 2016 09:55:09 -0700 Subject: [PATCH 087/339] integration.go: remove scheduler phantom pod test --- cmd/integration/integration.go | 65 ---------------------------------- 1 file changed, 65 deletions(-) diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index 85277c41d6..ff016a0aa9 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -295,66 +295,6 @@ func podRunning(c *client.Client, podNamespace string, podName string) wait.Cond } } -func runSchedulerNoPhantomPodsTest(client *client.Client) { - pod := &api.Pod{ - Spec: api.PodSpec{ - Containers: []api.Container{ - { - Name: "c1", - Image: e2e.GetPauseImageName(client), - Ports: []api.ContainerPort{ - {ContainerPort: 1234, HostPort: 9999}, - }, - ImagePullPolicy: api.PullIfNotPresent, - }, - }, - }, - } - - // Assuming we only have two kubelets, the third pod here won't schedule - // if the scheduler doesn't correctly handle the delete for the second - // pod. - pod.ObjectMeta.Name = "phantom.foo" - foo, err := client.Pods(api.NamespaceDefault).Create(pod) - if err != nil { - glog.Fatalf("Failed to create pod: %v, %v", pod, err) - } - if err := wait.Poll(time.Second, longTestTimeout, podRunning(client, foo.Namespace, foo.Name)); err != nil { - glog.Fatalf("FAILED: pod never started running %v", err) - } - - pod.ObjectMeta.Name = "phantom.bar" - bar, err := client.Pods(api.NamespaceDefault).Create(pod) - if err != nil { - glog.Fatalf("Failed to create pod: %v, %v", pod, err) - } - if err := wait.Poll(time.Second, longTestTimeout, podRunning(client, bar.Namespace, bar.Name)); err != nil { - glog.Fatalf("FAILED: pod never started running %v", err) - } - - // Delete a pod to free up room. - glog.Infof("Deleting pod %v", bar.Name) - err = client.Pods(api.NamespaceDefault).Delete(bar.Name, api.NewDeleteOptions(0)) - if err != nil { - glog.Fatalf("FAILED: couldn't delete pod %q: %v", bar.Name, err) - } - - pod.ObjectMeta.Name = "phantom.baz" - baz, err := client.Pods(api.NamespaceDefault).Create(pod) - if err != nil { - glog.Fatalf("Failed to create pod: %v, %v", pod, err) - } - if err := wait.Poll(time.Second, longTestTimeout, podRunning(client, baz.Namespace, baz.Name)); err != nil { - if pod, perr := client.Pods(api.NamespaceDefault).Get("phantom.bar"); perr == nil { - glog.Fatalf("FAILED: 'phantom.bar' was never deleted: %#v, err: %v", pod, err) - } else { - glog.Fatalf("FAILED: (Scheduler probably didn't process deletion of 'phantom.bar') Pod never started running: err: %v, perr: %v", err, perr) - } - } - - glog.Info("Scheduler doesn't make phantom pods: test passed.") -} - type testFunc func(*client.Client) func addFlags(fs *pflag.FlagSet) { @@ -457,11 +397,6 @@ func main() { } glog.Infof("OK - found created containers: %#v", createdConts.List()) - // This test doesn't run with the others because it can't run in - // parallel and also it schedules extra pods which would change the - // above pod counting logic. - runSchedulerNoPhantomPodsTest(kubeClient) - glog.Infof("\n\nLogging high latency metrics from the 10250 kubelet") e2e.HighLatencyKubeletOperations(nil, 1*time.Second, "localhost:10250") glog.Infof("\n\nLogging high latency metrics from the 10251 kubelet") From dd949976199b4cb741ef0175353c2601dd9a8c90 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara <justin@fathomdb.com> Date: Tue, 21 Jun 2016 15:22:16 -0400 Subject: [PATCH 088/339] Add comments & misc review fixes Lots of comments describing the heuristics, how it fits together and the limitations. In particular, we can't guarantee correct volume placement if the set of zones is changing between allocating volumes. --- pkg/cloudprovider/providers/aws/aws.go | 5 ++++- pkg/cloudprovider/providers/gce/gce.go | 16 ++++++++++++++++ pkg/volume/plugins.go | 2 +- pkg/volume/util.go | 14 +++++++++++++- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index ee53528e9d..5c1e2a465d 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -919,7 +919,10 @@ func (aws *AWSCloud) List(filter string) ([]string, error) { // getAllZones retrieves a list of all the zones in which nodes are running // It currently involves querying all instances func (c *AWSCloud) getAllZones() (sets.String, error) { - // TODO: Caching, although we currently only use this in volume creation + // We don't currently cache this; it is currently used only in volume + // creation which is expected to be a comparatively rare occurence. + + // TODO: Caching / expose api.Nodes to the cloud provider? // TODO: We could also query for subnets, I think filters := []*ec2.Filter{newEc2Filter("instance-state-name", "running")} diff --git a/pkg/cloudprovider/providers/gce/gce.go b/pkg/cloudprovider/providers/gce/gce.go index a2d3f5c577..da8536342c 100644 --- a/pkg/cloudprovider/providers/gce/gce.go +++ b/pkg/cloudprovider/providers/gce/gce.go @@ -2070,6 +2070,7 @@ func (gce *GCECloud) List(filter string) ([]string, error) { // GetAllZones returns all the zones in which nodes are running func (gce *GCECloud) GetAllZones() (sets.String, error) { + // Fast-path for non-multizone if len(gce.managedZones) == 1 { return sets.NewString(gce.managedZones...), nil } @@ -2084,6 +2085,15 @@ func (gce *GCECloud) GetAllZones() (sets.String, error) { listCall := gce.service.Instances.List(gce.projectID, zone) // No filter: We assume that a zone is either used or unused + // We could only consider running nodes (like we do in List above), + // but probably if instances are starting we still want to consider them. + // I think we should wait until we have a reason to make the + // call one way or the other; we generally can't guarantee correct + // volume spreading if the set of zones is changing + // (and volume spreading is currently only a heuristic). + // Long term we want to replace GetAllZones (which primarily supports volume + // spreading) with a scheduler policy that is able to see the global state of + // volumes and the health of zones. // Just a minimal set of fields - we only care about existence listCall = listCall.Fields("items(name)") @@ -2258,6 +2268,12 @@ func (gce *GCECloud) GetAutoLabelsForPD(name string, zone string) (map[string]st var disk *gceDisk var err error if zone == "" { + // We would like as far as possible to avoid this case, + // because GCE doesn't guarantee that volumes are uniquely named per region, + // just per zone. However, creation of GCE PDs was originally done only + // by name, so we have to continue to support that. + // However, wherever possible the zone should be passed (and it is passed + // for most cases that we can control, e.g. dynamic volume provisioning) disk, err = gce.getDiskByNameUnknownZone(name) if err != nil { return nil, err diff --git a/pkg/volume/plugins.go b/pkg/volume/plugins.go index 70760133f4..6a58b68812 100644 --- a/pkg/volume/plugins.go +++ b/pkg/volume/plugins.go @@ -49,7 +49,7 @@ type VolumeOptions struct { // PV.Name of the appropriate PersistentVolume. Used to generate cloud // volume name. PVName string - // PVC.Name of the PersistentVolumeClaim, if we are auto-provisioning. + // PVC.Name of the PersistentVolumeClaim; only set during dynamic provisioning. PVCName string // Unique name of Kubernetes cluster. ClusterName string diff --git a/pkg/volume/util.go b/pkg/volume/util.go index 40d6c872f8..9c2b352b93 100644 --- a/pkg/volume/util.go +++ b/pkg/volume/util.go @@ -194,6 +194,10 @@ func GenerateVolumeName(clusterName, pvName string, maxLength int) string { } // ChooseZone implements our heuristics for choosing a zone for volume creation based on the volume name +// Volumes are generally round-robin-ed across all active zones, using the hash of the PVC Name. +// However, if the PVCName ends with `-<integer>`, we will hash the prefix, and then add the integer to the hash. +// This means that a PetSet's volumes (`claimname-petsetname-id`) will spread across available zones, +// assuming the id values are consecutive. func ChooseZoneForVolume(zones sets.String, pvcName string) string { // We create the volume in a zone determined by the name // Eventually the scheduler will coordinate placement into an available zone @@ -202,7 +206,7 @@ func ChooseZoneForVolume(zones sets.String, pvcName string) string { if pvcName == "" { // We should always be called with a name; this shouldn't happen - glog.Warningf("No Name defined during volume create; choosing random zone") + glog.Warningf("No name defined during volume create; choosing random zone") hash = rand.Uint32() } else { @@ -230,6 +234,14 @@ func ChooseZoneForVolume(zones sets.String, pvcName string) string { hash = h.Sum32() } + // Zones.List returns zones in a consistent order (sorted) + // We do have a potential failure case where volumes will not be properly spread, + // if the set of zones changes during PetSet volume creation. However, this is + // probably relatively unlikely because we expect the set of zones to be essentially + // static for clusters. + // Hopefully we can address this problem if/when we do full scheduler integration of + // PVC placement (which could also e.g. avoid putting volumes in overloaded or + // unhealthy zones) zoneSlice := zones.List() zone := zoneSlice[(hash+index)%uint32(len(zoneSlice))] From 57201fad36bf731098a38acb5726a29084955506 Mon Sep 17 00:00:00 2001 From: Mike Danese <mikedanese@google.com> Date: Tue, 21 Jun 2016 07:42:53 -0700 Subject: [PATCH 089/339] increase addon check interval --- cluster/addons/addon-manager/Makefile | 2 +- cluster/addons/addon-manager/kube-addons.sh | 2 +- cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml | 6 ++++-- test/e2e/addon_update.go | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cluster/addons/addon-manager/Makefile b/cluster/addons/addon-manager/Makefile index b7cfb23fd3..55a7051983 100644 --- a/cluster/addons/addon-manager/Makefile +++ b/cluster/addons/addon-manager/Makefile @@ -15,7 +15,7 @@ IMAGE=gcr.io/google-containers/kube-addon-manager ARCH?=amd64 TEMP_DIR:=$(shell mktemp -d) -VERSION=v3 +VERSION=v4 # amd64 and arm has "stable" binaries pushed for v1.2, arm64 and ppc64le hasn't so they have to fetch the latest alpha # however, arm64 and ppc64le are very experimental right now, so it's okay diff --git a/cluster/addons/addon-manager/kube-addons.sh b/cluster/addons/addon-manager/kube-addons.sh index c532a1d46b..211b0aa163 100755 --- a/cluster/addons/addon-manager/kube-addons.sh +++ b/cluster/addons/addon-manager/kube-addons.sh @@ -19,7 +19,7 @@ # managed result is of that. Start everything below that directory. KUBECTL=${KUBECTL_BIN:-/usr/local/bin/kubectl} -ADDON_CHECK_INTERVAL_SEC=${TEST_ADDON_CHECK_INTERVAL_SEC:-10} +ADDON_CHECK_INTERVAL_SEC=${TEST_ADDON_CHECK_INTERVAL_SEC:-60} SYSTEM_NAMESPACE=kube-system trusty_master=${TRUSTY_MASTER:-false} diff --git a/cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml b/cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml index d46b988811..8057314f80 100644 --- a/cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml +++ b/cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml @@ -3,12 +3,14 @@ kind: Pod metadata: name: kube-addon-manager namespace: kube-system - version: v1 + labels: + component: kube-addon-manager + version: v4 spec: hostNetwork: true containers: - name: kube-addon-manager - image: gcr.io/google-containers/kube-addon-manager:v1 + image: gcr.io/google-containers/kube-addon-manager:v4 resources: requests: cpu: 5m diff --git a/test/e2e/addon_update.go b/test/e2e/addon_update.go index 60318f3896..c99c20901c 100644 --- a/test/e2e/addon_update.go +++ b/test/e2e/addon_update.go @@ -216,7 +216,7 @@ var _ = framework.KubeDescribe("Addon update", func() { }) // WARNING: the test is not parallel-friendly! - It("should propagate add-on file changes", func() { + It("should propagate add-on file changes [Slow]", func() { // This test requires: // - SSH // - master access From 63d979af9c1587d45f9c2832589bc07ee0076a06 Mon Sep 17 00:00:00 2001 From: Avesh Agarwal <avagarwa@redhat.com> Date: Tue, 21 Jun 2016 15:55:49 -0400 Subject: [PATCH 090/339] Fixes following node e2e test: [k8s.io] Kubelet metrics api when querying /stats/summary [It] it should report resource usage through the stats api And the logs show following error: Jun 21 15:57:13 localhost journal: tee: /test-empty-dir-mnt: Is a directory --- test/e2e_node/kubelet_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e_node/kubelet_test.go b/test/e2e_node/kubelet_test.go index 280fb6c7ad..6a8bed5e99 100644 --- a/test/e2e_node/kubelet_test.go +++ b/test/e2e_node/kubelet_test.go @@ -176,7 +176,7 @@ func createSummaryTestPods(f *framework.Framework, podNamePrefix string, count i createPod(f, podName, []api.Container{ { Image: ImageRegistry[busyBoxImage], - Command: []string{"sh", "-c", "while true; do echo 'hello world' | tee ~/file | tee /test-empty-dir-mnt ; sleep 1; done"}, + Command: []string{"sh", "-c", "while true; do echo 'hello world' | tee /test-empty-dir-mnt/file ; sleep 1; done"}, Name: podName + containerSuffix, VolumeMounts: []api.VolumeMount{ {MountPath: "/test-empty-dir-mnt", Name: volumeNamePrefix}, From 060e69ae92966f36431a57ffac607827b13fe323 Mon Sep 17 00:00:00 2001 From: derekwaynecarr <decarr@redhat.com> Date: Tue, 21 Jun 2016 16:56:07 -0400 Subject: [PATCH 091/339] Fix typo in filename --- .../stats/{volume_stat_caculator.go => volume_stat_calculator.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pkg/kubelet/server/stats/{volume_stat_caculator.go => volume_stat_calculator.go} (100%) diff --git a/pkg/kubelet/server/stats/volume_stat_caculator.go b/pkg/kubelet/server/stats/volume_stat_calculator.go similarity index 100% rename from pkg/kubelet/server/stats/volume_stat_caculator.go rename to pkg/kubelet/server/stats/volume_stat_calculator.go From ca3ee9e5a19f346c7c1e29178d2ca117c93ce8c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= <lucas.kaldstrom@hotmail.co.uk> Date: Wed, 22 Jun 2016 00:48:46 +0300 Subject: [PATCH 092/339] Revert kube-proxy as a DaemonSet in hyperkube for the v1.3 release --- cluster/images/hyperkube/Dockerfile | 6 +++++ cluster/images/hyperkube/Makefile | 4 ++- cluster/images/hyperkube/kube-proxy-ds.yaml | 2 ++ .../hyperkube/static-pods/addon-manager.json | 2 +- .../hyperkube/static-pods/kube-proxy.json | 27 +++++++++++++++++++ 5 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 cluster/images/hyperkube/static-pods/kube-proxy.json diff --git a/cluster/images/hyperkube/Dockerfile b/cluster/images/hyperkube/Dockerfile index 61d3a776de..64e8d1ef73 100644 --- a/cluster/images/hyperkube/Dockerfile +++ b/cluster/images/hyperkube/Dockerfile @@ -43,10 +43,16 @@ COPY static-pods/master.json /etc/kubernetes/manifests/ COPY static-pods/etcd.json /etc/kubernetes/manifests/ COPY static-pods/addon-manager.json /etc/kubernetes/manifests/ +# TODO: Move out kube-proxy to a DaemonSet again +COPY static-pods/kube-proxy.json /etc/kubernetes/manifests/ + # Manifests for the docker-multinode guide COPY static-pods/master-multi.json /etc/kubernetes/manifests-multi/ COPY static-pods/addon-manager.json /etc/kubernetes/manifests-multi/ +# TODO: Move out kube-proxy to a DaemonSet again +COPY static-pods/kube-proxy.json /etc/kubernetes/manifests-multi/ + # Copy over all addons COPY addons /etc/kubernetes/addons diff --git a/cluster/images/hyperkube/Makefile b/cluster/images/hyperkube/Makefile index 77febc779a..94bee1addd 100644 --- a/cluster/images/hyperkube/Makefile +++ b/cluster/images/hyperkube/Makefile @@ -61,7 +61,9 @@ endif cp ../../saltbase/salt/kube-dns/skydns-svc.yaml.base ${TEMP_DIR}/addons/skydns-svc.yaml cp ../../addons/dashboard/dashboard-controller.yaml ${TEMP_DIR}/addons cp ../../addons/dashboard/dashboard-service.yaml ${TEMP_DIR}/addons - cp kube-proxy-ds.yaml ${TEMP_DIR}/addons/kube-proxy.yaml + + # TODO: Move out kube-proxy to a DaemonSet again + #cp kube-proxy-ds.yaml ${TEMP_DIR}/addons/kube-proxy.yaml cp ../../../_output/dockerized/bin/linux/${ARCH}/hyperkube ${TEMP_DIR} cd ${TEMP_DIR} && sed -i.back "s|VERSION|${VERSION}|g" addons/*.yaml static-pods/*.json diff --git a/cluster/images/hyperkube/kube-proxy-ds.yaml b/cluster/images/hyperkube/kube-proxy-ds.yaml index c043b4ce6f..a81504c77e 100644 --- a/cluster/images/hyperkube/kube-proxy-ds.yaml +++ b/cluster/images/hyperkube/kube-proxy-ds.yaml @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# TODO: Move out kube-proxy to a DaemonSet again +# This is disabled for the v1.3 release, due to bootstrapping complexities apiVersion: extensions/v1beta1 kind: DaemonSet metadata: diff --git a/cluster/images/hyperkube/static-pods/addon-manager.json b/cluster/images/hyperkube/static-pods/addon-manager.json index eed276c21d..4d0f0bd687 100644 --- a/cluster/images/hyperkube/static-pods/addon-manager.json +++ b/cluster/images/hyperkube/static-pods/addon-manager.json @@ -11,7 +11,7 @@ "containers": [ { "name": "kube-addon-manager", - "image": "gcr.io/google-containers/kube-addon-manager-ARCH:v3", + "image": "gcr.io/google-containers/kube-addon-manager-ARCH:v4", "resources": { "requests": { "cpu": "5m", diff --git a/cluster/images/hyperkube/static-pods/kube-proxy.json b/cluster/images/hyperkube/static-pods/kube-proxy.json new file mode 100644 index 0000000000..b005433b86 --- /dev/null +++ b/cluster/images/hyperkube/static-pods/kube-proxy.json @@ -0,0 +1,27 @@ +{ + "apiVersion": "v1", + "kind": "Pod", + "metadata": { + "name": "k8s-proxy", + "namespace": "kube-system" + }, + "spec": { + "hostNetwork": true, + "containers": [ + { + "name": "kube-proxy", + "image": "gcr.io/google_containers/hyperkube-ARCH:VERSION", + "command": [ + "/hyperkube", + "proxy", + "--master=http://127.0.0.1:8080", + "--v=2", + "--resource-container=\"\"" + ], + "securityContext": { + "privileged": true + } + } + ] + } +} From 15a44e4243737e361f2b99d4ddbfffbe23e18465 Mon Sep 17 00:00:00 2001 From: Fabio Yeon <fabioy@google.com> Date: Tue, 21 Jun 2016 14:10:09 -0700 Subject: [PATCH 093/339] Fix NODE_INSTANCE_GROUPS resolution in GKE to only include single cluster groups. Add NODE_INSTANCE_GROUPS_URLS for multi-zone groups. --- cluster/gke/util.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cluster/gke/util.sh b/cluster/gke/util.sh index ae7064d1c1..cf3bad41f5 100755 --- a/cluster/gke/util.sh +++ b/cluster/gke/util.sh @@ -293,8 +293,10 @@ function detect-node-names { # Detect instance group name generated by gke. # -# Note that this will only select instance groups in the same zone as the -# cluster, meaning that it won't include all groups in a multi-zone cluster. +# Note that the NODE_INSTANCE_GROUPS var will only have instance groups in the +# same zone as the cluster, meaning that it won't include all groups in a +# multi-zone cluster. The ALL_INSTANCE_GROUP_URLS will contain all the +# instance group URLs, which include multi-zone groups. # # Assumed vars: # GCLOUD @@ -303,15 +305,20 @@ function detect-node-names { # CLUSTER_NAME # Vars set: # NODE_INSTANCE_GROUPS +# ALL_INSTANCE_GROUP_URLS function detect-node-instance-groups { echo "... in gke:detect-node-instance-groups()" >&2 local urls=$("${GCLOUD}" ${CMD_GROUP:-} container clusters describe \ --project="${PROJECT}" --zone="${ZONE}" \ --format='value(instanceGroupUrls)' "${CLUSTER_NAME}") urls=(${urls//;/ }) + ALL_INSTANCE_GROUP_URLS=${urls[*]} NODE_INSTANCE_GROUPS=() for url in "${urls[@]:-}"; do - NODE_INSTANCE_GROUPS+=("${url##*/}") + local igm_zone=$(expr match ${url} '.*/zones/\([a-z0-9-]*\)/') + if [[ "${igm_zone}" == "${ZONE}" ]]; then + NODE_INSTANCE_GROUPS+=("${url##*/}") + fi done } From 53805caa6009b60b91fa00114b07724a1c8d3293 Mon Sep 17 00:00:00 2001 From: Davide Agnello <dagnello@hp.com> Date: Tue, 21 Jun 2016 15:23:20 -0700 Subject: [PATCH 094/339] Removing name field from Member for compatibility with OpenStack Liberty In OpenStack Mitaka, the name field for members was added as an optional field but does not exist in Liberty. Therefore the current implementation for lbaas v2 will not work in Liberty. --- pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go b/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go index 1cbb44e6f2..90f345a8ae 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go +++ b/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go @@ -394,7 +394,6 @@ func (lbaas *LbaasV2) EnsureLoadBalancer(apiService *api.Service, hosts []string waitLoadbalancerActiveProvisioningStatus(lbaas.network, loadbalancer.ID) _, err = v2_pools.CreateAssociateMember(lbaas.network, pool.ID, v2_pools.MemberCreateOpts{ - Name: name, ProtocolPort: int(ports[0].NodePort), //TODO: need to handle multi-port Address: addr, SubnetID: lbaas.opts.SubnetId, From ab4a65c10a526356c7e3ff0326b55556e99a43df Mon Sep 17 00:00:00 2001 From: Joe Finney <spxtr@google.com> Date: Tue, 21 Jun 2016 15:58:34 -0700 Subject: [PATCH 095/339] Remove all traces of travis. --- .travis.yml | 5 ----- docs/devel/pull-requests.md | 2 +- hack/lib/golang.sh | 19 +++++++------------ hack/test-cmd.sh | 2 +- 4 files changed, 9 insertions(+), 19 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b9cd664458..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: bash - -script: - - echo "Travis is disabled on master. See issue 23611." - - echo "https://github.com/kubernetes/kubernetes/issues/23611" diff --git a/docs/devel/pull-requests.md b/docs/devel/pull-requests.md index f45e9b4041..e31dc94765 100644 --- a/docs/devel/pull-requests.md +++ b/docs/devel/pull-requests.md @@ -60,7 +60,7 @@ Either the [on call](on-call-rotations.md) manually or the [github "munger"](htt There are several requirements for the submit-queue to work: * Author must have signed CLA ("cla: yes" label added to PR) * No changes can be made since last lgtm label was applied -* k8s-bot must have reported the GCE E2E build and test steps passed (Travis, Jenkins unit/integration, Jenkins e2e) +* k8s-bot must have reported the GCE E2E build and test steps passed (Jenkins unit/integration, Jenkins e2e) Additionally, for infrequent or new contributors, we require the on call to apply the "ok-to-merge" label manually. This is gated by the [whitelist](https://github.com/kubernetes/contrib/blob/master/mungegithub/whitelist.txt). diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index fbbf34b4de..07ec266113 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -300,26 +300,21 @@ EOF return 2 fi - # Travis continuous build uses a head go release that doesn't report - # a version number, so we skip this check on Travis. It's unnecessary - # there anyway. - if [[ "${TRAVIS:-}" != "true" ]]; then - local go_version - go_version=($(go version)) - if [[ "${go_version[2]}" < "go1.6" && "${go_version[2]}" != "devel" ]]; then - kube::log::usage_from_stdin <<EOF + local go_version + go_version=($(go version)) + if [[ "${go_version[2]}" < "go1.6" && "${go_version[2]}" != "devel" ]]; then + kube::log::usage_from_stdin <<EOF Detected go version: ${go_version[*]}. Kubernetes requires go version 1.6 or greater. Please install Go version 1.6 or later. EOF - return 2 - fi + return 2 fi } # kube::golang::setup_env will check that the `go` commands is available in -# ${PATH}. If not running on Travis, it will also check that the Go version is -# good enough for the Kubernetes build. +# ${PATH}. It will also check that the Go version is good enough for the +# Kubernetes build. # # Inputs: # KUBE_EXTRA_GOPATH - If set, this is included in created GOPATH diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 78ae3843d0..0253b6e706 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -15,7 +15,7 @@ # limitations under the License. # This command checks that the built commands can function together for -# simple scenarios. It does not require Docker so it can run in travis. +# simple scenarios. It does not require Docker. set -o errexit set -o nounset From 5bacc4830e447a1a42d8f2d157fcf4792c1dd3dd Mon Sep 17 00:00:00 2001 From: Colin Hom <colin.hom@coreos.com> Date: Fri, 17 Jun 2016 11:46:42 -0700 Subject: [PATCH 096/339] Federation e2e supports aws --- cluster/aws/util.sh | 2 +- federation/cluster/common.sh | 24 +++++++++++++++++++ .../federation-apiserver-deployment.yaml | 4 ++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index 0c2c3fc124..b68dc76868 100755 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -1491,7 +1491,7 @@ function test-build-release { # Assumed vars: # Variables from config.sh function test-setup { - "${KUBE_ROOT}/cluster/kube-up.sh" + . "${KUBE_ROOT}/cluster/kube-up.sh" VPC_ID=$(get_vpc_id) detect-security-groups diff --git a/federation/cluster/common.sh b/federation/cluster/common.sh index 7955dd6581..3f628291be 100644 --- a/federation/cluster/common.sh +++ b/federation/cluster/common.sh @@ -135,6 +135,30 @@ function create-federation-api-objects { fi sleep 5 done + + # Poll until DNS record for federation-apiserver is propagated + # TODO(colhom): REQUIREMENT for any other providers which use a DNS name for routing to loadbalancers + # right now it's just AWS that does this. + which nslookup + set +o errexit + if [[ "$KUBERNETES_PROVIDER" == "aws" ]];then + for i in {1..60};do + echo "attempting to nslookup ${FEDERATION_API_HOST} ($i / 60)" + nslookup "${FEDERATION_API_HOST}" + if [[ $? -eq 0 ]];then + echo "Lookup for ${FEDERATION_API_HOST} successful!" + break + fi + sleep 10 + done + + if [[ $i -eq 60 ]];then + echo "Failed to resolve A record for ${FEDERATION_API_HOST}. Will exit" + exit 1 + fi + fi + set -o errexit + KUBE_MASTER_IP="${FEDERATION_API_HOST}:443" else echo "provider ${KUBERNETES_PROVIDER} is not (yet) supported for e2e testing" diff --git a/federation/manifests/federation-apiserver-deployment.yaml b/federation/manifests/federation-apiserver-deployment.yaml index 5656298b69..7c4bd6ee19 100644 --- a/federation/manifests/federation-apiserver-deployment.yaml +++ b/federation/manifests/federation-apiserver-deployment.yaml @@ -22,7 +22,11 @@ spec: - --etcd-servers=http://localhost:2379 - --service-cluster-ip-range={{.FEDERATION_SERVICE_CIDR}} - --secure-port=443 + {{if eq .KUBERNETES_PROVIDER "aws"}} + - --external-hostname={{.FEDERATION_API_HOST}} + {{else}} - --advertise-address={{.FEDERATION_API_HOST}} + {{end}} # TODO: --admission-control values must be set when support is added for each type of control. - --token-auth-file=/srv/kubernetes/known-tokens.csv ports: From 37ce95e107e17ffab5cfef2f0b80f6c632d3d964 Mon Sep 17 00:00:00 2001 From: Quinton Hoole <quinton@google.com> Date: Tue, 21 Jun 2016 16:11:27 -0700 Subject: [PATCH 097/339] Add unit test for zone addition to all dnsproviders. Fixes #27785 --- federation/pkg/dnsprovider/dns.go | 2 + .../providers/aws/route53/route53_test.go | 43 ++++++++++++++--- .../providers/aws/route53/stubs/route53api.go | 12 +++++ .../providers/aws/route53/zones.go | 12 ++++- .../google/clouddns/clouddns_test.go | 46 +++++++++++++++---- .../internal/managed_zones_delete_call.go | 2 +- .../internal/managed_zones_service.go | 7 ++- .../providers/google/clouddns/zones.go | 7 +++ 8 files changed, 112 insertions(+), 19 deletions(-) diff --git a/federation/pkg/dnsprovider/dns.go b/federation/pkg/dnsprovider/dns.go index 787367599a..f100133081 100644 --- a/federation/pkg/dnsprovider/dns.go +++ b/federation/pkg/dnsprovider/dns.go @@ -29,6 +29,8 @@ type Zones interface { List() ([]Zone, error) // Add creates and returns a new managed zone, or an error if the operation failed Add(Zone) (Zone, error) + // Remove deletes a managed zone, or returns an error if the operation failed. + Remove(Zone) error // New allocates a new Zone, which can then be passed to Add() // Arguments are as per the Zone interface below. New(name string) (Zone, error) diff --git a/federation/pkg/dnsprovider/providers/aws/route53/route53_test.go b/federation/pkg/dnsprovider/providers/aws/route53/route53_test.go index 0fc61d1caf..180d7cc45b 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/route53_test.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/route53_test.go @@ -32,7 +32,7 @@ import ( func newTestInterface() (dnsprovider.Interface, error) { // Use this to test the real cloud service. - // i, err := dnsprovider.GetDnsProvider(ProviderName, strings.NewReader("\n[global]\nproject-id = federation0-cluster00")) + // return dnsprovider.GetDnsProvider(ProviderName, strings.NewReader("\n[global]\nproject-id = federation0-cluster00")) return newFakeInterface() // Use this to stub out the entire cloud service } @@ -68,16 +68,23 @@ func TestMain(m *testing.M) { os.Exit(m.Run()) } +// zones returns the zones interface for the configured dns provider account/project, +// or fails if it can't be found +func zones(t *testing.T) dnsprovider.Zones { + zonesInterface, supported := interface_.Zones() + if !supported { + t.Fatalf("Zones interface not supported by interface %v", interface_) + } else { + t.Logf("Got zones %v\n", zonesInterface) + } + return zonesInterface +} + // firstZone returns the first zone for the configured dns provider account/project, // or fails if it can't be found func firstZone(t *testing.T) dnsprovider.Zone { t.Logf("Getting zones") - z, supported := interface_.Zones() - if supported { - t.Logf("Got zones %v\n", z) - } else { - t.Fatalf("Zones interface not supported by interface %v", interface_) - } + z := zones(t) zones, err := z.List() if err != nil { t.Fatalf("Failed to list zones: %v", err) @@ -139,6 +146,28 @@ func TestZonesList(t *testing.T) { firstZone(t) } +/* TestZoneAddSuccess verifies that addition of a valid managed DNS zone succeeds */ +func TestZoneAddSuccess(t *testing.T) { + testZoneName := "ubernetes.testing" + z := zones(t) + input, err := z.New(testZoneName) + if err != nil { + t.Errorf("Failed to allocate new zone object %s: %v", testZoneName, err) + } + zone, err := z.Add(input) + if err != nil { + t.Errorf("Failed to create new managed DNS zone %s: %v", testZoneName, err) + } + defer func(zone dnsprovider.Zone) { + if zone != nil { + if err := z.Remove(zone); err != nil { + t.Errorf("Failed to delete zone %v: %v", zone, err) + } + } + }(zone) + t.Logf("Successfully added managed DNS zone: %v", zone) +} + /* TestResourceRecordSetsList verifies that listing of RRS's succeeds */ func TestResourceRecordSetsList(t *testing.T) { listRrsOrFail(t, rrs(t, firstZone(t))) diff --git a/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go b/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go index 879c72b014..0869b3de23 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go @@ -31,6 +31,7 @@ type Route53API interface { ChangeResourceRecordSets(*route53.ChangeResourceRecordSetsInput) (*route53.ChangeResourceRecordSetsOutput, error) ListHostedZones(*route53.ListHostedZonesInput) (*route53.ListHostedZonesOutput, error) CreateHostedZone(*route53.CreateHostedZoneInput) (*route53.CreateHostedZoneOutput, error) + DeleteHostedZone(*route53.DeleteHostedZoneInput) (*route53.DeleteHostedZoneOutput, error) } // Route53APIStub is a minimal implementation of Route53API, used primarily for unit testing. @@ -110,3 +111,14 @@ func (r *Route53APIStub) CreateHostedZone(input *route53.CreateHostedZoneInput) } return &route53.CreateHostedZoneOutput{HostedZone: r.zones[*input.Name]}, nil } + +func (r *Route53APIStub) DeleteHostedZone(input *route53.DeleteHostedZoneInput) (*route53.DeleteHostedZoneOutput, error) { + if _, ok := r.zones[*input.Id]; !ok { + return nil, fmt.Errorf("Error deleting hosted DNS zone: %s does not exist", *input.Id) + } + if len(r.recordSets[*input.Id]) > 0 { + return nil, fmt.Errorf("Error deleting hosted DNS zone: %s has resource records", *input.Id) + } + delete(r.zones, *input.Id) + return &route53.DeleteHostedZoneOutput{}, nil +} diff --git a/federation/pkg/dnsprovider/providers/aws/route53/zones.go b/federation/pkg/dnsprovider/providers/aws/route53/zones.go index e836e5406e..3b40bc1408 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/zones.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/zones.go @@ -48,7 +48,8 @@ func (zones Zones) List() ([]dnsprovider.Zone, error) { func (zones Zones) Add(zone dnsprovider.Zone) (dnsprovider.Zone, error) { dnsName := zone.Name() - input := route53.CreateHostedZoneInput{Name: &dnsName} + callerReference := string(util.NewUUID()) + input := route53.CreateHostedZoneInput{Name: &dnsName, CallerReference: &callerReference} output, err := zones.interface_.service.CreateHostedZone(&input) if err != nil { return nil, err @@ -56,6 +57,15 @@ func (zones Zones) Add(zone dnsprovider.Zone) (dnsprovider.Zone, error) { return &Zone{output.HostedZone, &zones}, nil } +func (zones Zones) Remove(zone dnsprovider.Zone) error { + zoneId := zone.(*Zone).impl.Id + input := route53.DeleteHostedZoneInput{Id: zoneId} + _, err := zones.interface_.service.DeleteHostedZone(&input) + if err != nil { + return err + } + return nil +} func (zones Zones) New(name string) (dnsprovider.Zone, error) { id := string(util.NewUUID()) managedZone := route53.HostedZone{Id: &id, Name: &name} diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/clouddns_test.go b/federation/pkg/dnsprovider/providers/google/clouddns/clouddns_test.go index bf41d79204..9d0b06e5fb 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/clouddns_test.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/clouddns_test.go @@ -29,7 +29,7 @@ import ( func newTestInterface() (dnsprovider.Interface, error) { // Use this to test the real cloud service - insert appropriate project-id. Default token source will be used. See // https://github.com/golang/oauth2/blob/master/google/default.go for details. - // i, err := dnsprovider.GetDnsProvider(ProviderName, strings.NewReader("\n[global]\nproject-id = federation0-cluster00")) + // return dnsprovider.GetDnsProvider(ProviderName, strings.NewReader("\n[global]\nproject-id = federation0-cluster00")) return NewFakeInterface() // Use this to stub out the entire cloud service } @@ -46,17 +46,23 @@ func TestMain(m *testing.M) { os.Exit(m.Run()) } +// zones returns the zones interface for the configured dns provider account/project, +// or fails if it can't be found +func zones(t *testing.T) dnsprovider.Zones { + zonesInterface, supported := interface_.Zones() + if !supported { + t.Fatalf("Zones interface not supported by interface %v", interface_) + } else { + t.Logf("Got zones %v\n", zonesInterface) + } + return zonesInterface +} + // firstZone returns the first zone for the configured dns provider account/project, // or fails if it can't be found func firstZone(t *testing.T) dnsprovider.Zone { t.Logf("Getting zones") - z, supported := interface_.Zones() - if supported { - t.Logf("Got zones %v\n", z) - } else { - t.Fatalf("Zones interface not supported by interface %v", interface_) - } - zones, err := z.List() + zones, err := zones(t).List() if err != nil { t.Fatalf("Failed to list zones: %v", err) } else { @@ -117,6 +123,30 @@ func TestZonesList(t *testing.T) { firstZone(t) } +/* TestZoneAddSuccess verifies that addition of a valid managed DNS zone succeeds */ +func TestZoneAddSuccess(t *testing.T) { + testZoneName := "ubernetesv2.test." + t.Logf("Getting zones") + z := zones(t) + t.Logf("Got zones, making new Zone") + input, err := z.New(testZoneName) + if err != nil { + t.Errorf("Failed to allocate new zone object %s: %v", testZoneName, err) + } + zone, err := z.Add(input) + if err != nil { + t.Errorf("Failed to create new managed DNS zone %s: %v", testZoneName, err) + } + defer func(zone dnsprovider.Zone) { + if zone != nil { + if err := z.Remove(zone); err != nil { + t.Errorf("Failed to delete zone %v: %v", zone, err) + } + } + }(zone) + t.Logf("Successfully added managed DNS zone: %v", zone) +} + /* TestResourceRecordSetsList verifies that listing of RRS's succeeds */ func TestResourceRecordSetsList(t *testing.T) { listRrsOrFail(t, rrs(t, firstZone(t))) diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_delete_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_delete_call.go index 6fe25343ab..157ade0435 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_delete_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_delete_call.go @@ -28,5 +28,5 @@ var _ interfaces.ManagedZonesDeleteCall = ManagedZonesDeleteCall{} type ManagedZonesDeleteCall struct{ impl *dns.ManagedZonesDeleteCall } func (call ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error { - return call.Do(opts...) + return call.impl.Do(opts...) } diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_service.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_service.go index 62d2587df9..9862078618 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_service.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_service.go @@ -17,6 +17,8 @@ limitations under the License. package internal import ( + "strings" + dns "google.golang.org/api/dns/v1" "k8s.io/kubernetes/federation/pkg/dnsprovider/providers/google/clouddns/internal/interfaces" "k8s.io/kubernetes/pkg/util" @@ -28,7 +30,7 @@ var _ interfaces.ManagedZonesService = &ManagedZonesService{} type ManagedZonesService struct{ impl *dns.ManagedZonesService } func (m *ManagedZonesService) Create(project string, managedzone interfaces.ManagedZone) interfaces.ManagedZonesCreateCall { - return &ManagedZonesCreateCall{m.impl.Create(project, managedzone.(ManagedZone).impl)} + return &ManagedZonesCreateCall{m.impl.Create(project, managedzone.(*ManagedZone).impl)} } func (m *ManagedZonesService) Delete(project, managedZone string) interfaces.ManagedZonesDeleteCall { @@ -44,5 +46,6 @@ func (m *ManagedZonesService) List(project string) interfaces.ManagedZonesListCa } func (m *ManagedZonesService) NewManagedZone(dnsName string) interfaces.ManagedZone { - return &ManagedZone{impl: &dns.ManagedZone{Name: string(util.NewUUID()), DnsName: dnsName}} + name := "x" + strings.Replace(string(util.NewUUID()), "-", "", -1)[0:30] // Unique name, strip out the "-" chars to shorten it, start with a lower case alpha, and truncate to Cloud DNS 32 character limit + return &ManagedZone{impl: &dns.ManagedZone{Name: name, Description: "Kubernetes Federated Service", DnsName: dnsName}} } diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/zones.go b/federation/pkg/dnsprovider/providers/google/clouddns/zones.go index 2cd7f21fe4..4018037daa 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/zones.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/zones.go @@ -51,6 +51,13 @@ func (zones Zones) Add(zone dnsprovider.Zone) (dnsprovider.Zone, error) { return &Zone{response, &zones}, nil } +func (zones Zones) Remove(zone dnsprovider.Zone) error { + if err := zones.impl.Delete(zones.project(), zone.(*Zone).impl.Name()).Do(); err != nil { + return err + } + return nil +} + func (zones Zones) New(name string) (dnsprovider.Zone, error) { managedZone := zones.impl.NewManagedZone(name) return &Zone{managedZone, &zones}, nil From 49fe9d1b413ed396aa1c755a45002f46a88b2721 Mon Sep 17 00:00:00 2001 From: Harry Zhang <harryzhang@zju.edu.cn> Date: Tue, 21 Jun 2016 22:23:37 -0400 Subject: [PATCH 098/339] Add unit test to ensure no error thrown --- plugin/pkg/admission/antiaffinity/admission_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugin/pkg/admission/antiaffinity/admission_test.go b/plugin/pkg/admission/antiaffinity/admission_test.go index bded0340b6..3073d6d81c 100644 --- a/plugin/pkg/admission/antiaffinity/admission_test.go +++ b/plugin/pkg/admission/antiaffinity/admission_test.go @@ -200,6 +200,16 @@ func TestInterPodAffinityAdmission(t *testing.T) { }, errorExpected: true, }, + { + affinity: map[string]string{ + api.AffinityAnnotationKey: ` + {"podAntiAffinity": { + "thisIsAInvalidAffinity": [{} + }}`, + }, + // however, we should not got error here + errorExpected: false, + }, } for _, test := range tests { pod.ObjectMeta.Annotations = test.affinity From 669bf0773f59d5512097d092d3d14517726df44e Mon Sep 17 00:00:00 2001 From: mfanjie <fmeng@ebay.com> Date: Tue, 21 Jun 2016 09:33:09 +0800 Subject: [PATCH 099/339] add kubernetes service back when it is deleted in kubernetes cluster --- .../federation-controller/service/service_helper.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/federation/pkg/federation-controller/service/service_helper.go b/federation/pkg/federation-controller/service/service_helper.go index f6c38e7934..acf687c28f 100644 --- a/federation/pkg/federation-controller/service/service_helper.go +++ b/federation/pkg/federation-controller/service/service_helper.go @@ -68,7 +68,7 @@ func (cc *clusterClientCache) syncService(key, clusterName string, clusterCache clusterCache.serviceQueue.Add(key) return err } - var needUpdate bool + var needUpdate, isDeletion bool if exists { service, ok := serviceInterface.(*v1.Service) if ok { @@ -81,10 +81,12 @@ func (cc *clusterClientCache) syncService(key, clusterName string, clusterCache } glog.Infof("Found tombstone for %v", key) needUpdate = cc.processServiceDeletion(cachedService, clusterName) + isDeletion = true } } else { glog.Infof("Can not get service %v for cluster %s from serviceStore", key, clusterName) needUpdate = cc.processServiceDeletion(cachedService, clusterName) + isDeletion = true } if needUpdate { @@ -108,6 +110,15 @@ func (cc *clusterClientCache) syncService(key, clusterName string, clusterCache } } } + if isDeletion { + // cachedService is not reliable here as + // deleting cache is the last step of federation service deletion + _, err := fedClient.Core().Services(cachedService.lastState.Namespace).Get(cachedService.lastState.Name) + // rebuild service if federation service still exists + if err == nil || !errors.IsNotFound(err) { + return sc.ensureClusterService(cachedService, clusterName, cachedService.appliedState, clusterCache.clientset) + } + } return nil } From f9d1737299c8b84a90ca5d66d4f420e61a81a0c2 Mon Sep 17 00:00:00 2001 From: Zach Loafman <zml@google.com> Date: Tue, 21 Jun 2016 22:58:48 -0700 Subject: [PATCH 100/339] Copy and display source location prominently on Kubernetes instances Following from #27830, this copies the source onto the instance and displays the location of it prominently (keeping the download link for anyone that just wants to curl it). Example output (this tag doesn't exist yet): --- Welcome to Kubernetes v1.4.0! You can find documentation for Kubernetes at: http://docs.kubernetes.io/ The source for this release can be found at: /usr/local/share/doc/kubernetes/kubernetes-src.tar.gz Or you can download it at: https://storage.googleapis.com/kubernetes-release/release/v1.4.0/kubernetes-src.tar.gz It is based on the Kubernetes source at: https://github.com/kubernetes/kubernetes/tree/v1.4.0 For Kubernetes copyright and licensing information, see: /usr/local/share/doc/kubernetes/LICENSES --- --- cluster/gce/configure-vm.sh | 4 +++- cluster/gce/gci/configure-helper.sh | 4 +++- cluster/gce/gci/configure.sh | 3 +++ cluster/saltbase/install.sh | 1 + cluster/saltbase/salt/base.sls | 7 +++++++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index cca579d2e6..b774e18cbd 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -106,7 +106,9 @@ Welcome to Kubernetes ${version}! You can find documentation for Kubernetes at: http://docs.kubernetes.io/ -You can download the build image for this release at: +The source for this release can be found at: + /usr/local/share/doc/kubernetes/kubernetes-src.tar.gz +Or you can download it at: https://storage.googleapis.com/kubernetes-release/release/${version}/kubernetes-src.tar.gz It is based on the Kubernetes source at: diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 177e097590..bfbde3b25a 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -910,7 +910,9 @@ Welcome to Kubernetes ${version}! You can find documentation for Kubernetes at: http://docs.kubernetes.io/ -You can download the build image for this release at: +The source for this release can be found at: + /home/kubernetes/kubernetes-src.tar.gz +Or you can download it at: https://storage.googleapis.com/kubernetes-release/release/${version}/kubernetes-src.tar.gz It is based on the Kubernetes source at: diff --git a/cluster/gce/gci/configure.sh b/cluster/gce/gci/configure.sh index 1b10d05e20..36184f5b2f 100644 --- a/cluster/gce/gci/configure.sh +++ b/cluster/gce/gci/configure.sh @@ -158,6 +158,9 @@ function install-kube-binary-config { fi cp "${KUBE_HOME}/kubernetes/LICENSES" "${KUBE_HOME}" + cp "${KUBE_HOME}/kubernetes/kubernetes-src.tar.gz" "${KUBE_HOME}" + chmod a+r "${KUBE_HOME}/kubernetes/LICENSES" + chmod a+r "${KUBE_HOME}/kubernetes/kubernetes-src.tar.gz" # Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/. dst_dir="${KUBE_HOME}/kube-manifests" diff --git a/cluster/saltbase/install.sh b/cluster/saltbase/install.sh index 5a3f5e29f9..b01841274c 100755 --- a/cluster/saltbase/install.sh +++ b/cluster/saltbase/install.sh @@ -68,6 +68,7 @@ mkdir -p /srv/salt-new/salt/kube-bins mkdir -p /srv/salt-new/salt/kube-docs cp -v "${KUBE_TEMP}/kubernetes/server/bin/"* /srv/salt-new/salt/kube-bins/ cp -v "${KUBE_TEMP}/kubernetes/LICENSES" /srv/salt-new/salt/kube-docs/ +cp -v "${KUBE_TEMP}/kubernetes/kubernetes-src.tar.gz" /srv/salt-new/salt/kube-docs/ kube_bin_dir="/srv/salt-new/salt/kube-bins"; docker_images_sls_file="/srv/salt-new/pillar/docker-images.sls"; diff --git a/cluster/saltbase/salt/base.sls b/cluster/saltbase/salt/base.sls index a11542d22d..80ea7f3f5c 100644 --- a/cluster/saltbase/salt/base.sls +++ b/cluster/saltbase/salt/base.sls @@ -50,3 +50,10 @@ net.ipv4.neigh.default.gc_thresh1: - user: root - group: root - mode: 644 + +/usr/local/share/doc/kubernetes/kubernetes-src.tar.gz: + file.managed: + - source: salt://kube-docs/kubernetes-src.tar.gz + - user: root + - group: root + - mode: 644 From 57141a66766432eddc822957e02c3860d6a28a6b Mon Sep 17 00:00:00 2001 From: David Oppenheimer <davidopp@google.com> Date: Wed, 22 Jun 2016 00:11:05 -0700 Subject: [PATCH 101/339] Small fix to #27838 --- test/e2e/scheduler_predicates.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/scheduler_predicates.go b/test/e2e/scheduler_predicates.go index e9700b53d1..a071cac061 100644 --- a/test/e2e/scheduler_predicates.go +++ b/test/e2e/scheduler_predicates.go @@ -137,7 +137,7 @@ func removeLabelOffNode(c *client.Client, nodeName string, labelKey string) { framework.ExpectNoError(err) By("verifying the node doesn't have the label " + labelKey) - if nodeUpdated.Labels == nil || len(nodeUpdated.Labels[labelKey]) != 0 { + if nodeUpdated.Labels != nil && len(nodeUpdated.Labels[labelKey]) != 0 { framework.Failf("Failed removing label " + labelKey + " of the node " + nodeName) } } From c59de79d5fd0f096eec6b6c38a623cd0dc99bbb8 Mon Sep 17 00:00:00 2001 From: nikhiljindal <nikhiljindal@google.com> Date: Tue, 21 Jun 2016 16:58:58 -0700 Subject: [PATCH 102/339] Adding retries to fetching secret in controller manager --- .../util/cluster_util.go | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/federation/pkg/federation-controller/util/cluster_util.go b/federation/pkg/federation-controller/util/cluster_util.go index a92c3a829b..5105fa5387 100644 --- a/federation/pkg/federation-controller/util/cluster_util.go +++ b/federation/pkg/federation-controller/util/cluster_util.go @@ -18,21 +18,26 @@ package util import ( "fmt" + "net" + "os" + "time" + "github.com/golang/glog" federation_v1alpha1 "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api" utilnet "k8s.io/kubernetes/pkg/util/net" - "net" - "os" + "k8s.io/kubernetes/pkg/util/wait" ) const ( KubeAPIQPS = 20.0 KubeAPIBurst = 30 KubeconfigSecretDataKey = "kubeconfig" + getSecretTimeout = 1 * time.Minute ) func BuildClusterConfig(c *federation_v1alpha1.Cluster) (*restclient.Config, error) { @@ -101,9 +106,20 @@ var KubeconfigGetterForSecret = func(secretName string) clientcmd.KubeconfigGett return nil, fmt.Errorf("error in creating in-cluster client: %s", err) } data = []byte{} - secret, err := client.Secrets(namespace).Get(secretName) + var secret *api.Secret + err = wait.PollImmediate(1*time.Second, getSecretTimeout, func() (bool, error) { + secret, err = client.Secrets(namespace).Get(secretName) + if err == nil { + return true, nil + } + glog.Warningf("error in fetching secret: %s", err) + return false, nil + }) if err != nil { - return nil, fmt.Errorf("error in fetching secret: %s", err) + return nil, fmt.Errorf("timed out waiting for secret: %s", err) + } + if secret == nil { + return nil, fmt.Errorf("unexpected: received null secret %s", secretName) } ok := false data, ok = secret.Data[KubeconfigSecretDataKey] From 5875397a3f8e8d11107bfe58bc1347f0eea7f31c Mon Sep 17 00:00:00 2001 From: nikhiljindal <nikhiljindal@google.com> Date: Wed, 22 Jun 2016 01:28:02 -0700 Subject: [PATCH 103/339] Initialising nodesStore in KubeDNS --- pkg/dns/dns.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/dns/dns.go b/pkg/dns/dns.go index 467c736017..4cdfc67715 100644 --- a/pkg/dns/dns.go +++ b/pkg/dns/dns.go @@ -125,6 +125,7 @@ func NewKubeDNS(client clientset.Interface, domain string, federations map[strin domain: domain, cache: NewTreeCache(), cacheLock: sync.RWMutex{}, + nodesStore: kcache.NewStore(kcache.MetaNamespaceKeyFunc), reverseRecordMap: make(map[string]*skymsg.Service), domainPath: reverseArray(strings.Split(strings.TrimRight(domain, "."), ".")), federations: federations, From e029f9523b3148a298784b07c75e16cb5a5a45f2 Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski <wojtekt@google.com> Date: Tue, 21 Jun 2016 15:16:24 +0200 Subject: [PATCH 104/339] Fix not-ready master node after upgrade. --- cluster/gce/upgrade.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cluster/gce/upgrade.sh b/cluster/gce/upgrade.sh index e5fd89b25b..9f4746ca8c 100755 --- a/cluster/gce/upgrade.sh +++ b/cluster/gce/upgrade.sh @@ -74,6 +74,7 @@ function upgrade-master() { get-kubeconfig-bearertoken detect-master + parse-master-env # Delete the master instance. Note that the master-pd is created # with auto-delete=no, so it should not be deleted. @@ -120,7 +121,6 @@ function prepare-upgrade() { tars_from_version } - # Reads kube-env metadata from first node in NODE_NAMES. # # Assumed vars: @@ -134,15 +134,6 @@ function get-node-env() { 'http://metadata/computeMetadata/v1/instance/attributes/kube-env'" 2>/dev/null } -# Using provided node env, extracts value from provided key. -# -# Args: -# $1 node env (kube-env of node; result of calling get-node-env) -# $2 env key to use -function get-env-val() { - echo "${1}" | grep ${2} | cut -d : -f 2 | cut -d \' -f 2 -} - # Assumed vars: # KUBE_VERSION # NODE_SCOPES From 773ac20880b10cb4bb3eeb35e7552310805dd8e4 Mon Sep 17 00:00:00 2001 From: saadali <saadali@google.com> Date: Tue, 21 Jun 2016 21:47:52 -0700 Subject: [PATCH 105/339] Prevent detach before node status update --- .../volume/reconciler/reconciler.go | 19 ++++- .../volume/reconciler/reconciler_test.go | 81 ++++++++++++++++--- .../statusupdater/fake_node_status_updater.go | 39 +++++++++ 3 files changed, 123 insertions(+), 16 deletions(-) create mode 100644 pkg/controller/volume/statusupdater/fake_node_status_updater.go diff --git a/pkg/controller/volume/reconciler/reconciler.go b/pkg/controller/volume/reconciler/reconciler.go index efb9e9ad08..b948ee259b 100644 --- a/pkg/controller/volume/reconciler/reconciler.go +++ b/pkg/controller/volume/reconciler/reconciler.go @@ -92,6 +92,21 @@ func (rc *reconciler) reconciliationLoopFunc() func() { if !rc.desiredStateOfWorld.VolumeExists( attachedVolume.VolumeName, attachedVolume.NodeName) { // Volume exists in actual state of world but not desired + + // Mark desire to detach + timeElapsed, err := rc.actualStateOfWorld.MarkDesireToDetach(attachedVolume.VolumeName, attachedVolume.NodeName) + if err != nil { + glog.Errorf("Unexpected error actualStateOfWorld.MarkDesireToDetach(): %v", err) + } + + // Update Node Status to indicate volume is no longer safe to mount. + err = rc.nodeStatusUpdater.UpdateNodeStatuses() + if err != nil { + // Skip detaching this volume if unable to update node status + glog.Infof("UpdateNodeStatuses failed with: %v", err) + continue + } + if !attachedVolume.MountedByNode { glog.V(5).Infof("Attempting to start DetachVolume for volume %q from node %q", attachedVolume.VolumeName, attachedVolume.NodeName) err := rc.attacherDetacher.DetachVolume(attachedVolume.AttachedVolume, rc.actualStateOfWorld) @@ -112,10 +127,6 @@ func (rc *reconciler) reconciliationLoopFunc() func() { } } else { // If volume is not safe to detach (is mounted) wait a max amount of time before detaching any way. - timeElapsed, err := rc.actualStateOfWorld.MarkDesireToDetach(attachedVolume.VolumeName, attachedVolume.NodeName) - if err != nil { - glog.Errorf("Unexpected error actualStateOfWorld.MarkDesireToDetach(): %v", err) - } if timeElapsed > rc.maxWaitForUnmountDuration { glog.V(5).Infof("Attempting to start DetachVolume for volume %q from node %q. Volume is not safe to detach, but maxWaitForUnmountDuration expired.", attachedVolume.VolumeName, attachedVolume.NodeName) err := rc.attacherDetacher.DetachVolume(attachedVolume.AttachedVolume, rc.actualStateOfWorld) diff --git a/pkg/controller/volume/reconciler/reconciler_test.go b/pkg/controller/volume/reconciler/reconciler_test.go index e79d63f782..3563cebdf0 100644 --- a/pkg/controller/volume/reconciler/reconciler_test.go +++ b/pkg/controller/volume/reconciler/reconciler_test.go @@ -75,10 +75,7 @@ func Test_Run_Positive_OneDesiredVolumeAttach(t *testing.T) { asw := cache.NewActualStateOfWorld(volumePluginMgr) fakeKubeClient := controllervolumetesting.CreateTestClient() ad := operationexecutor.NewOperationExecutor(fakeKubeClient, volumePluginMgr) - nodeInformer := informers.CreateSharedNodeIndexInformer( - fakeKubeClient, resyncPeriod) - nsu := statusupdater.NewNodeStatusUpdater( - fakeKubeClient, nodeInformer, asw) + nsu := statusupdater.NewFakeNodeStatusUpdater(false /* returnError */) reconciler := NewReconciler( reconcilerLoopPeriod, maxWaitForUnmountDuration, dsw, asw, ad, nsu) podName := "pod-uid" @@ -121,10 +118,7 @@ func Test_Run_Positive_OneDesiredVolumeAttachThenDetachWithUnmountedVolume(t *te asw := cache.NewActualStateOfWorld(volumePluginMgr) fakeKubeClient := controllervolumetesting.CreateTestClient() ad := operationexecutor.NewOperationExecutor(fakeKubeClient, volumePluginMgr) - nodeInformer := informers.CreateSharedNodeIndexInformer( - fakeKubeClient, resyncPeriod) - nsu := statusupdater.NewNodeStatusUpdater( - fakeKubeClient, nodeInformer, asw) + nsu := statusupdater.NewFakeNodeStatusUpdater(false /* returnError */) reconciler := NewReconciler( reconcilerLoopPeriod, maxWaitForUnmountDuration, dsw, asw, ad, nsu) podName := "pod-uid" @@ -188,10 +182,7 @@ func Test_Run_Positive_OneDesiredVolumeAttachThenDetachWithMountedVolume(t *test asw := cache.NewActualStateOfWorld(volumePluginMgr) fakeKubeClient := controllervolumetesting.CreateTestClient() ad := operationexecutor.NewOperationExecutor(fakeKubeClient, volumePluginMgr) - nodeInformer := informers.CreateSharedNodeIndexInformer( - fakeKubeClient, resyncPeriod) - nsu := statusupdater.NewNodeStatusUpdater( - fakeKubeClient, nodeInformer, asw) + nsu := statusupdater.NewFakeNodeStatusUpdater(false /* returnError */) reconciler := NewReconciler( reconcilerLoopPeriod, maxWaitForUnmountDuration, dsw, asw, ad, nsu) podName := "pod-uid" @@ -241,6 +232,72 @@ func Test_Run_Positive_OneDesiredVolumeAttachThenDetachWithMountedVolume(t *test waitForDetachCallCount(t, 1 /* expectedDetachCallCount */, fakePlugin) } +// Populates desiredStateOfWorld cache with one node/volume/pod tuple. +// Has node update fail +// Calls Run() +// Verifies there is one attach call and no detach calls. +// Marks the node/volume as unmounted. +// Deletes the node/volume/pod tuple from desiredStateOfWorld cache. +// Verifies there are NO detach call and no (new) attach calls. +func Test_Run_Negative_OneDesiredVolumeAttachThenDetachWithUnmountedVolumeUpdateStatusFail(t *testing.T) { + // Arrange + volumePluginMgr, fakePlugin := volumetesting.GetTestVolumePluginMgr(t) + dsw := cache.NewDesiredStateOfWorld(volumePluginMgr) + asw := cache.NewActualStateOfWorld(volumePluginMgr) + fakeKubeClient := controllervolumetesting.CreateTestClient() + ad := operationexecutor.NewOperationExecutor(fakeKubeClient, volumePluginMgr) + nsu := statusupdater.NewFakeNodeStatusUpdater(true /* returnError */) + reconciler := NewReconciler( + reconcilerLoopPeriod, maxWaitForUnmountDuration, dsw, asw, ad, nsu) + podName := "pod-uid" + volumeName := api.UniqueVolumeName("volume-name") + volumeSpec := controllervolumetesting.GetTestVolumeSpec(string(volumeName), volumeName) + nodeName := "node-name" + dsw.AddNode(nodeName) + volumeExists := dsw.VolumeExists(volumeName, nodeName) + if volumeExists { + t.Fatalf( + "Volume %q/node %q should not exist, but it does.", + volumeName, + nodeName) + } + + generatedVolumeName, podAddErr := dsw.AddPod(types.UniquePodName(podName), controllervolumetesting.NewPod(podName, podName), volumeSpec, nodeName) + if podAddErr != nil { + t.Fatalf("AddPod failed. Expected: <no error> Actual: <%v>", podAddErr) + } + + // Act + go reconciler.Run(wait.NeverStop) + + // Assert + waitForNewAttacherCallCount(t, 1 /* expectedCallCount */, fakePlugin) + verifyNewAttacherCallCount(t, false /* expectZeroNewAttacherCallCount */, fakePlugin) + waitForAttachCallCount(t, 1 /* expectedAttachCallCount */, fakePlugin) + verifyNewDetacherCallCount(t, true /* expectZeroNewDetacherCallCount */, fakePlugin) + waitForDetachCallCount(t, 0 /* expectedDetachCallCount */, fakePlugin) + + // Act + dsw.DeletePod(types.UniquePodName(podName), generatedVolumeName, nodeName) + volumeExists = dsw.VolumeExists(generatedVolumeName, nodeName) + if volumeExists { + t.Fatalf( + "Deleted pod %q from volume %q/node %q. Volume should also be deleted but it still exists.", + podName, + generatedVolumeName, + nodeName) + } + asw.SetVolumeMountedByNode(generatedVolumeName, nodeName, true /* mounted */) + asw.SetVolumeMountedByNode(generatedVolumeName, nodeName, false /* mounted */) + + // Assert + verifyNewDetacherCallCount(t, true /* expectZeroNewDetacherCallCount */, fakePlugin) + verifyNewAttacherCallCount(t, false /* expectZeroNewAttacherCallCount */, fakePlugin) + waitForAttachCallCount(t, 1 /* expectedAttachCallCount */, fakePlugin) + verifyNewDetacherCallCount(t, false /* expectZeroNewDetacherCallCount */, fakePlugin) + waitForDetachCallCount(t, 0 /* expectedDetachCallCount */, fakePlugin) +} + func waitForNewAttacherCallCount( t *testing.T, expectedCallCount int, diff --git a/pkg/controller/volume/statusupdater/fake_node_status_updater.go b/pkg/controller/volume/statusupdater/fake_node_status_updater.go new file mode 100644 index 0000000000..dc734e2ff0 --- /dev/null +++ b/pkg/controller/volume/statusupdater/fake_node_status_updater.go @@ -0,0 +1,39 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package statusupdater + +import ( + "fmt" +) + +func NewFakeNodeStatusUpdater(returnError bool) NodeStatusUpdater { + return &fakeNodeStatusUpdater{ + returnError: returnError, + } +} + +type fakeNodeStatusUpdater struct { + returnError bool +} + +func (fnsu *fakeNodeStatusUpdater) UpdateNodeStatuses() error { + if fnsu.returnError { + return fmt.Errorf("fake error on update node status") + } + + return nil +} From 6d201c9c57def812995bfa08a000885127d863fc Mon Sep 17 00:00:00 2001 From: gmarek <gmarek@google.com> Date: Wed, 22 Jun 2016 14:09:37 +0200 Subject: [PATCH 106/339] kube-down deletes instance templates created by the cluster upgrade --- cluster/common.sh | 2 ++ cluster/gce/util.sh | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/cluster/common.sh b/cluster/common.sh index 6b677575c2..c5d4ed1e47 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -31,12 +31,14 @@ source "${KUBE_ROOT}/cluster/lib/logging.sh" # NOTE This must match the version_regex in build/common.sh # kube::release::parse_and_validate_release_version() KUBE_RELEASE_VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-(beta|alpha)\\.(0|[1-9][0-9]*))?$" +KUBE_RELEASE_VERSION_DASHED_REGEX="v(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)(-(beta|alpha)-(0|[1-9][0-9]*))?" # KUBE_CI_VERSION_REGEX matches things like "v1.2.3-alpha.4.56+abcdefg" This # # NOTE This must match the version_regex in build/common.sh # kube::release::parse_and_validate_ci_version() KUBE_CI_VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-(beta|alpha)\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*)\\+[-0-9a-z]*)?$" +KUBE_CI_VERSION_DASHED_REGEX="^v(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(beta|alpha)-(0|[1-9][0-9]*)(-(0|[1-9][0-9]*)\\+[-0-9a-z]*)?" # Generate kubeconfig data for the created cluster. # Assumed vars: diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 64a0af42e3..845c5598fb 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -967,7 +967,7 @@ function kube-down { # Get the name of the managed instance group template before we delete the # managed instance group. (The name of the managed instance group template may # change during a cluster upgrade.) - local template=$(get-template "${PROJECT}") + local templates=$(get-template "${PROJECT}") for group in ${INSTANCE_GROUPS[@]:-}; do if gcloud compute instance-groups managed describe "${group}" --project "${PROJECT}" --zone "${ZONE}" &>/dev/null; then @@ -984,12 +984,14 @@ function kube-down { echo -e "Failed to delete instance group(s)." >&2 } - if gcloud compute instance-templates describe --project "${PROJECT}" "${template}" &>/dev/null; then - gcloud compute instance-templates delete \ - --project "${PROJECT}" \ - --quiet \ - "${template}" - fi + for template in ${templates[@]:-}; do + if gcloud compute instance-templates describe --project "${PROJECT}" "${template}" &>/dev/null; then + gcloud compute instance-templates delete \ + --project "${PROJECT}" \ + --quiet \ + "${template}" + fi + done # First delete the master (if it exists). if gcloud compute instances describe "${MASTER_NAME}" --zone "${ZONE}" --project "${PROJECT}" &>/dev/null; then @@ -1097,7 +1099,7 @@ function kube-down { # # $1: project function get-template { - gcloud compute instance-templates list "${NODE_INSTANCE_PREFIX}-template" \ + gcloud compute instance-templates list -r "${NODE_INSTANCE_PREFIX}-template(-(${KUBE_RELEASE_VERSION_DASHED_REGEX}|${KUBE_CI_VERSION_DASHED_REGEX}))?" \ --project="${1}" --format='value(name)' } From aba33495dd997e37ed97b90693ddbe4c48064d2a Mon Sep 17 00:00:00 2001 From: bryk <bryk@google.com> Date: Wed, 22 Jun 2016 15:13:20 +0200 Subject: [PATCH 107/339] Set Dashboard UI version to v1.1.0 This is our final release for this quarter. Release info, changelog will go there: https://github.com/kubernetes/dashboard/releases/tag/v1.1.0 --- cluster/addons/dashboard/dashboard-controller.yaml | 8 ++++---- .../addons/dashboard/dashboard-controller.yaml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cluster/addons/dashboard/dashboard-controller.yaml b/cluster/addons/dashboard/dashboard-controller.yaml index 3a73df6c8b..1afc8050bc 100644 --- a/cluster/addons/dashboard/dashboard-controller.yaml +++ b/cluster/addons/dashboard/dashboard-controller.yaml @@ -2,11 +2,11 @@ apiVersion: v1 kind: ReplicationController metadata: - name: kubernetes-dashboard-v1.1.0-beta3 + name: kubernetes-dashboard-v1.1.0 namespace: kube-system labels: k8s-app: kubernetes-dashboard - version: v1.1.0-beta3 + version: v1.1.0 kubernetes.io/cluster-service: "true" spec: replicas: 1 @@ -16,12 +16,12 @@ spec: metadata: labels: k8s-app: kubernetes-dashboard - version: v1.1.0-beta3 + version: v1.1.0 kubernetes.io/cluster-service: "true" spec: containers: - name: kubernetes-dashboard - image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.1.0-beta3 + image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.1.0 resources: # keep request = limit to keep this container in guaranteed class limits: diff --git a/cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-controller.yaml b/cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-controller.yaml index 5de9ab416a..5be6ef83d7 100644 --- a/cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-controller.yaml +++ b/cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-controller.yaml @@ -2,11 +2,11 @@ apiVersion: v1 kind: ReplicationController metadata: # Keep this file in sync with addons/dashboard/dashboard-controller.yaml - name: kubernetes-dashboard-v1.1.0-beta3 + name: kubernetes-dashboard-v1.1.0 namespace: kube-system labels: k8s-app: kubernetes-dashboard - version: v1.1.0-beta3 + version: v1.1.0 kubernetes.io/cluster-service: "true" spec: replicas: 1 @@ -16,12 +16,12 @@ spec: metadata: labels: k8s-app: kubernetes-dashboard - version: v1.1.0-beta3 + version: v1.1.0 kubernetes.io/cluster-service: "true" spec: containers: - name: kubernetes-dashboard - image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.1.0-beta3 + image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.1.0 resources: # keep request = limit to keep this container in guaranteed class limits: From 9865ac325c7af23b88fdd363dffe9a32f65b242f Mon Sep 17 00:00:00 2001 From: Dan Williams <dcbw@redhat.com> Date: Mon, 20 Jun 2016 17:14:08 -0500 Subject: [PATCH 108/339] kubelet/cni: make cni plugin runtime agnostic Use the generic runtime method to get the netns path. Also move reading the container IP address into cni (based off kubenet) instead of having it in the Docker manager code. Both old and new methods use nsenter and /sbin/ip and should be functionally equivalent. --- pkg/kubelet/container/runtime_cache_test.go | 30 +++-- pkg/kubelet/container/testing/fake_runtime.go | 34 ++++- pkg/kubelet/dockertools/docker_manager.go | 35 ------ pkg/kubelet/image_manager_test.go | 76 ++++++------ pkg/kubelet/kubelet_cadvisor_test.go | 20 +-- pkg/kubelet/kubelet_test.go | 58 ++++----- pkg/kubelet/network/cni/cni.go | 77 ++++++++---- pkg/kubelet/network/cni/cni_test.go | 117 +++++++++++------- pkg/kubelet/pleg/generic_test.go | 40 +++--- 9 files changed, 269 insertions(+), 218 deletions(-) diff --git a/pkg/kubelet/container/runtime_cache_test.go b/pkg/kubelet/container/runtime_cache_test.go index d66e07bfc5..e98b8f7ca3 100644 --- a/pkg/kubelet/container/runtime_cache_test.go +++ b/pkg/kubelet/container/runtime_cache_test.go @@ -25,18 +25,28 @@ import ( ctest "k8s.io/kubernetes/pkg/kubelet/container/testing" ) +func comparePods(t *testing.T, expected []*ctest.FakePod, actual []*Pod) { + if len(expected) != len(actual) { + t.Errorf("expected %d pods, got %d instead", len(expected), len(actual)) + } + for i := range expected { + if !reflect.DeepEqual(expected[i].Pod, actual[i]) { + t.Errorf("expected %#v, got %#v", expected[i].Pod, actual[i]) + } + } +} + func TestGetPods(t *testing.T) { runtime := &ctest.FakeRuntime{} - expected := []*Pod{{ID: "1111"}, {ID: "2222"}, {ID: "3333"}} + expected := []*ctest.FakePod{{Pod: &Pod{ID: "1111"}}, {Pod: &Pod{ID: "2222"}}, {Pod: &Pod{ID: "3333"}}} runtime.PodList = expected cache := NewTestRuntimeCache(runtime) actual, err := cache.GetPods() if err != nil { t.Errorf("unexpected error %v", err) } - if !reflect.DeepEqual(expected, actual) { - t.Errorf("expected %#v, got %#v", expected, actual) - } + + comparePods(t, expected, actual) } func TestForceUpdateIfOlder(t *testing.T) { @@ -44,25 +54,21 @@ func TestForceUpdateIfOlder(t *testing.T) { cache := NewTestRuntimeCache(runtime) // Cache old pods. - oldpods := []*Pod{{ID: "1111"}} + oldpods := []*ctest.FakePod{{Pod: &Pod{ID: "1111"}}} runtime.PodList = oldpods cache.UpdateCacheWithLock() // Update the runtime to new pods. - newpods := []*Pod{{ID: "1111"}, {ID: "2222"}, {ID: "3333"}} + newpods := []*ctest.FakePod{{Pod: &Pod{ID: "1111"}}, {Pod: &Pod{ID: "2222"}}, {Pod: &Pod{ID: "3333"}}} runtime.PodList = newpods // An older timestamp should not force an update. cache.ForceUpdateIfOlder(time.Now().Add(-20 * time.Minute)) actual := cache.GetCachedPods() - if !reflect.DeepEqual(oldpods, actual) { - t.Errorf("expected %#v, got %#v", oldpods, actual) - } + comparePods(t, oldpods, actual) // A newer timestamp should force an update. cache.ForceUpdateIfOlder(time.Now().Add(20 * time.Second)) actual = cache.GetCachedPods() - if !reflect.DeepEqual(newpods, actual) { - t.Errorf("expected %#v, got %#v", newpods, actual) - } + comparePods(t, newpods, actual) } diff --git a/pkg/kubelet/container/testing/fake_runtime.go b/pkg/kubelet/container/testing/fake_runtime.go index fece66685d..9431d61b90 100644 --- a/pkg/kubelet/container/testing/fake_runtime.go +++ b/pkg/kubelet/container/testing/fake_runtime.go @@ -30,12 +30,17 @@ import ( "k8s.io/kubernetes/pkg/volume" ) +type FakePod struct { + Pod *Pod + NetnsPath string +} + // FakeRuntime is a fake container runtime for testing. type FakeRuntime struct { sync.Mutex CalledFunctions []string - PodList []*Pod - AllPodList []*Pod + PodList []*FakePod + AllPodList []*FakePod ImageList []Image APIPodStatus api.PodStatus PodStatus PodStatus @@ -98,8 +103,8 @@ func (f *FakeRuntime) ClearCalls() { defer f.Unlock() f.CalledFunctions = []string{} - f.PodList = []*Pod{} - f.AllPodList = []*Pod{} + f.PodList = []*FakePod{} + f.AllPodList = []*FakePod{} f.APIPodStatus = api.PodStatus{} f.StartedPods = []string{} f.KilledPods = []string{} @@ -182,11 +187,19 @@ func (f *FakeRuntime) GetPods(all bool) ([]*Pod, error) { f.Lock() defer f.Unlock() + var pods []*Pod + f.CalledFunctions = append(f.CalledFunctions, "GetPods") if all { - return f.AllPodList, f.Err + for _, fakePod := range f.AllPodList { + pods = append(pods, fakePod.Pod) + } + } else { + for _, fakePod := range f.PodList { + pods = append(pods, fakePod.Pod) + } } - return f.PodList, f.Err + return pods, f.Err } func (f *FakeRuntime) SyncPod(pod *api.Pod, _ api.PodStatus, _ *PodStatus, _ []api.Secret, backOff *flowcontrol.Backoff) (result PodSyncResult) { @@ -343,6 +356,15 @@ func (f *FakeRuntime) GetNetNS(containerID ContainerID) (string, error) { defer f.Unlock() f.CalledFunctions = append(f.CalledFunctions, "GetNetNS") + + for _, fp := range f.AllPodList { + for _, c := range fp.Pod.Containers { + if c.ID == containerID { + return fp.NetnsPath, nil + } + } + } + return "", f.Err } diff --git a/pkg/kubelet/dockertools/docker_manager.go b/pkg/kubelet/dockertools/docker_manager.go index 122acf6ccc..7712bf37df 100644 --- a/pkg/kubelet/dockertools/docker_manager.go +++ b/pkg/kubelet/dockertools/docker_manager.go @@ -1157,41 +1157,6 @@ func (dm *DockerManager) PortForward(pod *kubecontainer.Pod, port uint16, stream return nil } -// Get the IP address of a container's interface using nsenter -func (dm *DockerManager) GetContainerIP(containerID, interfaceName string) (string, error) { - _, lookupErr := exec.LookPath("nsenter") - if lookupErr != nil { - return "", fmt.Errorf("Unable to obtain IP address of container: missing nsenter.") - } - container, err := dm.client.InspectContainer(containerID) - if err != nil { - return "", err - } - - if !container.State.Running { - return "", fmt.Errorf("container not running (%s)", container.ID) - } - - containerPid := container.State.Pid - extractIPCmd := fmt.Sprintf("ip -4 addr show %s | grep inet | awk -F\" \" '{print $2}'", interfaceName) - args := []string{"-t", fmt.Sprintf("%d", containerPid), "-n", "--", "bash", "-c", extractIPCmd} - command := exec.Command("nsenter", args...) - out, err := command.CombinedOutput() - - // Fall back to IPv6 address if no IPv4 address is present - if err == nil && string(out) == "" { - extractIPCmd = fmt.Sprintf("ip -6 addr show %s scope global | grep inet6 | awk -F\" \" '{print $2}'", interfaceName) - args = []string{"-t", fmt.Sprintf("%d", containerPid), "-n", "--", "bash", "-c", extractIPCmd} - command = exec.Command("nsenter", args...) - out, err = command.CombinedOutput() - } - - if err != nil { - return "", err - } - return string(out), nil -} - // TODO(random-liu): Change running pod to pod status in the future. We can't do it now, because kubelet also uses this function without pod status. // We can only deprecate this after refactoring kubelet. // TODO(random-liu): After using pod status for KillPod(), we can also remove the kubernetesPodLabel, because all the needed information should have diff --git a/pkg/kubelet/image_manager_test.go b/pkg/kubelet/image_manager_test.go index cee3fb1bf0..30d7614e8f 100644 --- a/pkg/kubelet/image_manager_test.go +++ b/pkg/kubelet/image_manager_test.go @@ -86,12 +86,12 @@ func TestDetectImagesInitialDetect(t *testing.T) { makeImage(0, 1024), makeImage(1, 2048), } - fakeRuntime.AllPodList = []*container.Pod{ - { + fakeRuntime.AllPodList = []*containertest.FakePod{ + {Pod: &container.Pod{ Containers: []*container.Container{ makeContainer(1), }, - }, + }}, } startTime := time.Now().Add(-time.Millisecond) @@ -116,12 +116,12 @@ func TestDetectImagesWithNewImage(t *testing.T) { makeImage(0, 1024), makeImage(1, 2048), } - fakeRuntime.AllPodList = []*container.Pod{ - { + fakeRuntime.AllPodList = []*containertest.FakePod{ + {Pod: &container.Pod{ Containers: []*container.Container{ makeContainer(1), }, - }, + }}, } err := manager.detectImages(zero) @@ -161,12 +161,12 @@ func TestDetectImagesContainerStopped(t *testing.T) { makeImage(0, 1024), makeImage(1, 2048), } - fakeRuntime.AllPodList = []*container.Pod{ - { + fakeRuntime.AllPodList = []*containertest.FakePod{ + {Pod: &container.Pod{ Containers: []*container.Container{ makeContainer(1), }, - }, + }}, } err := manager.detectImages(zero) @@ -177,7 +177,7 @@ func TestDetectImagesContainerStopped(t *testing.T) { require.True(t, ok) // Simulate container being stopped. - fakeRuntime.AllPodList = []*container.Pod{} + fakeRuntime.AllPodList = []*containertest.FakePod{} err = manager.detectImages(time.Now()) require.NoError(t, err) assert.Equal(manager.imageRecordsLen(), 2) @@ -197,12 +197,12 @@ func TestDetectImagesWithRemovedImages(t *testing.T) { makeImage(0, 1024), makeImage(1, 2048), } - fakeRuntime.AllPodList = []*container.Pod{ - { + fakeRuntime.AllPodList = []*containertest.FakePod{ + {Pod: &container.Pod{ Containers: []*container.Container{ makeContainer(1), }, - }, + }}, } err := manager.detectImages(zero) @@ -223,12 +223,12 @@ func TestFreeSpaceImagesInUseContainersAreIgnored(t *testing.T) { makeImage(0, 1024), makeImage(1, 2048), } - fakeRuntime.AllPodList = []*container.Pod{ - { + fakeRuntime.AllPodList = []*containertest.FakePod{ + {Pod: &container.Pod{ Containers: []*container.Container{ makeContainer(1), }, - }, + }}, } spaceFreed, err := manager.freeSpace(2048, time.Now()) @@ -244,29 +244,29 @@ func TestFreeSpaceRemoveByLeastRecentlyUsed(t *testing.T) { makeImage(0, 1024), makeImage(1, 2048), } - fakeRuntime.AllPodList = []*container.Pod{ - { + fakeRuntime.AllPodList = []*containertest.FakePod{ + {Pod: &container.Pod{ Containers: []*container.Container{ makeContainer(0), makeContainer(1), }, - }, + }}, } // Make 1 be more recently used than 0. require.NoError(t, manager.detectImages(zero)) - fakeRuntime.AllPodList = []*container.Pod{ - { + fakeRuntime.AllPodList = []*containertest.FakePod{ + {Pod: &container.Pod{ Containers: []*container.Container{ makeContainer(1), }, - }, + }}, } require.NoError(t, manager.detectImages(time.Now())) - fakeRuntime.AllPodList = []*container.Pod{ - { + fakeRuntime.AllPodList = []*containertest.FakePod{ + {Pod: &container.Pod{ Containers: []*container.Container{}, - }, + }}, } require.NoError(t, manager.detectImages(time.Now())) require.Equal(t, manager.imageRecordsLen(), 2) @@ -283,12 +283,12 @@ func TestFreeSpaceTiesBrokenByDetectedTime(t *testing.T) { fakeRuntime.ImageList = []container.Image{ makeImage(0, 1024), } - fakeRuntime.AllPodList = []*container.Pod{ - { + fakeRuntime.AllPodList = []*containertest.FakePod{ + {Pod: &container.Pod{ Containers: []*container.Container{ makeContainer(0), }, - }, + }}, } // Make 1 more recently detected but used at the same time as 0. @@ -298,7 +298,7 @@ func TestFreeSpaceTiesBrokenByDetectedTime(t *testing.T) { makeImage(1, 2048), } require.NoError(t, manager.detectImages(time.Now())) - fakeRuntime.AllPodList = []*container.Pod{} + fakeRuntime.AllPodList = []*containertest.FakePod{} require.NoError(t, manager.detectImages(time.Now())) require.Equal(t, manager.imageRecordsLen(), 2) @@ -319,15 +319,15 @@ func TestFreeSpaceImagesAlsoDoesLookupByRepoTags(t *testing.T) { Size: 2048, }, } - fakeRuntime.AllPodList = []*container.Pod{ - { + fakeRuntime.AllPodList = []*containertest.FakePod{ + {Pod: &container.Pod{ Containers: []*container.Container{ { ID: container.ContainerID{Type: "test", ID: "c5678"}, Image: "salad", }, }, - }, + }}, } spaceFreed, err := manager.freeSpace(1024, time.Now()) @@ -347,15 +347,15 @@ func TestFreeSpaceImagesAlsoDoesLookupByRepoDigests(t *testing.T) { Size: 2048, }, } - fakeRuntime.AllPodList = []*container.Pod{ - { + fakeRuntime.AllPodList = []*containertest.FakePod{ + {Pod: &container.Pod{ Containers: []*container.Container{ { ID: container.ContainerID{Type: "test", ID: "c5678"}, Image: "salad", }, }, - }, + }}, } spaceFreed, err := manager.freeSpace(1024, time.Now()) @@ -451,12 +451,12 @@ func TestGarbageCollectImageNotOldEnough(t *testing.T) { makeImage(1, 2048), } // 1 image is in use, and another one is not old enough - fakeRuntime.AllPodList = []*container.Pod{ - { + fakeRuntime.AllPodList = []*containertest.FakePod{ + {Pod: &container.Pod{ Containers: []*container.Container{ makeContainer(1), }, - }, + }}, } fakeClock := util.NewFakeClock(time.Now()) diff --git a/pkg/kubelet/kubelet_cadvisor_test.go b/pkg/kubelet/kubelet_cadvisor_test.go index ab26d48980..1c0f7c8e96 100644 --- a/pkg/kubelet/kubelet_cadvisor_test.go +++ b/pkg/kubelet/kubelet_cadvisor_test.go @@ -22,6 +22,7 @@ import ( cadvisorapi "github.com/google/cadvisor/info/v1" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" + kubecontainertest "k8s.io/kubernetes/pkg/kubelet/container/testing" ) func TestGetContainerInfo(t *testing.T) { @@ -39,8 +40,8 @@ func TestGetContainerInfo(t *testing.T) { cadvisorReq := &cadvisorapi.ContainerInfoRequest{} mockCadvisor := testKubelet.fakeCadvisor mockCadvisor.On("DockerContainer", containerID, cadvisorReq).Return(containerInfo, nil) - fakeRuntime.PodList = []*kubecontainer.Pod{ - { + fakeRuntime.PodList = []*kubecontainertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "12345678", Name: "qux", Namespace: "ns", @@ -50,7 +51,7 @@ func TestGetContainerInfo(t *testing.T) { ID: kubecontainer.ContainerID{Type: "test", ID: containerID}, }, }, - }, + }}, } stats, err := kubelet.GetContainerInfo("qux_ns", "", "foo", cadvisorReq) if err != nil { @@ -122,8 +123,8 @@ func TestGetContainerInfoWhenCadvisorFailed(t *testing.T) { containerInfo := cadvisorapi.ContainerInfo{} cadvisorReq := &cadvisorapi.ContainerInfoRequest{} mockCadvisor.On("DockerContainer", containerID, cadvisorReq).Return(containerInfo, cadvisorApiFailure) - fakeRuntime.PodList = []*kubecontainer.Pod{ - { + fakeRuntime.PodList = []*kubecontainertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "uuid", Name: "qux", Namespace: "ns", @@ -132,7 +133,7 @@ func TestGetContainerInfoWhenCadvisorFailed(t *testing.T) { ID: kubecontainer.ContainerID{Type: "test", ID: containerID}, }, }, - }, + }}, } stats, err := kubelet.GetContainerInfo("qux_ns", "uuid", "foo", cadvisorReq) if stats != nil { @@ -153,7 +154,7 @@ func TestGetContainerInfoOnNonExistContainer(t *testing.T) { kubelet := testKubelet.kubelet mockCadvisor := testKubelet.fakeCadvisor fakeRuntime := testKubelet.fakeRuntime - fakeRuntime.PodList = []*kubecontainer.Pod{} + fakeRuntime.PodList = []*kubecontainertest.FakePod{} stats, _ := kubelet.GetContainerInfo("qux", "", "foo", nil) if stats != nil { @@ -206,8 +207,8 @@ func TestGetContainerInfoWithNoMatchingContainers(t *testing.T) { fakeRuntime := testKubelet.fakeRuntime kubelet := testKubelet.kubelet mockCadvisor := testKubelet.fakeCadvisor - fakeRuntime.PodList = []*kubecontainer.Pod{ - { + fakeRuntime.PodList = []*kubecontainertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "12345678", Name: "qux", Namespace: "ns", @@ -216,6 +217,7 @@ func TestGetContainerInfoWithNoMatchingContainers(t *testing.T) { ID: kubecontainer.ContainerID{Type: "test", ID: "fakeID"}, }, }}, + }, } stats, err := kubelet.GetContainerInfo("qux_ns", "", "foo", nil) diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index 60b4860e48..bbbcf20ec7 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -408,15 +408,15 @@ func TestSyncPodsDeletesWhenSourcesAreReady(t *testing.T) { kubelet := testKubelet.kubelet kubelet.sourcesReady = config.NewSourcesReady(func(_ sets.String) bool { return ready }) - fakeRuntime.PodList = []*kubecontainer.Pod{ - { + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "12345678", Name: "foo", Namespace: "new", Containers: []*kubecontainer.Container{ {Name: "bar"}, }, - }, + }}, } kubelet.HandlePodCleanups() // Sources are not ready yet. Don't remove any pods. @@ -1087,7 +1087,7 @@ func TestRunInContainerNoSuchPod(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) kubelet := testKubelet.kubelet fakeRuntime := testKubelet.fakeRuntime - fakeRuntime.PodList = []*kubecontainer.Pod{} + fakeRuntime.PodList = []*containertest.FakePod{} podName := "podFoo" podNamespace := "nsFoo" @@ -1113,8 +1113,8 @@ func TestRunInContainer(t *testing.T) { kubelet.runner = &fakeCommandRunner containerID := kubecontainer.ContainerID{Type: "test", ID: "abc1234"} - fakeRuntime.PodList = []*kubecontainer.Pod{ - { + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "12345678", Name: "podFoo", Namespace: "nsFoo", @@ -1123,7 +1123,7 @@ func TestRunInContainer(t *testing.T) { ID: containerID, }, }, - }, + }}, } cmd := []string{"ls"} _, err := kubelet.RunInContainer("podFoo_nsFoo", "", "containerFoo", cmd) @@ -2069,7 +2069,7 @@ func TestExecInContainerNoSuchPod(t *testing.T) { fakeRuntime := testKubelet.fakeRuntime fakeCommandRunner := fakeContainerCommandRunner{} kubelet.runner = &fakeCommandRunner - fakeRuntime.PodList = []*kubecontainer.Pod{} + fakeRuntime.PodList = []*containertest.FakePod{} podName := "podFoo" podNamespace := "nsFoo" @@ -2102,8 +2102,8 @@ func TestExecInContainerNoSuchContainer(t *testing.T) { podName := "podFoo" podNamespace := "nsFoo" containerID := "containerFoo" - fakeRuntime.PodList = []*kubecontainer.Pod{ - { + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "12345678", Name: podName, Namespace: podNamespace, @@ -2111,7 +2111,7 @@ func TestExecInContainerNoSuchContainer(t *testing.T) { {Name: "bar", ID: kubecontainer.ContainerID{Type: "test", ID: "barID"}}, }, - }, + }}, } err := kubelet.ExecInContainer( @@ -2165,8 +2165,8 @@ func TestExecInContainer(t *testing.T) { stdout := &fakeReadWriteCloser{} stderr := &fakeReadWriteCloser{} tty := true - fakeRuntime.PodList = []*kubecontainer.Pod{ - { + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "12345678", Name: podName, Namespace: podNamespace, @@ -2175,7 +2175,7 @@ func TestExecInContainer(t *testing.T) { ID: kubecontainer.ContainerID{Type: "test", ID: containerID}, }, }, - }, + }}, } err := kubelet.ExecInContainer( @@ -2215,7 +2215,7 @@ func TestPortForwardNoSuchPod(t *testing.T) { testKubelet := newTestKubelet(t, false /* controllerAttachDetachEnabled */) kubelet := testKubelet.kubelet fakeRuntime := testKubelet.fakeRuntime - fakeRuntime.PodList = []*kubecontainer.Pod{} + fakeRuntime.PodList = []*containertest.FakePod{} fakeCommandRunner := fakeContainerCommandRunner{} kubelet.runner = &fakeCommandRunner @@ -2245,8 +2245,8 @@ func TestPortForward(t *testing.T) { podName := "podFoo" podNamespace := "nsFoo" podID := types.UID("12345678") - fakeRuntime.PodList = []*kubecontainer.Pod{ - { + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: podID, Name: podName, Namespace: podNamespace, @@ -2256,7 +2256,7 @@ func TestPortForward(t *testing.T) { ID: kubecontainer.ContainerID{Type: "test", ID: "containerFoo"}, }, }, - }, + }}, } fakeCommandRunner := fakeContainerCommandRunner{} kubelet.runner = &fakeCommandRunner @@ -3594,8 +3594,8 @@ func TestGetContainerInfoForMirrorPods(t *testing.T) { mockCadvisor.On("DockerContainer", containerID, cadvisorReq).Return(containerInfo, nil) kubelet := testKubelet.kubelet - fakeRuntime.PodList = []*kubecontainer.Pod{ - { + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "1234", Name: "qux", Namespace: "ns", @@ -3605,7 +3605,7 @@ func TestGetContainerInfoForMirrorPods(t *testing.T) { ID: kubecontainer.ContainerID{Type: "test", ID: containerID}, }, }, - }, + }}, } kubelet.podManager.SetPods(pods) @@ -3930,15 +3930,15 @@ func TestSyncPodsSetStatusToFailedForPodsThatRunTooLong(t *testing.T) { }, } - fakeRuntime.PodList = []*kubecontainer.Pod{ - { + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "12345678", Name: "bar", Namespace: "new", Containers: []*kubecontainer.Container{ {Name: "foo"}, }, - }, + }}, } // Let the pod worker sets the status to fail after this sync. @@ -3986,15 +3986,15 @@ func TestSyncPodsDoesNotSetPodsThatDidNotRunTooLongToFailed(t *testing.T) { }, } - fakeRuntime.PodList = []*kubecontainer.Pod{ - { + fakeRuntime.PodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "12345678", Name: "bar", Namespace: "new", Containers: []*kubecontainer.Container{ {Name: "foo"}, }, - }, + }}, } kubelet.podManager.SetPods(pods) @@ -4118,13 +4118,13 @@ func TestDoesNotDeletePodDirsIfContainerIsRunning(t *testing.T) { // Pretend the pod is deleted from apiserver, but is still active on the node. // The pod directory should not be removed. pods = []*api.Pod{} - testKubelet.fakeRuntime.PodList = []*kubecontainer.Pod{runningPod} + testKubelet.fakeRuntime.PodList = []*containertest.FakePod{{runningPod, ""}} syncAndVerifyPodDir(t, testKubelet, pods, []*api.Pod{apiPod}, true) // The pod is deleted and also not active on the node. The pod directory // should be removed. pods = []*api.Pod{} - testKubelet.fakeRuntime.PodList = []*kubecontainer.Pod{} + testKubelet.fakeRuntime.PodList = []*containertest.FakePod{} syncAndVerifyPodDir(t, testKubelet, pods, []*api.Pod{apiPod}, false) } diff --git a/pkg/kubelet/network/cni/cni.go b/pkg/kubelet/network/cni/cni.go index 591ad38c20..06d7fcabf0 100644 --- a/pkg/kubelet/network/cni/cni.go +++ b/pkg/kubelet/network/cni/cni.go @@ -27,8 +27,8 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/apis/componentconfig" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/dockertools" "k8s.io/kubernetes/pkg/kubelet/network" + utilexec "k8s.io/kubernetes/pkg/util/exec" ) const ( @@ -43,6 +43,8 @@ type cniNetworkPlugin struct { defaultNetwork *cniNetwork host network.Host + execer utilexec.Interface + nsenterPath string } type cniNetwork struct { @@ -57,7 +59,10 @@ func probeNetworkPluginsWithVendorCNIDirPrefix(pluginDir, vendorCNIDirPrefix str if err != nil { return configList } - return append(configList, &cniNetworkPlugin{defaultNetwork: network}) + return append(configList, &cniNetworkPlugin{ + defaultNetwork: network, + execer: utilexec.New(), + }) } func ProbeNetworkPlugins(pluginDir string) []network.NetworkPlugin { @@ -95,6 +100,12 @@ func getDefaultCNINetwork(pluginDir, vendorCNIDirPrefix string) (*cniNetwork, er } func (plugin *cniNetworkPlugin) Init(host network.Host, hairpinMode componentconfig.HairpinMode, nonMasqueradeCIDR string) error { + var err error + plugin.nsenterPath, err = plugin.execer.LookPath("nsenter") + if err != nil { + return err + } + plugin.host = host return nil } @@ -104,16 +115,12 @@ func (plugin *cniNetworkPlugin) Name() string { } func (plugin *cniNetworkPlugin) SetUpPod(namespace string, name string, id kubecontainer.ContainerID) error { - runtime, ok := plugin.host.GetRuntime().(*dockertools.DockerManager) - if !ok { - return fmt.Errorf("CNI execution called on non-docker runtime") - } - netns, err := runtime.GetNetNS(id) + netnsPath, err := plugin.host.GetRuntime().GetNetNS(id) if err != nil { - return err + return fmt.Errorf("CNI failed to retrieve network namespace path: %v", err) } - _, err = plugin.defaultNetwork.addToNetwork(name, namespace, id, netns) + _, err = plugin.defaultNetwork.addToNetwork(name, namespace, id, netnsPath) if err != nil { glog.Errorf("Error while adding to cni network: %s", err) return err @@ -123,33 +130,55 @@ func (plugin *cniNetworkPlugin) SetUpPod(namespace string, name string, id kubec } func (plugin *cniNetworkPlugin) TearDownPod(namespace string, name string, id kubecontainer.ContainerID) error { - runtime, ok := plugin.host.GetRuntime().(*dockertools.DockerManager) - if !ok { - return fmt.Errorf("CNI execution called on non-docker runtime") - } - netns, err := runtime.GetNetNS(id) + netnsPath, err := plugin.host.GetRuntime().GetNetNS(id) if err != nil { - return err + return fmt.Errorf("CNI failed to retrieve network namespace path: %v", err) } - return plugin.defaultNetwork.deleteFromNetwork(name, namespace, id, netns) + return plugin.defaultNetwork.deleteFromNetwork(name, namespace, id, netnsPath) +} + +func (plugin *cniNetworkPlugin) getContainerIPAddress(netnsPath, addrType string) (net.IP, error) { + // Try to retrieve ip inside container network namespace + output, err := plugin.execer.Command(plugin.nsenterPath, fmt.Sprintf("--net=%s", netnsPath), "-F", "--", + "ip", "-o", addrType, "addr", "show", "dev", network.DefaultInterfaceName, "scope", "global").CombinedOutput() + if err != nil { + return nil, fmt.Errorf("Unexpected command output %s with error: %v", output, err) + } + + lines := strings.Split(string(output), "\n") + if len(lines) < 1 { + return nil, fmt.Errorf("Unexpected command output %s", output) + } + fields := strings.Fields(lines[0]) + if len(fields) < 4 { + return nil, fmt.Errorf("Unexpected address output %s ", lines[0]) + } + ip, _, err := net.ParseCIDR(fields[3]) + if err != nil { + return nil, fmt.Errorf("CNI failed to parse ip from output %s due to %v", output, err) + } + + return ip, nil } // TODO: Use the addToNetwork function to obtain the IP of the Pod. That will assume idempotent ADD call to the plugin. // Also fix the runtime's call to Status function to be done only in the case that the IP is lost, no need to do periodic calls func (plugin *cniNetworkPlugin) GetPodNetworkStatus(namespace string, name string, id kubecontainer.ContainerID) (*network.PodNetworkStatus, error) { - runtime, ok := plugin.host.GetRuntime().(*dockertools.DockerManager) - if !ok { - return nil, fmt.Errorf("CNI execution called on non-docker runtime") + netnsPath, err := plugin.host.GetRuntime().GetNetNS(id) + if err != nil { + return nil, fmt.Errorf("CNI failed to retrieve network namespace path: %v", err) + } + + ip, err := plugin.getContainerIPAddress(netnsPath, "-4") + if err != nil { + // Fall back to IPv6 address if no IPv4 address is present + ip, err = plugin.getContainerIPAddress(netnsPath, "-6") } - ipStr, err := runtime.GetContainerIP(id.ID, network.DefaultInterfaceName) - if err != nil { - return nil, err - } - ip, _, err := net.ParseCIDR(strings.Trim(ipStr, "\n")) if err != nil { return nil, err } + return &network.PodNetworkStatus{IP: ip}, nil } diff --git a/pkg/kubelet/network/cni/cni_test.go b/pkg/kubelet/network/cni/cni_test.go index fe4aedee84..3ad6aaeb94 100644 --- a/pkg/kubelet/network/cni/cni_test.go +++ b/pkg/kubelet/network/cni/cni_test.go @@ -30,18 +30,12 @@ import ( clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - cadvisorapi "github.com/google/cadvisor/info/v1" - - "k8s.io/kubernetes/cmd/kubelet/app/options" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/componentconfig" - "k8s.io/kubernetes/pkg/client/record" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" containertest "k8s.io/kubernetes/pkg/kubelet/container/testing" - "k8s.io/kubernetes/pkg/kubelet/dockertools" "k8s.io/kubernetes/pkg/kubelet/network" - nettest "k8s.io/kubernetes/pkg/kubelet/network/testing" - proberesults "k8s.io/kubernetes/pkg/kubelet/prober/results" + utilexec "k8s.io/kubernetes/pkg/util/exec" utiltesting "k8s.io/kubernetes/pkg/util/testing" ) @@ -115,10 +109,16 @@ func tearDownPlugin(tmpDir string) { type fakeNetworkHost struct { kubeClient clientset.Interface + runtime kubecontainer.Runtime } -func NewFakeHost(kubeClient clientset.Interface) *fakeNetworkHost { - host := &fakeNetworkHost{kubeClient: kubeClient} +func NewFakeHost(kubeClient clientset.Interface, pods []*containertest.FakePod) *fakeNetworkHost { + host := &fakeNetworkHost{ + kubeClient: kubeClient, + runtime: &containertest.FakeRuntime{ + AllPodList: pods, + }, + } return host } @@ -127,40 +127,11 @@ func (fnh *fakeNetworkHost) GetPodByName(name, namespace string) (*api.Pod, bool } func (fnh *fakeNetworkHost) GetKubeClient() clientset.Interface { - return nil + return fnh.kubeClient } -func (nh *fakeNetworkHost) GetRuntime() kubecontainer.Runtime { - dm, fakeDockerClient := newTestDockerManager() - fakeDockerClient.SetFakeRunningContainers([]*dockertools.FakeContainer{ - { - ID: "test_infra_container", - Pid: 12345, - }, - }) - return dm -} - -func newTestDockerManager() (*dockertools.DockerManager, *dockertools.FakeDockerClient) { - fakeDocker := dockertools.NewFakeDockerClient() - fakeRecorder := &record.FakeRecorder{} - containerRefManager := kubecontainer.NewRefManager() - networkPlugin, _ := network.InitNetworkPlugin([]network.NetworkPlugin{}, "", nettest.NewFakeHost(nil), componentconfig.HairpinNone, "10.0.0.0/8") - dockerManager := dockertools.NewFakeDockerManager( - fakeDocker, - fakeRecorder, - proberesults.NewManager(), - containerRefManager, - &cadvisorapi.MachineInfo{}, - options.GetDefaultPodInfraContainerImage(), - 0, 0, "", - &containertest.FakeOS{}, - networkPlugin, - nil, - nil, - nil) - - return dockerManager, fakeDocker +func (fnh *fakeNetworkHost) GetRuntime() kubecontainer.Runtime { + return fnh.runtime } func TestCNIPlugin(t *testing.T) { @@ -168,19 +139,64 @@ func TestCNIPlugin(t *testing.T) { pluginName := fmt.Sprintf("test%d", rand.Intn(1000)) vendorName := fmt.Sprintf("test_vendor%d", rand.Intn(1000)) + podIP := "10.0.0.2" + podIPOutput := fmt.Sprintf("4: eth0 inet %s/24 scope global dynamic eth0\\ valid_lft forever preferred_lft forever", podIP) + fakeCmds := []utilexec.FakeCommandAction{ + func(cmd string, args ...string) utilexec.Cmd { + return utilexec.InitFakeCmd(&utilexec.FakeCmd{ + CombinedOutputScript: []utilexec.FakeCombinedOutputAction{ + func() ([]byte, error) { + return []byte(podIPOutput), nil + }, + }, + }, cmd, args...) + }, + } + + fexec := &utilexec.FakeExec{ + CommandScript: fakeCmds, + LookPathFunc: func(file string) (string, error) { + return fmt.Sprintf("/fake-bin/%s", file), nil + }, + } + tmpDir := utiltesting.MkTmpdirOrDie("cni-test") testNetworkConfigPath := path.Join(tmpDir, "plugins", "net", "cni") testVendorCNIDirPrefix := tmpDir defer tearDownPlugin(tmpDir) installPluginUnderTest(t, testVendorCNIDirPrefix, testNetworkConfigPath, vendorName, pluginName) - np := probeNetworkPluginsWithVendorCNIDirPrefix(path.Join(testNetworkConfigPath, pluginName), testVendorCNIDirPrefix) - plug, err := network.InitNetworkPlugin(np, "cni", NewFakeHost(nil), componentconfig.HairpinNone, "10.0.0.0/8") + containerID := kubecontainer.ContainerID{Type: "test", ID: "test_infra_container"} + pods := []*containertest.FakePod{{ + Pod: &kubecontainer.Pod{ + Containers: []*kubecontainer.Container{ + {ID: containerID}, + }, + }, + NetnsPath: "/proc/12345/ns/net", + }} + + plugins := probeNetworkPluginsWithVendorCNIDirPrefix(path.Join(testNetworkConfigPath, pluginName), testVendorCNIDirPrefix) + if len(plugins) != 1 { + t.Fatalf("Expected only one network plugin, got %d", len(plugins)) + } + if plugins[0].Name() != "cni" { + t.Fatalf("Expected CNI network plugin, got %q", plugins[0].Name()) + } + + cniPlugin, ok := plugins[0].(*cniNetworkPlugin) + if !ok { + t.Fatalf("Not a CNI network plugin!") + } + cniPlugin.execer = fexec + + plug, err := network.InitNetworkPlugin(plugins, "cni", NewFakeHost(nil, pods), componentconfig.HairpinNone, "10.0.0.0/8") if err != nil { t.Fatalf("Failed to select the desired plugin: %v", err) } - err = plug.SetUpPod("podNamespace", "podName", kubecontainer.ContainerID{Type: "docker", ID: "test_infra_container"}) + // Set up the pod + err = plug.SetUpPod("podNamespace", "podName", containerID) if err != nil { t.Errorf("Expected nil: %v", err) } @@ -195,7 +211,18 @@ func TestCNIPlugin(t *testing.T) { if string(output) != expectedOutput { t.Errorf("Mismatch in expected output for setup hook. Expected '%s', got '%s'", expectedOutput, string(output)) } - err = plug.TearDownPod("podNamespace", "podName", kubecontainer.ContainerID{Type: "docker", ID: "test_infra_container"}) + + // Get its IP address + status, err := plug.GetPodNetworkStatus("podNamespace", "podName", containerID) + if err != nil { + t.Errorf("Failed to read pod network status: %v", err) + } + if status.IP.String() != podIP { + t.Errorf("Expected pod IP %q but got %q", podIP, status.IP.String()) + } + + // Tear it down + err = plug.TearDownPod("podNamespace", "podName", containerID) if err != nil { t.Errorf("Expected nil: %v", err) } diff --git a/pkg/kubelet/pleg/generic_test.go b/pkg/kubelet/pleg/generic_test.go index 460547d85a..0f92e57448 100644 --- a/pkg/kubelet/pleg/generic_test.go +++ b/pkg/kubelet/pleg/generic_test.go @@ -97,21 +97,21 @@ func TestRelisting(t *testing.T) { pleg, runtime := testPleg.pleg, testPleg.runtime ch := pleg.Watch() // The first relist should send a PodSync event to each pod. - runtime.AllPodList = []*kubecontainer.Pod{ - { + runtime.AllPodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "1234", Containers: []*kubecontainer.Container{ createTestContainer("c1", kubecontainer.ContainerStateExited), createTestContainer("c2", kubecontainer.ContainerStateRunning), createTestContainer("c3", kubecontainer.ContainerStateUnknown), }, - }, - { + }}, + {Pod: &kubecontainer.Pod{ ID: "4567", Containers: []*kubecontainer.Container{ createTestContainer("c1", kubecontainer.ContainerStateExited), }, - }, + }}, } pleg.relist() // Report every running/exited container if we see them for the first time. @@ -128,20 +128,20 @@ func TestRelisting(t *testing.T) { pleg.relist() verifyEvents(t, expected, actual) - runtime.AllPodList = []*kubecontainer.Pod{ - { + runtime.AllPodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "1234", Containers: []*kubecontainer.Container{ createTestContainer("c2", kubecontainer.ContainerStateExited), createTestContainer("c3", kubecontainer.ContainerStateRunning), }, - }, - { + }}, + {Pod: &kubecontainer.Pod{ ID: "4567", Containers: []*kubecontainer.Container{ createTestContainer("c4", kubecontainer.ContainerStateRunning), }, - }, + }}, } pleg.relist() // Only report containers that transitioned to running or exited status. @@ -169,15 +169,15 @@ func testReportMissingContainers(t *testing.T, numRelists int) { testPleg := newTestGenericPLEG() pleg, runtime := testPleg.pleg, testPleg.runtime ch := pleg.Watch() - runtime.AllPodList = []*kubecontainer.Pod{ - { + runtime.AllPodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "1234", Containers: []*kubecontainer.Container{ createTestContainer("c1", kubecontainer.ContainerStateRunning), createTestContainer("c2", kubecontainer.ContainerStateRunning), createTestContainer("c3", kubecontainer.ContainerStateExited), }, - }, + }}, } // Relist and drain the events from the channel. for i := 0; i < numRelists; i++ { @@ -188,13 +188,13 @@ func testReportMissingContainers(t *testing.T, numRelists int) { // Container c2 was stopped and removed between relists. We should report // the event. The exited container c3 was garbage collected (i.e., removed) // between relists. We should ignore that event. - runtime.AllPodList = []*kubecontainer.Pod{ - { + runtime.AllPodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "1234", Containers: []*kubecontainer.Container{ createTestContainer("c1", kubecontainer.ContainerStateRunning), }, - }, + }}, } pleg.relist() expected := []*PodLifecycleEvent{ @@ -208,13 +208,13 @@ func testReportMissingPods(t *testing.T, numRelists int) { testPleg := newTestGenericPLEG() pleg, runtime := testPleg.pleg, testPleg.runtime ch := pleg.Watch() - runtime.AllPodList = []*kubecontainer.Pod{ - { + runtime.AllPodList = []*containertest.FakePod{ + {Pod: &kubecontainer.Pod{ ID: "1234", Containers: []*kubecontainer.Container{ createTestContainer("c2", kubecontainer.ContainerStateRunning), }, - }, + }}, } // Relist and drain the events from the channel. for i := 0; i < numRelists; i++ { @@ -224,7 +224,7 @@ func testReportMissingPods(t *testing.T, numRelists int) { // Container c2 was stopped and removed between relists. We should report // the event. - runtime.AllPodList = []*kubecontainer.Pod{} + runtime.AllPodList = []*containertest.FakePod{} pleg.relist() expected := []*PodLifecycleEvent{ {ID: "1234", Type: ContainerDied, Data: "c2"}, From db078dbea4efef593933fe0a86e6ce9fea790b1e Mon Sep 17 00:00:00 2001 From: Dan Williams <dcbw@redhat.com> Date: Tue, 21 Jun 2016 16:58:30 -0500 Subject: [PATCH 109/339] kubelet/cni/kubenet: use common container IP address functions --- pkg/kubelet/network/cni/cni.go | 32 +---------------- pkg/kubelet/network/kubenet/kubenet_linux.go | 15 ++------ pkg/kubelet/network/plugins.go | 38 ++++++++++++++++++++ 3 files changed, 42 insertions(+), 43 deletions(-) diff --git a/pkg/kubelet/network/cni/cni.go b/pkg/kubelet/network/cni/cni.go index 06d7fcabf0..2356cb5bcf 100644 --- a/pkg/kubelet/network/cni/cni.go +++ b/pkg/kubelet/network/cni/cni.go @@ -18,9 +18,7 @@ package cni import ( "fmt" - "net" "sort" - "strings" "github.com/appc/cni/libcni" cnitypes "github.com/appc/cni/pkg/types" @@ -138,30 +136,6 @@ func (plugin *cniNetworkPlugin) TearDownPod(namespace string, name string, id ku return plugin.defaultNetwork.deleteFromNetwork(name, namespace, id, netnsPath) } -func (plugin *cniNetworkPlugin) getContainerIPAddress(netnsPath, addrType string) (net.IP, error) { - // Try to retrieve ip inside container network namespace - output, err := plugin.execer.Command(plugin.nsenterPath, fmt.Sprintf("--net=%s", netnsPath), "-F", "--", - "ip", "-o", addrType, "addr", "show", "dev", network.DefaultInterfaceName, "scope", "global").CombinedOutput() - if err != nil { - return nil, fmt.Errorf("Unexpected command output %s with error: %v", output, err) - } - - lines := strings.Split(string(output), "\n") - if len(lines) < 1 { - return nil, fmt.Errorf("Unexpected command output %s", output) - } - fields := strings.Fields(lines[0]) - if len(fields) < 4 { - return nil, fmt.Errorf("Unexpected address output %s ", lines[0]) - } - ip, _, err := net.ParseCIDR(fields[3]) - if err != nil { - return nil, fmt.Errorf("CNI failed to parse ip from output %s due to %v", output, err) - } - - return ip, nil -} - // TODO: Use the addToNetwork function to obtain the IP of the Pod. That will assume idempotent ADD call to the plugin. // Also fix the runtime's call to Status function to be done only in the case that the IP is lost, no need to do periodic calls func (plugin *cniNetworkPlugin) GetPodNetworkStatus(namespace string, name string, id kubecontainer.ContainerID) (*network.PodNetworkStatus, error) { @@ -170,11 +144,7 @@ func (plugin *cniNetworkPlugin) GetPodNetworkStatus(namespace string, name strin return nil, fmt.Errorf("CNI failed to retrieve network namespace path: %v", err) } - ip, err := plugin.getContainerIPAddress(netnsPath, "-4") - if err != nil { - // Fall back to IPv6 address if no IPv4 address is present - ip, err = plugin.getContainerIPAddress(netnsPath, "-6") - } + ip, err := network.GetPodIP(plugin.execer, plugin.nsenterPath, netnsPath, network.DefaultInterfaceName) if err != nil { return nil, err } diff --git a/pkg/kubelet/network/kubenet/kubenet_linux.go b/pkg/kubelet/network/kubenet/kubenet_linux.go index 8ced3032dd..4685529ca4 100644 --- a/pkg/kubelet/network/kubenet/kubenet_linux.go +++ b/pkg/kubelet/network/kubenet/kubenet_linux.go @@ -468,20 +468,11 @@ func (plugin *kubenetNetworkPlugin) GetPodNetworkStatus(namespace string, name s if err != nil { return nil, err } - // Try to retrieve ip inside container network namespace - output, err := plugin.execer.Command(nsenterPath, fmt.Sprintf("--net=%s", netnsPath), "-F", "--", - "ip", "-o", "-4", "addr", "show", "dev", network.DefaultInterfaceName).CombinedOutput() + ip, err := network.GetPodIP(plugin.execer, nsenterPath, netnsPath, network.DefaultInterfaceName) if err != nil { - return nil, fmt.Errorf("Unexpected command output %s with error: %v", output, err) - } - fields := strings.Fields(string(output)) - if len(fields) < 4 { - return nil, fmt.Errorf("Unexpected command output %s ", output) - } - ip, _, err := net.ParseCIDR(fields[3]) - if err != nil { - return nil, fmt.Errorf("Kubenet failed to parse ip from output %s due to %v", output, err) + return nil, err } + plugin.podIPs[id] = ip.String() return &network.PodNetworkStatus{IP: ip}, nil } diff --git a/pkg/kubelet/network/plugins.go b/pkg/kubelet/network/plugins.go index 405a2d1564..25c14937e9 100644 --- a/pkg/kubelet/network/plugins.go +++ b/pkg/kubelet/network/plugins.go @@ -199,3 +199,41 @@ func (plugin *NoopNetworkPlugin) GetPodNetworkStatus(namespace string, name stri func (plugin *NoopNetworkPlugin) Status() error { return nil } + +func getOnePodIP(execer utilexec.Interface, nsenterPath, netnsPath, interfaceName, addrType string) (net.IP, error) { + // Try to retrieve ip inside container network namespace + output, err := execer.Command(nsenterPath, fmt.Sprintf("--net=%s", netnsPath), "-F", "--", + "ip", "-o", addrType, "addr", "show", "dev", interfaceName, "scope", "global").CombinedOutput() + if err != nil { + return nil, fmt.Errorf("Unexpected command output %s with error: %v", output, err) + } + + lines := strings.Split(string(output), "\n") + if len(lines) < 1 { + return nil, fmt.Errorf("Unexpected command output %s", output) + } + fields := strings.Fields(lines[0]) + if len(fields) < 4 { + return nil, fmt.Errorf("Unexpected address output %s ", lines[0]) + } + ip, _, err := net.ParseCIDR(fields[3]) + if err != nil { + return nil, fmt.Errorf("CNI failed to parse ip from output %s due to %v", output, err) + } + + return ip, nil +} + +// GetPodIP gets the IP of the pod by inspecting the network info inside the pod's network namespace. +func GetPodIP(execer utilexec.Interface, nsenterPath, netnsPath, interfaceName string) (net.IP, error) { + ip, err := getOnePodIP(execer, nsenterPath, netnsPath, interfaceName, "-4") + if err != nil { + // Fall back to IPv6 address if no IPv4 address is present + ip, err = getOnePodIP(execer, nsenterPath, netnsPath, interfaceName, "-6") + } + if err != nil { + return nil, err + } + + return ip, nil +} From ae67a4e2095f59fdc1be10ff4f69f36e2a6f2db0 Mon Sep 17 00:00:00 2001 From: CJ Cullen <cjcullen@google.com> Date: Wed, 22 Jun 2016 11:06:56 -0700 Subject: [PATCH 110/339] Check HTTP Status code in webhook authorizer/authenticator. --- .../authenticator/token/webhook/webhook.go | 7 +- .../token/webhook/webhook_test.go | 74 ++++++++++++++++-- plugin/pkg/auth/authorizer/webhook/webhook.go | 17 +++-- .../auth/authorizer/webhook/webhook_test.go | 75 +++++++++++++++++-- 4 files changed, 151 insertions(+), 22 deletions(-) diff --git a/plugin/pkg/auth/authenticator/token/webhook/webhook.go b/plugin/pkg/auth/authenticator/token/webhook/webhook.go index ad298a39aa..43e76d00d8 100644 --- a/plugin/pkg/auth/authenticator/token/webhook/webhook.go +++ b/plugin/pkg/auth/authenticator/token/webhook/webhook.go @@ -18,6 +18,7 @@ limitations under the License. package webhook import ( + "fmt" "time" "k8s.io/kubernetes/pkg/api/unversioned" @@ -64,11 +65,15 @@ func (w *WebhookTokenAuthenticator) AuthenticateToken(token string) (user.Info, if err := result.Error(); err != nil { return nil, false, err } + var statusCode int + if result.StatusCode(&statusCode); statusCode < 200 || statusCode >= 300 { + return nil, false, fmt.Errorf("Error contacting webhook: %d", statusCode) + } spec := r.Spec if err := result.Into(r); err != nil { return nil, false, err } - go w.responseCache.Add(spec, r.Status, w.ttl) + w.responseCache.Add(spec, r.Status, w.ttl) } if !r.Status.Authenticated { return nil, false, nil diff --git a/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go b/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go index 9dfcb8d034..cbf63a2460 100644 --- a/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go +++ b/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go @@ -27,6 +27,7 @@ import ( "os" "reflect" "testing" + "time" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1" @@ -39,6 +40,7 @@ type Service interface { // Review looks at the TokenReviewSpec and provides an authentication // response in the TokenReviewStatus. Review(*v1beta1.TokenReview) + HTTPStatusCode() int } // NewTestServer wraps a Service as an httptest.Server. @@ -68,6 +70,10 @@ func NewTestServer(s Service, cert, key, caCert []byte) (*httptest.Server, error http.Error(w, fmt.Sprintf("failed to decode body: %v", err), http.StatusBadRequest) return } + if s.HTTPStatusCode() < 200 || s.HTTPStatusCode() >= 300 { + http.Error(w, "HTTP Error", s.HTTPStatusCode()) + return + } s.Review(&review) type userInfo struct { Username string `json:"username"` @@ -104,7 +110,8 @@ func NewTestServer(s Service, cert, key, caCert []byte) (*httptest.Server, error // A service that can be set to say yes or no to authentication requests. type mockService struct { - allow bool + allow bool + statusCode int } func (m *mockService) Review(r *v1beta1.TokenReview) { @@ -113,12 +120,13 @@ func (m *mockService) Review(r *v1beta1.TokenReview) { r.Status.User.Username = "realHooman@email.com" } } -func (m *mockService) Allow() { m.allow = true } -func (m *mockService) Deny() { m.allow = false } +func (m *mockService) Allow() { m.allow = true } +func (m *mockService) Deny() { m.allow = false } +func (m *mockService) HTTPStatusCode() int { return m.statusCode } // newTokenAuthenticator creates a temporary kubeconfig file from the provided // arguments and attempts to load a new WebhookTokenAuthenticator from it. -func newTokenAuthenticator(serverURL string, clientCert, clientKey, ca []byte) (*WebhookTokenAuthenticator, error) { +func newTokenAuthenticator(serverURL string, clientCert, clientKey, ca []byte, cacheTime time.Duration) (*WebhookTokenAuthenticator, error) { tempfile, err := ioutil.TempFile("", "") if err != nil { return nil, err @@ -140,7 +148,7 @@ func newTokenAuthenticator(serverURL string, clientCert, clientKey, ca []byte) ( if err := json.NewEncoder(tempfile).Encode(config); err != nil { return nil, err } - return New(p, 0) + return New(p, cacheTime) } func TestTLSConfig(t *testing.T) { @@ -187,6 +195,7 @@ func TestTLSConfig(t *testing.T) { // Use a closure so defer statements trigger between loop iterations. func() { service := new(mockService) + service.statusCode = 200 server, err := NewTestServer(service, tt.serverCert, tt.serverKey, tt.serverCA) if err != nil { @@ -195,7 +204,7 @@ func TestTLSConfig(t *testing.T) { } defer server.Close() - wh, err := newTokenAuthenticator(server.URL, tt.clientCert, tt.clientKey, tt.clientCA) + wh, err := newTokenAuthenticator(server.URL, tt.clientCert, tt.clientKey, tt.clientCA, 0) if err != nil { t.Errorf("%s: failed to create client: %v", tt.test, err) return @@ -239,6 +248,8 @@ func (rec *recorderService) Review(r *v1beta1.TokenReview) { r.Status = rec.response } +func (rec *recorderService) HTTPStatusCode() int { return 200 } + func TestWebhookTokenAuthenticator(t *testing.T) { serv := &recorderService{} @@ -248,7 +259,7 @@ func TestWebhookTokenAuthenticator(t *testing.T) { } defer s.Close() - wh, err := newTokenAuthenticator(s.URL, clientCert, clientKey, caCert) + wh, err := newTokenAuthenticator(s.URL, clientCert, clientKey, caCert, 0) if err != nil { t.Fatal(err) } @@ -350,3 +361,52 @@ func (a *authenticationUserInfo) GetExtra() map[string][]string { return a.Extra // Ensure v1beta1.UserInfo contains the fields necessary to implement the // user.Info interface. var _ user.Info = (*authenticationUserInfo)(nil) + +// TestWebhookCache verifies that error responses from the server are not +// cached, but successful responses are. +func TestWebhookCache(t *testing.T) { + serv := new(mockService) + s, err := NewTestServer(serv, serverCert, serverKey, caCert) + if err != nil { + t.Fatal(err) + } + defer s.Close() + + // Create an authenticator that caches successful responses "forever" (100 days). + wh, err := newTokenAuthenticator(s.URL, clientCert, clientKey, caCert, 2400*time.Hour) + if err != nil { + t.Fatal(err) + } + token := "t0k3n" + serv.allow = true + serv.statusCode = 500 + if _, _, err := wh.AuthenticateToken(token); err == nil { + t.Errorf("Webhook returned HTTP 500, but authorizer reported success.") + } + serv.statusCode = 404 + if _, _, err := wh.AuthenticateToken(token); err == nil { + t.Errorf("Webhook returned HTTP 404, but authorizer reported success.") + } + serv.statusCode = 200 + if _, _, err := wh.AuthenticateToken(token); err != nil { + t.Errorf("Webhook returned HTTP 200, but authorizer reported unauthorized.") + } + serv.statusCode = 500 + if _, _, err := wh.AuthenticateToken(token); err != nil { + t.Errorf("Webhook should have successful response cached, but authorizer reported unauthorized.") + } + // For a different request, webhook should be called again. + token = "an0th3r_t0k3n" + serv.statusCode = 500 + if _, _, err := wh.AuthenticateToken(token); err == nil { + t.Errorf("Webhook returned HTTP 500, but authorizer reported success.") + } + serv.statusCode = 200 + if _, _, err := wh.AuthenticateToken(token); err != nil { + t.Errorf("Webhook returned HTTP 200, but authorizer reported unauthorized.") + } + serv.statusCode = 500 + if _, _, err := wh.AuthenticateToken(token); err != nil { + t.Errorf("Webhook should have successful response cached, but authorizer reported unauthorized.") + } +} diff --git a/plugin/pkg/auth/authorizer/webhook/webhook.go b/plugin/pkg/auth/authorizer/webhook/webhook.go index eeaf2af1d3..956789864f 100644 --- a/plugin/pkg/auth/authorizer/webhook/webhook.go +++ b/plugin/pkg/auth/authorizer/webhook/webhook.go @@ -20,6 +20,7 @@ package webhook import ( "encoding/json" "errors" + "fmt" "time" "k8s.io/kubernetes/pkg/api/unversioned" @@ -151,16 +152,18 @@ func (w *WebhookAuthorizer) Authorize(attr authorizer.Attributes) (err error) { if err := result.Error(); err != nil { return err } + var statusCode int + if result.StatusCode(&statusCode); statusCode < 200 || statusCode >= 300 { + return fmt.Errorf("Error contacting webhook: %d", statusCode) + } if err := result.Into(r); err != nil { return err } - go func() { - if r.Status.Allowed { - w.responseCache.Add(string(key), r.Status, w.authorizedTTL) - } else { - w.responseCache.Add(string(key), r.Status, w.unauthorizedTTL) - } - }() + if r.Status.Allowed { + w.responseCache.Add(string(key), r.Status, w.authorizedTTL) + } else { + w.responseCache.Add(string(key), r.Status, w.unauthorizedTTL) + } } if r.Status.Allowed { return nil diff --git a/plugin/pkg/auth/authorizer/webhook/webhook_test.go b/plugin/pkg/auth/authorizer/webhook/webhook_test.go index deb332960f..2f95751c02 100644 --- a/plugin/pkg/auth/authorizer/webhook/webhook_test.go +++ b/plugin/pkg/auth/authorizer/webhook/webhook_test.go @@ -29,6 +29,7 @@ import ( "reflect" "testing" "text/template" + "time" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" @@ -197,6 +198,7 @@ current-context: default // Service mocks a remote service. type Service interface { Review(*v1beta1.SubjectAccessReview) + HTTPStatusCode() int } // NewTestServer wraps a Service as an httptest.Server. @@ -226,6 +228,10 @@ func NewTestServer(s Service, cert, key, caCert []byte) (*httptest.Server, error http.Error(w, fmt.Sprintf("failed to decode body: %v", err), http.StatusBadRequest) return } + if s.HTTPStatusCode() < 200 || s.HTTPStatusCode() >= 300 { + http.Error(w, "HTTP Error", s.HTTPStatusCode()) + return + } s.Review(&review) type status struct { Allowed bool `json:"allowed"` @@ -250,18 +256,20 @@ func NewTestServer(s Service, cert, key, caCert []byte) (*httptest.Server, error // A service that can be set to allow all or deny all authorization requests. type mockService struct { - allow bool + allow bool + statusCode int } func (m *mockService) Review(r *v1beta1.SubjectAccessReview) { r.Status.Allowed = m.allow } -func (m *mockService) Allow() { m.allow = true } -func (m *mockService) Deny() { m.allow = false } +func (m *mockService) Allow() { m.allow = true } +func (m *mockService) Deny() { m.allow = false } +func (m *mockService) HTTPStatusCode() int { return m.statusCode } // newAuthorizer creates a temporary kubeconfig file from the provided arguments and attempts to load // a new WebhookAuthorizer from it. -func newAuthorizer(callbackURL string, clientCert, clientKey, ca []byte) (*WebhookAuthorizer, error) { +func newAuthorizer(callbackURL string, clientCert, clientKey, ca []byte, cacheTime time.Duration) (*WebhookAuthorizer, error) { tempfile, err := ioutil.TempFile("", "") if err != nil { return nil, err @@ -283,7 +291,7 @@ func newAuthorizer(callbackURL string, clientCert, clientKey, ca []byte) (*Webho if err := json.NewEncoder(tempfile).Encode(config); err != nil { return nil, err } - return New(p, 0, 0) + return New(p, cacheTime, cacheTime) } func TestTLSConfig(t *testing.T) { @@ -330,6 +338,7 @@ func TestTLSConfig(t *testing.T) { // Use a closure so defer statements trigger between loop iterations. func() { service := new(mockService) + service.statusCode = 200 server, err := NewTestServer(service, tt.serverCert, tt.serverKey, tt.serverCA) if err != nil { @@ -338,7 +347,7 @@ func TestTLSConfig(t *testing.T) { } defer server.Close() - wh, err := newAuthorizer(server.URL, tt.clientCert, tt.clientKey, tt.clientCA) + wh, err := newAuthorizer(server.URL, tt.clientCert, tt.clientKey, tt.clientCA, 0) if err != nil { t.Errorf("%s: failed to create client: %v", tt.test, err) return @@ -384,6 +393,8 @@ func (rec *recorderService) Last() (v1beta1.SubjectAccessReview, error) { return rec.last, rec.err } +func (rec *recorderService) HTTPStatusCode() int { return 200 } + func TestWebhook(t *testing.T) { serv := new(recorderService) s, err := NewTestServer(serv, serverCert, serverKey, caCert) @@ -392,7 +403,7 @@ func TestWebhook(t *testing.T) { } defer s.Close() - wh, err := newAuthorizer(s.URL, clientCert, clientKey, caCert) + wh, err := newAuthorizer(s.URL, clientCert, clientKey, caCert, 0) if err != nil { t.Fatal(err) } @@ -477,3 +488,53 @@ func TestWebhook(t *testing.T) { } } } + +// TestWebhookCache verifies that error responses from the server are not +// cached, but successful responses are. +func TestWebhookCache(t *testing.T) { + serv := new(mockService) + s, err := NewTestServer(serv, serverCert, serverKey, caCert) + if err != nil { + t.Fatal(err) + } + defer s.Close() + + // Create an authorizer that caches successful responses "forever" (100 days). + wh, err := newAuthorizer(s.URL, clientCert, clientKey, caCert, 2400*time.Hour) + if err != nil { + t.Fatal(err) + } + + attr := authorizer.AttributesRecord{User: &user.DefaultInfo{Name: "alice"}} + serv.allow = true + serv.statusCode = 500 + if err := wh.Authorize(attr); err == nil { + t.Errorf("Webhook returned HTTP 500, but authorizer reported success.") + } + serv.statusCode = 404 + if err := wh.Authorize(attr); err == nil { + t.Errorf("Webhook returned HTTP 404, but authorizer reported success.") + } + serv.statusCode = 200 + if err := wh.Authorize(attr); err != nil { + t.Errorf("Webhook returned HTTP 200, but authorizer reported unauthorized.") + } + serv.statusCode = 500 + if err := wh.Authorize(attr); err != nil { + t.Errorf("Webhook should have successful response cached, but authorizer reported unauthorized.") + } + // For a different request, webhook should be called again. + attr = authorizer.AttributesRecord{User: &user.DefaultInfo{Name: "bob"}} + serv.statusCode = 500 + if err := wh.Authorize(attr); err == nil { + t.Errorf("Webhook returned HTTP 500, but authorizer reported success.") + } + serv.statusCode = 200 + if err := wh.Authorize(attr); err != nil { + t.Errorf("Webhook returned HTTP 200, but authorizer reported unauthorized.") + } + serv.statusCode = 500 + if err := wh.Authorize(attr); err != nil { + t.Errorf("Webhook should have successful response cached, but authorizer reported unauthorized.") + } +} From a657d0587b47193976606a418572957f834658e3 Mon Sep 17 00:00:00 2001 From: Dan Williams <dcbw@redhat.com> Date: Wed, 22 Jun 2016 09:44:33 -0500 Subject: [PATCH 111/339] kubelet/kubenet: Fix getRunningPods() to support rkt pods Don't assume there's an infra container. --- pkg/kubelet/container/runtime.go | 5 +++ pkg/kubelet/container/testing/fake_runtime.go | 8 +++++ pkg/kubelet/container/testing/runtime_mock.go | 5 +++ pkg/kubelet/dockertools/docker_manager.go | 10 ++++++ pkg/kubelet/network/kubenet/kubenet_linux.go | 36 +++++++++---------- pkg/kubelet/rkt/rkt.go | 4 +++ 6 files changed, 49 insertions(+), 19 deletions(-) diff --git a/pkg/kubelet/container/runtime.go b/pkg/kubelet/container/runtime.go index ba11209fc4..d48f4a7024 100644 --- a/pkg/kubelet/container/runtime.go +++ b/pkg/kubelet/container/runtime.go @@ -108,6 +108,11 @@ type Runtime interface { // TODO: Change ContainerID to a Pod ID since the namespace is shared // by all containers in the pod. GetNetNS(containerID ContainerID) (string, error) + // Returns the container ID that represents the Pod, as passed to network + // plugins. For example if the runtime uses an infra container, returns + // the infra container's ContainerID. + // TODO: Change ContainerID to a Pod ID, see GetNetNS() + GetPodContainerID(*Pod) (ContainerID, error) // TODO(vmarmol): Unify pod and containerID args. // GetContainerLogs returns logs of a specific container. By // default, it returns a snapshot of the container log. Set 'follow' to true to diff --git a/pkg/kubelet/container/testing/fake_runtime.go b/pkg/kubelet/container/testing/fake_runtime.go index 9431d61b90..3bd5c69974 100644 --- a/pkg/kubelet/container/testing/fake_runtime.go +++ b/pkg/kubelet/container/testing/fake_runtime.go @@ -368,6 +368,14 @@ func (f *FakeRuntime) GetNetNS(containerID ContainerID) (string, error) { return "", f.Err } +func (f *FakeRuntime) GetPodContainerID(pod *Pod) (ContainerID, error) { + f.Lock() + defer f.Unlock() + + f.CalledFunctions = append(f.CalledFunctions, "GetPodContainerID") + return ContainerID{}, f.Err +} + func (f *FakeRuntime) GarbageCollect(gcPolicy ContainerGCPolicy, ready bool) error { f.Lock() defer f.Unlock() diff --git a/pkg/kubelet/container/testing/runtime_mock.go b/pkg/kubelet/container/testing/runtime_mock.go index 17003b8e1e..939054b0f0 100644 --- a/pkg/kubelet/container/testing/runtime_mock.go +++ b/pkg/kubelet/container/testing/runtime_mock.go @@ -133,6 +133,11 @@ func (r *Mock) GetNetNS(containerID ContainerID) (string, error) { return "", args.Error(0) } +func (r *Mock) GetPodContainerID(pod *Pod) (ContainerID, error) { + args := r.Called(pod) + return ContainerID{}, args.Error(0) +} + func (r *Mock) GarbageCollect(gcPolicy ContainerGCPolicy, ready bool) error { args := r.Called(gcPolicy, ready) return args.Error(0) diff --git a/pkg/kubelet/dockertools/docker_manager.go b/pkg/kubelet/dockertools/docker_manager.go index 7712bf37df..627fc4d389 100644 --- a/pkg/kubelet/dockertools/docker_manager.go +++ b/pkg/kubelet/dockertools/docker_manager.go @@ -2318,6 +2318,16 @@ func (dm *DockerManager) GetNetNS(containerID kubecontainer.ContainerID) (string return netnsPath, nil } +func (dm *DockerManager) GetPodContainerID(pod *kubecontainer.Pod) (kubecontainer.ContainerID, error) { + for _, c := range pod.Containers { + if c.Name == PodInfraContainerName { + return c.ID, nil + } + } + + return kubecontainer.ContainerID{}, fmt.Errorf("Pod %s unknown to docker.", kubecontainer.BuildPodFullName(pod.Name, pod.Namespace)) +} + // Garbage collection of dead containers func (dm *DockerManager) GarbageCollect(gcPolicy kubecontainer.ContainerGCPolicy, allSourcesReady bool) error { return dm.containerGC.GarbageCollect(gcPolicy, allSourcesReady) diff --git a/pkg/kubelet/network/kubenet/kubenet_linux.go b/pkg/kubelet/network/kubenet/kubenet_linux.go index 4685529ca4..927bab804c 100644 --- a/pkg/kubelet/network/kubenet/kubenet_linux.go +++ b/pkg/kubelet/network/kubenet/kubenet_linux.go @@ -34,7 +34,6 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apis/componentconfig" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" - "k8s.io/kubernetes/pkg/kubelet/dockertools" "k8s.io/kubernetes/pkg/kubelet/network" "k8s.io/kubernetes/pkg/util/bandwidth" utildbus "k8s.io/kubernetes/pkg/util/dbus" @@ -495,24 +494,23 @@ func (plugin *kubenetNetworkPlugin) getRunningPods() ([]*hostport.RunningPod, er } runningPods := make([]*hostport.RunningPod, 0) for _, p := range pods { - for _, c := range p.Containers { - if c.Name != dockertools.PodInfraContainerName { - continue - } - ipString, ok := plugin.podIPs[c.ID] - if !ok { - continue - } - podIP := net.ParseIP(ipString) - if podIP == nil { - continue - } - if pod, ok := plugin.host.GetPodByName(p.Namespace, p.Name); ok { - runningPods = append(runningPods, &hostport.RunningPod{ - Pod: pod, - IP: podIP, - }) - } + containerID, err := plugin.host.GetRuntime().GetPodContainerID(p) + if err != nil { + continue + } + ipString, ok := plugin.podIPs[containerID] + if !ok { + continue + } + podIP := net.ParseIP(ipString) + if podIP == nil { + continue + } + if pod, ok := plugin.host.GetPodByName(p.Namespace, p.Name); ok { + runningPods = append(runningPods, &hostport.RunningPod{ + Pod: pod, + IP: podIP, + }) } } return runningPods, nil diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go index 84e7c5412a..da140d6331 100644 --- a/pkg/kubelet/rkt/rkt.go +++ b/pkg/kubelet/rkt/rkt.go @@ -1785,6 +1785,10 @@ func (r *Runtime) GetNetNS(containerID kubecontainer.ContainerID) (string, error return netnsPathFromName(makePodNetnsName(kubetypes.UID(containerID.ID))), nil } +func (r *Runtime) GetPodContainerID(pod *kubecontainer.Pod) (kubecontainer.ContainerID, error) { + return kubecontainer.ContainerID{ID: string(pod.ID)}, nil +} + func podDetailsFromServiceFile(serviceFilePath string) (string, string, string, bool, error) { f, err := os.Open(serviceFilePath) if err != nil { From e47d020cb6025c181d2c4a519cad9766b2096c16 Mon Sep 17 00:00:00 2001 From: Dan Williams <dcbw@redhat.com> Date: Wed, 22 Jun 2016 14:26:11 -0500 Subject: [PATCH 112/339] kubelet/kubenet: simplify getting nsenter path --- pkg/kubelet/network/kubenet/kubenet_linux.go | 24 ++++++-------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/pkg/kubelet/network/kubenet/kubenet_linux.go b/pkg/kubelet/network/kubenet/kubenet_linux.go index 927bab804c..bc90b7b3d4 100644 --- a/pkg/kubelet/network/kubenet/kubenet_linux.go +++ b/pkg/kubelet/network/kubenet/kubenet_linux.go @@ -95,6 +95,7 @@ func NewPlugin(networkPluginDir string) network.NetworkPlugin { func (plugin *kubenetNetworkPlugin) Init(host network.Host, hairpinMode componentconfig.HairpinMode, nonMasqueradeCIDR string) error { plugin.host = host plugin.hairpinMode = hairpinMode + plugin.nonMasqueradeCIDR = nonMasqueradeCIDR plugin.cniConfig = &libcni.CNIConfig{ Path: []string{DefaultCNIDir, plugin.vendorDir}, } @@ -127,7 +128,11 @@ func (plugin *kubenetNetworkPlugin) Init(host network.Host, hairpinMode componen return fmt.Errorf("Failed to generate loopback config: %v", err) } - plugin.nonMasqueradeCIDR = nonMasqueradeCIDR + plugin.nsenterPath, err = plugin.execer.LookPath("nsenter") + if err != nil { + return fmt.Errorf("Failed to find nsenter binary: %v", err) + } + // Need to SNAT outbound traffic from cluster if err = plugin.ensureMasqRule(); err != nil { return err @@ -463,11 +468,7 @@ func (plugin *kubenetNetworkPlugin) GetPodNetworkStatus(namespace string, name s if err != nil { return nil, fmt.Errorf("Kubenet failed to retrieve network namespace path: %v", err) } - nsenterPath, err := plugin.getNsenterPath() - if err != nil { - return nil, err - } - ip, err := network.GetPodIP(plugin.execer, nsenterPath, netnsPath, network.DefaultInterfaceName) + ip, err := network.GetPodIP(plugin.execer, plugin.nsenterPath, netnsPath, network.DefaultInterfaceName) if err != nil { return nil, err } @@ -556,17 +557,6 @@ func (plugin *kubenetNetworkPlugin) delContainerFromNetwork(config *libcni.Netwo return nil } -func (plugin *kubenetNetworkPlugin) getNsenterPath() (string, error) { - if plugin.nsenterPath == "" { - nsenterPath, err := plugin.execer.LookPath("nsenter") - if err != nil { - return "", err - } - plugin.nsenterPath = nsenterPath - } - return plugin.nsenterPath, nil -} - // shaper retrieves the bandwidth shaper and, if it hasn't been fetched before, // initializes it and ensures the bridge is appropriately configured // This function should only be called while holding the `plugin.mu` lock From d6ab37927531f9251c063e3527ba44f07189d933 Mon Sep 17 00:00:00 2001 From: Matt Liggett <mml@google.com> Date: Wed, 22 Jun 2016 11:44:45 -0700 Subject: [PATCH 113/339] Catch the case where we cannot find any nodes. It's possible to fall through the loops above with node still nil. This catches this and reports an error. Found this working on #27819. --- pkg/dns/dns.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/dns/dns.go b/pkg/dns/dns.go index 4cdfc67715..b65fe9fc55 100644 --- a/pkg/dns/dns.go +++ b/pkg/dns/dns.go @@ -659,6 +659,10 @@ func (kd *KubeDNS) getClusterZone() (string, error) { } } + if node == nil { + return "", fmt.Errorf("Could not find any nodes") + } + zone, ok := node.Annotations[unversioned.LabelZoneFailureDomain] if !ok || zone == "" { return "", fmt.Errorf("unknown cluster zone") From ea9cedab3af94bce15727e7b5b8c08513bf8ff08 Mon Sep 17 00:00:00 2001 From: "Madhusudan.C.S" <madhusudancs@google.com> Date: Wed, 22 Jun 2016 12:48:47 -0700 Subject: [PATCH 114/339] Dumbed down version of providing a separate IP range for each cluster in the federation. --- hack/e2e-internal/e2e-up.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/hack/e2e-internal/e2e-up.sh b/hack/e2e-internal/e2e-up.sh index eea67d4b87..fd4495e655 100755 --- a/hack/e2e-internal/e2e-up.sh +++ b/hack/e2e-internal/e2e-up.sh @@ -29,16 +29,19 @@ source "${KUBE_ROOT}/cluster/kube-util.sh" prepare-e2e -if [[ "${FEDERATION:-}" == "true" ]];then - #TODO(colhom): the last cluster that was created in the loop above is the current context. +if [[ "${FEDERATION:-}" == "true" ]]; then + cur_ip_octet2=180 + # TODO(colhom): the last cluster that was created in the loop above is the current context. # Hence, it will be the cluster that hosts the federated components. # In the future, we will want to loop through the all the federated contexts, # select each one and call federated-up for zone in ${E2E_ZONES};do - ( - set-federation-zone-vars "$zone" - test-setup - ) + ( + export CLUSTER_IP_RANGE="10.${cur_ip_octet2}.0.0/16" + set-federation-zone-vars "$zone" + test-setup + ) + cur_ip_octet2="$((cur_ip_octet2 + 1))" done tagfile="${KUBE_ROOT}/federation/manifests/federated-image.tag" if [[ ! -f "$tagfile" ]]; then From dfe8e606c11b498e2a1bbeb9ae2a03b2a0f846b1 Mon Sep 17 00:00:00 2001 From: saadali <saadali@google.com> Date: Wed, 22 Jun 2016 12:56:58 -0700 Subject: [PATCH 115/339] Fix device path used by volume WaitForAttach --- .../volume/statusupdater/node_status_updater.go | 1 + .../util/operationexecutor/operation_executor.go | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pkg/controller/volume/statusupdater/node_status_updater.go b/pkg/controller/volume/statusupdater/node_status_updater.go index 591ee07489..cf9d989b5f 100644 --- a/pkg/controller/volume/statusupdater/node_status_updater.go +++ b/pkg/controller/volume/statusupdater/node_status_updater.go @@ -121,6 +121,7 @@ func (nsu *nodeStatusUpdater) UpdateNodeStatuses() error { glog.V(3).Infof( "Updating status for node %q succeeded. patchBytes: %q", + nodeName, string(patchBytes)) } return nil diff --git a/pkg/volume/util/operationexecutor/operation_executor.go b/pkg/volume/util/operationexecutor/operation_executor.go index f1c5fc4493..25b4fb3b16 100644 --- a/pkg/volume/util/operationexecutor/operation_executor.go +++ b/pkg/volume/util/operationexecutor/operation_executor.go @@ -575,11 +575,12 @@ func (oe *operationExecutor) generateMountVolumeFunc( if volumeAttacher != nil { // Wait for attachable volumes to finish attaching glog.Infof( - "Entering MountVolume.WaitForAttach for volume %q (spec.Name: %q) pod %q (UID: %q).", + "Entering MountVolume.WaitForAttach for volume %q (spec.Name: %q) pod %q (UID: %q) DevicePath: %q", volumeToMount.VolumeName, volumeToMount.VolumeSpec.Name(), volumeToMount.PodName, - volumeToMount.Pod.UID) + volumeToMount.Pod.UID, + volumeToMount.DevicePath) devicePath, err := volumeAttacher.WaitForAttach( volumeToMount.VolumeSpec, volumeToMount.DevicePath, waitForAttachTimeout) @@ -889,12 +890,13 @@ func (oe *operationExecutor) generateVerifyControllerAttachedVolumeFunc( for _, attachedVolume := range node.Status.VolumesAttached { if attachedVolume.Name == volumeToMount.VolumeName { addVolumeNodeErr := actualStateOfWorld.MarkVolumeAsAttached( - volumeToMount.VolumeSpec, nodeName, volumeToMount.DevicePath) - glog.Infof("Controller successfully attached volume %q (spec.Name: %q) pod %q (UID: %q)", + volumeToMount.VolumeSpec, nodeName, attachedVolume.DevicePath) + glog.Infof("Controller successfully attached volume %q (spec.Name: %q) pod %q (UID: %q) devicePath: %q", volumeToMount.VolumeName, volumeToMount.VolumeSpec.Name(), volumeToMount.PodName, - volumeToMount.Pod.UID) + volumeToMount.Pod.UID, + attachedVolume.DevicePath) if addVolumeNodeErr != nil { // On failure, return error. Caller will log and retry. From cc8aaf195d1eefe4c2f87d544c92b00292113c89 Mon Sep 17 00:00:00 2001 From: Daniel Wang <wonderfly@google.com> Date: Wed, 22 Jun 2016 13:02:48 -0700 Subject: [PATCH 116/339] e2e-runner: Get rid of the uses of JENKINS_GCI_IMAGE_TYPE It's now `JENKINS_GCI_IMAGE_FAMILY`. --- hack/jenkins/e2e-runner.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hack/jenkins/e2e-runner.sh b/hack/jenkins/e2e-runner.sh index 699a4f3fcd..b779a963a9 100755 --- a/hack/jenkins/e2e-runner.sh +++ b/hack/jenkins/e2e-runner.sh @@ -165,7 +165,9 @@ if [[ -n "${JENKINS_GCI_IMAGE_FAMILY:-}" ]]; then export KUBE_GCE_MASTER_PROJECT="${GCI_STAGING_PROJECT}" export KUBE_GCE_MASTER_IMAGE="$(get_latest_gci_image "${GCI_STAGING_PROJECT}" "${JENKINS_GCI_IMAGE_FAMILY}")" export KUBE_OS_DISTRIBUTION="gci" - if [[ "${JENKINS_GCI_IMAGE_TYPE}" == preview-test ]]; then + if [[ "${JENKINS_GCI_IMAGE_FAMILY}" == "gci-preview-test" ]]; then + # The family "gci-preview-test" is reserved for a special type of GCI images + # that are used to continuously validate Docker releases. export KUBE_GCI_DOCKER_VERSION="$(get_latest_docker_release)" fi fi From ff1264bc33562ed580fad581b2ffd4944ac0bdf9 Mon Sep 17 00:00:00 2001 From: nikhiljindal <nikhiljindal@google.com> Date: Wed, 22 Jun 2016 13:08:41 -0700 Subject: [PATCH 117/339] Pushing a new KubeDNS image and updating the YAML files --- build/kube-dns/Changelog | 3 +++ build/kube-dns/Makefile | 4 ++-- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base | 10 +++++----- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in | 10 +++++----- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed | 10 +++++----- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/build/kube-dns/Changelog b/build/kube-dns/Changelog index 020953e1dd..834a1e263a 100644 --- a/build/kube-dns/Changelog +++ b/build/kube-dns/Changelog @@ -3,3 +3,6 @@ ## Version 1.3 (Fri June 3 2016 Prashanth.B <beeps@google.com>) - Fixed SRV record lookup (issue #26116) + + ## Version 1.4 (Tue June 21 2016 Nikhil Jindal <nikhiljindal@google.com>) + - Initialising nodesStore (issue #27820) diff --git a/build/kube-dns/Makefile b/build/kube-dns/Makefile index 247a39e6f2..5d0dfa7748 100644 --- a/build/kube-dns/Makefile +++ b/build/kube-dns/Makefile @@ -17,12 +17,12 @@ # If you update this image please bump the tag value before pushing. # # Usage: -# [ARCH=amd64] [TAG=1.3] [REGISTRY=gcr.io/google_containers] [BASEIMAGE=busybox] make (container|push) +# [ARCH=amd64] [TAG=1.4] [REGISTRY=gcr.io/google_containers] [BASEIMAGE=busybox] make (container|push) # Default registry, arch and tag. This can be overwritten by arguments to make PLATFORM?=linux ARCH?=amd64 -TAG?=1.3 +TAG?=1.4 REGISTRY?=gcr.io/google_containers GOLANG_VERSION=1.6 diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base index b70b1492c9..ce5f426de8 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base @@ -21,27 +21,27 @@ apiVersion: v1 kind: ReplicationController metadata: - name: kube-dns-v15 + name: kube-dns-v16 namespace: kube-system labels: k8s-app: kube-dns - version: v15 + version: v16 kubernetes.io/cluster-service: "true" spec: replicas: __PILLAR__DNS__REPLICAS__ selector: k8s-app: kube-dns - version: v15 + version: v16 template: metadata: labels: k8s-app: kube-dns - version: v15 + version: v16 kubernetes.io/cluster-service: "true" spec: containers: - name: kubedns - image: gcr.io/google_containers/kubedns-amd64:1.3 + image: gcr.io/google_containers/kubedns-amd64:1.4 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in index d3a71af190..3cc597dc4a 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in @@ -21,27 +21,27 @@ apiVersion: v1 kind: ReplicationController metadata: - name: kube-dns-v15 + name: kube-dns-v16 namespace: kube-system labels: k8s-app: kube-dns - version: v15 + version: v16 kubernetes.io/cluster-service: "true" spec: replicas: {{ pillar['dns_replicas'] }} selector: k8s-app: kube-dns - version: v15 + version: v16 template: metadata: labels: k8s-app: kube-dns - version: v15 + version: v16 kubernetes.io/cluster-service: "true" spec: containers: - name: kubedns - image: gcr.io/google_containers/kubedns-amd64:1.3 + image: gcr.io/google_containers/kubedns-amd64:1.4 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed index eb3ac73a0f..17df3ebe2a 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed @@ -21,27 +21,27 @@ apiVersion: v1 kind: ReplicationController metadata: - name: kube-dns-v15 + name: kube-dns-v16 namespace: kube-system labels: k8s-app: kube-dns - version: v15 + version: v16 kubernetes.io/cluster-service: "true" spec: replicas: $DNS_REPLICAS selector: k8s-app: kube-dns - version: v15 + version: v16 template: metadata: labels: k8s-app: kube-dns - version: v15 + version: v16 kubernetes.io/cluster-service: "true" spec: containers: - name: kubedns - image: gcr.io/google_containers/kubedns-amd64:1.3 + image: gcr.io/google_containers/kubedns-amd64:1.4 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in From d9f07925be40db7b9cfe9c6aa81bbec857a58792 Mon Sep 17 00:00:00 2001 From: Chao Xu <xuchao@google.com> Date: Mon, 20 Jun 2016 12:47:10 -0700 Subject: [PATCH 118/339] let dynamic client handle non-registered ListOptions; register ListOptions for apis/policy --- pkg/api/serialization_test.go | 14 +++++++++++ pkg/apis/apps/v1alpha1/register.go | 1 + pkg/apis/autoscaling/v1/register.go | 1 + pkg/apis/batch/v1/register.go | 1 + pkg/apis/batch/v2alpha1/register.go | 1 + pkg/apis/policy/v1alpha1/register.go | 3 +++ pkg/client/typed/dynamic/client.go | 23 +++++++++++++++++++ .../garbagecollector/garbagecollector.go | 14 +++++------ 8 files changed, 50 insertions(+), 8 deletions(-) diff --git a/pkg/api/serialization_test.go b/pkg/api/serialization_test.go index 4dbd1430c4..e0b470c430 100644 --- a/pkg/api/serialization_test.go +++ b/pkg/api/serialization_test.go @@ -174,6 +174,20 @@ var nonRoundTrippableTypes = sets.NewString( "WatchEvent", ) +var commonKinds = []string{"ListOptions", "DeleteOptions"} + +// verify all external group/versions have the common kinds like the ListOptions, DeleteOptions are registered. +func TestCommonKindsRegistered(t *testing.T) { + for _, kind := range commonKinds { + for _, group := range testapi.Groups { + gv := group.GroupVersion() + if _, err := api.Scheme.New(gv.WithKind(kind)); err != nil { + t.Error(err) + } + } + } +} + var nonInternalRoundTrippableTypes = sets.NewString("List", "ListOptions", "ExportOptions") var nonRoundTrippableTypesByVersion = map[string][]string{} diff --git a/pkg/apis/apps/v1alpha1/register.go b/pkg/apis/apps/v1alpha1/register.go index e069807754..9ab37dfb0d 100644 --- a/pkg/apis/apps/v1alpha1/register.go +++ b/pkg/apis/apps/v1alpha1/register.go @@ -41,6 +41,7 @@ func addKnownTypes(scheme *runtime.Scheme) { &PetSet{}, &PetSetList{}, &v1.ListOptions{}, + &v1.DeleteOptions{}, ) versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) } diff --git a/pkg/apis/autoscaling/v1/register.go b/pkg/apis/autoscaling/v1/register.go index bed584f0d1..fed2cdf48c 100644 --- a/pkg/apis/autoscaling/v1/register.go +++ b/pkg/apis/autoscaling/v1/register.go @@ -41,6 +41,7 @@ func addKnownTypes(scheme *runtime.Scheme) { &HorizontalPodAutoscalerList{}, &Scale{}, &v1.ListOptions{}, + &v1.DeleteOptions{}, ) versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) } diff --git a/pkg/apis/batch/v1/register.go b/pkg/apis/batch/v1/register.go index 3a5e1cfe38..d8c087f1bb 100644 --- a/pkg/apis/batch/v1/register.go +++ b/pkg/apis/batch/v1/register.go @@ -41,6 +41,7 @@ func addKnownTypes(scheme *runtime.Scheme) { &Job{}, &JobList{}, &v1.ListOptions{}, + &v1.DeleteOptions{}, ) versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) } diff --git a/pkg/apis/batch/v2alpha1/register.go b/pkg/apis/batch/v2alpha1/register.go index 1c33ab6782..00142f018a 100644 --- a/pkg/apis/batch/v2alpha1/register.go +++ b/pkg/apis/batch/v2alpha1/register.go @@ -44,6 +44,7 @@ func addKnownTypes(scheme *runtime.Scheme) { &ScheduledJob{}, &ScheduledJobList{}, &v1.ListOptions{}, + &v1.DeleteOptions{}, ) versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) } diff --git a/pkg/apis/policy/v1alpha1/register.go b/pkg/apis/policy/v1alpha1/register.go index dd6c2dd14c..a6a94d96d0 100644 --- a/pkg/apis/policy/v1alpha1/register.go +++ b/pkg/apis/policy/v1alpha1/register.go @@ -18,6 +18,7 @@ package v1alpha1 import ( "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/runtime" versionedwatch "k8s.io/kubernetes/pkg/watch/versioned" ) @@ -41,6 +42,8 @@ func addKnownTypes(scheme *runtime.Scheme) { scheme.AddKnownTypes(SchemeGroupVersion, &PodDisruptionBudget{}, &PodDisruptionBudgetList{}, + &v1.ListOptions{}, + &v1.DeleteOptions{}, ) // Add the watch version that applies versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) diff --git a/pkg/client/typed/dynamic/client.go b/pkg/client/typed/dynamic/client.go index 5d690877f0..26369bd582 100644 --- a/pkg/client/typed/dynamic/client.go +++ b/pkg/client/typed/dynamic/client.go @@ -270,3 +270,26 @@ func (parameterCodec) DecodeParameters(parameters url.Values, from unversioned.G } var defaultParameterEncoder runtime.ParameterCodec = parameterCodec{} + +type versionedParameterEncoderWithV1Fallback struct{} + +func (versionedParameterEncoderWithV1Fallback) EncodeParameters(obj runtime.Object, to unversioned.GroupVersion) (url.Values, error) { + ret, err := api.ParameterCodec.EncodeParameters(obj, to) + if err != nil && runtime.IsNotRegisteredError(err) { + // fallback to v1 + return api.ParameterCodec.EncodeParameters(obj, v1.SchemeGroupVersion) + } + return ret, err +} + +func (versionedParameterEncoderWithV1Fallback) DecodeParameters(parameters url.Values, from unversioned.GroupVersion, into runtime.Object) error { + return errors.New("DecodeParameters not implemented on versionedParameterEncoderWithV1Fallback") +} + +// VersionedParameterEncoderWithV1Fallback is useful for encoding query +// parameters for thirdparty resources. It tries to convert object to the +// specified version before converting it to query parameters, and falls back to +// converting to v1 if the object is not registered in the specified version. +// For the record, currently API server always treats query parameters sent to a +// thirdparty resource endpoint as v1. +var VersionedParameterEncoderWithV1Fallback runtime.ParameterCodec = versionedParameterEncoderWithV1Fallback{} diff --git a/pkg/controller/garbagecollector/garbagecollector.go b/pkg/controller/garbagecollector/garbagecollector.go index 0b7431278f..cbd0ba29e7 100644 --- a/pkg/controller/garbagecollector/garbagecollector.go +++ b/pkg/controller/garbagecollector/garbagecollector.go @@ -443,11 +443,9 @@ func gcListWatcher(client *dynamic.Client, resource unversioned.GroupVersionReso // namespaces if it's namespace scoped, so leave // APIResource.Namespaced as false is all right. apiResource := unversioned.APIResource{Name: resource.Resource} - // The default parameter codec used by the dynamic client cannot - // encode api.ListOptions. - // TODO: api.ParameterCodec doesn't support thirdparty objects. - // We need a generic parameter codec. - return client.ParameterCodec(api.ParameterCodec).Resource(&apiResource, api.NamespaceAll).List(&options) + return client.ParameterCodec(dynamic.VersionedParameterEncoderWithV1Fallback). + Resource(&apiResource, api.NamespaceAll). + List(&options) }, WatchFunc: func(options api.ListOptions) (watch.Interface, error) { // APIResource.Kind is not used by the dynamic client, so @@ -455,9 +453,9 @@ func gcListWatcher(client *dynamic.Client, resource unversioned.GroupVersionReso // namespaces if it's namespace scoped, so leave // APIResource.Namespaced as false is all right. apiResource := unversioned.APIResource{Name: resource.Resource} - // The default parameter codec used by the dynamic client cannot - // encode api.ListOptions. - return client.ParameterCodec(api.ParameterCodec).Resource(&apiResource, api.NamespaceAll).Watch(&options) + return client.ParameterCodec(dynamic.VersionedParameterEncoderWithV1Fallback). + Resource(&apiResource, api.NamespaceAll). + Watch(&options) }, } } From 095e04d5628b2d3f7e87fb70bcdf570da6f6e8ab Mon Sep 17 00:00:00 2001 From: Ron Lai <ronl@google.com> Date: Tue, 21 Jun 2016 16:05:15 -0700 Subject: [PATCH 119/339] Marking container gc policy deprecated in the future and changing the default value --- cmd/kubelet/app/options/options.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 795bcd6063..d0001923ae 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -106,12 +106,12 @@ func NewKubeletServer() *KubeletServer { ImageGCLowThresholdPercent: 80, LowDiskSpaceThresholdMB: 256, MasterServiceNamespace: api.NamespaceDefault, - MaxContainerCount: 240, - MaxPerPodContainerCount: 2, + MaxContainerCount: -1, + MaxPerPodContainerCount: 1, MaxOpenFiles: 1000000, MaxPods: 110, NvidiaGPUs: 0, - MinimumGCAge: unversioned.Duration{Duration: 1 * time.Minute}, + MinimumGCAge: unversioned.Duration{Duration: 0}, NetworkPluginDir: "/usr/libexec/kubernetes/kubelet-plugins/net/exec/", NetworkPluginName: "", NonMasqueradeCIDR: "10.0.0.0/8", @@ -189,8 +189,11 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.BoolVar(&s.RunOnce, "runonce", s.RunOnce, "If true, exit after spawning pods from local manifests or remote urls. Exclusive with --api-servers, and --enable-server") fs.BoolVar(&s.EnableDebuggingHandlers, "enable-debugging-handlers", s.EnableDebuggingHandlers, "Enables server endpoints for log collection and local running of containers and commands") fs.DurationVar(&s.MinimumGCAge.Duration, "minimum-container-ttl-duration", s.MinimumGCAge.Duration, "Minimum age for a finished container before it is garbage collected. Examples: '300ms', '10s' or '2h45m'") + fs.MarkDeprecated("minimum-container-ttl-duration", "Use --eviction-hard or --eviction-soft instead. Will be removed in a future version.") fs.Int32Var(&s.MaxPerPodContainerCount, "maximum-dead-containers-per-container", s.MaxPerPodContainerCount, "Maximum number of old instances to retain per container. Each container takes up some disk space. Default: 2.") + fs.MarkDeprecated("maximum-dead-containers-per-container", "Use --eviction-hard or --eviction-soft instead. Will be removed in a future version.") fs.Int32Var(&s.MaxContainerCount, "maximum-dead-containers", s.MaxContainerCount, "Maximum number of old instances of containers to retain globally. Each container takes up some disk space. Default: 100.") + fs.MarkDeprecated("maximum-dead-containers", "Use --eviction-hard or --eviction-soft instead. Will be removed in a future version.") fs.Var(&s.AuthPath, "auth-path", "Path to .kubernetes_auth file, specifying how to authenticate to API server.") fs.MarkDeprecated("auth-path", "will be removed in a future version") fs.Var(&s.KubeConfig, "kubeconfig", "Path to a kubeconfig file, specifying how to authenticate to API server (the master location is set by the api-servers flag).") From 21661ba1e6d114e8b259222093788664793c0cc9 Mon Sep 17 00:00:00 2001 From: Marcin <mwielgus@google.com> Date: Wed, 22 Jun 2016 22:41:36 +0200 Subject: [PATCH 120/339] Bump Cluster Autoscaler to 0.2.1 --- .../salt/cluster-autoscaler/cluster-autoscaler.manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest b/cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest index bd73b9e89d..b2894c5f5d 100644 --- a/cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest +++ b/cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest @@ -25,7 +25,7 @@ "containers": [ { "name": "cluster-autoscaler", - "image": "gcr.io/google_containers/cluster-autoscaler:v0.2.0", + "image": "gcr.io/google_containers/cluster-autoscaler:v0.2.1", "command": [ "/bin/sh", "-c", From 98651fca01a8b694f449cb4f8eb3aba20b872683 Mon Sep 17 00:00:00 2001 From: Andy Goldstein <agoldste@redhat.com> Date: Wed, 22 Jun 2016 17:04:54 -0400 Subject: [PATCH 121/339] bump(google/cadvisor): v0.23.5 Fix an issue where cadvisor was unable to report container filesystem stats for LVM-based devicemapper thin pools. Fix an issue where cadvisor would not report any stats for a container if it failed to get the filesystem stats when Docker's storage driver is devicemapper. --- Godeps/Godeps.json | 160 +++++++++--------- .../cadvisor/container/docker/factory.go | 65 ++++--- .../google/cadvisor/utils/docker/docker.go | 16 +- 3 files changed, 125 insertions(+), 116 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 60ec7a96c5..d64736db67 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -927,203 +927,203 @@ }, { "ImportPath": "github.com/google/cadvisor/api", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/cache/memory", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/collector", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/container", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/container/common", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/container/docker", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/container/libcontainer", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/container/raw", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/container/rkt", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/container/systemd", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/devicemapper", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/events", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/fs", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/healthz", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/http", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/http/mux", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/info/v1", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/info/v1/test", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/info/v2", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/machine", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/manager", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher/raw", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher/rkt", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/metrics", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/pages", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/pages/static", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/storage", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/summary", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/utils", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/utils/cloudinfo", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/utils/cpuload", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/utils/cpuload/netlink", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/utils/docker", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/utils/oomparser", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/utils/sysfs", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/utils/sysinfo", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/utils/tail", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/validate", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/cadvisor/version", - "Comment": "v0.23.4", - "Rev": "7d22cf63253c17bad8ab64b8eef679718d00342e" + "Comment": "v0.23.5", + "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" }, { "ImportPath": "github.com/google/gofuzz", diff --git a/vendor/github.com/google/cadvisor/container/docker/factory.go b/vendor/github.com/google/cadvisor/container/docker/factory.go index 6edfcd935d..68d5046816 100644 --- a/vendor/github.com/google/cadvisor/container/docker/factory.go +++ b/vendor/github.com/google/cadvisor/container/docker/factory.go @@ -22,6 +22,7 @@ import ( "strings" "sync" + dockertypes "github.com/docker/engine-api/types" "github.com/google/cadvisor/container" "github.com/google/cadvisor/container/libcontainer" "github.com/google/cadvisor/devicemapper" @@ -171,6 +172,31 @@ var ( version_re = regexp.MustCompile(version_regexp_string) ) +func startThinPoolWatcher(dockerInfo *dockertypes.Info) (*devicemapper.ThinPoolWatcher, error) { + _, err := devicemapper.ThinLsBinaryPresent() + if err != nil { + return nil, err + } + + dockerThinPoolName, err := dockerutil.DockerThinPoolName(*dockerInfo) + if err != nil { + return nil, err + } + + dockerMetadataDevice, err := dockerutil.DockerMetadataDevice(*dockerInfo) + if err != nil { + return nil, err + } + + thinPoolWatcher, err := devicemapper.NewThinPoolWatcher(dockerThinPoolName, dockerMetadataDevice) + if err != nil { + return nil, err + } + + go thinPoolWatcher.Start() + return thinPoolWatcher, nil +} + // Register root container before running this function! func Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, ignoreMetrics container.MetricSet) error { client, err := Client() @@ -191,40 +217,11 @@ func Register(factory info.MachineInfoFactory, fsInfo fs.FsInfo, ignoreMetrics c return fmt.Errorf("failed to get cgroup subsystems: %v", err) } - var ( - dockerStorageDriver = storageDriver(dockerInfo.Driver) - thinPoolWatcher *devicemapper.ThinPoolWatcher = nil - ) - - if dockerStorageDriver == devicemapperStorageDriver { - _, err := devicemapper.ThinLsBinaryPresent() - if err == nil { - // If the storage driver is devicemapper, create and start a - // ThinPoolWatcher to monitor the size of container CoW layers - // with thin_ls. - dockerThinPoolName, err := dockerutil.DockerThinPoolName(*dockerInfo) - if err != nil { - return fmt.Errorf("couldn't find device mapper thin pool name: %v", err) - } - - dockerMetadataDevice, err := dockerutil.DockerMetadataDevice(*dockerInfo) - if err != nil { - return fmt.Errorf("couldn't determine devicemapper metadata device: %v", err) - } - - thinPoolWatcher, err = devicemapper.NewThinPoolWatcher(dockerThinPoolName, dockerMetadataDevice) - if err != nil { - return fmt.Errorf("couldn't create thin pool watcher: %v", err) - } - - go thinPoolWatcher.Start() - } else { - msg := []string{ - "Couldn't locate thin_ls binary; not starting thin pool watcher.", - "Containers backed by thin pools will not show accurate usage.", - "err: %v", - } - glog.Errorf(strings.Join(msg, " "), err) + var thinPoolWatcher *devicemapper.ThinPoolWatcher + if storageDriver(dockerInfo.Driver) == devicemapperStorageDriver { + thinPoolWatcher, err = startThinPoolWatcher(dockerInfo) + if err != nil { + glog.Errorf("devicemapper filesystem stats will not be reported: %v", err) } } diff --git a/vendor/github.com/google/cadvisor/utils/docker/docker.go b/vendor/github.com/google/cadvisor/utils/docker/docker.go index 568bd12178..3ae627977b 100644 --- a/vendor/github.com/google/cadvisor/utils/docker/docker.go +++ b/vendor/github.com/google/cadvisor/utils/docker/docker.go @@ -16,6 +16,7 @@ package docker import ( "fmt" + "os" "strings" dockertypes "github.com/docker/engine-api/types" @@ -50,8 +51,19 @@ func DockerThinPoolName(info dockertypes.Info) (string, error) { func DockerMetadataDevice(info dockertypes.Info) (string, error) { metadataDevice := DriverStatusValue(info.DriverStatus, DriverStatusMetadataFile) - if len(metadataDevice) == 0 { - return "", fmt.Errorf("Could not get the devicemapper metadata device") + if len(metadataDevice) != 0 { + return metadataDevice, nil + } + + poolName, err := DockerThinPoolName(info) + if err != nil { + return "", err + } + + metadataDevice = fmt.Sprintf("/dev/mapper/%s_tmeta", poolName) + + if _, err := os.Stat(metadataDevice); err != nil { + return "", err } return metadataDevice, nil From 97ac3595d377dc25716b1a015b25223896c54e57 Mon Sep 17 00:00:00 2001 From: Johannes Scheuermann <johannes.scheuermann@inovex.de> Date: Wed, 22 Jun 2016 23:27:41 +0200 Subject: [PATCH 122/339] Add upgrade Docker VM --- build/common.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/common.sh b/build/common.sh index 5decf6b197..fe5d5f0336 100755 --- a/build/common.sh +++ b/build/common.sh @@ -266,6 +266,9 @@ function kube::build::ensure_docker_daemon_connectivity { echo " - Set your environment variables using: " echo " - eval \$(docker-machine env ${DOCKER_MACHINE_NAME})" echo " - \$(boot2docker shellinit)" + echo " - Update your Docker VM" + echo " - Error Message: 'Error response from daemon: client is newer than server (...)' " + echo " - docker-machine upgrade ${DOCKER_MACHINE_NAME}" echo " - On Linux, user isn't in 'docker' group. Add and relogin." echo " - Something like 'sudo usermod -a -G docker ${USER-user}'" echo " - RHEL7 bug and workaround: https://bugzilla.redhat.com/show_bug.cgi?id=1119282#c8" From 27f4eca5b315d5db7c35d888a4004065ef0e6199 Mon Sep 17 00:00:00 2001 From: Chao Xu <xuchao@google.com> Date: Wed, 22 Jun 2016 14:57:26 -0700 Subject: [PATCH 123/339] fix test-cmd multi-resource test --- hack/test-cmd.sh | 2 +- hack/testdata/multi-resource-yaml-modify.yaml | 2 ++ hack/testdata/multi-resource-yaml.yaml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 78ae3843d0..6e33187611 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -2031,7 +2031,7 @@ __EOF__ fi kubectl describe -f "${file}" "${kube_flags[@]}" # Command - kubectl replace -f $replace_file --force "${kube_flags[@]}" + kubectl replace -f $replace_file --force --cascade "${kube_flags[@]}" # Post-condition: mock service (and mock2) and mock rc (and mock2) are replaced if [ "$has_svc" = true ]; then kube::test::get_object_assert 'services mock' "{{${labels_field}.status}}" 'replaced' diff --git a/hack/testdata/multi-resource-yaml-modify.yaml b/hack/testdata/multi-resource-yaml-modify.yaml index c5e9b32f95..86fe824197 100644 --- a/hack/testdata/multi-resource-yaml-modify.yaml +++ b/hack/testdata/multi-resource-yaml-modify.yaml @@ -19,6 +19,8 @@ metadata: name: mock spec: replicas: 1 + selector: + app: mock template: metadata: labels: diff --git a/hack/testdata/multi-resource-yaml.yaml b/hack/testdata/multi-resource-yaml.yaml index 760fdefb09..bef9e88b2c 100644 --- a/hack/testdata/multi-resource-yaml.yaml +++ b/hack/testdata/multi-resource-yaml.yaml @@ -18,6 +18,8 @@ metadata: name: mock spec: replicas: 1 + selector: + app: mock template: metadata: labels: From 66e595b48055b493077d59b9364ffe18dc5c7146 Mon Sep 17 00:00:00 2001 From: Johannes Scheuermann <johannes.scheuermann@inovex.de> Date: Wed, 22 Jun 2016 14:40:55 +0200 Subject: [PATCH 124/339] Add support for Docker for MacOS --- build/common.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/common.sh b/build/common.sh index 5decf6b197..67de4aa7ea 100755 --- a/build/common.sh +++ b/build/common.sh @@ -170,10 +170,14 @@ function kube::build::verify_prereqs() { function kube::build::docker_available_on_osx() { if [[ -z "${DOCKER_HOST}" ]]; then + if [[ -S "/var/run/docker.sock" ]]; then + kube::log::status "Using Docker for MacOS" + return 0 + fi + kube::log::status "No docker host is set. Checking options for setting one..." - if [[ -z "$(which docker-machine)" && -z "$(which boot2docker)" ]]; then - kube::log::status "It looks like you're running Mac OS X, and neither docker-machine or boot2docker are nowhere to be found." + kube::log::status "It looks like you're running Mac OS X, and neither Docker for Mac, docker-machine or boot2docker are nowhere to be found." kube::log::status "See: https://docs.docker.com/machine/ for installation instructions." return 1 elif [[ -n "$(which docker-machine)" ]]; then From 233ea2f1ed36e23ddb5628961e0f9c84701ffa48 Mon Sep 17 00:00:00 2001 From: Kris <krousey@google.com> Date: Wed, 22 Jun 2016 15:29:59 -0700 Subject: [PATCH 125/339] Add a missing $ for bash variable evaluation --- hack/ginkgo-e2e.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/ginkgo-e2e.sh b/hack/ginkgo-e2e.sh index 1555ed5d45..b43b2bfc3a 100755 --- a/hack/ginkgo-e2e.sh +++ b/hack/ginkgo-e2e.sh @@ -87,7 +87,7 @@ fi if [[ "${KUBERNETES_PROVIDER}" == "gke" ]]; then detect-node-instance-groups - NODE_INSTANCE_GROUP=$(kube::util::join , NODE_INSTANCE_GROUPS) + NODE_INSTANCE_GROUP=$(kube::util::join , "${NODE_INSTANCE_GROUPS[@]}") fi ginkgo_args=() From e515cc131d718519755a6cda50f490a41faceb10 Mon Sep 17 00:00:00 2001 From: Vishnu Kannan <vishnuk@google.com> Date: Wed, 22 Jun 2016 15:51:52 -0700 Subject: [PATCH 126/339] Add a makefile rule for ginkgo. Signed-off-by: Vishnu Kannan <vishnuk@google.com> --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 884c0ca972..6628dc6aeb 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,14 @@ all: hack/build-go.sh $(WHAT) .PHONY: all +# Build ginkgo +# +# Example: +# make ginkgo +ginkgo: + hack/build-go.sh vendor/github.com/onsi/ginkgo/ginkgo +.PHONY: ginkgo + # Runs all the presubmission verifications. # # Args: @@ -111,7 +119,7 @@ test_e2e: # make test_e2e_node FOCUS=kubelet SKIP=container # make test_e2e_node REMOTE=true DELETE_INSTANCES=true # Build and run tests. -test_e2e_node: +test_e2e_node: ginkgo hack/e2e-node-test.sh .PHONY: test_e2e_node From 0e56237057a24b0529cef3d9e4eb4ec7069ef40a Mon Sep 17 00:00:00 2001 From: Vishnu kannan <vishnuk@google.com> Date: Wed, 22 Jun 2016 16:17:39 -0700 Subject: [PATCH 127/339] Update node e2e test images project to the new centralized project - `kubernetes-node-e2e-images` Signed-off-by: Vishnu kannan <vishnuk@google.com> --- test/e2e_node/jenkins/jenkins-ci.properties | 2 +- test/e2e_node/jenkins/jenkins-pull.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e_node/jenkins/jenkins-ci.properties b/test/e2e_node/jenkins/jenkins-ci.properties index 64f8261abf..58c5e3e335 100644 --- a/test/e2e_node/jenkins/jenkins-ci.properties +++ b/test/e2e_node/jenkins/jenkins-ci.properties @@ -6,7 +6,7 @@ GCE_HOSTS= GCE_IMAGES=e2e-node-ubuntu-trusty-docker10-image,e2e-node-ubuntu-trusty-docker9-image,e2e-node-ubuntu-trusty-docker8-image,e2e-node-coreos-stable20160531-image,e2e-node-containervm-v20160321-image GCE_ZONE=us-central1-f GCE_PROJECT=kubernetes-jenkins -GCE_IMAGE_PROJECT=kubernetes-jenkins +GCE_IMAGE_PROJECT=kubernetes-node-e2e-images CLEANUP=true GINKGO_FLAGS=--skip=FLAKY SETUP_NODE=false diff --git a/test/e2e_node/jenkins/jenkins-pull.properties b/test/e2e_node/jenkins/jenkins-pull.properties index 0fff91d98e..6491e1de0a 100644 --- a/test/e2e_node/jenkins/jenkins-pull.properties +++ b/test/e2e_node/jenkins/jenkins-pull.properties @@ -6,7 +6,7 @@ GCE_HOSTS= GCE_IMAGES=e2e-node-ubuntu-trusty-docker10-image,e2e-node-ubuntu-trusty-docker9-image,e2e-node-ubuntu-trusty-docker8-image,e2e-node-coreos-stable20160531-image,e2e-node-containervm-v20160321-image GCE_ZONE=us-central1-f GCE_PROJECT=kubernetes-jenkins-pull -GCE_IMAGE_PROJECT=kubernetes-jenkins-pull +GCE_IMAGE_PROJECT=kubernetes-node-e2e-images CLEANUP=true GINKGO_FLAGS=--skip=FLAKY SETUP_NODE=false \ No newline at end of file From 7fd9a60617b63219f1bbd14b021f8ee02463ab10 Mon Sep 17 00:00:00 2001 From: Janet Kuo <chiachenk@google.com> Date: Wed, 22 Jun 2016 16:43:39 -0700 Subject: [PATCH 128/339] Wait for frontend pods Running before verifying its service in guestbook e2e test --- test/e2e/kubectl.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index 754309fa4e..73afbaae49 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -1232,6 +1232,10 @@ func curl(url string) (string, error) { } func validateGuestbookApp(c *client.Client, ns string) { + framework.Logf("Waiting for all frontend pods to be Running.") + label := labels.SelectorFromSet(labels.Set(map[string]string{"tier": "frontend", "app": "guestbook"})) + err := framework.WaitForPodsWithLabelRunning(c, ns, label) + Expect(err).NotTo(HaveOccurred()) framework.Logf("Waiting for frontend to serve content.") if !waitForGuestbookResponse(c, "get", "", `{"data": ""}`, guestbookStartupTimeout, ns) { framework.Failf("Frontend service did not start serving content in %v seconds.", guestbookStartupTimeout.Seconds()) From 48169ce736995c9b06b7c7d23841c2e0cdc19433 Mon Sep 17 00:00:00 2001 From: Minhan Xia <mixia@google.com> Date: Wed, 22 Jun 2016 15:57:01 -0700 Subject: [PATCH 129/339] avoid deleting cbr0 address due to subnet string mismatch --- pkg/kubelet/network/kubenet/kubenet_linux.go | 9 +-- pkg/util/net/util.go | 36 +++++++++++ pkg/util/net/util_test.go | 68 ++++++++++++++++++++ 3 files changed, 109 insertions(+), 4 deletions(-) create mode 100644 pkg/util/net/util.go create mode 100644 pkg/util/net/util_test.go diff --git a/pkg/kubelet/network/kubenet/kubenet_linux.go b/pkg/kubelet/network/kubenet/kubenet_linux.go index bc90b7b3d4..9df7459661 100644 --- a/pkg/kubelet/network/kubenet/kubenet_linux.go +++ b/pkg/kubelet/network/kubenet/kubenet_linux.go @@ -40,6 +40,7 @@ import ( utilerrors "k8s.io/kubernetes/pkg/util/errors" utilexec "k8s.io/kubernetes/pkg/util/exec" utiliptables "k8s.io/kubernetes/pkg/util/iptables" + utilnet "k8s.io/kubernetes/pkg/util/net" utilsets "k8s.io/kubernetes/pkg/util/sets" utilsysctl "k8s.io/kubernetes/pkg/util/sysctl" @@ -228,7 +229,7 @@ func (plugin *kubenetNetworkPlugin) Event(name string, details map[string]interf // Ensure cbr0 has no conflicting addresses; CNI's 'bridge' // plugin will bail out if the bridge has an unexpected one - plugin.clearBridgeAddressesExcept(cidr.IP.String()) + plugin.clearBridgeAddressesExcept(cidr) } } @@ -237,7 +238,7 @@ func (plugin *kubenetNetworkPlugin) Event(name string, details map[string]interf } } -func (plugin *kubenetNetworkPlugin) clearBridgeAddressesExcept(keep string) { +func (plugin *kubenetNetworkPlugin) clearBridgeAddressesExcept(keep *net.IPNet) { bridge, err := netlink.LinkByName(BridgeName) if err != nil { return @@ -249,8 +250,8 @@ func (plugin *kubenetNetworkPlugin) clearBridgeAddressesExcept(keep string) { } for _, addr := range addrs { - if addr.IPNet.String() != keep { - glog.V(5).Infof("Removing old address %s from %s", addr.IPNet.String(), BridgeName) + if !utilnet.IPNetEqual(addr.IPNet, keep) { + glog.V(2).Infof("Removing old address %s from %s", addr.IPNet.String(), BridgeName) netlink.AddrDel(bridge, &addr) } } diff --git a/pkg/util/net/util.go b/pkg/util/net/util.go new file mode 100644 index 0000000000..92d5d0b98d --- /dev/null +++ b/pkg/util/net/util.go @@ -0,0 +1,36 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "net" + "reflect" +) + +// IPNetEqual checks if the two input IPNets are representing the same subnet. +// For example, +// 10.0.0.1/24 and 10.0.0.0/24 are the same subnet. +// 10.0.0.1/24 and 10.0.0.0/25 are not the same subnet. +func IPNetEqual(ipnet1, ipnet2 *net.IPNet) bool { + if ipnet1 == nil || ipnet2 == nil { + return false + } + if reflect.DeepEqual(ipnet1.Mask, ipnet2.Mask) && ipnet1.Contains(ipnet2.IP) && ipnet2.Contains(ipnet1.IP) { + return true + } + return false +} diff --git a/pkg/util/net/util_test.go b/pkg/util/net/util_test.go new file mode 100644 index 0000000000..ead640934f --- /dev/null +++ b/pkg/util/net/util_test.go @@ -0,0 +1,68 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package net + +import ( + "net" + "testing" +) + +func getIPNet(cidr string) *net.IPNet { + _, ipnet, _ := net.ParseCIDR(cidr) + return ipnet +} + +func TestIPNetEqual(t *testing.T) { + testCases := []struct { + ipnet1 *net.IPNet + ipnet2 *net.IPNet + expect bool + }{ + //null case + { + getIPNet("10.0.0.1/24"), + getIPNet(""), + false, + }, + { + getIPNet("10.0.0.0/24"), + getIPNet("10.0.0.0/24"), + true, + }, + { + getIPNet("10.0.0.0/24"), + getIPNet("10.0.0.1/24"), + true, + }, + { + getIPNet("10.0.0.0/25"), + getIPNet("10.0.0.0/24"), + false, + }, + { + getIPNet("10.0.1.0/24"), + getIPNet("10.0.0.0/24"), + false, + }, + } + + for _, tc := range testCases { + if tc.expect != IPNetEqual(tc.ipnet1, tc.ipnet2) { + t.Errorf("Expect equality of %s and %s be to %v", tc.ipnet1.String(), tc.ipnet2.String(), tc.expect) + } + } +} From 0fc392f40f8c3a04b5b24f7dccc195dc6c7f4637 Mon Sep 17 00:00:00 2001 From: Vishnu kannan <vishnuk@google.com> Date: Wed, 22 Jun 2016 17:38:29 -0700 Subject: [PATCH 130/339] Updating CoreOS image to CoreOS stable 1010.5.0 in Node e2e. Signed-off-by: Vishnu kannan <vishnuk@google.com> --- test/e2e_node/jenkins/jenkins-ci.properties | 2 +- test/e2e_node/jenkins/jenkins-pull.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e_node/jenkins/jenkins-ci.properties b/test/e2e_node/jenkins/jenkins-ci.properties index 64f8261abf..be9a436b0d 100644 --- a/test/e2e_node/jenkins/jenkins-ci.properties +++ b/test/e2e_node/jenkins/jenkins-ci.properties @@ -3,7 +3,7 @@ GCE_HOSTS= # To copy an image between projects: # `gcloud compute --project <to-project> disks create <image name> --image=https://www.googleapis.com/compute/v1/projects/<from-project>/global/images/<image-name>` # `gcloud compute --project <to-project> images create <image-name> --source-disk=<image-name>` -GCE_IMAGES=e2e-node-ubuntu-trusty-docker10-image,e2e-node-ubuntu-trusty-docker9-image,e2e-node-ubuntu-trusty-docker8-image,e2e-node-coreos-stable20160531-image,e2e-node-containervm-v20160321-image +GCE_IMAGES=e2e-node-ubuntu-trusty-docker10-image,e2e-node-ubuntu-trusty-docker9-image,e2e-node-ubuntu-trusty-docker8-image,e2e-node-coreos-stable20160622-image,e2e-node-containervm-v20160321-image GCE_ZONE=us-central1-f GCE_PROJECT=kubernetes-jenkins GCE_IMAGE_PROJECT=kubernetes-jenkins diff --git a/test/e2e_node/jenkins/jenkins-pull.properties b/test/e2e_node/jenkins/jenkins-pull.properties index 0fff91d98e..47904e4710 100644 --- a/test/e2e_node/jenkins/jenkins-pull.properties +++ b/test/e2e_node/jenkins/jenkins-pull.properties @@ -3,7 +3,7 @@ GCE_HOSTS= # To copy an image between projects: # `gcloud compute --project <to-project> disks create <image name> --image=https://www.googleapis.com/compute/v1/projects/<from-project>/global/images/<image-name>` # `gcloud compute --project <to-project> images create <image-name> --source-disk=<image-name>` -GCE_IMAGES=e2e-node-ubuntu-trusty-docker10-image,e2e-node-ubuntu-trusty-docker9-image,e2e-node-ubuntu-trusty-docker8-image,e2e-node-coreos-stable20160531-image,e2e-node-containervm-v20160321-image +GCE_IMAGES=e2e-node-ubuntu-trusty-docker10-image,e2e-node-ubuntu-trusty-docker9-image,e2e-node-ubuntu-trusty-docker8-image,e2e-node-coreos-stable20160622-image,e2e-node-containervm-v20160321-image GCE_ZONE=us-central1-f GCE_PROJECT=kubernetes-jenkins-pull GCE_IMAGE_PROJECT=kubernetes-jenkins-pull From 751af3a838d7a334d1576453fe2779d91da1e055 Mon Sep 17 00:00:00 2001 From: Kris <krousey@google.com> Date: Wed, 22 Jun 2016 18:27:06 -0700 Subject: [PATCH 131/339] Bump inotify to pickup fix for memory leak --- Godeps/Godeps.json | 4 ++-- .../golang.org/x/exp/inotify/inotify_linux.go | 24 ++++++++++++------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 60ec7a96c5..5002e11290 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/kubernetes", "GoVersion": "go1.6", - "GodepVersion": "v69", + "GodepVersion": "v74", "Packages": [ "github.com/ugorji/go/codec/codecgen", "github.com/onsi/ginkgo/ginkgo", @@ -1973,7 +1973,7 @@ }, { "ImportPath": "golang.org/x/exp/inotify", - "Rev": "d00e13ec443927751b2bd49e97dea7bf3b6a6487" + "Rev": "292a51b8d262487dab23a588950e8052d63d9113" }, { "ImportPath": "golang.org/x/net/context", diff --git a/vendor/golang.org/x/exp/inotify/inotify_linux.go b/vendor/golang.org/x/exp/inotify/inotify_linux.go index 41ac558382..901f308d84 100644 --- a/vendor/golang.org/x/exp/inotify/inotify_linux.go +++ b/vendor/golang.org/x/exp/inotify/inotify_linux.go @@ -144,6 +144,10 @@ func (w *Watcher) RemoveWatch(path string) error { return os.NewSyscallError("inotify_rm_watch", errno) } delete(w.watches, path) + // Locking here to protect the read from paths in readEvents. + w.mu.Lock() + delete(w.paths, int(watch.wd)) + w.mu.Unlock() return nil } @@ -197,17 +201,19 @@ func (w *Watcher) readEvents() { // the "Name" field with a valid filename. We retrieve the path of the watch from // the "paths" map. w.mu.Lock() - event.Name = w.paths[int(raw.Wd)] + name, ok := w.paths[int(raw.Wd)] w.mu.Unlock() - if nameLen > 0 { - // Point "bytes" at the first byte of the filename - bytes := (*[syscall.PathMax]byte)(unsafe.Pointer(&buf[offset+syscall.SizeofInotifyEvent])) - // The filename is padded with NUL bytes. TrimRight() gets rid of those. - event.Name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000") + if ok { + event.Name = name + if nameLen > 0 { + // Point "bytes" at the first byte of the filename + bytes := (*[syscall.PathMax]byte)(unsafe.Pointer(&buf[offset+syscall.SizeofInotifyEvent])) + // The filename is padded with NUL bytes. TrimRight() gets rid of those. + event.Name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000") + } + // Send the event on the events channel + w.Event <- event } - // Send the event on the events channel - w.Event <- event - // Move to the next event in the buffer offset += syscall.SizeofInotifyEvent + nameLen } From 5561056d7471031540c8399a8885b9013c54b097 Mon Sep 17 00:00:00 2001 From: Sylwester Brzeczkowski <sbrzeczkowski@mirantis.com> Date: Thu, 9 Jun 2016 12:14:46 +0200 Subject: [PATCH 132/339] Parallel waiting for pods in e2e --- test/e2e/framework/util.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 3228745e28..6d6b7de21d 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -1599,13 +1599,21 @@ func podsRunning(c *client.Client, pods *api.PodList) []error { // are running so non-running pods cause a timeout for this test. By("ensuring each pod is running") e := []error{} + error_chan := make(chan error) + for _, pod := range pods.Items { - // TODO: make waiting parallel. - err := WaitForPodRunningInNamespace(c, pod.Name, pod.Namespace) + go func(p api.Pod) { + error_chan <- WaitForPodRunningInNamespace(c, p.Name, p.Namespace) + }(pod) + } + + for range pods.Items { + err := <-error_chan if err != nil { e = append(e, err) } } + return e } From 5094333bc27fcdfb644c34e9f49f8ea852582827 Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski <wojtekt@google.com> Date: Wed, 22 Jun 2016 16:46:45 +0200 Subject: [PATCH 133/339] Fix waiting for node upgrades --- cluster/gce/upgrade.sh | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/cluster/gce/upgrade.sh b/cluster/gce/upgrade.sh index 9f4746ca8c..cb916af7df 100755 --- a/cluster/gce/upgrade.sh +++ b/cluster/gce/upgrade.sh @@ -207,8 +207,6 @@ function prepare-node-upgrade() { source "${KUBE_ROOT}/cluster/gce/debian/helper.sh" fi create-node-instance-template "${template_name}" - # The following is echo'd so that callers can get the template name. - echo $template_name echo "== Finished preparing node upgrade (to ${KUBE_VERSION}). ==" >&2 } @@ -220,8 +218,15 @@ function do-node-upgrade() { # NOTE(zmerlynn): If you are changing this gcloud command, update # test/e2e/cluster_upgrade.go to match this EXACTLY. local template_name=$(get-template-name-from-version ${SANITIZED_VERSION}) + local old_templates=() + local updates=() for group in ${INSTANCE_GROUPS[@]}; do - gcloud alpha compute rolling-updates \ + old_templates+=($(gcloud compute instance-groups managed list \ + --project="${PROJECT}" \ + --zone="${ZONE}" \ + --regexp="${group}" \ + --format='value(instanceTemplate)' || true)) + update=$(gcloud alpha compute rolling-updates \ --project="${PROJECT}" \ --zone="${ZONE}" \ start \ @@ -230,10 +235,36 @@ function do-node-upgrade() { --instance-startup-timeout=300s \ --max-num-concurrent-instances=1 \ --max-num-failed-instances=0 \ - --min-instance-update-time=0s + --min-instance-update-time=0s 2>&1) + id=$(echo "${update}" | grep "Started" | cut -d '/' -f 11 | cut -d ']' -f 1) + updates+=("${id}") done - # TODO(zmerlynn): Wait for the rolling-update to finish. + # Wait until rolling updates are finished. + for update in ${updates[@]}; do + while true; do + result=$(gcloud alpha compute rolling-updates \ + --project="${PROJECT}" \ + --zone="${ZONE}" \ + describe \ + ${update} \ + --format='value(status)' || true) + if [ $result = "ROLLED_OUT" ]; then + echo "Rolling update ${update} is ${result} state and finished." + break + fi + echo "Rolling update ${update} is stil in ${result} state." + sleep 10 + done + done + + # Remove the old templates. + for tmpl in ${old_templates[@]}; do + gcloud compute instance-templates delete \ + --quiet \ + --project="${PROJECT}" \ + "${tmpl}" || true + done echo "== Finished upgrading nodes to ${KUBE_VERSION}. ==" >&2 } From b694fc0688288504c3eb6dd07b5c00f534af0b72 Mon Sep 17 00:00:00 2001 From: Kanghua Wang <wang.kanghua@zte.com.cn> Date: Thu, 23 Jun 2016 16:14:55 +0800 Subject: [PATCH 134/339] fix return value // matchesNodeSelector returns true if pod matches node's labels. Whether this return value should be false? --- pkg/kubelet/kubelet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 9085c720ef..7d3859f50d 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -2378,7 +2378,7 @@ func (kl *Kubelet) matchesNodeSelector(pod *api.Pod) bool { node, err := kl.GetNode() if err != nil { glog.Errorf("error getting node: %v", err) - return true + return false } return predicates.PodMatchesNodeLabels(pod, node) } From 56d4586f89933aebb3c543ae7fd65ed5114cf77e Mon Sep 17 00:00:00 2001 From: Marek Grabowski <gmarek@google.com> Date: Thu, 23 Jun 2016 10:24:29 +0200 Subject: [PATCH 135/339] Revert "Copy and display source location prominently on Kubernetes instances" --- cluster/gce/configure-vm.sh | 4 +--- cluster/gce/gci/configure-helper.sh | 4 +--- cluster/gce/gci/configure.sh | 3 --- cluster/saltbase/install.sh | 1 - cluster/saltbase/salt/base.sls | 7 ------- 5 files changed, 2 insertions(+), 17 deletions(-) diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index b774e18cbd..cca579d2e6 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -106,9 +106,7 @@ Welcome to Kubernetes ${version}! You can find documentation for Kubernetes at: http://docs.kubernetes.io/ -The source for this release can be found at: - /usr/local/share/doc/kubernetes/kubernetes-src.tar.gz -Or you can download it at: +You can download the build image for this release at: https://storage.googleapis.com/kubernetes-release/release/${version}/kubernetes-src.tar.gz It is based on the Kubernetes source at: diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index bfbde3b25a..177e097590 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -910,9 +910,7 @@ Welcome to Kubernetes ${version}! You can find documentation for Kubernetes at: http://docs.kubernetes.io/ -The source for this release can be found at: - /home/kubernetes/kubernetes-src.tar.gz -Or you can download it at: +You can download the build image for this release at: https://storage.googleapis.com/kubernetes-release/release/${version}/kubernetes-src.tar.gz It is based on the Kubernetes source at: diff --git a/cluster/gce/gci/configure.sh b/cluster/gce/gci/configure.sh index 36184f5b2f..1b10d05e20 100644 --- a/cluster/gce/gci/configure.sh +++ b/cluster/gce/gci/configure.sh @@ -158,9 +158,6 @@ function install-kube-binary-config { fi cp "${KUBE_HOME}/kubernetes/LICENSES" "${KUBE_HOME}" - cp "${KUBE_HOME}/kubernetes/kubernetes-src.tar.gz" "${KUBE_HOME}" - chmod a+r "${KUBE_HOME}/kubernetes/LICENSES" - chmod a+r "${KUBE_HOME}/kubernetes/kubernetes-src.tar.gz" # Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/. dst_dir="${KUBE_HOME}/kube-manifests" diff --git a/cluster/saltbase/install.sh b/cluster/saltbase/install.sh index b01841274c..5a3f5e29f9 100755 --- a/cluster/saltbase/install.sh +++ b/cluster/saltbase/install.sh @@ -68,7 +68,6 @@ mkdir -p /srv/salt-new/salt/kube-bins mkdir -p /srv/salt-new/salt/kube-docs cp -v "${KUBE_TEMP}/kubernetes/server/bin/"* /srv/salt-new/salt/kube-bins/ cp -v "${KUBE_TEMP}/kubernetes/LICENSES" /srv/salt-new/salt/kube-docs/ -cp -v "${KUBE_TEMP}/kubernetes/kubernetes-src.tar.gz" /srv/salt-new/salt/kube-docs/ kube_bin_dir="/srv/salt-new/salt/kube-bins"; docker_images_sls_file="/srv/salt-new/pillar/docker-images.sls"; diff --git a/cluster/saltbase/salt/base.sls b/cluster/saltbase/salt/base.sls index 80ea7f3f5c..a11542d22d 100644 --- a/cluster/saltbase/salt/base.sls +++ b/cluster/saltbase/salt/base.sls @@ -50,10 +50,3 @@ net.ipv4.neigh.default.gc_thresh1: - user: root - group: root - mode: 644 - -/usr/local/share/doc/kubernetes/kubernetes-src.tar.gz: - file.managed: - - source: salt://kube-docs/kubernetes-src.tar.gz - - user: root - - group: root - - mode: 644 From ba1d201a4cafcc5a151b9925f8c742fc4267c7a4 Mon Sep 17 00:00:00 2001 From: Manjunath A Kumatagi <mkumatag@in.ibm.com> Date: Thu, 23 Jun 2016 06:59:41 -0400 Subject: [PATCH 136/339] Need doc updated with export KUBERNETES_PROVIDER=local in local-up-cluster.sh script --- hack/local-up-cluster.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 85b7c6e87b..c8a611886c 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -442,6 +442,8 @@ Logs: To start using your cluster, open up another terminal/tab and run: + export KUBERNETES_PROVIDER=local + cluster/kubectl.sh config set-cluster local --server=http://${API_HOST}:${API_PORT} --insecure-skip-tls-verify=true cluster/kubectl.sh config set-context local --cluster=local cluster/kubectl.sh config use-context local From 0000f1859b5192e18943e5f2964b9543aee88a86 Mon Sep 17 00:00:00 2001 From: Marcin Wielgus <mwielgus@google.com> Date: Thu, 23 Jun 2016 13:10:45 +0200 Subject: [PATCH 137/339] Enable cluster autoscaling in e2e tests using gcloud command --- test/e2e/cluster_size_autoscaling.go | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/test/e2e/cluster_size_autoscaling.go b/test/e2e/cluster_size_autoscaling.go index d36054a9b5..9fe58caa37 100644 --- a/test/e2e/cluster_size_autoscaling.go +++ b/test/e2e/cluster_size_autoscaling.go @@ -273,24 +273,18 @@ func isAutoscalerEnabled(expectedMinNodeCountInTargetPool int) (bool, error) { } func enableAutoscaler(nodePool string, minCount, maxCount int) error { - updateRequest := "{" + - " \"update\": {" + - " \"desiredNodePoolId\": \"" + nodePool + "\"," + - " \"desiredNodePoolAutoscaling\": {" + - " \"enabled\": \"true\"," + - " \"minNodeCount\": \"" + strconv.Itoa(minCount) + "\"," + - " \"maxNodeCount\": \"" + strconv.Itoa(maxCount) + "\"" + - " }" + - " }" + - "}" + output, err := exec.Command("gcloud", "alpha", "container", "clusters", "update", framework.TestContext.CloudConfig.Cluster, + "--enable-autoscaling", + "--min-nodes="+strconv.Itoa(minCount), + "--max-nodes="+strconv.Itoa(maxCount), + "--node-pool="+nodePool, + "--project="+framework.TestContext.CloudConfig.ProjectID, + "--zone="+framework.TestContext.CloudConfig.Zone).Output() - url := getGKEClusterUrl() - glog.Infof("Using gke api url %s", url) - putResult, err := doPut(url, updateRequest) if err != nil { - return fmt.Errorf("Failed to put %s: %v", url, err) + return fmt.Errorf("Failed to enable autoscaling: %v", err) } - glog.Infof("Config update result: %s", putResult) + glog.Infof("Config update result: %s", output) for startTime := time.Now(); startTime.Add(gkeUpdateTimeout).After(time.Now()); time.Sleep(30 * time.Second) { if val, err := isAutoscalerEnabled(minCount); err == nil && val { From 4dc6a9f2a1a89e9da58f8b990250e5934dabc1f1 Mon Sep 17 00:00:00 2001 From: Piotr Szczesniak <pszczesniak@google.com> Date: Thu, 23 Jun 2016 13:29:17 +0200 Subject: [PATCH 138/339] Fixed typo in upgrade.sh script --- cluster/gce/upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/gce/upgrade.sh b/cluster/gce/upgrade.sh index cb916af7df..5b56a0759c 100755 --- a/cluster/gce/upgrade.sh +++ b/cluster/gce/upgrade.sh @@ -253,7 +253,7 @@ function do-node-upgrade() { echo "Rolling update ${update} is ${result} state and finished." break fi - echo "Rolling update ${update} is stil in ${result} state." + echo "Rolling update ${update} is still in ${result} state." sleep 10 done done From 0d96eeea6369fab1007d04662816e0a4748b7b97 Mon Sep 17 00:00:00 2001 From: gmarek <gmarek@google.com> Date: Thu, 23 Jun 2016 14:44:30 +0200 Subject: [PATCH 139/339] Increase PodReadyBeforeTimeout by 50% --- test/e2e/framework/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 3228745e28..5d141c7d67 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -123,7 +123,7 @@ const ( NodeReadyInitialTimeout = 20 * time.Second // How long pods have to be "ready" when a test begins. - PodReadyBeforeTimeout = 2 * time.Minute + PodReadyBeforeTimeout = 5 * time.Minute // How long pods have to become scheduled onto nodes podScheduledBeforeTimeout = PodListTimeout + (20 * time.Second) From 7f3cf57f99d0c7e331209d204cb98f59b7d3a9f6 Mon Sep 17 00:00:00 2001 From: Marcin Wielgus <mwielgus@google.com> Date: Thu, 23 Jun 2016 17:59:03 +0200 Subject: [PATCH 140/339] Increase gke update timeout in cluster autoscaler e2e tests --- test/e2e/cluster_size_autoscaling.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/cluster_size_autoscaling.go b/test/e2e/cluster_size_autoscaling.go index 9fe58caa37..3637028450 100644 --- a/test/e2e/cluster_size_autoscaling.go +++ b/test/e2e/cluster_size_autoscaling.go @@ -44,7 +44,7 @@ const ( scaleDownTimeout = 15 * time.Minute gkeEndpoint = "https://test-container.sandbox.googleapis.com" - gkeUpdateTimeout = 10 * time.Minute + gkeUpdateTimeout = 15 * time.Minute ) var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() { From c87b61341241bae37017db5f76902ea2642ea169 Mon Sep 17 00:00:00 2001 From: Matt Liggett <mml@google.com> Date: Wed, 22 Jun 2016 13:26:58 -0700 Subject: [PATCH 141/339] Look for the failure zone label in labels. Not annotations. Found this working on #27819. --- pkg/dns/dns.go | 4 ++-- pkg/dns/dns_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/dns/dns.go b/pkg/dns/dns.go index b65fe9fc55..9e5c98d875 100644 --- a/pkg/dns/dns.go +++ b/pkg/dns/dns.go @@ -648,7 +648,7 @@ func (kd *KubeDNS) getClusterZone() (string, error) { // Select a node (arbitrarily the first node) that has `LabelZoneFailureDomain` set. for _, nodeItem := range nodeList.Items { - if _, ok := nodeItem.Annotations[unversioned.LabelZoneFailureDomain]; !ok { + if _, ok := nodeItem.Labels[unversioned.LabelZoneFailureDomain]; !ok { continue } // Make a copy of the node, don't rely on the loop variable. @@ -663,7 +663,7 @@ func (kd *KubeDNS) getClusterZone() (string, error) { return "", fmt.Errorf("Could not find any nodes") } - zone, ok := node.Annotations[unversioned.LabelZoneFailureDomain] + zone, ok := node.Labels[unversioned.LabelZoneFailureDomain] if !ok || zone == "" { return "", fmt.Errorf("unknown cluster zone") } diff --git a/pkg/dns/dns_test.go b/pkg/dns/dns_test.go index 061accf2f3..3ea240c24c 100644 --- a/pkg/dns/dns_test.go +++ b/pkg/dns/dns_test.go @@ -433,7 +433,7 @@ func newNodes() *kapi.NodeList { { ObjectMeta: kapi.ObjectMeta{ Name: "testnode-1", - Annotations: map[string]string{ + Labels: map[string]string{ // Note: The zone name here is an arbitrary string and doesn't exactly follow the // format used by the cloud providers to name their zones. But that shouldn't matter // for these tests here. From 7a40584f66f3c5d18300358653ca9e6318eda9ab Mon Sep 17 00:00:00 2001 From: Matt Liggett <mml@google.com> Date: Thu, 23 Jun 2016 08:39:02 -0700 Subject: [PATCH 142/339] Verify that the we get a non-nil subtree before consulting it. Fixes #27919 --- pkg/dns/treecache.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/dns/treecache.go b/pkg/dns/treecache.go index d6c9c77c23..6f7a9aa1fb 100644 --- a/pkg/dns/treecache.go +++ b/pkg/dns/treecache.go @@ -98,6 +98,9 @@ func (cache *TreeCache) setSubCache(key string, subCache *TreeCache, path ...str func (cache *TreeCache) getEntry(key string, path ...string) (interface{}, bool) { childNode := cache.getSubCache(path...) + if childNode == nil { + return nil, false + } val, ok := childNode.Entries[key] return val, ok } From 07b8c612744f558b1e21be5bd0a981a94e14975c Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong <yjhong@google.com> Date: Fri, 10 Jun 2016 15:20:32 -0700 Subject: [PATCH 143/339] Bump minimum API version for docker to 1.21 The corresponding docker version is 1.9.x. Dropping support for docker 1.8. --- pkg/kubelet/dockertools/docker_manager.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/kubelet/dockertools/docker_manager.go b/pkg/kubelet/dockertools/docker_manager.go index 627fc4d389..eaa332796c 100644 --- a/pkg/kubelet/dockertools/docker_manager.go +++ b/pkg/kubelet/dockertools/docker_manager.go @@ -67,7 +67,9 @@ import ( const ( DockerType = "docker" - minimumDockerAPIVersion = "1.20" + // https://docs.docker.com/engine/reference/api/docker_remote_api/ + // docker verison should be at least 1.9.x + minimumDockerAPIVersion = "1.21" // Remote API version for docker daemon version v1.10 // https://docs.docker.com/engine/reference/api/docker_remote_api/ From a6b91a41fa2aaf1f69fd371024ed4de44f7cf51d Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong <yjhong@google.com> Date: Thu, 23 Jun 2016 11:39:18 -0700 Subject: [PATCH 144/339] e2e_node: lower the log verbosity level The current level is so high that the logs are almost unreadable. --- test/e2e_node/e2e_service.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/e2e_node/e2e_service.go b/test/e2e_node/e2e_service.go index 630cbef643..62257d3e38 100644 --- a/test/e2e_node/e2e_service.go +++ b/test/e2e_node/e2e_service.go @@ -52,6 +52,11 @@ type logFileData struct { journalctlCommand []string } +const ( + // This is consistent with the level used in a cluster e2e test. + LOG_VERBOSITY_LEVEL = "4" +) + func newE2eService(nodeName string) *e2eService { // Special log files that need to be collected for additional debugging. var logFiles = map[string]logFileData{ @@ -194,7 +199,7 @@ func (es *e2eService) startApiServer() (*killCmd, error) { "--service-cluster-ip-range", "10.0.0.1/24", "--kubelet-port", "10250", "--allow-privileged", "true", - "--v", "8", "--logtostderr", + "--v", LOG_VERBOSITY_LEVEL, "--logtostderr", ) hcc := newHealthCheckCommand( "http://127.0.0.1:8080/healthz", @@ -235,7 +240,7 @@ func (es *e2eService) startKubeletServer() (*killCmd, error) { "--serialize-image-pulls", "false", "--config", es.kubeletStaticPodDir, "--file-check-frequency", "10s", // Check file frequently so tests won't wait too long - "--v", "8", "--logtostderr", + "--v", LOG_VERBOSITY_LEVEL, "--logtostderr", ) cmd := exec.Command("sudo", cmdArgs...) hcc := newHealthCheckCommand( From 6894e74027409a19bb38296d7cf5290bb10932f5 Mon Sep 17 00:00:00 2001 From: "Madhusudan.C.S" <madhusudancs@google.com> Date: Thu, 23 Jun 2016 11:26:51 -0700 Subject: [PATCH 145/339] Append both the zone and the region to the federation query responses, not just the zone. --- pkg/dns/dns.go | 47 +++++++++++++++++++++++++++------------------ pkg/dns/dns_test.go | 5 +++-- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/pkg/dns/dns.go b/pkg/dns/dns.go index 9e5c98d875..236094087f 100644 --- a/pkg/dns/dns.go +++ b/pkg/dns/dns.go @@ -595,12 +595,13 @@ func (kd *KubeDNS) federationRecords(queryPath []string) ([]skymsg.Service, erro // domain path components, i.e. kd.domainPath, from the query. path = path[:len(path)-len(kd.domainPath)] - // Append the zone name (zone in the cloud provider terminology, not a DNS zone) - zone, err := kd.getClusterZone() + // Append the zone name (zone in the cloud provider terminology, not a DNS + // zone) and the region name. + zone, region, err := kd.getClusterZoneAndRegion() if err != nil { - return nil, fmt.Errorf("failed to obtain the cluster zone: %v", err) + return nil, fmt.Errorf("failed to obtain the cluster zone and region: %v", err) } - path = append(path, zone) + path = append(path, zone, region) // We have already established that the map entry exists for the given federation, // we just need to retrieve the domain name, validate it and append it to the path. @@ -620,21 +621,23 @@ func (kd *KubeDNS) federationRecords(queryPath []string) ([]skymsg.Service, erro return []skymsg.Service{{Host: name}}, nil } -// getClusterZone returns the name of the zone the cluster is running in. It arbitrarily selects -// a node and reads the failure domain annotation on the node. An alternative is to obtain this -// pod's (i.e. kube-dns pod's) name using the downward API, get the pod, get the node the pod is -// bound to and retrieve that node's annotations. But even just by reading those steps, it looks -// complex and it is not entirely clear what that complexity is going to buy us. So taking a -// simpler approach here. -// Also note that zone here means the zone in cloud provider terminology, not the DNS zone. -func (kd *KubeDNS) getClusterZone() (string, error) { +// getClusterZoneAndRegion returns the name of the zone and the region the +// cluster is running in. It arbitrarily selects a node and reads the failure +// domain label on the node. An alternative is to obtain this pod's +// (i.e. kube-dns pod's) name using the downward API, get the pod, get the +// node the pod is bound to and retrieve that node's labels. But even just by +// reading those steps, it looks complex and it is not entirely clear what +// that complexity is going to buy us. So taking a simpler approach here. +// Also note that zone here means the zone in cloud provider terminology, not +// the DNS zone. +func (kd *KubeDNS) getClusterZoneAndRegion() (string, string, error) { var node *kapi.Node objs := kd.nodesStore.List() if len(objs) > 0 { var ok bool if node, ok = objs[0].(*kapi.Node); !ok { - return "", fmt.Errorf("expected node object, got: %T", objs[0]) + return "", "", fmt.Errorf("expected node object, got: %T", objs[0]) } } else { // An alternative to listing nodes each time is to set a watch, but that is totally @@ -643,31 +646,37 @@ func (kd *KubeDNS) getClusterZone() (string, error) { // TODO(madhusudancs): Move this to external/v1 API. nodeList, err := kd.kubeClient.Core().Nodes().List(kapi.ListOptions{}) if err != nil || len(nodeList.Items) == 0 { - return "", fmt.Errorf("failed to retrieve the cluster nodes: %v", err) + return "", "", fmt.Errorf("failed to retrieve the cluster nodes: %v", err) } // Select a node (arbitrarily the first node) that has `LabelZoneFailureDomain` set. for _, nodeItem := range nodeList.Items { - if _, ok := nodeItem.Labels[unversioned.LabelZoneFailureDomain]; !ok { + _, zfound := nodeItem.Labels[unversioned.LabelZoneFailureDomain] + _, rfound := nodeItem.Labels[unversioned.LabelZoneRegion] + if !zfound || !rfound { continue } // Make a copy of the node, don't rely on the loop variable. node = &(*(&nodeItem)) if err := kd.nodesStore.Add(node); err != nil { - return "", fmt.Errorf("couldn't add the retrieved node to the cache: %v", err) + return "", "", fmt.Errorf("couldn't add the retrieved node to the cache: %v", err) } } } if node == nil { - return "", fmt.Errorf("Could not find any nodes") + return "", "", fmt.Errorf("Could not find any nodes") } zone, ok := node.Labels[unversioned.LabelZoneFailureDomain] if !ok || zone == "" { - return "", fmt.Errorf("unknown cluster zone") + return "", "", fmt.Errorf("unknown cluster zone") } - return zone, nil + region, ok := node.Labels[unversioned.LabelZoneRegion] + if !ok || region == "" { + return "", "", fmt.Errorf("unknown cluster region") + } + return zone, region, nil } func (kd *KubeDNS) getServiceFQDN(service *kapi.Service) string { diff --git a/pkg/dns/dns_test.go b/pkg/dns/dns_test.go index 3ea240c24c..9d7a1bb7d5 100644 --- a/pkg/dns/dns_test.go +++ b/pkg/dns/dns_test.go @@ -387,12 +387,12 @@ func testValidFederationQueries(t *testing.T, kd *KubeDNS) { // Federation suffix is just a domain. { q: "mysvc.myns.myfederation.svc.cluster.local.", - a: "mysvc.myns.myfederation.svc.testcontinent-testreg-testzone.example.com.", + a: "mysvc.myns.myfederation.svc.testcontinent-testreg-testzone.testcontinent-testreg.example.com.", }, // Federation suffix is a subdomain. { q: "secsvc.default.secondfederation.svc.cluster.local.", - a: "secsvc.default.secondfederation.svc.testcontinent-testreg-testzone.second.example.com.", + a: "secsvc.default.secondfederation.svc.testcontinent-testreg-testzone.testcontinent-testreg.second.example.com.", }, } @@ -438,6 +438,7 @@ func newNodes() *kapi.NodeList { // format used by the cloud providers to name their zones. But that shouldn't matter // for these tests here. unversioned.LabelZoneFailureDomain: "testcontinent-testreg-testzone", + unversioned.LabelZoneRegion: "testcontinent-testreg", }, }, }, From a827ef0713078cd3b1fca637f12f8afb631c9438 Mon Sep 17 00:00:00 2001 From: "Madhusudan.C.S" <madhusudancs@google.com> Date: Thu, 23 Jun 2016 12:33:41 -0700 Subject: [PATCH 146/339] Addressed review comments. --- pkg/dns/dns.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/dns/dns.go b/pkg/dns/dns.go index 236094087f..10aa0363ac 100644 --- a/pkg/dns/dns.go +++ b/pkg/dns/dns.go @@ -649,7 +649,8 @@ func (kd *KubeDNS) getClusterZoneAndRegion() (string, string, error) { return "", "", fmt.Errorf("failed to retrieve the cluster nodes: %v", err) } - // Select a node (arbitrarily the first node) that has `LabelZoneFailureDomain` set. + // Select a node (arbitrarily the first node) that has + // `LabelZoneFailureDomain` and `LabelZoneRegion` set. for _, nodeItem := range nodeList.Items { _, zfound := nodeItem.Labels[unversioned.LabelZoneFailureDomain] _, rfound := nodeItem.Labels[unversioned.LabelZoneRegion] @@ -661,6 +662,8 @@ func (kd *KubeDNS) getClusterZoneAndRegion() (string, string, error) { if err := kd.nodesStore.Add(node); err != nil { return "", "", fmt.Errorf("couldn't add the retrieved node to the cache: %v", err) } + // Node is found, break out of the loop. + break } } From 6add478b2667cb0e957d1bcc37fa35b6d5881180 Mon Sep 17 00:00:00 2001 From: "Madhusudan.C.S" <madhusudancs@google.com> Date: Wed, 22 Jun 2016 16:47:35 -0700 Subject: [PATCH 147/339] Create the e2e test namespace in each of the individual clusters in the federation. --- test/e2e/federated-service.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/e2e/federated-service.go b/test/e2e/federated-service.go index c3cc7e8519..fd8cd81b58 100644 --- a/test/e2e/federated-service.go +++ b/test/e2e/federated-service.go @@ -24,6 +24,7 @@ import ( "k8s.io/kubernetes/federation/apis/federation" "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3" "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_3" "k8s.io/kubernetes/pkg/client/restclient" @@ -118,11 +119,34 @@ var _ = framework.KubeDescribe("[Feature:Federation] Federated Services", func() clset := release_1_3.NewForConfigOrDie(restclient.AddUserAgent(cfg, UserAgentName)) clusterClientSets = append(clusterClientSets, clset) } + + for i, cs := range clusterClientSets { + if _, err := cs.Core().Namespaces().Get(f.Namespace.Name); errors.IsNotFound(err) { + ns := &v1.Namespace{ + ObjectMeta: v1.ObjectMeta{ + Name: f.Namespace.Name, + }, + } + if _, err := cs.Core().Namespaces().Create(ns); err != nil { + framework.Logf("Couldn't create the namespace %s in cluster [%d]: %v", f.Namespace.Name, i, err) + } + framework.Logf("Namespace %s created in cluster [%d]", f.Namespace.Name, i) + } else if err != nil { + framework.Logf("Couldn't create the namespace %s in cluster [%d]: %v", f.Namespace.Name, i, err) + } + } }) AfterEach(func() { framework.SkipUnlessFederated(f.Client) + for i, cs := range clusterClientSets { + if err := cs.Core().Namespaces().Delete(f.Namespace.Name, &api.DeleteOptions{}); err != nil { + framework.Failf("Couldn't delete the namespace %s in cluster [%d]: %v", f.Namespace.Name, i, err) + } + framework.Logf("Namespace %s deleted in cluster [%d]", f.Namespace.Name, i) + } + // Delete the registered clusters in the federation API server. clusterList, err := f.FederationClientset.Federation().Clusters().List(api.ListOptions{}) Expect(err).NotTo(HaveOccurred()) From 9140ce07bcf20303c4d9d6e484583c578aa6f2d6 Mon Sep 17 00:00:00 2001 From: Yifan Gu <yifan.gu@coreos.com> Date: Wed, 22 Jun 2016 17:52:12 -0700 Subject: [PATCH 148/339] kubenet: Fix host port for rktnetes. Because rkt pod runs after plugin.SetUpPod() is called, so getRunningPods() does not return the newly created pod, which causes the hostport iptable rules to be missing for this new pod. --- pkg/kubelet/network/hostport/hostport.go | 18 +++++++++++++++--- pkg/kubelet/network/hostport/hostport_test.go | 2 +- pkg/kubelet/network/hostport/testing/fake.go | 5 ++--- pkg/kubelet/network/kubenet/kubenet_linux.go | 4 +++- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/pkg/kubelet/network/hostport/hostport.go b/pkg/kubelet/network/hostport/hostport.go index 23587e2fde..10ce366ec8 100644 --- a/pkg/kubelet/network/hostport/hostport.go +++ b/pkg/kubelet/network/hostport/hostport.go @@ -42,7 +42,7 @@ const ( ) type HostportHandler interface { - OpenPodHostportsAndSync(newPod *api.Pod, natInterfaceName string, runningPods []*RunningPod) error + OpenPodHostportsAndSync(newPod *RunningPod, natInterfaceName string, runningPods []*RunningPod) error SyncHostports(natInterfaceName string, runningPods []*RunningPod) error } @@ -172,12 +172,24 @@ func hostportChainName(cp api.ContainerPort, podFullName string) utiliptables.Ch // OpenPodHostportsAndSync opens hostports for a new pod, gathers all hostports on // node, sets up iptables rules enable them. And finally clean up stale hostports -func (h *handler) OpenPodHostportsAndSync(newPod *api.Pod, natInterfaceName string, runningPods []*RunningPod) error { +func (h *handler) OpenPodHostportsAndSync(newPod *RunningPod, natInterfaceName string, runningPods []*RunningPod) error { // try to open pod host port if specified - if err := h.openHostports(newPod); err != nil { + if err := h.openHostports(newPod.Pod); err != nil { return err } + // Add the new pod to running pods if it's not running already (e.g. in rkt's case). + var found bool + for _, p := range runningPods { + if p.Pod.UID == newPod.Pod.UID { + found = true + break + } + } + if !found { + runningPods = append(runningPods, newPod) + } + return h.SyncHostports(natInterfaceName, runningPods) } diff --git a/pkg/kubelet/network/hostport/hostport_test.go b/pkg/kubelet/network/hostport/hostport_test.go index 5b8159c3ef..18fa865165 100644 --- a/pkg/kubelet/network/hostport/hostport_test.go +++ b/pkg/kubelet/network/hostport/hostport_test.go @@ -185,7 +185,7 @@ func TestOpenPodHostports(t *testing.T) { }) } - err := h.OpenPodHostportsAndSync(tests[0].pod, "br0", runningPods) + err := h.OpenPodHostportsAndSync(&RunningPod{Pod: tests[0].pod, IP: net.ParseIP(tests[0].ip)}, "br0", runningPods) if err != nil { t.Fatalf("Failed to OpenPodHostportsAndSync: %v", err) } diff --git a/pkg/kubelet/network/hostport/testing/fake.go b/pkg/kubelet/network/hostport/testing/fake.go index d203274137..f5ce6b94cf 100644 --- a/pkg/kubelet/network/hostport/testing/fake.go +++ b/pkg/kubelet/network/hostport/testing/fake.go @@ -19,7 +19,6 @@ package testing import ( "fmt" - "k8s.io/kubernetes/pkg/api" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/network/hostport" ) @@ -30,8 +29,8 @@ func NewFakeHostportHandler() hostport.HostportHandler { return &fakeHandler{} } -func (h *fakeHandler) OpenPodHostportsAndSync(newPod *api.Pod, natInterfaceName string, runningPods []*hostport.RunningPod) error { - return h.SyncHostports(natInterfaceName, runningPods) +func (h *fakeHandler) OpenPodHostportsAndSync(newPod *hostport.RunningPod, natInterfaceName string, runningPods []*hostport.RunningPod) error { + return h.SyncHostports(natInterfaceName, append(runningPods, newPod)) } func (h *fakeHandler) SyncHostports(natInterfaceName string, runningPods []*hostport.RunningPod) error { diff --git a/pkg/kubelet/network/kubenet/kubenet_linux.go b/pkg/kubelet/network/kubenet/kubenet_linux.go index bc90b7b3d4..f51b569613 100644 --- a/pkg/kubelet/network/kubenet/kubenet_linux.go +++ b/pkg/kubelet/network/kubenet/kubenet_linux.go @@ -348,7 +348,9 @@ func (plugin *kubenetNetworkPlugin) setup(namespace string, name string, id kube if err != nil { return err } - if err := plugin.hostportHandler.OpenPodHostportsAndSync(pod, BridgeName, runningPods); err != nil { + + newPod := &hostport.RunningPod{Pod: pod, IP: ip4} + if err := plugin.hostportHandler.OpenPodHostportsAndSync(newPod, BridgeName, runningPods); err != nil { return err } From f13c767aab4dd900586b59edb8abc6b832a54a0c Mon Sep 17 00:00:00 2001 From: Brandon Philips <brandon.philips@coreos.com> Date: Thu, 23 Jun 2016 13:23:17 -0700 Subject: [PATCH 149/339] README: remove go report card This service seems broken, probably because the k8s repo is larger than the normal project. I have emailed the service author but for the time being remove the badge. --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index ea5be18177..1c395db1ec 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,11 @@ # Kubernetes -[![Submit Queue Widget]][Submit Queue] [![GoReportCard Widget]][GoReportCard] [![GoDoc Widget]][GoDoc] [![Coverage Status Widget]][Coverage Status] +[![Submit Queue Widget]][Submit Queue] [![GoDoc Widget]][GoDoc] [![Coverage Status Widget]][Coverage Status] [Submit Queue]: http://submit-queue.k8s.io/#/e2e [Submit Queue Widget]: http://submit-queue.k8s.io/health.svg?v=1 [GoDoc]: https://godoc.org/k8s.io/kubernetes [GoDoc Widget]: https://godoc.org/k8s.io/kubernetes?status.svg -[GoReportCard]: https://goreportcard.com/report/k8s.io/kubernetes -[GoReportCard Widget]: https://goreportcard.com/badge/k8s.io/kubernetes [Coverage Status]: https://coveralls.io/r/kubernetes/kubernetes [Coverage Status Widget]: https://coveralls.io/repos/kubernetes/kubernetes/badge.svg From 58062a2c491923c45af714bf60c3e55dd6ea94d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Ole=C5=9B?= <lukaszoles@gmail.com> Date: Wed, 22 Jun 2016 15:51:34 +0200 Subject: [PATCH 150/339] Check provider first When testing on local cluster for example using vagrant the Uberntes tests should be skipped. --- test/e2e/ubernetes_lite.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/ubernetes_lite.go b/test/e2e/ubernetes_lite.go index c3368c7970..4f94085ff8 100644 --- a/test/e2e/ubernetes_lite.go +++ b/test/e2e/ubernetes_lite.go @@ -38,13 +38,13 @@ var _ = framework.KubeDescribe("Ubernetes Lite", func() { var err error image := "gcr.io/google_containers/serve_hostname:v1.4" BeforeEach(func() { + framework.SkipUnlessProviderIs("gce", "gke", "aws") if zoneCount <= 0 { zoneCount, err = getZoneCount(f.Client) Expect(err).NotTo(HaveOccurred()) } By(fmt.Sprintf("Checking for multi-zone cluster. Zone count = %d", zoneCount)) framework.SkipUnlessAtLeast(zoneCount, 2, "Zone count is %d, only run for multi-zone clusters, skipping test") - framework.SkipUnlessProviderIs("gce", "gke", "aws") // TODO: SkipUnlessDefaultScheduler() // Non-default schedulers might not spread }) It("should spread the pods of a service across zones", func() { From e7a9881d8497961062f3899548de871e20bb8cd9 Mon Sep 17 00:00:00 2001 From: Zach Loafman <zml@google.com> Date: Tue, 21 Jun 2016 22:58:48 -0700 Subject: [PATCH 151/339] Copy and display source location prominently on Kubernetes instances Following from #27830, this copies the source onto the instance and displays the location of it prominently (keeping the download link for anyone that just wants to curl it). Example output (this tag doesn't exist yet): --- Welcome to Kubernetes v1.4.0! You can find documentation for Kubernetes at: http://docs.kubernetes.io/ The source for this release can be found at: /usr/local/share/doc/kubernetes/kubernetes-src.tar.gz Or you can download it at: https://storage.googleapis.com/kubernetes-release/release/v1.4.0/kubernetes-src.tar.gz It is based on the Kubernetes source at: https://github.com/kubernetes/kubernetes/tree/v1.4.0 For Kubernetes copyright and licensing information, see: /usr/local/share/doc/kubernetes/LICENSES --- --- cluster/gce/configure-vm.sh | 4 +++- cluster/gce/gci/configure-helper.sh | 4 +++- cluster/gce/gci/configure.sh | 3 +++ cluster/saltbase/install.sh | 1 + cluster/saltbase/salt/base.sls | 7 +++++++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index cca579d2e6..b774e18cbd 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -106,7 +106,9 @@ Welcome to Kubernetes ${version}! You can find documentation for Kubernetes at: http://docs.kubernetes.io/ -You can download the build image for this release at: +The source for this release can be found at: + /usr/local/share/doc/kubernetes/kubernetes-src.tar.gz +Or you can download it at: https://storage.googleapis.com/kubernetes-release/release/${version}/kubernetes-src.tar.gz It is based on the Kubernetes source at: diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 177e097590..bfbde3b25a 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -910,7 +910,9 @@ Welcome to Kubernetes ${version}! You can find documentation for Kubernetes at: http://docs.kubernetes.io/ -You can download the build image for this release at: +The source for this release can be found at: + /home/kubernetes/kubernetes-src.tar.gz +Or you can download it at: https://storage.googleapis.com/kubernetes-release/release/${version}/kubernetes-src.tar.gz It is based on the Kubernetes source at: diff --git a/cluster/gce/gci/configure.sh b/cluster/gce/gci/configure.sh index 1b10d05e20..36184f5b2f 100644 --- a/cluster/gce/gci/configure.sh +++ b/cluster/gce/gci/configure.sh @@ -158,6 +158,9 @@ function install-kube-binary-config { fi cp "${KUBE_HOME}/kubernetes/LICENSES" "${KUBE_HOME}" + cp "${KUBE_HOME}/kubernetes/kubernetes-src.tar.gz" "${KUBE_HOME}" + chmod a+r "${KUBE_HOME}/kubernetes/LICENSES" + chmod a+r "${KUBE_HOME}/kubernetes/kubernetes-src.tar.gz" # Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/. dst_dir="${KUBE_HOME}/kube-manifests" diff --git a/cluster/saltbase/install.sh b/cluster/saltbase/install.sh index 5a3f5e29f9..b01841274c 100755 --- a/cluster/saltbase/install.sh +++ b/cluster/saltbase/install.sh @@ -68,6 +68,7 @@ mkdir -p /srv/salt-new/salt/kube-bins mkdir -p /srv/salt-new/salt/kube-docs cp -v "${KUBE_TEMP}/kubernetes/server/bin/"* /srv/salt-new/salt/kube-bins/ cp -v "${KUBE_TEMP}/kubernetes/LICENSES" /srv/salt-new/salt/kube-docs/ +cp -v "${KUBE_TEMP}/kubernetes/kubernetes-src.tar.gz" /srv/salt-new/salt/kube-docs/ kube_bin_dir="/srv/salt-new/salt/kube-bins"; docker_images_sls_file="/srv/salt-new/pillar/docker-images.sls"; diff --git a/cluster/saltbase/salt/base.sls b/cluster/saltbase/salt/base.sls index a11542d22d..80ea7f3f5c 100644 --- a/cluster/saltbase/salt/base.sls +++ b/cluster/saltbase/salt/base.sls @@ -50,3 +50,10 @@ net.ipv4.neigh.default.gc_thresh1: - user: root - group: root - mode: 644 + +/usr/local/share/doc/kubernetes/kubernetes-src.tar.gz: + file.managed: + - source: salt://kube-docs/kubernetes-src.tar.gz + - user: root + - group: root + - mode: 644 From c2e70a7c35d9dde1bf80bfd72869de625b77637a Mon Sep 17 00:00:00 2001 From: "Madhusudan.C.S" <madhusudancs@google.com> Date: Thu, 23 Jun 2016 16:16:03 -0700 Subject: [PATCH 152/339] Parametrize the kube-dns --federations command line argument in the manifest. This parameter is later substituted with the environment variable during the build process. --- build/common.sh | 3 +++ cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base | 1 + cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in | 1 + cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed | 1 + cluster/saltbase/salt/kube-dns/transforms2salt.sed | 1 + cluster/saltbase/salt/kube-dns/transforms2sed.sed | 1 + 6 files changed, 8 insertions(+) diff --git a/build/common.sh b/build/common.sh index 67de4aa7ea..51429a1343 100755 --- a/build/common.sh +++ b/build/common.sh @@ -949,6 +949,9 @@ function kube::release::package_kube_manifests_tarball() { objects=$(cd "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns" && find . \( -name \*.yaml -or -name \*.yaml.in -or -name \*.json \) | grep -v demo) mkdir -p "${dst_dir}/dns" tar c -C "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns" ${objects} | tar x -C "${dst_dir}/dns" + if [[ "${FEDERATION:-}" == "true" ]]; then + sed -i 's/{{ pillar\['"'"'federations_domain_map'"'"'\] }}/- --federations="'"${FEDERATIONS_DOMAIN_MAP}"'"/g' "${dst_dir}/dns/skydns-rc.yaml.in" + fi # This is for coreos only. ContainerVM, GCI, or Trusty does not use it. cp -r "${KUBE_ROOT}/cluster/gce/coreos/kube-manifests"/* "${release_stage}/" diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base index ce5f426de8..74bafd064d 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base @@ -75,6 +75,7 @@ spec: # command = "/kube-dns" - --domain=__PILLAR__DNS__DOMAIN__. - --dns-port=10053 + __PILLAR__FEDERATIONS__DOMAIN__MAP__ ports: - containerPort: 10053 name: dns-local diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in index 3cc597dc4a..88d1ff902a 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in @@ -75,6 +75,7 @@ spec: # command = "/kube-dns" - --domain={{ pillar['dns_domain'] }}. - --dns-port=10053 + {{ pillar['federations_domain_map'] }} ports: - containerPort: 10053 name: dns-local diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed index 17df3ebe2a..0840686a9a 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed @@ -75,6 +75,7 @@ spec: # command = "/kube-dns" - --domain=$DNS_DOMAIN. - --dns-port=10053 + $FEDERATIONS_DOMAIN_MAP ports: - containerPort: 10053 name: dns-local diff --git a/cluster/saltbase/salt/kube-dns/transforms2salt.sed b/cluster/saltbase/salt/kube-dns/transforms2salt.sed index 051f40a2a4..4ce2e4988f 100644 --- a/cluster/saltbase/salt/kube-dns/transforms2salt.sed +++ b/cluster/saltbase/salt/kube-dns/transforms2salt.sed @@ -1,4 +1,5 @@ s/__PILLAR__DNS__SERVER__/{{ pillar['dns_server'] }}/g s/__PILLAR__DNS__REPLICAS__/{{ pillar['dns_replicas'] }}/g s/__PILLAR__DNS__DOMAIN__/{{ pillar['dns_domain'] }}/g +s/__PILLAR__FEDERATIONS__DOMAIN__MAP__/{{ pillar['federations_domain_map'] }}/g s/__MACHINE_GENERATED_WARNING__/Warning: This is a file generated from the base underscore template file: __SOURCE_FILENAME__/g \ No newline at end of file diff --git a/cluster/saltbase/salt/kube-dns/transforms2sed.sed b/cluster/saltbase/salt/kube-dns/transforms2sed.sed index 612e467a95..95a938144b 100644 --- a/cluster/saltbase/salt/kube-dns/transforms2sed.sed +++ b/cluster/saltbase/salt/kube-dns/transforms2sed.sed @@ -1,4 +1,5 @@ s/__PILLAR__DNS__SERVER__/$DNS_SERVER_IP/g s/__PILLAR__DNS__REPLICAS__/$DNS_REPLICAS/g s/__PILLAR__DNS__DOMAIN__/$DNS_DOMAIN/g +s/__PILLAR__FEDERATIONS__DOMAIN__MAP__/$FEDERATIONS_DOMAIN_MAP/g s/__MACHINE_GENERATED_WARNING__/Warning: This is a file generated from the base underscore template file: __SOURCE_FILENAME__/g \ No newline at end of file From fc3101f515a2923bab69fdd3ff04419a941333be Mon Sep 17 00:00:00 2001 From: Vishnu kannan <vishnuk@google.com> Date: Thu, 23 Jun 2016 16:28:01 -0700 Subject: [PATCH 153/339] remove reference to documentation webpage from kubectl describe nodes output Signed-off-by: Vishnu kannan <vishnuk@google.com> --- pkg/kubectl/describe.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubectl/describe.go b/pkg/kubectl/describe.go index 487f81b6c6..07b34f6fee 100644 --- a/pkg/kubectl/describe.go +++ b/pkg/kubectl/describe.go @@ -1846,7 +1846,7 @@ func describeNodeResource(nodeNonTerminatedPodsList *api.PodList, node *api.Node memoryReq.String(), int64(fractionMemoryReq), memoryLimit.String(), int64(fractionMemoryLimit)) } - fmt.Fprint(out, "Allocated resources:\n (Total limits may be over 100 percent, i.e., overcommitted. More info: http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md)\n CPU Requests\tCPU Limits\tMemory Requests\tMemory Limits\n") + fmt.Fprint(out, "Allocated resources:\n (Total limits may be over 100 percent, i.e., overcommitted.\n CPU Requests\tCPU Limits\tMemory Requests\tMemory Limits\n") fmt.Fprint(out, " ------------\t----------\t---------------\t-------------\n") reqs, limits, err := getPodsTotalRequestsAndLimits(nodeNonTerminatedPodsList) if err != nil { From 72af2b7c215e6b37c0c05cc8362c6259fba422ee Mon Sep 17 00:00:00 2001 From: Aditya Kali <adityakali@google.com> Date: Thu, 23 Jun 2016 17:08:31 -0700 Subject: [PATCH 154/339] Use new fluentd-gcp container with journal support This makes use of the systemd-journal support added in PR #27981 and Fixes #27446. --- cluster/gce/gci/configure-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 177e097590..3ad041c239 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -868,7 +868,7 @@ function start-fluentd { echo "Start fluentd pod" if [[ "${ENABLE_NODE_LOGGING:-}" == "true" ]]; then if [[ "${LOGGING_DESTINATION:-}" == "gcp" ]]; then - cp "${KUBE_HOME}/kube-manifests/kubernetes/fluentd-gcp.yaml" /etc/kubernetes/manifests/ + cp "${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty/gci/fluentd-gcp.yaml" /etc/kubernetes/manifests/ elif [[ "${LOGGING_DESTINATION:-}" == "elasticsearch" && "${KUBERNETES_MASTER:-}" != "true" ]]; then # Running fluentd-es on the master is pointless, as it can't communicate # with elasticsearch from there in the default configuration. From 19bf9d06246d9e5cf1d10cb84b02aa72d586f1fb Mon Sep 17 00:00:00 2001 From: Alex Robinson <arob@google.com> Date: Wed, 1 Jun 2016 20:33:56 +0000 Subject: [PATCH 155/339] Support journal logs in fluentd-gcp. Only run the systemd-journal plugin when on a platform that requests it. The plugin crashes the fluentd process if the journal isn't present, so it can't just be run blindly in all configurations. --- .../fluentd-gcp/fluentd-gcp-image/Dockerfile | 17 +- .../fluentd-gcp/fluentd-gcp-image/Makefile | 2 +- .../google-fluentd-journal.conf | 249 ++++++++++++++++++ .../fluentd-gcp-image/google-fluentd.conf | 4 + cluster/addons/gci/README.md | 7 + cluster/addons/gci/fluentd-gcp.yaml | 53 ++++ .../salt/fluentd-gcp/fluentd-gcp.yaml | 4 +- 7 files changed, 329 insertions(+), 7 deletions(-) create mode 100644 cluster/addons/fluentd-gcp/fluentd-gcp-image/google-fluentd-journal.conf create mode 100644 cluster/addons/gci/README.md create mode 100644 cluster/addons/gci/fluentd-gcp.yaml diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile index 731af6845b..6d74ff28f1 100644 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile +++ b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile @@ -18,9 +18,9 @@ # Logging API. This configuration assumes that the host performning # the collection is a VM that has been created with a logging.write # scope and that the Logging API has been enabled for the project -# in the Google Developer Console. +# in the Google Developer Console. -FROM ubuntu:14.04 +FROM ubuntu:16.04 MAINTAINER Alex Robinson "arob@google.com" # Disable prompts from apt. @@ -30,17 +30,24 @@ ENV DO_NOT_INSTALL_CATCH_ALL_CONFIG true RUN apt-get -q update && \ apt-get install -y curl && \ + apt-get install -y gcc && \ + apt-get install -y make && \ apt-get clean && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ curl -s https://dl.google.com/cloudagents/install-logging-agent.sh | bash -# Install the record reformer plugin. -RUN /usr/sbin/google-fluentd-gem install fluent-plugin-record-reformer +# Install the record reformer and systemd plugins. +RUN /usr/sbin/google-fluentd-gem install fluent-plugin-record-reformer -v 0.8.1 +RUN /usr/sbin/google-fluentd-gem install fluent-plugin-systemd -v 0.0.3 # Remove the misleading log file that gets generated when the agent is installed RUN rm -rf /var/log/google-fluentd -# Copy the Fluentd configuration file for logging Docker container logs. +# Copy the Fluentd configuration files for logging Docker container logs. +# Either configuration file can be used by specifying `-c <file>` as a command +# line argument. COPY google-fluentd.conf /etc/google-fluentd/google-fluentd.conf +COPY google-fluentd-journal.conf /etc/google-fluentd/google-fluentd-journal.conf # Start Fluentd to pick up our config that watches Docker container logs. CMD /usr/sbin/google-fluentd "$FLUENTD_ARGS" diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile index 95b77f33c6..755139838b 100644 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile +++ b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile @@ -28,7 +28,7 @@ .PHONY: kbuild kpush -TAG = 1.20 +TAG = 1.21 # Rules for building the test image for deployment to Dockerhub with user kubernetes. diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/google-fluentd-journal.conf b/cluster/addons/fluentd-gcp/fluentd-gcp-image/google-fluentd-journal.conf new file mode 100644 index 0000000000..b0a4fd401a --- /dev/null +++ b/cluster/addons/fluentd-gcp/fluentd-gcp-image/google-fluentd-journal.conf @@ -0,0 +1,249 @@ +# This configuration file for Fluentd / td-agent is used +# to watch changes to Docker log files that live in the +# directory /var/lib/docker/containers/ and are symbolically +# linked to from the /var/log directory using names that capture the +# pod name and container name. These logs are then submitted to +# Google Cloud Logging which assumes the installation of the cloud-logging plug-in. +# +# This configuration is almost identical to google-fluentd.conf, with the one +# difference being that this collects systemd journal logs. +# +# Example +# ======= +# A line in the Docker log file might like like this JSON: +# +# {"log":"2014/09/25 21:15:03 Got request with path wombat\n", +# "stream":"stderr", +# "time":"2014-09-25T21:15:03.499185026Z"} +# +# The record reformer is used to write the tag to focus on the pod name +# and the Kubernetes container name. For example a Docker container's logs +# might be in the directory: +# /var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b +# and in the file: +# 997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log +# where 997599971ee6... is the Docker ID of the running container. +# The Kubernetes kubelet makes a symbolic link to this file on the host machine +# in the /var/log/containers directory which includes the pod name and the Kubernetes +# container name: +# synthetic-logger-0.25lps-pod_default-synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log +# -> +# /var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log +# The /var/log directory on the host is mapped to the /var/log directory in the container +# running this instance of Fluentd and we end up collecting the file: +# /var/log/containers/synthetic-logger-0.25lps-pod_default-synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log +# This results in the tag: +# var.log.containers.synthetic-logger-0.25lps-pod_default-synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log +# The record reformer is used is discard the var.log.containers prefix and +# the Docker container ID suffix and "kubernetes." is pre-pended giving the +# final tag which is ingested into Elasticsearch: +# kubernetes.synthetic-logger-0.25lps-pod_default-synth-lgr +# This makes it easier for users to search for logs by pod name or by +# the name of the Kubernetes container regardless of how many times the +# Kubernetes pod has been restarted (resulting in a several Docker container IDs). + +# Do not directly collect fluentd's own logs to avoid infinite loops. +<match fluent.**> + type null +</match> + +# Example: +# {"log":"[info:2016-02-16T16:04:05.930-08:00] Some log text here\n","stream":"stdout","time":"2016-02-17T00:04:05.931087621Z"} +<source> + type tail + format json + time_key time + path /var/log/containers/*.log + pos_file /var/log/gcp-containers.log.pos + time_format %Y-%m-%dT%H:%M:%S.%NZ + tag reform.* + read_from_head true +</source> + +<match reform.**> + type record_reformer + enable_ruby true + tag kubernetes.${tag_suffix[4].split('-')[0..-2].join('-')} +</match> + +# Example: +# 2015-12-21 23:17:22,066 [salt.state ][INFO ] Completed state [net.ipv4.ip_forward] at time 23:17:22.066081 +<source> + type tail + format /^(?<time>[^ ]* [^ ,]*)[^\[]*\[[^\]]*\]\[(?<severity>[^ \]]*) *\] (?<message>.*)$/ + time_format %Y-%m-%d %H:%M:%S + path /var/log/salt/minion + pos_file /var/log/gcp-salt.pos + tag salt +</source> + +# Example: +# Dec 21 23:17:22 gke-foo-1-1-4b5cbd14-node-4eoj startupscript: Finished running startup script /var/run/google.startup.script +<source> + type tail + format syslog + path /var/log/startupscript.log + pos_file /var/log/gcp-startupscript.log.pos + tag startupscript +</source> + +# Examples: +# time="2016-02-04T06:51:03.053580605Z" level=info msg="GET /containers/json" +# time="2016-02-04T07:53:57.505612354Z" level=error msg="HTTP Error" err="No such image: -f" statusCode=404 +<source> + type tail + format /^time="(?<time>[^)]*)" level=(?<severity>[^ ]*) msg="(?<message>[^"]*)"( err="(?<error>[^"]*)")?( statusCode=($<status_code>\d+))?/ + time_format %Y-%m-%dT%H:%M:%S.%NZ + path /var/log/docker.log + pos_file /var/log/gcp-docker.log.pos + tag docker +</source> + +# Example: +# 2016/02/04 06:52:38 filePurge: successfully removed file /var/etcd/data/member/wal/00000000000006d0-00000000010a23d1.wal +<source> + type tail + # Not parsing this, because it doesn't have anything particularly useful to + # parse out of it (like severities). + format none + path /var/log/etcd.log + pos_file /var/log/gcp-etcd.log.pos + tag etcd +</source> + +# Multi-line parsing is required for all the kube logs because very large log +# statements, such as those that include entire object bodies, get split into +# multiple lines by glog. + +# Example: +# I0204 07:32:30.020537 3368 server.go:1048] POST /stats/container/: (13.972191ms) 200 [[Go-http-client/1.1] 10.244.1.3:40537] +<source> + type tail + format multiline + multiline_flush_interval 5s + format_firstline /^\w\d{4}/ + format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/ + time_format %m%d %H:%M:%S.%N + path /var/log/kubelet.log + pos_file /var/log/gcp-kubelet.log.pos + tag kubelet +</source> + +# Example: +# I0204 07:00:19.604280 5 handlers.go:131] GET /api/v1/nodes: (1.624207ms) 200 [[kube-controller-manager/v1.1.3 (linux/amd64) kubernetes/6a81b50] 127.0.0.1:38266] +<source> + type tail + format multiline + multiline_flush_interval 5s + format_firstline /^\w\d{4}/ + format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/ + time_format %m%d %H:%M:%S.%N + path /var/log/kube-apiserver.log + pos_file /var/log/gcp-kube-apiserver.log.pos + tag kube-apiserver +</source> + +# Example: +# I0204 06:55:31.872680 5 servicecontroller.go:277] LB already exists and doesn't need update for service kube-system/kube-ui +<source> + type tail + format multiline + multiline_flush_interval 5s + format_firstline /^\w\d{4}/ + format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/ + time_format %m%d %H:%M:%S.%N + path /var/log/kube-controller-manager.log + pos_file /var/log/gcp-kube-controller-manager.log.pos + tag kube-controller-manager +</source> + +# Example: +# W0204 06:49:18.239674 7 reflector.go:245] pkg/scheduler/factory/factory.go:193: watch of *api.Service ended with: 401: The event in requested index is outdated and cleared (the requested history has been cleared [2578313/2577886]) [2579312] +<source> + type tail + format multiline + multiline_flush_interval 5s + format_firstline /^\w\d{4}/ + format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/ + time_format %m%d %H:%M:%S.%N + path /var/log/kube-scheduler.log + pos_file /var/log/gcp-kube-scheduler.log.pos + tag kube-scheduler +</source> + +# Example: +# I0603 15:31:05.793605 6 cluster_manager.go:230] Reading config from path /etc/gce.conf +<source> + type tail + format multiline + multiline_flush_interval 5s + format_firstline /^\w\d{4}/ + format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/ + time_format %m%d %H:%M:%S.%N + path /var/log/glbc.log + pos_file /var/log/gcp-glbc.log.pos + tag glbc +</source> + +# Example: +# I0603 15:31:05.793605 6 cluster_manager.go:230] Reading config from path /etc/gce.conf +<source> + type tail + format multiline + multiline_flush_interval 5s + format_firstline /^\w\d{4}/ + format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/ + time_format %m%d %H:%M:%S.%N + path /var/log/cluster-autoscaler.log + pos_file /var/log/gcp-cluster-autoscaler.log.pos + tag cluster-autoscaler +</source> + +# Logs from systemd-journal for interesting services. +<source> + type systemd + filters [{ "_SYSTEMD_UNIT": "docker.service" }] + pos_file /var/log/gcp-journald-docker.pos + read_from_head true + tag docker +</source> + +<source> + type systemd + filters [{ "_SYSTEMD_UNIT": "kubelet.service" }] + pos_file /var/log/gcp-journald-kubelet.pos + read_from_head true + tag kubelet +</source> + +# We use 2 output stanzas - one to handle the container logs and one to handle +# the node daemon logs, the latter of which explicitly sends its logs to the +# compute.googleapis.com service rather than container.googleapis.com to keep +# them separate since most users don't care about the node logs. +<match kubernetes.**> + type google_cloud + # Set the chunk limit conservatively to avoid exceeding the GCL limit + # of 10MiB per write request. + buffer_chunk_limit 2M + # Cap the combined memory usage of this buffer and the one below to + # 2MiB/chunk * (24 + 8) chunks = 64 MiB + buffer_queue_limit 24 + # Never wait more than 5 seconds before flushing logs in the non-error case. + flush_interval 5s + # Never wait longer than 30 seconds between retries. + max_retry_wait 30 + # Disable the limit on the number of retries (retry forever). + disable_retry_limit +</match> + +# Keep a smaller buffer here since these logs are less important than the user's +# container logs. +<match **> + type google_cloud + detect_subservice false + buffer_chunk_limit 2M + buffer_queue_limit 8 + flush_interval 5s + max_retry_wait 30 + disable_retry_limit +</match> diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/google-fluentd.conf b/cluster/addons/fluentd-gcp/fluentd-gcp-image/google-fluentd.conf index eaf6e2b6b6..a4c918dd54 100644 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/google-fluentd.conf +++ b/cluster/addons/fluentd-gcp/fluentd-gcp-image/google-fluentd.conf @@ -5,6 +5,10 @@ # pod name and container name. These logs are then submitted to # Google Cloud Logging which assumes the installation of the cloud-logging plug-in. # +# This configuration is almost identical to google-fluentd-journal.conf, with +# the one difference being that this doesn't try to collect systemd journal +# logs. +# # Example # ======= # A line in the Docker log file might like like this JSON: diff --git a/cluster/addons/gci/README.md b/cluster/addons/gci/README.md new file mode 100644 index 0000000000..02e1172e64 --- /dev/null +++ b/cluster/addons/gci/README.md @@ -0,0 +1,7 @@ +Some addons need to be configured slightly differently when running on the +Google ContainerVM Image (GCI). This directory serves as a place to store yaml +manifests that need to differ slightly from the ones under +`cluster/saltbase/salt`. + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/addons/gci/README.md?pixel)]() diff --git a/cluster/addons/gci/fluentd-gcp.yaml b/cluster/addons/gci/fluentd-gcp.yaml new file mode 100644 index 0000000000..fe76221f58 --- /dev/null +++ b/cluster/addons/gci/fluentd-gcp.yaml @@ -0,0 +1,53 @@ +# This config should be kept as similar as possible to the one at +# cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml +apiVersion: v1 +kind: Pod +metadata: + name: fluentd-cloud-logging + namespace: kube-system + labels: + k8s-app: fluentd-logging +spec: + dnsPolicy: Default + containers: + - name: fluentd-cloud-logging + image: gcr.io/google_containers/fluentd-gcp:1.21 + command: + - '/bin/sh' + - '-c' + # This is pretty hacky, but ruby relies on libsystemd's native code, and + # the ubuntu:16.04 libsystemd doesn't play nice with the journal on GCI + # hosts. Work around the problem by copying in the host's libsystemd. + - 'rm /lib/x86_64-linux-gnu/libsystemd* && cp /host/lib/libsystemd* /lib/x86_64-linux-gnu/ && /usr/sbin/google-fluentd -q -c /etc/google-fluentd/google-fluentd-journal.conf' + resources: + limits: + memory: 200Mi + requests: + # Any change here should be accompanied by a proportional change in CPU + # requests of other per-node add-ons (e.g. kube-proxy). + cpu: 80m + memory: 200Mi + volumeMounts: + - name: varlog + mountPath: /var/log + - name: varlibdockercontainers + mountPath: /var/lib/docker/containers + readOnly: true + - name: journaldir + mountPath: /var/log/journal + - name: libsystemddir + mountPath: /host/lib + terminationGracePeriodSeconds: 30 + volumes: + - name: varlog + hostPath: + path: /var/log + - name: varlibdockercontainers + hostPath: + path: /var/lib/docker/containers + - name: journaldir + hostPath: + path: /var/log/journal + - name: libsystemddir + hostPath: + path: /usr/lib64 diff --git a/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml b/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml index ef573f5b55..10e678fae2 100644 --- a/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml +++ b/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml @@ -1,3 +1,5 @@ +# This config should be kept as similar as possible to the one at +# cluster/addons/gci/fluentd-gcp.yaml apiVersion: v1 kind: Pod metadata: @@ -9,7 +11,7 @@ spec: dnsPolicy: Default containers: - name: fluentd-cloud-logging - image: gcr.io/google_containers/fluentd-gcp:1.20 + image: gcr.io/google_containers/fluentd-gcp:1.21 resources: limits: memory: 200Mi From e2021ef2417a8ce5a7a5469b1136c2dbec5b83e7 Mon Sep 17 00:00:00 2001 From: Matt Liggett <mml@google.com> Date: Thu, 23 Jun 2016 13:12:44 -0700 Subject: [PATCH 156/339] A few changes to federated-service e2e test. Most of the changes that get the test to pass have been made already or elsewhere. Here we restructure a bit fixing a nesting problem, extend the timeouts, and start creating distinct backend pods that I'll delete in the non-local test (coming shortly). Also some extra debugging info in the DNS code. I made some upstream changes to skydns in https://github.com/skynetservices/skydns/pull/283 --- pkg/dns/dns.go | 44 ++++++++----- test/e2e/federated-service.go | 114 +++++++++++++++++++++------------- 2 files changed, 100 insertions(+), 58 deletions(-) diff --git a/pkg/dns/dns.go b/pkg/dns/dns.go index 10aa0363ac..59b7835ef0 100644 --- a/pkg/dns/dns.go +++ b/pkg/dns/dns.go @@ -559,22 +559,38 @@ func getSkyMsg(ip string, port int) (*skymsg.Service, string) { // 6. The remaining segments match kd.domainPath. // 7. And federation must be one of the listed federations in the config. func (kd *KubeDNS) isFederationQuery(path []string) bool { - if len(path) == 4+len(kd.domainPath) && - len(validation.IsDNS952Label(path[0])) == 0 && - len(validation.IsDNS1123Label(path[1])) == 0 && - len(validation.IsDNS1123Label(path[2])) == 0 && - path[3] == serviceSubdomain { - for i, domComp := range kd.domainPath { - // kd.domainPath is reversed, so we need to look in the `path` in the reverse order. - if domComp != path[len(path)-i-1] { - return false - } - } - if _, ok := kd.federations[path[2]]; ok { - return true + if len(path) != 4+len(kd.domainPath) { + glog.V(2).Infof("not a federation query: len(%q) != 4+len(%q)", path, kd.domainPath) + return false + } + if errs := validation.IsDNS952Label(path[0]); len(errs) != 0 { + glog.V(2).Infof("not a federation query: %q is not an RFC 952 label: %q", path[0], errs) + return false + } + if errs := validation.IsDNS1123Label(path[1]); len(errs) != 0 { + glog.V(2).Infof("not a federation query: %q is not an RFC 1123 label: %q", path[1], errs) + return false + } + if errs := validation.IsDNS1123Label(path[2]); len(errs) != 0 { + glog.V(2).Infof("not a federation query: %q is not an RFC 1123 label: %q", path[2], errs) + return false + } + if path[3] != serviceSubdomain { + glog.V(2).Infof("not a federation query: %q != %q (serviceSubdomain)", path[3], serviceSubdomain) + return false + } + for i, domComp := range kd.domainPath { + // kd.domainPath is reversed, so we need to look in the `path` in the reverse order. + if domComp != path[len(path)-i-1] { + glog.V(2).Infof("not a federation query: kd.domainPath[%d] != path[%d] (%q != %q)", i, len(path)-i-1, domComp, path[len(path)-i-1]) + return false } } - return false + if _, ok := kd.federations[path[2]]; !ok { + glog.V(2).Infof("not a federation query: kd.federations[%q] not found", path[2]) + return false + } + return true } // federationRecords checks if the given `queryPath` is for a federated service and if it is, diff --git a/test/e2e/federated-service.go b/test/e2e/federated-service.go index fd8cd81b58..e53f40a8ea 100644 --- a/test/e2e/federated-service.go +++ b/test/e2e/federated-service.go @@ -56,7 +56,12 @@ const ( DNSTTL = 180 * time.Second ) +var FederatedServiceLabels = map[string]string{ + "foo": "bar", +} + var _ = framework.KubeDescribe("[Feature:Federation] Federated Services", func() { + var clusterClientSets []*release_1_3.Clientset var federationName string f := framework.NewDefaultFederatedFramework("service") @@ -137,28 +142,29 @@ var _ = framework.KubeDescribe("[Feature:Federation] Federated Services", func() } }) - AfterEach(func() { - framework.SkipUnlessFederated(f.Client) - - for i, cs := range clusterClientSets { - if err := cs.Core().Namespaces().Delete(f.Namespace.Name, &api.DeleteOptions{}); err != nil { - framework.Failf("Couldn't delete the namespace %s in cluster [%d]: %v", f.Namespace.Name, i, err) - } - framework.Logf("Namespace %s deleted in cluster [%d]", f.Namespace.Name, i) - } - - // Delete the registered clusters in the federation API server. - clusterList, err := f.FederationClientset.Federation().Clusters().List(api.ListOptions{}) - Expect(err).NotTo(HaveOccurred()) - for _, cluster := range clusterList.Items { - err := f.FederationClientset.Federation().Clusters().Delete(cluster.Name, &api.DeleteOptions{}) - Expect(err).NotTo(HaveOccurred()) - } - }) - Describe("DNS", func() { + AfterEach(func() { + framework.SkipUnlessFederated(f.Client) + + for i, cs := range clusterClientSets { + if err := cs.Core().Namespaces().Delete(f.Namespace.Name, &api.DeleteOptions{}); err != nil { + framework.Failf("Couldn't delete the namespace %s in cluster [%d]: %v", f.Namespace.Name, i, err) + } + framework.Logf("Namespace %s deleted in cluster [%d]", f.Namespace.Name, i) + } + + // Delete the registered clusters in the federation API server. + clusterList, err := f.FederationClientset.Federation().Clusters().List(api.ListOptions{}) + Expect(err).NotTo(HaveOccurred()) + for _, cluster := range clusterList.Items { + err := f.FederationClientset.Federation().Clusters().Delete(cluster.Name, &api.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + } + }) + BeforeEach(func() { framework.SkipUnlessFederated(f.Client) + createBackendPods(clusterClientSets, f.Namespace.Name) createService(f.FederationClientset_1_3, clusterClientSets, f.Namespace.Name) }) @@ -202,10 +208,14 @@ var _ = framework.KubeDescribe("[Feature:Federation] Federated Services", func() for _, name := range svcDNSNames { discoverService(f, name, true) } + }) + + // TODO(mml): This currently takes 9 minutes. Consider reducing the + // TTL and/or running the pods in parallel. + Context("[Slow] missing local service", func() { + It("should never find DNS entries for a missing local service", func() { + framework.SkipUnlessFederated(f.Client) - // TODO(mml): This currently takes 9 minutes. Consider reducing the - // TTL and/or running the pods in parallel. - Context("[Slow]", func() { localSvcDNSNames := []string{ FederatedServiceName, fmt.Sprintf("%s.%s", FederatedServiceName, f.Namespace.Name), @@ -247,10 +257,6 @@ func waitForFederatedServiceShard(cs *release_1_3.Clientset, namespace string, s // Renaming for clarity/readability clSvc := clSvcList.Items[0] - // The federation service has no cluster IP. Clear any cluster IP before - // comparison. - clSvc.Spec.ClusterIP = "" - Expect(clSvc.Name).To(Equal(service.Name)) // Some fields are expected to be different, so make them the same before checking equality. clSvc.Spec.ClusterIP = service.Spec.ClusterIP @@ -258,6 +264,11 @@ func waitForFederatedServiceShard(cs *release_1_3.Clientset, namespace string, s clSvc.Spec.DeprecatedPublicIPs = service.Spec.DeprecatedPublicIPs clSvc.Spec.LoadBalancerIP = service.Spec.LoadBalancerIP clSvc.Spec.LoadBalancerSourceRanges = service.Spec.LoadBalancerSourceRanges + // N.B. We cannot iterate over the port objects directly, as their values + // only get copied and our updates will get lost. + for i := range clSvc.Spec.Ports { + clSvc.Spec.Ports[i].NodePort = service.Spec.Ports[i].NodePort + } Expect(clSvc.Spec).To(Equal(service.Spec)) } } @@ -265,29 +276,18 @@ func waitForFederatedServiceShard(cs *release_1_3.Clientset, namespace string, s func createService(fcs *federation_release_1_3.Clientset, clusterClientSets []*release_1_3.Clientset, namespace string) { By(fmt.Sprintf("Creating federated service %q in namespace %q", FederatedServiceName, namespace)) - labels := map[string]string{ - "foo": "bar", - } - - svc1port := "svc1" - svc2port := "svc2" - service := &v1.Service{ ObjectMeta: v1.ObjectMeta{ Name: FederatedServiceName, }, Spec: v1.ServiceSpec{ - Selector: labels, + Selector: FederatedServiceLabels, + Type: "LoadBalancer", Ports: []v1.ServicePort{ { - Name: "portname1", + Name: "http", Port: 80, - TargetPort: intstr.FromString(svc1port), - }, - { - Name: "portname2", - Port: 81, - TargetPort: intstr.FromString(svc2port), + TargetPort: intstr.FromInt(8080), }, }, }, @@ -342,7 +342,7 @@ func podExitCodeDetector(f *framework.Framework, name string, code int32) func() } func discoverService(f *framework.Framework, name string, exists bool) { - command := []string{"sh", "-c", fmt.Sprintf("until nslookup '%s'; do sleep 1; done", name)} + command := []string{"sh", "-c", fmt.Sprintf("until nslookup '%s'; do sleep 10; done", name)} By(fmt.Sprintf("Looking up %q", name)) pod := &api.Pod{ @@ -368,10 +368,36 @@ func discoverService(f *framework.Framework, name string, exists bool) { if exists { // TODO(mml): Eventually check the IP address is correct, too. - Eventually(podExitCodeDetector(f, FederatedServicePod, 0), DNSTTL, time.Second*2). + Eventually(podExitCodeDetector(f, FederatedServicePod, 0), 10*DNSTTL, time.Second*2). Should(BeNil(), "%q should exit 0, but it never did", command) } else { - Consistently(podExitCodeDetector(f, FederatedServicePod, 0), DNSTTL, time.Second*2). + Consistently(podExitCodeDetector(f, FederatedServicePod, 0), 10*DNSTTL, time.Second*2). ShouldNot(BeNil(), "%q should never exit 0, but it did", command) } } + +func createBackendPods(clusterClientSets []*release_1_3.Clientset, namespace string) { + name := "backend" + + pod := &v1.Pod{ + ObjectMeta: v1.ObjectMeta{ + Name: name, + Namespace: namespace, + Labels: FederatedServiceLabels, + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Name: "backend", + Image: "gcr.io/google_containers/echoserver:1.4", + }, + }, + RestartPolicy: v1.RestartPolicyAlways, + }, + } + + for _, client := range clusterClientSets { + _, err := client.Core().Pods(namespace).Create(pod) + Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Creating pod %q/%q", namespace, name)) + } +} From f980aa2ae18c05293715ed3016049fbc82926b5c Mon Sep 17 00:00:00 2001 From: "Madhusudan.C.S" <madhusudancs@google.com> Date: Thu, 23 Jun 2016 16:46:55 -0700 Subject: [PATCH 157/339] Address review comments. --- build/common.sh | 13 ++++++++++++- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed | 1 - cluster/saltbase/salt/kube-dns/transforms2sed.sed | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/build/common.sh b/build/common.sh index 51429a1343..9b6d361d44 100755 --- a/build/common.sh +++ b/build/common.sh @@ -949,8 +949,19 @@ function kube::release::package_kube_manifests_tarball() { objects=$(cd "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns" && find . \( -name \*.yaml -or -name \*.yaml.in -or -name \*.json \) | grep -v demo) mkdir -p "${dst_dir}/dns" tar c -C "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns" ${objects} | tar x -C "${dst_dir}/dns" + + # We leave the `{{ pillar['federations_domain_map'] }}` parameter as is, if + # the right federation environment variables isn't set. This is to allow + # users to provide these pillar values using the regular salt's mechanisms + # during cluster bootstrap. if [[ "${FEDERATION:-}" == "true" ]]; then - sed -i 's/{{ pillar\['"'"'federations_domain_map'"'"'\] }}/- --federations="'"${FEDERATIONS_DOMAIN_MAP}"'"/g' "${dst_dir}/dns/skydns-rc.yaml.in" + FEDERATIONS_DOMAIN_MAP="${FEDERATIONS_DOMAIN_MAP:-}" + if [[ -z "${FEDERATIONS_DOMAIN_MAP}" && -n "${FEDERATION_NAME:-}" && -n "${DNS_ZONE_NAME:-}" ]]; then + FEDERATIONS_DOMAIN_MAP="${FEDERATION_NAME}=${DNS_ZONE_NAME}" + fi + if [[ -n "${FEDERATIONS_DOMAIN_MAP}" ]]; then + sed -i 's/{{ pillar\['"'"'federations_domain_map'"'"'\] }}/- --federations="'"${FEDERATIONS_DOMAIN_MAP}"'"/g' "${dst_dir}/dns/skydns-rc.yaml.in" + fi fi # This is for coreos only. ContainerVM, GCI, or Trusty does not use it. diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed index 0840686a9a..17df3ebe2a 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed @@ -75,7 +75,6 @@ spec: # command = "/kube-dns" - --domain=$DNS_DOMAIN. - --dns-port=10053 - $FEDERATIONS_DOMAIN_MAP ports: - containerPort: 10053 name: dns-local diff --git a/cluster/saltbase/salt/kube-dns/transforms2sed.sed b/cluster/saltbase/salt/kube-dns/transforms2sed.sed index 95a938144b..2138854dfe 100644 --- a/cluster/saltbase/salt/kube-dns/transforms2sed.sed +++ b/cluster/saltbase/salt/kube-dns/transforms2sed.sed @@ -1,5 +1,5 @@ s/__PILLAR__DNS__SERVER__/$DNS_SERVER_IP/g s/__PILLAR__DNS__REPLICAS__/$DNS_REPLICAS/g s/__PILLAR__DNS__DOMAIN__/$DNS_DOMAIN/g -s/__PILLAR__FEDERATIONS__DOMAIN__MAP__/$FEDERATIONS_DOMAIN_MAP/g +/__PILLAR__FEDERATIONS__DOMAIN__MAP__/d s/__MACHINE_GENERATED_WARNING__/Warning: This is a file generated from the base underscore template file: __SOURCE_FILENAME__/g \ No newline at end of file From 61f43c59246b5485049b595b72d761bc812e487f Mon Sep 17 00:00:00 2001 From: nikhiljindal <nikhiljindal@google.com> Date: Mon, 20 Jun 2016 00:40:24 -0700 Subject: [PATCH 158/339] Updating KubeDNS to try a local service first for federation query --- cmd/kube-dns/app/server.go | 5 +- pkg/dns/dns.go | 154 ++++++++++++++++++++++++++++++++----- pkg/dns/dns_test.go | 126 +++++++++++++++++++++++++++--- 3 files changed, 253 insertions(+), 32 deletions(-) diff --git a/cmd/kube-dns/app/server.go b/cmd/kube-dns/app/server.go index e16439ff9d..11c76f6ce9 100644 --- a/cmd/kube-dns/app/server.go +++ b/cmd/kube-dns/app/server.go @@ -53,7 +53,10 @@ func NewKubeDNSServerDefault(config *options.KubeDNSConfig) *KubeDNSServer { } ks.healthzPort = config.HealthzPort ks.dnsPort = config.DNSPort - ks.kd = kdns.NewKubeDNS(kubeClient, config.ClusterDomain, config.Federations) + ks.kd, err = kdns.NewKubeDNS(kubeClient, config.ClusterDomain, config.Federations) + if err != nil { + glog.Fatalf("Failed to start kubeDNS: %v", err) + } return &ks } diff --git a/pkg/dns/dns.go b/pkg/dns/dns.go index 10aa0363ac..08ce75fc65 100644 --- a/pkg/dns/dns.go +++ b/pkg/dns/dns.go @@ -92,8 +92,15 @@ type KubeDNS struct { // A Records and SRV Records for (regular) services and headless Services. cache *TreeCache + // TODO(nikhiljindal): Remove this. It can be recreated using clusterIPServiceMap. reverseRecordMap map[string]*skymsg.Service + // Map of cluster IP to service object. Headless services are not part of this map. + // Used to get a service when given its cluster IP. + // Access to this is coordinated using cacheLock. We use the same lock for cache and this map + // to ensure that they dont get out of sync. + clusterIPServiceMap map[string]*kapi.Service + // caller is responsible for using the cacheLock before invoking methods on cache // the cache is not thread-safe, and the caller can guarantee thread safety by using // the cacheLock @@ -119,20 +126,28 @@ type KubeDNS struct { nodesStore kcache.Store } -func NewKubeDNS(client clientset.Interface, domain string, federations map[string]string) *KubeDNS { +func NewKubeDNS(client clientset.Interface, domain string, federations map[string]string) (*KubeDNS, error) { + // Verify that federation names should not contain dots ('.') + // We can not allow dots since we use that as separator for path segments (svcname.nsname.fedname.svc.domain) + for key := range federations { + if strings.ContainsAny(key, ".") { + return nil, fmt.Errorf("invalid federation name: %s, cannot have '.'", key) + } + } kd := &KubeDNS{ - kubeClient: client, - domain: domain, - cache: NewTreeCache(), - cacheLock: sync.RWMutex{}, - nodesStore: kcache.NewStore(kcache.MetaNamespaceKeyFunc), - reverseRecordMap: make(map[string]*skymsg.Service), - domainPath: reverseArray(strings.Split(strings.TrimRight(domain, "."), ".")), - federations: federations, + kubeClient: client, + domain: domain, + cache: NewTreeCache(), + cacheLock: sync.RWMutex{}, + nodesStore: kcache.NewStore(kcache.MetaNamespaceKeyFunc), + reverseRecordMap: make(map[string]*skymsg.Service), + clusterIPServiceMap: make(map[string]*kapi.Service), + domainPath: reverseArray(strings.Split(strings.TrimRight(domain, "."), ".")), + federations: federations, } kd.setEndpointsStore() kd.setServicesStore() - return kd + return kd, nil } func (kd *KubeDNS) Start() { @@ -245,6 +260,7 @@ func (kd *KubeDNS) removeService(obj interface{}) { defer kd.cacheLock.Unlock() kd.cache.deletePath(subCachePath...) delete(kd.reverseRecordMap, s.Spec.ClusterIP) + delete(kd.clusterIPServiceMap, s.Spec.ClusterIP) } } @@ -319,6 +335,7 @@ func (kd *KubeDNS) newPortalService(service *kapi.Service) { defer kd.cacheLock.Unlock() kd.cache.setSubCache(service.Name, subCache, subCachePath...) kd.reverseRecordMap[service.Spec.ClusterIP] = reverseRecord + kd.clusterIPServiceMap[service.Spec.ClusterIP] = service } func (kd *KubeDNS) generateRecordsForHeadlessService(e *kapi.Endpoints, svc *kapi.Service) error { @@ -422,7 +439,74 @@ func (kd *KubeDNS) Records(name string, exact bool) (retval []skymsg.Service, er glog.Infof("Received DNS Request:%s, exact:%v", name, exact) trimmed := strings.TrimRight(name, ".") segments := strings.Split(trimmed, ".") + isFederationQuery := false + federationSegments := []string{} + if !exact && kd.isFederationQuery(segments) { + glog.Infof("federation service query: Received federation query. Going to try to find local service first") + // Try quering the non-federation (local) service first. + // Will try the federation one later, if this fails. + isFederationQuery = true + federationSegments = append(federationSegments, segments...) + // To try local service, remove federation name from segments. + // Federation name is 3rd in the segment (after service name and namespace). + segments = append(segments[:2], segments[3:]...) + } path := reverseArray(segments) + records, err := kd.getRecordsForPath(path, exact) + if err != nil { + return nil, err + } + if !isFederationQuery { + if len(records) > 0 { + return records, nil + } + return nil, etcd.Error{Code: etcd.ErrorCodeKeyNotFound} + } + + // For federation query, verify that the local service has endpoints. + validRecord := false + for _, val := range records { + // We know that a headless service has endpoints for sure if a record was returned for it. + // The record contains endpoint IPs. So nothing to check for headless services. + if !kd.isHeadlessServiceRecord(&val) { + ok, err := kd.serviceWithClusterIPHasEndpoints(&val) + if err != nil { + glog.Infof("federation service query: unexpected error while trying to find if service has endpoint: %v") + continue + } + if !ok { + glog.Infof("federation service query: skipping record since service has no endpoint: %v", val) + continue + } + } + validRecord = true + break + } + if validRecord { + // There is a local service with valid endpoints, return its CNAME. + name := strings.Join(reverseArray(path), ".") + // Ensure that this name that we are returning as a CNAME response is a fully qualified + // domain name so that the client's resolver library doesn't have to go through its + // search list all over again. + if !strings.HasSuffix(name, ".") { + name = name + "." + } + glog.Infof("federation service query: Returning CNAME for local service : %s", name) + return []skymsg.Service{{Host: name}}, nil + } + + // If the name query is not an exact query and does not match any records in the local store, + // attempt to send a federation redirect (CNAME) response. + if !exact { + glog.Infof("federation service query: Did not find a local service. Trying federation redirect (CNAME) response") + return kd.federationRecords(reverseArray(federationSegments)) + } + + return nil, etcd.Error{Code: etcd.ErrorCodeKeyNotFound} +} + +func (kd *KubeDNS) getRecordsForPath(path []string, exact bool) ([]skymsg.Service, error) { + retval := []skymsg.Service{} if kd.isPodRecord(path) { ip, err := kd.getPodIP(path) if err == nil { @@ -448,21 +532,50 @@ func (kd *KubeDNS) Records(name string, exact bool) (retval []skymsg.Service, er kd.cacheLock.RLock() defer kd.cacheLock.RUnlock() records := kd.cache.getValuesForPathWithWildcards(path...) + glog.V(2).Infof("Received %d records from cache", len(records)) for _, val := range records { retval = append(retval, *val) } glog.Infof("records:%v, retval:%v, path:%v", records, retval, path) - if len(retval) > 0 { - return retval, nil - } + return retval, nil +} - // If the name query is not an exact query and does not match any records in the local store, - // attempt to send a federation redirect (CNAME) response. - if !exact { - return kd.federationRecords(path) - } +// Returns true if the given record corresponds to a headless service. +// Important: Assumes that we already have the cacheLock. Callers responsibility to acquire it. +// This is because the code will panic, if we try to acquire it again if we already have it. +func (kd *KubeDNS) isHeadlessServiceRecord(msg *skymsg.Service) bool { + // If it is not a headless service, then msg.Host will be the cluster IP. + // So we can check if msg.host exists in our clusterIPServiceMap. + _, ok := kd.clusterIPServiceMap[msg.Host] + // It is headless service if no record was found. + return !ok +} - return nil, etcd.Error{Code: etcd.ErrorCodeKeyNotFound} +// Returns true if the service corresponding to the given message has endpoints. +// Note: Works only for services with ClusterIP. Will return an error for headless service (service without a clusterIP). +// Important: Assumes that we already have the cacheLock. Callers responsibility to acquire it. +// This is because the code will panic, if we try to acquire it again if we already have it. +func (kd *KubeDNS) serviceWithClusterIPHasEndpoints(msg *skymsg.Service) (bool, error) { + svc, ok := kd.clusterIPServiceMap[msg.Host] + if !ok { + // It is a headless service. + return false, fmt.Errorf("method not expected to be called for headless service") + } + key, err := kcache.MetaNamespaceKeyFunc(svc) + if err != nil { + return false, err + } + e, exists, err := kd.endpointsStore.GetByKey(key) + if err != nil { + return false, fmt.Errorf("failed to get endpoints object from endpoints store - %v", err) + } + if !exists { + return false, nil + } + if e, ok := e.(*kapi.Endpoints); ok { + return len(e.Subsets) > 0, nil + } + return false, fmt.Errorf("unexpected: found non-endpoint object in endpoint store: %v", e) } // ReverseRecords performs a reverse lookup for the given name. @@ -558,6 +671,9 @@ func getSkyMsg(ip string, port int) (*skymsg.Service, string) { // 5. Fourth segment is exactly "svc" // 6. The remaining segments match kd.domainPath. // 7. And federation must be one of the listed federations in the config. +// Note: Because of the above conditions, this method will treat wildcard queries such as +// *.mysvc.myns.myfederation.svc.domain.path as non-federation queries. +// We can add support for wildcard queries later, if needed. func (kd *KubeDNS) isFederationQuery(path []string) bool { if len(path) == 4+len(kd.domainPath) && len(validation.IsDNS952Label(path[0])) == 0 && diff --git a/pkg/dns/dns_test.go b/pkg/dns/dns_test.go index 9d7a1bb7d5..0d9e11dfa5 100644 --- a/pkg/dns/dns_test.go +++ b/pkg/dns/dns_test.go @@ -46,18 +46,27 @@ const ( func newKubeDNS() *KubeDNS { kd := &KubeDNS{ - domain: testDomain, - endpointsStore: cache.NewStore(cache.MetaNamespaceKeyFunc), - servicesStore: cache.NewStore(cache.MetaNamespaceKeyFunc), - cache: NewTreeCache(), - reverseRecordMap: make(map[string]*skymsg.Service), - cacheLock: sync.RWMutex{}, - domainPath: reverseArray(strings.Split(strings.TrimRight(testDomain, "."), ".")), - nodesStore: cache.NewStore(cache.MetaNamespaceKeyFunc), + domain: testDomain, + endpointsStore: cache.NewStore(cache.MetaNamespaceKeyFunc), + servicesStore: cache.NewStore(cache.MetaNamespaceKeyFunc), + cache: NewTreeCache(), + reverseRecordMap: make(map[string]*skymsg.Service), + clusterIPServiceMap: make(map[string]*kapi.Service), + cacheLock: sync.RWMutex{}, + domainPath: reverseArray(strings.Split(strings.TrimRight(testDomain, "."), ".")), + nodesStore: cache.NewStore(cache.MetaNamespaceKeyFunc), } return kd } +func TestNewKubeDNS(t *testing.T) { + // Verify that it returns an error for invalid federation names. + _, err := NewKubeDNS(nil, "domainName", map[string]string{"invalid.name.with.dot": "example.come"}) + if err == nil { + t.Errorf("Expected an error due to invalid federation name") + } +} + func TestPodDns(t *testing.T) { const ( testPodIP = "1.2.3.4" @@ -350,6 +359,98 @@ func TestHeadlessServiceWithDelayedEndpointsAddition(t *testing.T) { assertNoDNSForHeadlessService(t, kd, service) } +// Verifies that a single record with host "a" is returned for query "q". +func verifyRecord(q, a string, t *testing.T, kd *KubeDNS) { + records, err := kd.Records(q, false) + require.NoError(t, err) + assert.Equal(t, 1, len(records)) + assert.Equal(t, a, records[0].Host) +} + +// Verifies that quering KubeDNS for a headless federation service returns the DNS hostname when a local service does not exist and returns the endpoint IP when a local service exists. +func TestFederationHeadlessService(t *testing.T) { + kd := newKubeDNS() + kd.federations = map[string]string{ + "myfederation": "example.com", + } + kd.kubeClient = fake.NewSimpleClientset(newNodes()) + + // Verify that quering for federation service returns a federation domain name. + verifyRecord("testservice.default.myfederation.svc.cluster.local.", + "testservice.default.myfederation.svc.testcontinent-testreg-testzone.testcontinent-testreg.example.com.", + t, kd) + + // Add a local service without any endpoint. + s := newHeadlessService() + assert.NoError(t, kd.servicesStore.Add(s)) + kd.newService(s) + + // Verify that quering for federation service still returns the federation domain name. + verifyRecord(getFederationServiceFQDN(kd, s, "myfederation"), + "testservice.default.myfederation.svc.testcontinent-testreg-testzone.testcontinent-testreg.example.com.", + t, kd) + + // Now add an endpoint. + endpoints := newEndpoints(s, newSubsetWithOnePort("", 80, "10.0.0.1")) + assert.NoError(t, kd.endpointsStore.Add(endpoints)) + kd.updateService(s, s) + + // Verify that quering for federation service returns the local service domain name this time. + verifyRecord(getFederationServiceFQDN(kd, s, "myfederation"), "testservice.default.svc.cluster.local.", t, kd) + + // Delete the endpoint. + endpoints.Subsets = []kapi.EndpointSubset{} + kd.handleEndpointAdd(endpoints) + kd.updateService(s, s) + + // Verify that quering for federation service returns the federation domain name again. + verifyRecord(getFederationServiceFQDN(kd, s, "myfederation"), + "testservice.default.myfederation.svc.testcontinent-testreg-testzone.testcontinent-testreg.example.com.", + t, kd) +} + +// Verifies that quering KubeDNS for a federation service returns the DNS hostname if no endpoint exists and returns the local cluster IP if endpoints exist. +func TestFederationService(t *testing.T) { + kd := newKubeDNS() + kd.federations = map[string]string{ + "myfederation": "example.com", + } + kd.kubeClient = fake.NewSimpleClientset(newNodes()) + + // Verify that quering for federation service returns the federation domain name. + verifyRecord("testservice.default.myfederation.svc.cluster.local.", + "testservice.default.myfederation.svc.testcontinent-testreg-testzone.testcontinent-testreg.example.com.", + t, kd) + + // Add a local service without any endpoint. + s := newService(testNamespace, testService, "1.2.3.4", "", 80) + assert.NoError(t, kd.servicesStore.Add(s)) + kd.newService(s) + + // Verify that quering for federation service still returns the federation domain name. + verifyRecord(getFederationServiceFQDN(kd, s, "myfederation"), + "testservice.default.myfederation.svc.testcontinent-testreg-testzone.testcontinent-testreg.example.com.", + t, kd) + + // Now add an endpoint. + endpoints := newEndpoints(s, newSubsetWithOnePort("", 80, "10.0.0.1")) + assert.NoError(t, kd.endpointsStore.Add(endpoints)) + kd.updateService(s, s) + + // Verify that quering for federation service returns the local service domain name this time. + verifyRecord(getFederationServiceFQDN(kd, s, "myfederation"), "testservice.default.svc.cluster.local.", t, kd) + + // Remove the endpoint. + endpoints.Subsets = []kapi.EndpointSubset{} + kd.handleEndpointAdd(endpoints) + kd.updateService(s, s) + + // Verify that quering for federation service returns the federation domain name again. + verifyRecord(getFederationServiceFQDN(kd, s, "myfederation"), + "testservice.default.myfederation.svc.testcontinent-testreg-testzone.testcontinent-testreg.example.com.", + t, kd) +} + func TestFederationQueryWithoutCache(t *testing.T) { kd := newKubeDNS() kd.federations = map[string]string{ @@ -397,10 +498,7 @@ func testValidFederationQueries(t *testing.T, kd *KubeDNS) { } for _, query := range queries { - records, err := kd.Records(query.q, false) - require.NoError(t, err) - assert.Equal(t, 1, len(records)) - assert.Equal(t, query.a, records[0].Host) + verifyRecord(query.q, query.a, t, kd) } } @@ -630,6 +728,10 @@ func getEquivalentQueries(serviceFQDN, namespace string) []string { } } +func getFederationServiceFQDN(kd *KubeDNS, s *kapi.Service, federationName string) string { + return fmt.Sprintf("%s.%s.%s.svc.%s", s.Name, s.Namespace, federationName, kd.domain) +} + func getServiceFQDN(kd *KubeDNS, s *kapi.Service) string { return fmt.Sprintf("%s.%s.svc.%s", s.Name, s.Namespace, kd.domain) } From 7be429307bdc7fc545c671e46be91f27e322f378 Mon Sep 17 00:00:00 2001 From: nikhiljindal <nikhiljindal@google.com> Date: Thu, 23 Jun 2016 01:31:18 -0700 Subject: [PATCH 159/339] Updating the Makefile and YAML files to use the updated image --- build/kube-dns/Changelog | 3 +++ build/kube-dns/Makefile | 4 ++-- .../coreos/kube-manifests/addons/dns/skydns-rc.yaml | 10 +++++----- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base | 10 +++++----- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in | 10 +++++----- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed | 10 +++++----- 6 files changed, 25 insertions(+), 22 deletions(-) diff --git a/build/kube-dns/Changelog b/build/kube-dns/Changelog index 834a1e263a..73b89805c1 100644 --- a/build/kube-dns/Changelog +++ b/build/kube-dns/Changelog @@ -6,3 +6,6 @@ ## Version 1.4 (Tue June 21 2016 Nikhil Jindal <nikhiljindal@google.com>) - Initialising nodesStore (issue #27820) + + ## Version 1.5 (Thu June 23 2016 Nikhil Jindal <nikhiljindal@google.com>) + - Adding support to return local service (pr #27708) diff --git a/build/kube-dns/Makefile b/build/kube-dns/Makefile index 5d0dfa7748..0ea431cb2d 100644 --- a/build/kube-dns/Makefile +++ b/build/kube-dns/Makefile @@ -17,12 +17,12 @@ # If you update this image please bump the tag value before pushing. # # Usage: -# [ARCH=amd64] [TAG=1.4] [REGISTRY=gcr.io/google_containers] [BASEIMAGE=busybox] make (container|push) +# [ARCH=amd64] [TAG=1.5] [REGISTRY=gcr.io/google_containers] [BASEIMAGE=busybox] make (container|push) # Default registry, arch and tag. This can be overwritten by arguments to make PLATFORM?=linux ARCH?=amd64 -TAG?=1.4 +TAG?=1.5 REGISTRY?=gcr.io/google_containers GOLANG_VERSION=1.6 diff --git a/cluster/gce/coreos/kube-manifests/addons/dns/skydns-rc.yaml b/cluster/gce/coreos/kube-manifests/addons/dns/skydns-rc.yaml index 1a1ee3b1c0..3c5f498ad3 100644 --- a/cluster/gce/coreos/kube-manifests/addons/dns/skydns-rc.yaml +++ b/cluster/gce/coreos/kube-manifests/addons/dns/skydns-rc.yaml @@ -1,27 +1,27 @@ apiVersion: v1 kind: ReplicationController metadata: - name: kube-dns-v14 + name: kube-dns-v15 namespace: kube-system labels: k8s-app: kube-dns - version: v14 + version: v15 kubernetes.io/cluster-service: "true" spec: replicas: ${DNS_REPLICAS} selector: k8s-app: kube-dns - version: v14 + version: v15 template: metadata: labels: k8s-app: kube-dns - version: v14 + version: v15 kubernetes.io/cluster-service: "true" spec: containers: - name: kubedns - image: gcr.io/google_containers/kubedns-amd64:1.3 + image: gcr.io/google_containers/kubedns-amd64:1.5 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base index ce5f426de8..59b9debc18 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base @@ -21,27 +21,27 @@ apiVersion: v1 kind: ReplicationController metadata: - name: kube-dns-v16 + name: kube-dns-v17 namespace: kube-system labels: k8s-app: kube-dns - version: v16 + version: v17 kubernetes.io/cluster-service: "true" spec: replicas: __PILLAR__DNS__REPLICAS__ selector: k8s-app: kube-dns - version: v16 + version: v17 template: metadata: labels: k8s-app: kube-dns - version: v16 + version: v17 kubernetes.io/cluster-service: "true" spec: containers: - name: kubedns - image: gcr.io/google_containers/kubedns-amd64:1.4 + image: gcr.io/google_containers/kubedns-amd64:1.5 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in index 3cc597dc4a..5411979b94 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in @@ -21,27 +21,27 @@ apiVersion: v1 kind: ReplicationController metadata: - name: kube-dns-v16 + name: kube-dns-v17 namespace: kube-system labels: k8s-app: kube-dns - version: v16 + version: v17 kubernetes.io/cluster-service: "true" spec: replicas: {{ pillar['dns_replicas'] }} selector: k8s-app: kube-dns - version: v16 + version: v17 template: metadata: labels: k8s-app: kube-dns - version: v16 + version: v17 kubernetes.io/cluster-service: "true" spec: containers: - name: kubedns - image: gcr.io/google_containers/kubedns-amd64:1.4 + image: gcr.io/google_containers/kubedns-amd64:1.5 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed index 17df3ebe2a..385d448d8e 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed @@ -21,27 +21,27 @@ apiVersion: v1 kind: ReplicationController metadata: - name: kube-dns-v16 + name: kube-dns-v17 namespace: kube-system labels: k8s-app: kube-dns - version: v16 + version: v17 kubernetes.io/cluster-service: "true" spec: replicas: $DNS_REPLICAS selector: k8s-app: kube-dns - version: v16 + version: v17 template: metadata: labels: k8s-app: kube-dns - version: v16 + version: v17 kubernetes.io/cluster-service: "true" spec: containers: - name: kubedns - image: gcr.io/google_containers/kubedns-amd64:1.4 + image: gcr.io/google_containers/kubedns-amd64:1.5 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in From d78e6053bb6d169a13b6a98b79e623a85d44c849 Mon Sep 17 00:00:00 2001 From: Andy Goldstein <agoldste@redhat.com> Date: Thu, 23 Jun 2016 21:01:52 -0400 Subject: [PATCH 160/339] bump(google/cadvisor): v0.23.6 Fix a bug where cadvisor couldn't gather container filesystem stats on RHEL 7.2 devicemapper. --- Godeps/Godeps.json | 160 +++++++++--------- .../devicemapper/thin_pool_watcher.go | 14 +- 2 files changed, 87 insertions(+), 87 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 87223706f4..2ac71a977d 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -927,203 +927,203 @@ }, { "ImportPath": "github.com/google/cadvisor/api", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/cache/memory", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/collector", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/container", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/container/common", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/container/docker", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/container/libcontainer", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/container/raw", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/container/rkt", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/container/systemd", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/devicemapper", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/events", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/fs", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/healthz", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/http", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/http/mux", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/info/v1", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/info/v1/test", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/info/v2", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/machine", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/manager", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher/raw", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher/rkt", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/metrics", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/pages", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/pages/static", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/storage", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/summary", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/utils", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/utils/cloudinfo", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/utils/cpuload", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/utils/cpuload/netlink", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/utils/docker", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/utils/oomparser", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/utils/sysfs", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/utils/sysinfo", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/utils/tail", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/validate", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/cadvisor/version", - "Comment": "v0.23.5", - "Rev": "3ecedda96383d3342a5c8e5b8f39c7c9db65982f" + "Comment": "v0.23.6", + "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" }, { "ImportPath": "github.com/google/gofuzz", diff --git a/vendor/github.com/google/cadvisor/devicemapper/thin_pool_watcher.go b/vendor/github.com/google/cadvisor/devicemapper/thin_pool_watcher.go index 4062f1fed2..bf2300a33b 100644 --- a/vendor/github.com/google/cadvisor/devicemapper/thin_pool_watcher.go +++ b/vendor/github.com/google/cadvisor/devicemapper/thin_pool_watcher.go @@ -150,8 +150,8 @@ func (w *ThinPoolWatcher) Refresh() error { } const ( - thinPoolDmsetupStatusTokens = 11 thinPoolDmsetupStatusHeldMetadataRoot = 6 + thinPoolDmsetupStatusMinFields = thinPoolDmsetupStatusHeldMetadataRoot + 1 ) // checkReservation checks to see whether the thin device is currently holding @@ -163,14 +163,14 @@ func (w *ThinPoolWatcher) checkReservation(poolName string) (bool, error) { return false, err } - tokens := strings.Split(string(output), " ") - // Split returns the input as the last item in the result, adjust the - // number of tokens by one - if len(tokens) != thinPoolDmsetupStatusTokens+1 { - return false, fmt.Errorf("unexpected output of dmsetup status command; expected 11 fields, got %v; output: %v", len(tokens), string(output)) + // we care about the field at fields[thinPoolDmsetupStatusHeldMetadataRoot], + // so make sure we get enough fields + fields := strings.Fields(string(output)) + if len(fields) < thinPoolDmsetupStatusMinFields { + return false, fmt.Errorf("unexpected output of dmsetup status command; expected at least %d fields, got %v; output: %v", thinPoolDmsetupStatusMinFields, len(fields), string(output)) } - heldMetadataRoot := tokens[thinPoolDmsetupStatusHeldMetadataRoot] + heldMetadataRoot := fields[thinPoolDmsetupStatusHeldMetadataRoot] currentlyReserved := heldMetadataRoot != "-" return currentlyReserved, nil } From 38a104219922fb5ba6fe447546ac50f641adb8c8 Mon Sep 17 00:00:00 2001 From: CJ Cullen <cjcullen@google.com> Date: Thu, 23 Jun 2016 17:37:09 -0700 Subject: [PATCH 161/339] Add a 5x exponential backoff on 429s & 5xxs to the webhook Authenticator/Authorizer. --- .../authenticator/token/webhook/webhook.go | 14 ++++++-- .../token/webhook/webhook_test.go | 2 +- plugin/pkg/auth/authorizer/webhook/webhook.go | 14 ++++++-- .../auth/authorizer/webhook/webhook_test.go | 4 +-- plugin/pkg/webhook/webhook.go | 35 +++++++++++++++++-- 5 files changed, 59 insertions(+), 10 deletions(-) diff --git a/plugin/pkg/auth/authenticator/token/webhook/webhook.go b/plugin/pkg/auth/authenticator/token/webhook/webhook.go index 43e76d00d8..b6a4108301 100644 --- a/plugin/pkg/auth/authenticator/token/webhook/webhook.go +++ b/plugin/pkg/auth/authenticator/token/webhook/webhook.go @@ -25,6 +25,7 @@ import ( "k8s.io/kubernetes/pkg/apis/authentication.k8s.io/v1beta1" "k8s.io/kubernetes/pkg/auth/authenticator" "k8s.io/kubernetes/pkg/auth/user" + "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/util/cache" "k8s.io/kubernetes/plugin/pkg/webhook" @@ -35,6 +36,8 @@ var ( groupVersions = []unversioned.GroupVersion{v1beta1.SchemeGroupVersion} ) +const retryBackoff = 500 * time.Millisecond + // Ensure WebhookTokenAuthenticator implements the authenticator.Token interface. var _ authenticator.Token = (*WebhookTokenAuthenticator)(nil) @@ -46,7 +49,12 @@ type WebhookTokenAuthenticator struct { // New creates a new WebhookTokenAuthenticator from the provided kubeconfig file. func New(kubeConfigFile string, ttl time.Duration) (*WebhookTokenAuthenticator, error) { - gw, err := webhook.NewGenericWebhook(kubeConfigFile, groupVersions) + return newWithBackoff(kubeConfigFile, ttl, retryBackoff) +} + +// newWithBackoff allows tests to skip the sleep. +func newWithBackoff(kubeConfigFile string, ttl, initialBackoff time.Duration) (*WebhookTokenAuthenticator, error) { + gw, err := webhook.NewGenericWebhook(kubeConfigFile, groupVersions, initialBackoff) if err != nil { return nil, err } @@ -61,7 +69,9 @@ func (w *WebhookTokenAuthenticator) AuthenticateToken(token string) (user.Info, if entry, ok := w.responseCache.Get(r.Spec); ok { r.Status = entry.(v1beta1.TokenReviewStatus) } else { - result := w.RestClient.Post().Body(r).Do() + result := w.WithExponentialBackoff(func() restclient.Result { + return w.RestClient.Post().Body(r).Do() + }) if err := result.Error(); err != nil { return nil, false, err } diff --git a/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go b/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go index cbf63a2460..5cfdcd3d7e 100644 --- a/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go +++ b/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go @@ -148,7 +148,7 @@ func newTokenAuthenticator(serverURL string, clientCert, clientKey, ca []byte, c if err := json.NewEncoder(tempfile).Encode(config); err != nil { return nil, err } - return New(p, cacheTime) + return newWithBackoff(p, cacheTime, 0) } func TestTLSConfig(t *testing.T) { diff --git a/plugin/pkg/auth/authorizer/webhook/webhook.go b/plugin/pkg/auth/authorizer/webhook/webhook.go index 956789864f..f4b844ea38 100644 --- a/plugin/pkg/auth/authorizer/webhook/webhook.go +++ b/plugin/pkg/auth/authorizer/webhook/webhook.go @@ -26,6 +26,7 @@ import ( "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/authorization/v1beta1" "k8s.io/kubernetes/pkg/auth/authorizer" + "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/util/cache" "k8s.io/kubernetes/plugin/pkg/webhook" @@ -36,6 +37,8 @@ var ( groupVersions = []unversioned.GroupVersion{v1beta1.SchemeGroupVersion} ) +const retryBackoff = 500 * time.Millisecond + // Ensure Webhook implements the authorizer.Authorizer interface. var _ authorizer.Authorizer = (*WebhookAuthorizer)(nil) @@ -67,7 +70,12 @@ type WebhookAuthorizer struct { // For additional HTTP configuration, refer to the kubeconfig documentation // http://kubernetes.io/v1.1/docs/user-guide/kubeconfig-file.html. func New(kubeConfigFile string, authorizedTTL, unauthorizedTTL time.Duration) (*WebhookAuthorizer, error) { - gw, err := webhook.NewGenericWebhook(kubeConfigFile, groupVersions) + return newWithBackoff(kubeConfigFile, authorizedTTL, unauthorizedTTL, retryBackoff) +} + +// newWithBackoff allows tests to skip the sleep. +func newWithBackoff(kubeConfigFile string, authorizedTTL, unauthorizedTTL, initialBackoff time.Duration) (*WebhookAuthorizer, error) { + gw, err := webhook.NewGenericWebhook(kubeConfigFile, groupVersions, initialBackoff) if err != nil { return nil, err } @@ -148,7 +156,9 @@ func (w *WebhookAuthorizer) Authorize(attr authorizer.Attributes) (err error) { if entry, ok := w.responseCache.Get(string(key)); ok { r.Status = entry.(v1beta1.SubjectAccessReviewStatus) } else { - result := w.RestClient.Post().Body(r).Do() + result := w.WithExponentialBackoff(func() restclient.Result { + return w.RestClient.Post().Body(r).Do() + }) if err := result.Error(); err != nil { return err } diff --git a/plugin/pkg/auth/authorizer/webhook/webhook_test.go b/plugin/pkg/auth/authorizer/webhook/webhook_test.go index 2f95751c02..7d3db49988 100644 --- a/plugin/pkg/auth/authorizer/webhook/webhook_test.go +++ b/plugin/pkg/auth/authorizer/webhook/webhook_test.go @@ -183,7 +183,7 @@ current-context: default return fmt.Errorf("failed to execute test template: %v", err) } // Create a new authorizer - _, err = New(p, 0, 0) + _, err = newWithBackoff(p, 0, 0, 0) return err }() if err != nil && !tt.wantErr { @@ -291,7 +291,7 @@ func newAuthorizer(callbackURL string, clientCert, clientKey, ca []byte, cacheTi if err := json.NewEncoder(tempfile).Encode(config); err != nil { return nil, err } - return New(p, cacheTime, cacheTime) + return newWithBackoff(p, cacheTime, cacheTime, 0) } func TestTLSConfig(t *testing.T) { diff --git a/plugin/pkg/webhook/webhook.go b/plugin/pkg/webhook/webhook.go index d00d54a5e5..a907444b95 100644 --- a/plugin/pkg/webhook/webhook.go +++ b/plugin/pkg/webhook/webhook.go @@ -19,6 +19,7 @@ package webhook import ( "fmt" + "time" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" @@ -27,16 +28,18 @@ import ( "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" "k8s.io/kubernetes/pkg/runtime" runtimeserializer "k8s.io/kubernetes/pkg/runtime/serializer" + "k8s.io/kubernetes/pkg/util/wait" _ "k8s.io/kubernetes/pkg/apis/authorization/install" ) type GenericWebhook struct { - RestClient *restclient.RESTClient + RestClient *restclient.RESTClient + initialBackoff time.Duration } // New creates a new GenericWebhook from the provided kubeconfig file. -func NewGenericWebhook(kubeConfigFile string, groupVersions []unversioned.GroupVersion) (*GenericWebhook, error) { +func NewGenericWebhook(kubeConfigFile string, groupVersions []unversioned.GroupVersion, initialBackoff time.Duration) (*GenericWebhook, error) { for _, groupVersion := range groupVersions { if !registered.IsEnabledVersion(groupVersion) { return nil, fmt.Errorf("webhook plugin requires enabling extension resource: %s", groupVersion) @@ -64,5 +67,31 @@ func NewGenericWebhook(kubeConfigFile string, groupVersions []unversioned.GroupV // TODO(ericchiang): Can we ensure remote service is reachable? - return &GenericWebhook{restClient}, nil + return &GenericWebhook{restClient, initialBackoff}, nil +} + +// WithExponentialBackoff will retry webhookFn 5 times w/ exponentially +// increasing backoff when a 429 or a 5xx response code is returned. +func (g *GenericWebhook) WithExponentialBackoff(webhookFn func() restclient.Result) restclient.Result { + backoff := wait.Backoff{ + Duration: g.initialBackoff, + Factor: 1.5, + Jitter: 0.2, + Steps: 5, + } + var result restclient.Result + wait.ExponentialBackoff(backoff, func() (bool, error) { + result = webhookFn() + // Return from Request.Do() errors immediately. + if err := result.Error(); err != nil { + return false, err + } + // Retry 429s, and 5xxs. + var statusCode int + if result.StatusCode(&statusCode); statusCode == 429 || statusCode >= 500 { + return false, nil + } + return true, nil + }) + return result } From 6b435a6415a348aad14d1be257d0fcd6e2652e16 Mon Sep 17 00:00:00 2001 From: Quinton Hoole <quinton@google.com> Date: Thu, 23 Jun 2016 19:05:17 -0700 Subject: [PATCH 162/339] Fixes #27989 --- .../pkg/federation-controller/service/dns.go | 85 ++++++++++--------- 1 file changed, 45 insertions(+), 40 deletions(-) diff --git a/federation/pkg/federation-controller/service/dns.go b/federation/pkg/federation-controller/service/dns.go index 5dd4a0d296..407f6c04f1 100644 --- a/federation/pkg/federation-controller/service/dns.go +++ b/federation/pkg/federation-controller/service/dns.go @@ -20,6 +20,8 @@ import ( "fmt" "net" + "github.com/golang/glog" + "k8s.io/kubernetes/federation/pkg/dnsprovider" "k8s.io/kubernetes/federation/pkg/dnsprovider/rrstype" ) @@ -150,7 +152,7 @@ func getResolvedEndpoints(endpoints []string) ([]string, error) { /* ensureDnsRrsets ensures (idempotently, and with minimum mutations) that all of the DNS resource record sets for dnsName are consistent with endpoints. if endpoints is nil or empty, a CNAME record to uplevelCname is ensured. */ -func (s *ServiceController) ensureDnsRrsets(dnsZoneName, dnsName string, endpoints []string, uplevelCname string, endpointReachable bool) error { +func (s *ServiceController) ensureDnsRrsets(dnsZoneName, dnsName string, endpoints []string, uplevelCname string) error { dnsZone, err := getDnsZone(dnsZoneName, s.dnsZones) if err != nil { return err @@ -164,86 +166,90 @@ func (s *ServiceController) ensureDnsRrsets(dnsZoneName, dnsName string, endpoin return err } if rrset == nil { - if endpointReachable { - // It doesn't exist yet, so create it, if we indeed have healthy endpoints - if len(endpoints) < 1 { - // There are no endpoint addresses at this level, so CNAME to uplevel, if provided - if uplevelCname != "" { - newRrset := rrsets.New(dnsName, []string{uplevelCname}, minDnsTtl, rrstype.CNAME) - rrset, err = rrsets.Add(newRrset) - if err != nil { - return err - } - } - // else we want no record, and we have no record, so we're all good. - } else { - // We have valid endpoint addresses, so just add them as A records. - // But first resolve DNS names, as some cloud providers (like AWS) expose - // load balancers behind DNS names, not IP addresses. - resolvedEndpoints, err := getResolvedEndpoints(endpoints) - if err != nil { - return err // TODO: We could potentially add the ones we did get back, even if some of them failed to resolve. - } - newRrset := rrsets.New(dnsName, resolvedEndpoints, minDnsTtl, rrstype.A) + glog.V(4).Infof("No recordsets found for DNS name %q. Need to add either A records (if we have healthy endpoints), or a CNAME record to %q", dnsName, uplevelCname) + if len(endpoints) < 1 { + glog.V(4).Infof("There are no healthy endpoint addresses at level %q, so CNAME to %q, if provided", dnsName, uplevelCname) + if uplevelCname != "" { + glog.V(4).Infof("Creating CNAME to %q for %q", uplevelCname, dnsName) + newRrset := rrsets.New(dnsName, []string{uplevelCname}, minDnsTtl, rrstype.CNAME) rrset, err = rrsets.Add(newRrset) if err != nil { return err } + glog.V(4).Infof("Successfully created CNAME to %q for %q", uplevelCname, dnsName) + } else { + glog.V(4).Infof("We want no record for %q, and we have no record, so we're all good.", dnsName) } + } else { + // We have valid endpoint addresses, so just add them as A records. + // But first resolve DNS names, as some cloud providers (like AWS) expose + // load balancers behind DNS names, not IP addresses. + glog.V(4).Infof("We have valid endpoint addresses %v at level %q, so add them as A records, after resolving DNS names", endpoints, dnsName) + resolvedEndpoints, err := getResolvedEndpoints(endpoints) + if err != nil { + return err // TODO: We could potentially add the ones we did get back, even if some of them failed to resolve. + } + newRrset := rrsets.New(dnsName, resolvedEndpoints, minDnsTtl, rrstype.A) + glog.V(4).Infof("Adding recordset %v", newRrset) + rrset, err = rrsets.Add(newRrset) + if err != nil { + return err + } + glog.V(4).Infof("Successfully added recordset %v", newRrset) } } else { // the rrset already exists, so make it right. + glog.V(4).Infof("Recordset %v already exists. Ensuring that it is correct.") if len(endpoints) < 1 { // Need an appropriate CNAME record. Check that we have it. newRrset := rrsets.New(dnsName, []string{uplevelCname}, minDnsTtl, rrstype.CNAME) + glog.V(4).Infof("No healthy endpoints for %s. Have recordset %v. Need recordset %v", dnsName, rrset, newRrset) if rrset == newRrset { - if !endpointReachable { - if err = rrsets.Remove(rrset); err != nil { - return err - } - } // The existing rrset is equal to the required one - our work is done here + glog.V(4).Infof("Existing recordset %v is equal to needed recordset %v, our work is done here.", rrset, newRrset) return nil } else { // Need to replace the existing one with a better one (or just remove it if we have no healthy endpoints). // TODO: Ideally do these inside a transaction, or do an atomic update, but dnsprovider interface doesn't support that yet. + glog.V(4).Infof("Existing recordset %v is not equal to needed recordset %v, removing existing and adding needed.", rrset, newRrset) if err = rrsets.Remove(rrset); err != nil { return err } - if uplevelCname != "" && endpointReachable { + glog.V(4).Infof("Successfully removed existing recordset %v", rrset) + if uplevelCname != "" { if _, err = rrsets.Add(newRrset); err != nil { return err } + glog.V(4).Infof("Successfully added needed recordset %v", newRrset) + } else { + glog.V(4).Infof("Uplevel CNAME is empty string. Not adding recordset %v", newRrset) } } } else { // We have an rrset in DNS, possibly with some missing addresses and some unwanted addresses. // And we have healthy endpoints. Just replace what's there with the healthy endpoints, if it's not already correct. + glog.V(4).Infof("%s: Healthy endpoints %v exist. Recordset %v exists. Reconciling.", dnsName, endpoints, rrset) resolvedEndpoints, err := getResolvedEndpoints(endpoints) if err != nil { // Some invalid addresses or otherwise unresolvable DNS names. return err // TODO: We could potentially add the ones we did get back, even if some of them failed to resolve. } newRrset := rrsets.New(dnsName, resolvedEndpoints, minDnsTtl, rrstype.A) + glog.V(4).Infof("Have recordset %v. Need recordset %v", rrset, newRrset) if rrset == newRrset { - if !endpointReachable { - if err = rrsets.Remove(rrset); err != nil { - return err - } - } - // The existing rrset is equal to the required one - our work is done here + glog.V(4).Infof("Existing recordset %v is equal to needed recordset %v, our work is done here.", rrset, newRrset) // TODO: We could be more thorough about checking for equivalence to avoid unnecessary updates, but in the // worst case we'll just replace what's there with an equivalent, if not exactly identical record set. return nil } else { // Need to replace the existing one with a better one // TODO: Ideally do these inside a transaction, or do an atomic update, but dnsprovider interface doesn't support that yet. + glog.V(4).Infof("Existing recordset %v is not equal to needed recordset %v, removing existing and adding needed.", rrset, newRrset) if err = rrsets.Remove(rrset); err != nil { return err } - if endpointReachable { - if _, err = rrsets.Add(newRrset); err != nil { - return err - } + glog.V(4).Infof("Successfully removed existing recordset %v", rrset) + if _, err = rrsets.Add(newRrset); err != nil { + return err } } } @@ -297,7 +303,6 @@ func (s *ServiceController) ensureDnsRecords(clusterName string, cachedService * if err != nil { return err } - _, endpointReachable := cachedService.endpointMap[clusterName] commonPrefix := serviceName + "." + namespaceName + "." + s.federationName + ".svc" // dnsNames is the path up the DNS search tree, starting at the leaf dnsNames := []string{ @@ -310,7 +315,7 @@ func (s *ServiceController) ensureDnsRecords(clusterName string, cachedService * endpoints := [][]string{zoneEndpoints, regionEndpoints, globalEndpoints} for i, endpoint := range endpoints { - if err = s.ensureDnsRrsets(dnsZoneName, dnsNames[i], endpoint, dnsNames[i+1], endpointReachable); err != nil { + if err = s.ensureDnsRrsets(dnsZoneName, dnsNames[i], endpoint, dnsNames[i+1]); err != nil { return err } } From 038b8797c4307e91c32866e730639061a54d6efc Mon Sep 17 00:00:00 2001 From: Ron Lai <ronl@google.com> Date: Thu, 23 Jun 2016 17:44:56 -0700 Subject: [PATCH 163/339] Calculating the disk usage based on available bytes instead of usage bytes to account for reserved blocks in image GC --- pkg/kubelet/image_manager.go | 10 +++++++--- pkg/kubelet/image_manager_test.go | 12 ++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/pkg/kubelet/image_manager.go b/pkg/kubelet/image_manager.go index 6f521647d6..9fd4780ff2 100644 --- a/pkg/kubelet/image_manager.go +++ b/pkg/kubelet/image_manager.go @@ -213,8 +213,12 @@ func (im *realImageManager) GarbageCollect() error { if err != nil { return err } - usage := int64(fsInfo.Usage) capacity := int64(fsInfo.Capacity) + available := int64(fsInfo.Available) + if available > capacity { + glog.Warningf("available %d is larger than capacity %d", available, capacity) + available = capacity + } // Check valid capacity. if capacity == 0 { @@ -224,9 +228,9 @@ func (im *realImageManager) GarbageCollect() error { } // If over the max threshold, free enough to place us at the lower threshold. - usagePercent := int(usage * 100 / capacity) + usagePercent := 100 - int(available*100/capacity) if usagePercent >= im.policy.HighThresholdPercent { - amountToFree := usage - (int64(im.policy.LowThresholdPercent) * capacity / 100) + amountToFree := capacity*int64(100-im.policy.LowThresholdPercent)/100 - available glog.Infof("[ImageManager]: Disk usage on %q (%s) is at %d%% which is over the high threshold (%d%%). Trying to free %d bytes", fsInfo.Device, fsInfo.Mountpoint, usagePercent, im.policy.HighThresholdPercent, amountToFree) freed, err := im.freeSpace(amountToFree, time.Now()) if err != nil { diff --git a/pkg/kubelet/image_manager_test.go b/pkg/kubelet/image_manager_test.go index 30d7614e8f..93ffd86260 100644 --- a/pkg/kubelet/image_manager_test.go +++ b/pkg/kubelet/image_manager_test.go @@ -374,8 +374,8 @@ func TestGarbageCollectBelowLowThreshold(t *testing.T) { // Expect 40% usage. mockCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 400, - Capacity: 1000, + Available: 600, + Capacity: 1000, }, nil) assert.NoError(t, manager.GarbageCollect()) @@ -401,8 +401,8 @@ func TestGarbageCollectBelowSuccess(t *testing.T) { // Expect 95% usage and most of it gets freed. mockCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 950, - Capacity: 1000, + Available: 50, + Capacity: 1000, }, nil) fakeRuntime.ImageList = []container.Image{ makeImage(0, 450), @@ -420,8 +420,8 @@ func TestGarbageCollectNotEnoughFreed(t *testing.T) { // Expect 95% usage and little of it gets freed. mockCadvisor.On("ImagesFsInfo").Return(cadvisorapiv2.FsInfo{ - Usage: 950, - Capacity: 1000, + Available: 50, + Capacity: 1000, }, nil) fakeRuntime.ImageList = []container.Image{ makeImage(0, 50), From 135c6899e9ccb160e167f940411d0eb8caa5866b Mon Sep 17 00:00:00 2001 From: Mike Danese <mikedanese@google.com> Date: Thu, 23 Jun 2016 22:12:13 -0700 Subject: [PATCH 164/339] return nil from NewClientConfig instead of empty struct --- .../go2idl/client-gen/generators/generator_for_clientset.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go b/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go index c50be650d1..17ce06fb73 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go +++ b/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go @@ -155,14 +155,15 @@ func NewForConfig(c *$.Config|raw$) (*Clientset, error) { var err error $range .allGroups$ clientset.$.Group$Client, err =$.PackageName$.NewForConfig(&configShallowCopy) if err!=nil { - return &clientset, err + return nil, err } $end$ clientset.DiscoveryClient, err = $.NewDiscoveryClientForConfig|raw$(&configShallowCopy) if err!=nil { glog.Errorf("failed to create the DiscoveryClient: %v", err) + return nil, err } - return &clientset, err + return &clientset, nil } ` From 3162197c2343dbbd89a23df78d29a4ac84332a2d Mon Sep 17 00:00:00 2001 From: Mike Danese <mikedanese@google.com> Date: Thu, 23 Jun 2016 22:15:03 -0700 Subject: [PATCH 165/339] autogenerated --- .../test_internalclientset/clientset.go | 5 +++-- .../federation_internalclientset/clientset.go | 7 ++++--- .../federation_release_1_3/clientset.go | 7 ++++--- .../internalclientset/clientset.go | 13 +++++++------ .../clientset_generated/release_1_3/clientset.go | 11 ++++++----- 5 files changed, 24 insertions(+), 19 deletions(-) diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go index 2ff07a670b..e165337b0b 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go @@ -59,14 +59,15 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { var err error clientset.TestgroupClient, err = unversionedtestgroup.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + 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, err + return &clientset, nil } // NewForConfigOrDie creates a new Clientset for the given config and diff --git a/federation/client/clientset_generated/federation_internalclientset/clientset.go b/federation/client/clientset_generated/federation_internalclientset/clientset.go index 37c13f858a..f8163ef835 100644 --- a/federation/client/clientset_generated/federation_internalclientset/clientset.go +++ b/federation/client/clientset_generated/federation_internalclientset/clientset.go @@ -70,18 +70,19 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { var err error clientset.FederationClient, err = unversionedfederation.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + return nil, err } clientset.CoreClient, err = unversionedcore.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + 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, err + return &clientset, nil } // NewForConfigOrDie creates a new Clientset for the given config and diff --git a/federation/client/clientset_generated/federation_release_1_3/clientset.go b/federation/client/clientset_generated/federation_release_1_3/clientset.go index 7bc6216e80..66116c2f08 100644 --- a/federation/client/clientset_generated/federation_release_1_3/clientset.go +++ b/federation/client/clientset_generated/federation_release_1_3/clientset.go @@ -70,18 +70,19 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { var err error clientset.FederationClient, err = v1alpha1federation.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + return nil, err } clientset.CoreClient, err = v1core.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + 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, err + return &clientset, nil } // NewForConfigOrDie creates a new Clientset for the given config and diff --git a/pkg/client/clientset_generated/internalclientset/clientset.go b/pkg/client/clientset_generated/internalclientset/clientset.go index 9876441b73..8b958a581c 100644 --- a/pkg/client/clientset_generated/internalclientset/clientset.go +++ b/pkg/client/clientset_generated/internalclientset/clientset.go @@ -103,30 +103,31 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { var err error clientset.CoreClient, err = unversionedcore.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + return nil, err } clientset.ExtensionsClient, err = unversionedextensions.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + return nil, err } clientset.AutoscalingClient, err = unversionedautoscaling.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + return nil, err } clientset.BatchClient, err = unversionedbatch.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + return nil, err } clientset.RbacClient, err = unversionedrbac.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + 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, err + return &clientset, nil } // NewForConfigOrDie creates a new Clientset for the given config and diff --git a/pkg/client/clientset_generated/release_1_3/clientset.go b/pkg/client/clientset_generated/release_1_3/clientset.go index 29093e061d..7232953696 100644 --- a/pkg/client/clientset_generated/release_1_3/clientset.go +++ b/pkg/client/clientset_generated/release_1_3/clientset.go @@ -92,26 +92,27 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { var err error clientset.CoreClient, err = v1core.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + return nil, err } clientset.ExtensionsClient, err = v1beta1extensions.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + return nil, err } clientset.AutoscalingClient, err = v1autoscaling.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + return nil, err } clientset.BatchClient, err = v1batch.NewForConfig(&configShallowCopy) if err != nil { - return &clientset, err + 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, err + return &clientset, nil } // NewForConfigOrDie creates a new Clientset for the given config and From 6e449190ecc747d3eb4202afa26502e5472f2983 Mon Sep 17 00:00:00 2001 From: Marcin Wielgus <mwielgus@google.com> Date: Fri, 24 Jun 2016 11:55:54 +0200 Subject: [PATCH 166/339] Use gcloud for default node pool and api for other in cluster autoscaler e2e testx --- test/e2e/cluster_size_autoscaling.go | 46 ++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/test/e2e/cluster_size_autoscaling.go b/test/e2e/cluster_size_autoscaling.go index 9fe58caa37..31f78cd24f 100644 --- a/test/e2e/cluster_size_autoscaling.go +++ b/test/e2e/cluster_size_autoscaling.go @@ -273,18 +273,44 @@ func isAutoscalerEnabled(expectedMinNodeCountInTargetPool int) (bool, error) { } func enableAutoscaler(nodePool string, minCount, maxCount int) error { - output, err := exec.Command("gcloud", "alpha", "container", "clusters", "update", framework.TestContext.CloudConfig.Cluster, - "--enable-autoscaling", - "--min-nodes="+strconv.Itoa(minCount), - "--max-nodes="+strconv.Itoa(maxCount), - "--node-pool="+nodePool, - "--project="+framework.TestContext.CloudConfig.ProjectID, - "--zone="+framework.TestContext.CloudConfig.Zone).Output() - if err != nil { - return fmt.Errorf("Failed to enable autoscaling: %v", err) + if nodePool == "default-pool" { + glog.Infof("Using gcloud to enable autoscaling for pool %s", nodePool) + + output, err := exec.Command("gcloud", "alpha", "container", "clusters", "update", framework.TestContext.CloudConfig.Cluster, + "--enable-autoscaling", + "--min-nodes="+strconv.Itoa(minCount), + "--max-nodes="+strconv.Itoa(maxCount), + "--node-pool="+nodePool, + "--project="+framework.TestContext.CloudConfig.ProjectID, + "--zone="+framework.TestContext.CloudConfig.Zone).Output() + + if err != nil { + return fmt.Errorf("Failed to enable autoscaling: %v", err) + } + glog.Infof("Config update result: %s", output) + + } else { + glog.Infof("Using direct api access to enable autoscaling for pool %s", nodePool) + updateRequest := "{" + + " \"update\": {" + + " \"desiredNodePoolId\": \"" + nodePool + "\"," + + " \"desiredNodePoolAutoscaling\": {" + + " \"enabled\": \"true\"," + + " \"minNodeCount\": \"" + strconv.Itoa(minCount) + "\"," + + " \"maxNodeCount\": \"" + strconv.Itoa(maxCount) + "\"" + + " }" + + " }" + + "}" + + url := getGKEClusterUrl() + glog.Infof("Using gke api url %s", url) + putResult, err := doPut(url, updateRequest) + if err != nil { + return fmt.Errorf("Failed to put %s: %v", url, err) + } + glog.Infof("Config update result: %s", putResult) } - glog.Infof("Config update result: %s", output) for startTime := time.Now(); startTime.Add(gkeUpdateTimeout).After(time.Now()); time.Sleep(30 * time.Second) { if val, err := isAutoscalerEnabled(minCount); err == nil && val { From a745bb17e32ef141fac9298aec6ba1c187a89259 Mon Sep 17 00:00:00 2001 From: Jerzy Szczepkowski <jsz@google.com> Date: Fri, 24 Jun 2016 13:32:37 +0200 Subject: [PATCH 167/339] Cleanup in kube-down: removed deletion of old autoscaler. Cleanup in kube-down: removed deletion of old autoscaler. --- cluster/gce/util.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 845c5598fb..121920bbe2 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -953,17 +953,6 @@ function kube-down { echo "Bringing down cluster" set +e # Do not stop on error - # Delete autoscaler for nodes if present. We assume that all or none instance groups have an autoscaler - local autoscaler - autoscaler=( $(gcloud compute instance-groups managed list \ - --zone "${ZONE}" --project "${PROJECT}" --regexp="${NODE_INSTANCE_PREFIX}-.+" \ - --format='value(autoscaled)') ) - if [[ "${autoscaler:-}" == "yes" ]]; then - for group in ${INSTANCE_GROUPS[@]:-}; do - gcloud compute instance-groups managed stop-autoscaling "${group}" --zone "${ZONE}" --project "${PROJECT}" - done - fi - # Get the name of the managed instance group template before we delete the # managed instance group. (The name of the managed instance group template may # change during a cluster upgrade.) From a558cadedda1e7cd572e5da07a0675b8814faa84 Mon Sep 17 00:00:00 2001 From: Sylwester Brzeczkowski <sylwek1992@gmail.com> Date: Fri, 24 Jun 2016 14:35:02 +0200 Subject: [PATCH 168/339] Fix attach command for InitContainers --- pkg/kubectl/cmd/attach.go | 11 +++++++++-- pkg/kubectl/cmd/attach_test.go | 13 +++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/pkg/kubectl/cmd/attach.go b/pkg/kubectl/cmd/attach.go index 3150bccaee..56df25e757 100644 --- a/pkg/kubectl/cmd/attach.go +++ b/pkg/kubectl/cmd/attach.go @@ -167,9 +167,11 @@ func (p *AttachOptions) Run() error { if err != nil { return err } - if pod.Status.Phase != api.PodRunning { - return fmt.Errorf("pod %s is not running and cannot be attached to; current phase is %s", p.PodName, pod.Status.Phase) + + if pod.Status.Phase == api.PodSucceeded || pod.Status.Phase == api.PodFailed { + return fmt.Errorf("cannot attach a container in a completed pod; current phase is %s", pod.Status.Phase) } + p.Pod = pod // TODO: convert this to a clean "wait" behavior } @@ -233,6 +235,11 @@ func (p *AttachOptions) GetContainer(pod *api.Pod) api.Container { return container } } + for _, container := range pod.Spec.InitContainers { + if container.Name == p.ContainerName { + return container + } + } } glog.V(4).Infof("defaulting container name to %s", pod.Spec.Containers[0].Name) diff --git a/pkg/kubectl/cmd/attach_test.go b/pkg/kubectl/cmd/attach_test.go index 29128ae518..e4af36582c 100644 --- a/pkg/kubectl/cmd/attach_test.go +++ b/pkg/kubectl/cmd/attach_test.go @@ -79,7 +79,15 @@ func TestPodAndContainerAttach(t *testing.T) { expectedContainer: "bar", name: "container in flag", }, + { + p: &AttachOptions{ContainerName: "initfoo"}, + args: []string{"foo"}, + expectedPod: "foo", + expectedContainer: "initfoo", + name: "init container in flag", + }, } + for _, test := range tests { f, tf, codec := NewAPIFactory() tf.Client = &fake.RESTClient{ @@ -271,6 +279,11 @@ func attachPod() *api.Pod { Name: "bar", }, }, + InitContainers: []api.Container{ + { + Name: "initfoo", + }, + }, }, Status: api.PodStatus{ Phase: api.PodRunning, From 77679b043745d0d51f30c6fafae2cd34d14f15bd Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski <wojtekt@google.com> Date: Fri, 24 Jun 2016 10:27:50 +0200 Subject: [PATCH 169/339] Workardoun KubeProxy failures in test framework --- test/e2e/e2e.go | 2 +- test/e2e/framework/util.go | 36 +++++++++++++++++++++++++++++++- test/e2e/mesos.go | 2 +- test/e2e/resize_nodes.go | 2 +- test/e2e/scheduler_predicates.go | 2 +- 5 files changed, 39 insertions(+), 5 deletions(-) diff --git a/test/e2e/e2e.go b/test/e2e/e2e.go index 366a6ccaa8..0b65f7d207 100644 --- a/test/e2e/e2e.go +++ b/test/e2e/e2e.go @@ -125,7 +125,7 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte { // test pods from running, and tests that ensure all pods are running and // ready will fail). podStartupTimeout := framework.TestContext.SystemPodsStartupTimeout - if err := framework.WaitForPodsRunningReady(c, api.NamespaceSystem, int32(framework.TestContext.MinStartupPods), podStartupTimeout, framework.ImagePullerLabels); err != nil { + if err := framework.WaitForPodsRunningReady(c, api.NamespaceSystem, int32(framework.TestContext.MinStartupPods), podStartupTimeout, framework.ImagePullerLabels, true); err != nil { framework.DumpAllNamespaceInfo(c, api.NamespaceSystem) framework.LogFailedContainers(c, api.NamespaceSystem) framework.RunKubernetesServiceTestContainer(c, framework.TestContext.RepoRoot, api.NamespaceDefault) diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 5d141c7d67..74e2f862d6 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -554,7 +554,7 @@ func WaitForPodsSuccess(c *client.Client, ns string, successPodLabels map[string // even if there are minPods pods, some of which are in Running/Ready // and some in Success. This is to allow the client to decide if "Success" // means "Ready" or not. -func WaitForPodsRunningReady(c *client.Client, ns string, minPods int32, timeout time.Duration, ignoreLabels map[string]string) error { +func WaitForPodsRunningReady(c *client.Client, ns string, minPods int32, timeout time.Duration, ignoreLabels map[string]string, restartDockerOnFailures bool) error { ignoreSelector := labels.SelectorFromSet(ignoreLabels) start := time.Now() Logf("Waiting up to %v for all pods (need at least %d) in namespace '%s' to be running and ready", @@ -567,6 +567,10 @@ func WaitForPodsRunningReady(c *client.Client, ns string, minPods int32, timeout wg.Done() }() + // We will be restarting all not-ready kubeProxies every 5 minutes, + // to workaround #25543 issue. + badKubeProxySince := make(map[string]time.Time) + if wait.PollImmediate(Poll, timeout, func() (bool, error) { // We get the new list of pods and replication controllers in every // iteration because more pods come online during startup and we want to @@ -597,6 +601,8 @@ func WaitForPodsRunningReady(c *client.Client, ns string, minPods int32, timeout if hasReplicationControllersForPod(rcList, pod) { replicaOk++ } + // If the pod is healthy, remove it from bad ones. + delete(badKubeProxySince, pod.Name) } else { if pod.Status.Phase != api.PodFailed { Logf("The status of Pod %s is %s, waiting for it to be either Running or Failed", pod.ObjectMeta.Name, pod.Status.Phase) @@ -609,6 +615,34 @@ func WaitForPodsRunningReady(c *client.Client, ns string, minPods int32, timeout } } + // Try to repair all KubeProxies that are not-ready long enough by restarting Docker: + // see https://github.com/kubernetes/kubernetes/issues/24295#issuecomment-218920357 + // for exact details. + if restartDockerOnFailures { + for _, badPod := range badPods { + name := badPod.Name + if len(name) > 10 && name[:10] == "kube-proxy" { + if _, ok := badKubeProxySince[name]; !ok { + badKubeProxySince[name] = time.Now() + } + if time.Since(badKubeProxySince[name]) > 5*time.Minute { + node, err := c.Nodes().Get(badPod.Spec.NodeName) + if err != nil { + Logf("Couldn't get node: %v", err) + continue + } + err = IssueSSHCommand("sudo service docker restart", TestContext.Provider, node) + if err != nil { + Logf("Couldn't restart docker on %s: %v", name, err) + continue + } + Logf("Docker on %s node restarted", badPod.Spec.NodeName) + delete(badKubeProxySince, name) + } + } + } + } + Logf("%d / %d pods in namespace '%s' are running and ready (%d seconds elapsed)", nOk, len(podList.Items), ns, int(time.Since(start).Seconds())) Logf("expected %d pod replicas in namespace '%s', %d are Running and Ready.", replicas, ns, replicaOk) diff --git a/test/e2e/mesos.go b/test/e2e/mesos.go index 01acaa9506..de6096f6df 100644 --- a/test/e2e/mesos.go +++ b/test/e2e/mesos.go @@ -69,7 +69,7 @@ var _ = framework.KubeDescribe("Mesos", func() { const ns = "static-pods" numpods := int32(len(nodelist.Items)) - framework.ExpectNoError(framework.WaitForPodsRunningReady(client, ns, numpods, wait.ForeverTestTimeout, map[string]string{}), + framework.ExpectNoError(framework.WaitForPodsRunningReady(client, ns, numpods, wait.ForeverTestTimeout, map[string]string{}, false), fmt.Sprintf("number of static pods in namespace %s is %d", ns, numpods)) }) diff --git a/test/e2e/resize_nodes.go b/test/e2e/resize_nodes.go index 80d98dd885..867831cc5f 100644 --- a/test/e2e/resize_nodes.go +++ b/test/e2e/resize_nodes.go @@ -424,7 +424,7 @@ var _ = framework.KubeDescribe("Nodes [Disruptive]", func() { // Many e2e tests assume that the cluster is fully healthy before they start. Wait until // the cluster is restored to health. By("waiting for system pods to successfully restart") - err := framework.WaitForPodsRunningReady(c, api.NamespaceSystem, systemPodsNo, framework.PodReadyBeforeTimeout, ignoreLabels) + err := framework.WaitForPodsRunningReady(c, api.NamespaceSystem, systemPodsNo, framework.PodReadyBeforeTimeout, ignoreLabels, false) Expect(err).NotTo(HaveOccurred()) By("waiting for image prepulling pods to complete") framework.WaitForPodsSuccess(c, api.NamespaceSystem, framework.ImagePullerLabels, imagePrePullingTimeout) diff --git a/test/e2e/scheduler_predicates.go b/test/e2e/scheduler_predicates.go index a071cac061..31976293ba 100644 --- a/test/e2e/scheduler_predicates.go +++ b/test/e2e/scheduler_predicates.go @@ -222,7 +222,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() { } } - err = framework.WaitForPodsRunningReady(c, api.NamespaceSystem, int32(systemPodsNo), framework.PodReadyBeforeTimeout, ignoreLabels) + err = framework.WaitForPodsRunningReady(c, api.NamespaceSystem, int32(systemPodsNo), framework.PodReadyBeforeTimeout, ignoreLabels, false) Expect(err).NotTo(HaveOccurred()) for _, node := range nodeList.Items { From 8ec15ad93724518b5432b48b6d1d2f248492b01a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Ole=C5=9B?= <lukaszoles@gmail.com> Date: Fri, 24 Jun 2016 16:36:07 +0200 Subject: [PATCH 170/339] Skip test if ssh is not supported by provider On local vagrant cluster this test is failing because there is no ssh support. --- test/e2e/node_problem_detector.go | 1 + 1 file changed, 1 insertion(+) diff --git a/test/e2e/node_problem_detector.go b/test/e2e/node_problem_detector.go index 9b49948cbb..be80f5a7d9 100644 --- a/test/e2e/node_problem_detector.go +++ b/test/e2e/node_problem_detector.go @@ -86,6 +86,7 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() { } BeforeEach(func() { + framework.SkipUnlessProviderIs(framework.ProvidersWithSSH...) // Randomize the source name to avoid conflict with real node problem detector source = "kernel-monitor-" + uid config = ` From 51c70f2369437e0c73df63ddb493d4e25fad06b8 Mon Sep 17 00:00:00 2001 From: Jerzy Szczepkowski <jsz@google.com> Date: Fri, 24 Jun 2016 16:45:41 +0200 Subject: [PATCH 171/339] Added PetSet support to addon manager. Added PetSet support to addon manager. --- cluster/addons/addon-manager/Makefile | 10 +++++----- cluster/addons/addon-manager/kube-addon-update.sh | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cluster/addons/addon-manager/Makefile b/cluster/addons/addon-manager/Makefile index 55a7051983..254bf48565 100644 --- a/cluster/addons/addon-manager/Makefile +++ b/cluster/addons/addon-manager/Makefile @@ -15,26 +15,26 @@ IMAGE=gcr.io/google-containers/kube-addon-manager ARCH?=amd64 TEMP_DIR:=$(shell mktemp -d) -VERSION=v4 +VERSION=v5 # amd64 and arm has "stable" binaries pushed for v1.2, arm64 and ppc64le hasn't so they have to fetch the latest alpha # however, arm64 and ppc64le are very experimental right now, so it's okay ifeq ($(ARCH),amd64) - KUBECTL_VERSION?=v1.2.4 + KUBECTL_VERSION?=v1.3.0-beta.2 BASEIMAGE?=python:2.7-slim endif ifeq ($(ARCH),arm) - KUBECTL_VERSION?=v1.2.4 + KUBECTL_VERSION?=v1.3.0-beta.2 BASEIMAGE?=hypriot/rpi-python:2.7 QEMUARCH=arm endif ifeq ($(ARCH),arm64) - KUBECTL_VERSION?=v1.3.0-beta.0 + KUBECTL_VERSION?=v1.3.0-beta.2 BASEIMAGE?=aarch64/python:2.7-slim QEMUARCH=aarch64 endif ifeq ($(ARCH),ppc64le) - KUBECTL_VERSION?=v1.3.0-alpha.4 + KUBECTL_VERSION?=v1.3.0-beta.2 BASEIMAGE?=ppc64le/python:2.7-slim QEMUARCH=ppc64le endif diff --git a/cluster/addons/addon-manager/kube-addon-update.sh b/cluster/addons/addon-manager/kube-addon-update.sh index 8b38b5ea3a..efb3b6d7b2 100755 --- a/cluster/addons/addon-manager/kube-addon-update.sh +++ b/cluster/addons/addon-manager/kube-addon-update.sh @@ -477,6 +477,7 @@ function update-addons() { reconcile-objects ${addon_path} ReplicationController "-" & reconcile-objects ${addon_path} Deployment "-" & reconcile-objects ${addon_path} DaemonSet "-" & + reconcile-objects ${addon_path} PetSet "-" & # We don't expect names to be versioned for the following kinds, so # we match the entire name, ignoring version suffix. From 8d5d7e90135295fa6682f51e61412583adf8e74d Mon Sep 17 00:00:00 2001 From: Quinton Hoole <quinton@google.com> Date: Fri, 24 Jun 2016 08:35:12 -0700 Subject: [PATCH 172/339] Address outstanding review comments in #27999. --- federation/pkg/federation-controller/service/dns.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/federation/pkg/federation-controller/service/dns.go b/federation/pkg/federation-controller/service/dns.go index 407f6c04f1..5e245a1a43 100644 --- a/federation/pkg/federation-controller/service/dns.go +++ b/federation/pkg/federation-controller/service/dns.go @@ -172,6 +172,7 @@ func (s *ServiceController) ensureDnsRrsets(dnsZoneName, dnsName string, endpoin if uplevelCname != "" { glog.V(4).Infof("Creating CNAME to %q for %q", uplevelCname, dnsName) newRrset := rrsets.New(dnsName, []string{uplevelCname}, minDnsTtl, rrstype.CNAME) + glog.V(4).Infof("Adding recordset %v", newRrset) rrset, err = rrsets.Add(newRrset) if err != nil { return err @@ -199,7 +200,7 @@ func (s *ServiceController) ensureDnsRrsets(dnsZoneName, dnsName string, endpoin } } else { // the rrset already exists, so make it right. - glog.V(4).Infof("Recordset %v already exists. Ensuring that it is correct.") + glog.V(4).Infof("Recordset %v already exists. Ensuring that it is correct.", rrset) if len(endpoints) < 1 { // Need an appropriate CNAME record. Check that we have it. newRrset := rrsets.New(dnsName, []string{uplevelCname}, minDnsTtl, rrstype.CNAME) From 3ee03a558447a797ff79884feace17fb4d2a634f Mon Sep 17 00:00:00 2001 From: "Madhusudan.C.S" <madhusudancs@google.com> Date: Fri, 24 Jun 2016 09:59:17 -0700 Subject: [PATCH 173/339] Remove federation_domain_map entirely if it isn't set, seems to be not replaced by empty value. --- build/common.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/common.sh b/build/common.sh index 9b6d361d44..1d0b17cfd9 100755 --- a/build/common.sh +++ b/build/common.sh @@ -961,7 +961,11 @@ function kube::release::package_kube_manifests_tarball() { fi if [[ -n "${FEDERATIONS_DOMAIN_MAP}" ]]; then sed -i 's/{{ pillar\['"'"'federations_domain_map'"'"'\] }}/- --federations="'"${FEDERATIONS_DOMAIN_MAP}"'"/g' "${dst_dir}/dns/skydns-rc.yaml.in" + else + sed -i '/{{ pillar\['"'"'federations_domain_map'"'"'\] }}/d' "${dst_dir}/dns/skydns-rc.yaml.in" fi + else + sed -i '/{{ pillar\['"'"'federations_domain_map'"'"'\] }}/d' "${dst_dir}/dns/skydns-rc.yaml.in" fi # This is for coreos only. ContainerVM, GCI, or Trusty does not use it. From ca1e808c2f7f0f76ce1d66a2f8610672f1787603 Mon Sep 17 00:00:00 2001 From: Minhan Xia <mixia@google.com> Date: Wed, 22 Jun 2016 16:38:31 -0700 Subject: [PATCH 174/339] introduce shell2junit --- third_party/forked/shell2junit/LICENSE | 172 ++++++++++++++++++++++++ third_party/forked/shell2junit/sh2ju.sh | 169 +++++++++++++++++++++++ 2 files changed, 341 insertions(+) create mode 100644 third_party/forked/shell2junit/LICENSE create mode 100755 third_party/forked/shell2junit/sh2ju.sh diff --git a/third_party/forked/shell2junit/LICENSE b/third_party/forked/shell2junit/LICENSE new file mode 100644 index 0000000000..a03114bc7c --- /dev/null +++ b/third_party/forked/shell2junit/LICENSE @@ -0,0 +1,172 @@ + Shell2Junit License Information + +Feb, 2010 + +shell2junit library and sample code is licensed under Apache License, v.2.0. + +(c) 2009 Manolo Carrasco (Manuel Carrasco Moñino) + +===== + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the +copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control with +that entity. For the purposes of this definition, "control" means (i) the +power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty percent +(50%) or more of the outstanding shares, or (iii) beneficial ownership of +such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, and +configuration files. + +"Object" form shall mean any form resulting from mechanical transformation +or translation of a Source form, including but not limited to compiled +object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice that is +included in or attached to the work (an example is provided in the Appendix +below). + +"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, as a +whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, or +merely link (or bind by name) to the interfaces of, the Work and Derivative +Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the copyright owner or by an individual or Legal +Entity authorized to submit on behalf of the copyright owner. For the +purposes of this definition, "submitted" means any form of electronic, +verbal, or written communication sent to the Licensor or its +representatives, including but not limited to communication on electronic +mailing lists, source code control systems, and issue tracking systems that +are managed by, or on behalf of, the Licensor for the purpose of discussing +and improving the Work, but excluding communication that is conspicuously +marked or otherwise designated in writing by the copyright owner as "Not a +Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on +behalf of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable copyright license to +reproduce, prepare Derivative Works of, publicly display, publicly perform, +sublicense, and distribute the Work and such Derivative Works in Source or +Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this +License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in +this section) patent license to make, have made, use, offer to sell, sell, +import, and otherwise transfer the Work, where such license applies only to +those patent claims licensable by such Contributor that are necessarily +infringed by their Contribution(s) alone or by combination of their +Contribution(s) with the Work to which such Contribution(s) was submitted. +If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this +License for that Work shall terminate as of the date such litigation is +filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or +Derivative Works thereof in any medium, with or without modifications, and +in Source or Object form, provided that You meet the following conditions: + +a. You must give any other recipients of the Work or Derivative Works a copy +of this License; and + +b. You must cause any modified files to carry prominent notices stating that +You changed the files; and + +c. You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices from +the Source form of the Work, excluding those notices that do not pertain to +any part of the Derivative Works; and + +d. If the Work includes a "NOTICE" text file as part of its distribution, +then any Derivative Works that You distribute must include a readable copy +of the attribution notices contained within such NOTICE file, excluding +those notices that do not pertain to any part of the Derivative Works, in at +least one of the following places: within a NOTICE text file distributed as +part of the Derivative Works; within the Source form or documentation, if +provided along with the Derivative Works; or, within a display generated by +the Derivative Works, if and wherever such third-party notices normally +appear. The contents of the NOTICE file are for informational purposes only +and do not modify the License. You may add Your own attribution notices +within Derivative Works that You distribute, alongside or as an addendum to +the NOTICE text from the Work, provided that such additional attribution +notices cannot be construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may +provide additional or different license terms and conditions for use, +reproduction, or distribution of Your modifications, or for any such +Derivative Works as a whole, provided Your use, reproduction, and +distribution of the Work otherwise complies with the conditions stated in +this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any +Contribution intentionally submitted for inclusion in the Work by You to the +Licensor shall be under the terms and conditions of this License, without +any additional terms or conditions. Notwithstanding the above, nothing +herein shall supersede or modify the terms of any separate license agreement +you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, except +as required for reasonable and customary use in describing the origin of the +Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in +writing, Licensor provides the Work (and each Contributor provides its +Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied, including, without limitation, any +warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or +FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining +the appropriateness of using or redistributing the Work and assume any risks +associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether +in tort (including negligence), contract, or otherwise, unless required by +applicable law (such as deliberate and grossly negligent acts) or agreed to +in writing, shall any Contributor be liable to You for damages, including +any direct, indirect, special, incidental, or consequential damages of any +character arising as a result of this License or out of the use or inability +to use the Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all other +commercial damages or losses), even if such Contributor has been advised of +the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work +or Derivative Works thereof, You may choose to offer, and charge a fee for, +acceptance of support, warranty, indemnity, or other liability obligations +and/or rights consistent with this License. However, in accepting such +obligations, You may act only on Your own behalf and on Your sole +responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any +liability incurred by, or claims asserted against, such Contributor by +reason of your accepting any such warranty or additional liability. + diff --git a/third_party/forked/shell2junit/sh2ju.sh b/third_party/forked/shell2junit/sh2ju.sh new file mode 100755 index 0000000000..097d13bf93 --- /dev/null +++ b/third_party/forked/shell2junit/sh2ju.sh @@ -0,0 +1,169 @@ +#!/bin/sh +### Copyright 2010 Manuel Carrasco Moñino. (manolo at apache.org) +### +### Licensed under the Apache License, Version 2.0. +### You may obtain a copy of it at +### http://www.apache.org/licenses/LICENSE-2.0 + +### +### A library for shell scripts which creates reports in jUnit format. +### These reports can be used in Jenkins, or any other CI. +### +### Usage: +### - Include this file in your shell script +### - Use juLog to call your command any time you want to produce a new report +### Usage: juLog <options> command arguments +### options: +### -class="MyClass" : a class name which will be shown in the junit report +### -name="TestName" : the test name which will be shown in the junit report +### -error="RegExp" : a regexp which sets the test as failure when the output matches it +### -ierror="RegExp" : same as -error but case insensitive +### - Junit reports are left in the folder 'result' under the directory where the script is executed. +### - Configure Jenkins to parse junit files from the generated folder +### + +asserts=00; errors=0; total=0; content="" +date=`which gdate 2>/dev/null || which date` + +# create output folder +juDIR=`pwd`/results +mkdir -p "$juDIR" || exit + +# The name of the suite is calculated based in your script name +suite="" + +# A wrapper for the eval method witch allows catching seg-faults and use tee +errfile=/tmp/evErr.$$.log +eVal() { + eval "$1" + # stdout and stderr may currently be inverted (see below) so echo may write to stderr + echo $? 2>&1 | tr -d "\n" > $errfile +} + +# Method to clean old tests +juLogClean() { + echo "+++ Removing old junit reports from: $juDIR " + rm -f "$juDIR"/TEST-* +} + +# Execute a command and record its results +juLog() { + suite=""; + errfile=/tmp/evErr.$$.log + date=`which gdate || which date` + asserts=00; errors=0; total=0; content="" + + # parse arguments + ya=""; icase="" + while [ -z "$ya" ]; do + case "$1" in + -name=*) name=`echo "$1" | sed -e 's/-name=//'`; shift;; + -class=*) class=`echo "$1" | sed -e 's/-class=//'`; shift;; + -ierror=*) ereg=`echo "$1" | sed -e 's/-ierror=//'`; icase="-i"; shift;; + -error=*) ereg=`echo "$1" | sed -e 's/-error=//'`; shift;; + *) ya=1;; + esac + done + + # use first arg as name if it was not given + if [ -z "$name" ]; then + name="$asserts-$1" + shift + fi + + if [[ "$class" = "" ]]; then + class="default" + fi + + echo "name is: $name" + echo "class is: $class" + + suite=$class + + # calculate command to eval + [ -z "$1" ] && return + cmd="$1"; shift + while [ -n "$1" ] + do + cmd="$cmd \"$1\"" + shift + done + + # eval the command sending output to a file + outf=/var/tmp/ju$$.txt + errf=/var/tmp/ju$$-err.txt + >$outf + echo "" | tee -a $outf + echo "+++ Running case: $class.$name " | tee -a $outf + echo "+++ working dir: "`pwd` | tee -a $outf + echo "+++ command: $cmd" | tee -a $outf + ini=`$date +%s.%N` + # execute the command, temporarily swapping stderr and stdout so they can be tee'd to separate files, + # then swapping them back again so that the streams are written correctly for the invoking process + ((eVal "$cmd" | tee -a $outf) 3>&1 1>&2 2>&3 | tee $errf) 3>&1 1>&2 2>&3 + evErr=`cat $errfile` + rm -f $errfile + end=`$date +%s.%N` + echo "+++ exit code: $evErr" | tee -a $outf + + # set the appropriate error, based in the exit code and the regex + [ $evErr != 0 ] && err=1 || err=0 + out=`cat $outf | sed -e 's/^\([^+]\)/| \1/g'` + if [ $err = 0 -a -n "$ereg" ]; then + H=`echo "$out" | egrep $icase "$ereg"` + [ -n "$H" ] && err=1 + fi + echo "+++ error: $err" | tee -a $outf + rm -f $outf + + errMsg=`cat $errf` + rm -f $errf + # calculate vars + asserts=`expr $asserts + 1` + errors=`expr $errors + $err` + time=`echo "$end - $ini" | bc -l` + total=`echo "$total + $time" | bc -l` + + # write the junit xml report + ## failure tag + [ $err = 0 ] && failure="" || failure=" + <failure type=\"ScriptError\" message=\"Script Error\"><![CDATA[$errMsg]]></failure> + " + ## testcase tag + content="$content + <testcase assertions=\"1\" name=\"$name\" time=\"$time\"> + $failure + <system-out> +<![CDATA[ +$out +]]> + </system-out> + <system-err> +<![CDATA[ +$errMsg +]]> + </system-err> + </testcase> + " + ## testsuite block + + if [[ -e "$juDIR/TEST-$suite.xml" ]]; then + + # file exists. Need to append to it. If we remove the testsuite end tag, we can just add it in after. + sed -i "s^</testsuite>^^g" $juDIR/TEST-$suite.xml ## remove testSuite so we can add it later + cat <<EOF >> "$juDIR/TEST-$suite.xml" + $content + </testsuite> +EOF + + else + # no file exists. Adding a new file + cat <<EOF > "$juDIR/TEST-$suite.xml" + <testsuite failures="0" assertions="$assertions" name="$suite" tests="1" errors="$errors" time="$total"> + $content + </testsuite> +EOF + fi + +} + From 1204411209d23a84301a5aae75bf88e786b905bb Mon Sep 17 00:00:00 2001 From: nikhiljindal <nikhiljindal@google.com> Date: Fri, 24 Jun 2016 10:44:35 -0700 Subject: [PATCH 175/339] Revert "Federation e2e supports aws" This reverts commit 5bacc4830e447a1a42d8f2d157fcf4792c1dd3dd. --- cluster/aws/util.sh | 2 +- federation/cluster/common.sh | 24 ------------------- .../federation-apiserver-deployment.yaml | 4 ---- 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index b68dc76868..0c2c3fc124 100755 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -1491,7 +1491,7 @@ function test-build-release { # Assumed vars: # Variables from config.sh function test-setup { - . "${KUBE_ROOT}/cluster/kube-up.sh" + "${KUBE_ROOT}/cluster/kube-up.sh" VPC_ID=$(get_vpc_id) detect-security-groups diff --git a/federation/cluster/common.sh b/federation/cluster/common.sh index 3f628291be..7955dd6581 100644 --- a/federation/cluster/common.sh +++ b/federation/cluster/common.sh @@ -135,30 +135,6 @@ function create-federation-api-objects { fi sleep 5 done - - # Poll until DNS record for federation-apiserver is propagated - # TODO(colhom): REQUIREMENT for any other providers which use a DNS name for routing to loadbalancers - # right now it's just AWS that does this. - which nslookup - set +o errexit - if [[ "$KUBERNETES_PROVIDER" == "aws" ]];then - for i in {1..60};do - echo "attempting to nslookup ${FEDERATION_API_HOST} ($i / 60)" - nslookup "${FEDERATION_API_HOST}" - if [[ $? -eq 0 ]];then - echo "Lookup for ${FEDERATION_API_HOST} successful!" - break - fi - sleep 10 - done - - if [[ $i -eq 60 ]];then - echo "Failed to resolve A record for ${FEDERATION_API_HOST}. Will exit" - exit 1 - fi - fi - set -o errexit - KUBE_MASTER_IP="${FEDERATION_API_HOST}:443" else echo "provider ${KUBERNETES_PROVIDER} is not (yet) supported for e2e testing" diff --git a/federation/manifests/federation-apiserver-deployment.yaml b/federation/manifests/federation-apiserver-deployment.yaml index 7c4bd6ee19..5656298b69 100644 --- a/federation/manifests/federation-apiserver-deployment.yaml +++ b/federation/manifests/federation-apiserver-deployment.yaml @@ -22,11 +22,7 @@ spec: - --etcd-servers=http://localhost:2379 - --service-cluster-ip-range={{.FEDERATION_SERVICE_CIDR}} - --secure-port=443 - {{if eq .KUBERNETES_PROVIDER "aws"}} - - --external-hostname={{.FEDERATION_API_HOST}} - {{else}} - --advertise-address={{.FEDERATION_API_HOST}} - {{end}} # TODO: --admission-control values must be set when support is added for each type of control. - --token-auth-file=/srv/kubernetes/known-tokens.csv ports: From a031f7aea4d31f03a2940217335b8a88a016dff9 Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong <yjhong@google.com> Date: Fri, 24 Jun 2016 10:45:45 -0700 Subject: [PATCH 176/339] node e2e: stop testing trusty+docker 1.8 --- test/e2e_node/jenkins/jenkins-ci.properties | 2 +- test/e2e_node/jenkins/jenkins-pull.properties | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e_node/jenkins/jenkins-ci.properties b/test/e2e_node/jenkins/jenkins-ci.properties index be9a436b0d..5b41766d7a 100644 --- a/test/e2e_node/jenkins/jenkins-ci.properties +++ b/test/e2e_node/jenkins/jenkins-ci.properties @@ -3,7 +3,7 @@ GCE_HOSTS= # To copy an image between projects: # `gcloud compute --project <to-project> disks create <image name> --image=https://www.googleapis.com/compute/v1/projects/<from-project>/global/images/<image-name>` # `gcloud compute --project <to-project> images create <image-name> --source-disk=<image-name>` -GCE_IMAGES=e2e-node-ubuntu-trusty-docker10-image,e2e-node-ubuntu-trusty-docker9-image,e2e-node-ubuntu-trusty-docker8-image,e2e-node-coreos-stable20160622-image,e2e-node-containervm-v20160321-image +GCE_IMAGES=e2e-node-ubuntu-trusty-docker10-image,e2e-node-ubuntu-trusty-docker9-image,e2e-node-coreos-stable20160622-image,e2e-node-containervm-v20160321-image GCE_ZONE=us-central1-f GCE_PROJECT=kubernetes-jenkins GCE_IMAGE_PROJECT=kubernetes-jenkins diff --git a/test/e2e_node/jenkins/jenkins-pull.properties b/test/e2e_node/jenkins/jenkins-pull.properties index 47904e4710..9b25d018cc 100644 --- a/test/e2e_node/jenkins/jenkins-pull.properties +++ b/test/e2e_node/jenkins/jenkins-pull.properties @@ -3,10 +3,10 @@ GCE_HOSTS= # To copy an image between projects: # `gcloud compute --project <to-project> disks create <image name> --image=https://www.googleapis.com/compute/v1/projects/<from-project>/global/images/<image-name>` # `gcloud compute --project <to-project> images create <image-name> --source-disk=<image-name>` -GCE_IMAGES=e2e-node-ubuntu-trusty-docker10-image,e2e-node-ubuntu-trusty-docker9-image,e2e-node-ubuntu-trusty-docker8-image,e2e-node-coreos-stable20160622-image,e2e-node-containervm-v20160321-image +GCE_IMAGES=e2e-node-ubuntu-trusty-docker10-image,e2e-node-ubuntu-trusty-docker9-image,e2e-node-coreos-stable20160622-image,e2e-node-containervm-v20160321-image GCE_ZONE=us-central1-f GCE_PROJECT=kubernetes-jenkins-pull GCE_IMAGE_PROJECT=kubernetes-jenkins-pull CLEANUP=true GINKGO_FLAGS=--skip=FLAKY -SETUP_NODE=false \ No newline at end of file +SETUP_NODE=false From 86928dbea07575087dd992ea3810851a1e4b45c4 Mon Sep 17 00:00:00 2001 From: Fabio Yeon <fabioy@google.com> Date: Fri, 24 Jun 2016 10:41:49 -0700 Subject: [PATCH 177/339] Increase pod CPU/memory for fluentd, dns and kube-proxy. --- cluster/gce/gci/configure-helper.sh | 4 ++-- cluster/gce/trusty/node.yaml | 2 +- cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml | 2 +- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base | 2 +- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in | 2 +- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed | 2 +- cluster/saltbase/salt/kube-proxy/init.sls | 6 ++---- 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 044aadf949..83b6957574 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -326,7 +326,7 @@ function assemble-docker-flags { echo "DOCKER_OPTS=\"${docker_opts} ${EXTRA_DOCKER_OPTS:-}\"" > /etc/default/docker # If using a network plugin, we need to explicitly restart docker daemon, because - # kubelet will not do it. + # kubelet will not do it. if [[ "${use_net_plugin}" == "true" ]]; then echo "Docker command line is updated. Restart docker to pick it up" systemctl restart docker @@ -474,7 +474,7 @@ function start-kube-proxy { sed -i -e "s@{{pillar\['kube_docker_registry'\]}}@${kube_docker_registry}@g" ${src_file} sed -i -e "s@{{pillar\['kube-proxy_docker_tag'\]}}@${kube_proxy_docker_tag}@g" ${src_file} sed -i -e "s@{{test_args}}@${KUBEPROXY_TEST_ARGS:-}@g" ${src_file} - sed -i -e "s@{{ cpurequest }}@20m@g" ${src_file} + sed -i -e "s@{{ cpurequest }}@100m@g" ${src_file} sed -i -e "s@{{log_level}}@${KUBEPROXY_TEST_LOG_LEVEL:-"--v=2"}@g" ${src_file} sed -i -e "s@{{api_servers_with_port}}@${api_servers}@g" ${src_file} if [[ -n "${CLUSTER_IP_RANGE:-}" ]]; then diff --git a/cluster/gce/trusty/node.yaml b/cluster/gce/trusty/node.yaml index 6437479011..17cdcfe88b 100644 --- a/cluster/gce/trusty/node.yaml +++ b/cluster/gce/trusty/node.yaml @@ -212,7 +212,7 @@ script sed -i -e "s@{{pillar\['kube_docker_registry'\]}}@${kube_docker_registry}@g" ${tmp_file} sed -i -e "s@{{pillar\['kube-proxy_docker_tag'\]}}@${kube_proxy_docker_tag}@g" ${tmp_file} sed -i -e "s@{{test_args}}@${test_args}@g" ${tmp_file} - sed -i -e "s@{{ cpurequest }}@20m@g" ${tmp_file} + sed -i -e "s@{{ cpurequest }}@100m@g" ${tmp_file} sed -i -e "s@{{log_level}}@${log_level}@g" ${tmp_file} sed -i -e "s@{{api_servers_with_port}}@${api_servers}@g" ${tmp_file} if [ -n "${CLUSTER_IP_RANGE:-}" ]; then diff --git a/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml b/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml index 10e678fae2..15226d5d6b 100644 --- a/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml +++ b/cluster/saltbase/salt/fluentd-gcp/fluentd-gcp.yaml @@ -18,7 +18,7 @@ spec: requests: # Any change here should be accompanied by a proportional change in CPU # requests of other per-node add-ons (e.g. kube-proxy). - cpu: 80m + cpu: 100m memory: 200Mi env: - name: FLUENTD_ARGS diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base index 59b9debc18..1eaec013f2 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base @@ -52,7 +52,7 @@ spec: memory: 200Mi requests: cpu: 100m - memory: 50Mi + memory: 100Mi livenessProbe: httpGet: path: /healthz diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in index 5411979b94..5d9cb59669 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in @@ -52,7 +52,7 @@ spec: memory: 200Mi requests: cpu: 100m - memory: 50Mi + memory: 100Mi livenessProbe: httpGet: path: /healthz diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed index 385d448d8e..960a6c5e3d 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed @@ -52,7 +52,7 @@ spec: memory: 200Mi requests: cpu: 100m - memory: 50Mi + memory: 100Mi livenessProbe: httpGet: path: /healthz diff --git a/cluster/saltbase/salt/kube-proxy/init.sls b/cluster/saltbase/salt/kube-proxy/init.sls index 2568a55150..6d65c574c4 100644 --- a/cluster/saltbase/salt/kube-proxy/init.sls +++ b/cluster/saltbase/salt/kube-proxy/init.sls @@ -17,12 +17,10 @@ - makedirs: true - dir_mode: 755 - context: - # 20m might cause kube-proxy CPU starvation on full nodes, resulting in - # delayed service updates. But, giving it more would be a breaking change - # to the overhead requirements for existing clusters. + # Increasing to 100m to avoid CPU starvation on full nodes. # Any change here should be accompanied by a proportional change in CPU # requests of other per-node add-ons (e.g. fluentd). - cpurequest: '20m' + cpurequest: '100m' - require: - service: docker - service: kubelet From e12fa40c1de070f7cd5711e0d57c003a75a6ce7f Mon Sep 17 00:00:00 2001 From: Mike Spreitzer <mspreitz@us.ibm.com> Date: Fri, 24 Jun 2016 15:28:55 -0400 Subject: [PATCH 178/339] Tracked addition of federation, sed support in kube DNS The kube DNS app recently gained support for federation (whatever that is), including a new Salt parameter. It also gained alternate templates, intended to be friendly to `sed`. Fortunately, those do not demand a federation parameter. --- cluster/ubuntu/deployAddons.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cluster/ubuntu/deployAddons.sh b/cluster/ubuntu/deployAddons.sh index 47a5b9773b..87e7d6b738 100755 --- a/cluster/ubuntu/deployAddons.sh +++ b/cluster/ubuntu/deployAddons.sh @@ -41,8 +41,8 @@ function init { function deploy_dns { echo "Deploying DNS on Kubernetes" - sed -e "s/{{ pillar\['dns_replicas'\] }}/${DNS_REPLICAS}/g;s/{{ pillar\['dns_domain'\] }}/${DNS_DOMAIN}/g;" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in" > skydns-rc.yaml - sed -e "s/{{ pillar\['dns_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in" > skydns-svc.yaml + sed -e "s/\\\$DNS_REPLICAS/${DNS_REPLICAS}/g;s/\\\$DNS_DOMAIN/${DNS_DOMAIN}/g;" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed" > skydns-rc.yaml + sed -e "s/\\\$DNS_SERVER_IP/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in" > skydns-svc.yaml KUBEDNS=`eval "${KUBECTL} get services --namespace=kube-system | grep kube-dns | cat"` From 772ba36a7230154b0f99957806f715af8d1eccde Mon Sep 17 00:00:00 2001 From: Matt Liggett <mml@google.com> Date: Fri, 24 Jun 2016 12:32:03 -0700 Subject: [PATCH 179/339] Fixup debug log line in federation controller --- federation/pkg/federation-controller/service/dns.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/federation/pkg/federation-controller/service/dns.go b/federation/pkg/federation-controller/service/dns.go index 407f6c04f1..0fe0f9d5e2 100644 --- a/federation/pkg/federation-controller/service/dns.go +++ b/federation/pkg/federation-controller/service/dns.go @@ -199,7 +199,7 @@ func (s *ServiceController) ensureDnsRrsets(dnsZoneName, dnsName string, endpoin } } else { // the rrset already exists, so make it right. - glog.V(4).Infof("Recordset %v already exists. Ensuring that it is correct.") + glog.V(4).Infof("Recordset %v already exists. Ensuring that it is correct.", rrset) if len(endpoints) < 1 { // Need an appropriate CNAME record. Check that we have it. newRrset := rrsets.New(dnsName, []string{uplevelCname}, minDnsTtl, rrstype.CNAME) From 8beed4cd8d34b4b28b68750b819c92b0d72db19e Mon Sep 17 00:00:00 2001 From: Davanum Srinivas <davanum@gmail.com> Date: Mon, 20 Jun 2016 21:54:23 -0400 Subject: [PATCH 180/339] Fix pkg/kubelet unit tests fail on OSX Fixes #27730 --- pkg/kubelet/kubelet_test.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index bbbcf20ec7..a1202a3291 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -25,6 +25,7 @@ import ( "net/http" "os" "reflect" + goruntime "runtime" "sort" "strconv" "strings" @@ -2763,8 +2764,8 @@ func TestUpdateNewNodeStatus(t *testing.T) { BootID: "1b3", KernelVersion: "3.16.0-0.bpo.4-amd64", OSImage: "Debian GNU/Linux 7 (wheezy)", - OperatingSystem: "linux", - Architecture: "amd64", + OperatingSystem: goruntime.GOOS, + Architecture: goruntime.GOARCH, ContainerRuntimeVersion: "test://1.5.0", KubeletVersion: version.Get().String(), KubeProxyVersion: version.Get().String(), @@ -3010,8 +3011,8 @@ func TestUpdateExistingNodeStatus(t *testing.T) { BootID: "1b3", KernelVersion: "3.16.0-0.bpo.4-amd64", OSImage: "Debian GNU/Linux 7 (wheezy)", - OperatingSystem: "linux", - Architecture: "amd64", + OperatingSystem: goruntime.GOOS, + Architecture: goruntime.GOARCH, ContainerRuntimeVersion: "test://1.5.0", KubeletVersion: version.Get().String(), KubeProxyVersion: version.Get().String(), @@ -3294,8 +3295,8 @@ func TestUpdateNodeStatusWithRuntimeStateError(t *testing.T) { BootID: "1b3", KernelVersion: "3.16.0-0.bpo.4-amd64", OSImage: "Debian GNU/Linux 7 (wheezy)", - OperatingSystem: "linux", - Architecture: "amd64", + OperatingSystem: goruntime.GOOS, + Architecture: goruntime.GOARCH, ContainerRuntimeVersion: "test://1.5.0", KubeletVersion: version.Get().String(), KubeProxyVersion: version.Get().String(), From 88e2a31978a793207c539d29b6f9e25404ac5cf8 Mon Sep 17 00:00:00 2001 From: Kris <krousey@google.com> Date: Fri, 24 Jun 2016 11:08:23 -0700 Subject: [PATCH 181/339] Adding lock files for kubeconfig updating --- pkg/client/unversioned/clientcmd/loader.go | 26 +++++++++++++++++++ .../unversioned/clientcmd/loader_test.go | 16 ++++++++++++ 2 files changed, 42 insertions(+) diff --git a/pkg/client/unversioned/clientcmd/loader.go b/pkg/client/unversioned/clientcmd/loader.go index f0c9c547a1..3d2df1f7da 100644 --- a/pkg/client/unversioned/clientcmd/loader.go +++ b/pkg/client/unversioned/clientcmd/loader.go @@ -381,12 +381,38 @@ func WriteToFile(config clientcmdapi.Config, filename string) error { return err } } + + err = lockFile(filename) + if err != nil { + return err + } + defer unlockFile(filename) + if err := ioutil.WriteFile(filename, content, 0600); err != nil { return err } return nil } +func lockFile(filename string) error { + // TODO: find a way to do this with actual file locks. Will + // probably need seperate solution for windows and linux. + f, err := os.OpenFile(lockName(filename), os.O_CREATE|os.O_EXCL, 0) + if err != nil { + return err + } + f.Close() + return nil +} + +func unlockFile(filename string) error { + return os.Remove(lockName(filename)) +} + +func lockName(filename string) string { + return filename + ".lock" +} + // Write serializes the config to yaml. // Encapsulates serialization without assuming the destination is a file. func Write(config clientcmdapi.Config) ([]byte, error) { diff --git a/pkg/client/unversioned/clientcmd/loader_test.go b/pkg/client/unversioned/clientcmd/loader_test.go index ad79c7b818..5075bded22 100644 --- a/pkg/client/unversioned/clientcmd/loader_test.go +++ b/pkg/client/unversioned/clientcmd/loader_test.go @@ -376,6 +376,22 @@ func TestMigratingFileSourceMissingSkip(t *testing.T) { } } +func TestFileLocking(t *testing.T) { + f, _ := ioutil.TempFile("", "") + defer os.Remove(f.Name()) + + err := lockFile(f.Name()) + if err != nil { + t.Errorf("unexpected error while locking file: %v", err) + } + defer unlockFile(f.Name()) + + err = lockFile(f.Name()) + if err == nil { + t.Error("expected error while locking file.") + } +} + func Example_noMergingOnExplicitPaths() { commandLineFile, _ := ioutil.TempFile("", "") defer os.Remove(commandLineFile.Name()) From b1021db07ebabd270136299e6143ecd4b41488b1 Mon Sep 17 00:00:00 2001 From: nikhiljindal <nikhiljindal@google.com> Date: Fri, 24 Jun 2016 13:47:39 -0700 Subject: [PATCH 182/339] Adding OWNERS for federation --- federation/OWNERS | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 federation/OWNERS diff --git a/federation/OWNERS b/federation/OWNERS new file mode 100644 index 0000000000..66c7b43acd --- /dev/null +++ b/federation/OWNERS @@ -0,0 +1,5 @@ +assignees: + - quinton-hoole + - madhusudancs + - mml + - nikhiljindal From c16416d6b4111dca6de52827086c2e07b1adfda1 Mon Sep 17 00:00:00 2001 From: Matt Liggett <mml@google.com> Date: Fri, 24 Jun 2016 13:54:05 -0700 Subject: [PATCH 183/339] fg --- test/e2e/federated-service.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/e2e/federated-service.go b/test/e2e/federated-service.go index e53f40a8ea..5e90611b08 100644 --- a/test/e2e/federated-service.go +++ b/test/e2e/federated-service.go @@ -146,8 +146,14 @@ var _ = framework.KubeDescribe("[Feature:Federation] Federated Services", func() AfterEach(func() { framework.SkipUnlessFederated(f.Client) + // TODO(mml): replace with calls to framework.DeleteNamespaces and + // framework.WaitForNamespacesDeleted. But first we need to re-write + // them to expect versioned clients. + // ALSO TODO(mml): Utility functions like these should [optionally?] + // accept a list of clients/clusters to act upon, to increase + // re-usablity. for i, cs := range clusterClientSets { - if err := cs.Core().Namespaces().Delete(f.Namespace.Name, &api.DeleteOptions{}); err != nil { + if err := cs.Core().Namespaces().Delete(f.Namespace.Name, api.NewDeleteOptions(0)); err != nil { framework.Failf("Couldn't delete the namespace %s in cluster [%d]: %v", f.Namespace.Name, i, err) } framework.Logf("Namespace %s deleted in cluster [%d]", f.Namespace.Name, i) From 30c913e2119b7792f12fded23c58808809b08fbb Mon Sep 17 00:00:00 2001 From: Yifan Gu <yifan.gu@coreos.com> Date: Fri, 24 Jun 2016 13:54:32 -0700 Subject: [PATCH 184/339] rkt: Bump required rkt version to 1.9.1. --- cluster/gce/config-default.sh | 2 +- cluster/gce/config-test.sh | 2 +- pkg/kubelet/rkt/rkt.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 3fb64fca9d..31e5d0d18e 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -46,7 +46,7 @@ MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-google-containers} NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-"${MASTER_IMAGE}"} NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-"${MASTER_IMAGE_PROJECT}"} CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker} -RKT_VERSION=${KUBE_RKT_VERSION:-1.8.0} +RKT_VERSION=${KUBE_RKT_VERSION:-1.9.1} RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos} NETWORK=${KUBE_GCE_NETWORK:-default} diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 1c6181a9b6..c0e31fb005 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -48,7 +48,7 @@ NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-"${MASTER_IMAGE}"} NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-"${MASTER_IMAGE_PROJECT}"} CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker} GCI_DOCKER_VERSION=${KUBE_GCI_DOCKER_VERSION:-} -RKT_VERSION=${KUBE_RKT_VERSION:-1.8.0} +RKT_VERSION=${KUBE_RKT_VERSION:-1.9.1} RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos} NETWORK=${KUBE_GCE_NETWORK:-e2e} diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go index da140d6331..262d9c7afd 100644 --- a/pkg/kubelet/rkt/rkt.go +++ b/pkg/kubelet/rkt/rkt.go @@ -68,8 +68,8 @@ const ( RktType = "rkt" DefaultRktAPIServiceEndpoint = "localhost:15441" - minimumRktBinVersion = "1.8.0" - recommendedRktBinVersion = "1.8.0" + minimumRktBinVersion = "1.9.1" + recommendedRktBinVersion = "1.9.1" minimumRktApiVersion = "1.0.0-alpha" minimumSystemdVersion = "219" From 8db551f674f99fb0ec3f22a61c102e4dc133ff9c Mon Sep 17 00:00:00 2001 From: Rudi Chiarito <rudi@clarifai.com> Date: Sun, 17 Apr 2016 16:31:02 -0400 Subject: [PATCH 185/339] golint fixes for aws cloudprovider --- pkg/cloudprovider/providers/aws/aws.go | 529 +++++++++--------- .../providers/aws/aws_instancegroups.go | 10 +- .../providers/aws/aws_loadbalancer.go | 48 +- pkg/cloudprovider/providers/aws/aws_routes.go | 34 +- pkg/cloudprovider/providers/aws/aws_test.go | 8 +- pkg/volume/aws_ebs/aws_util.go | 4 +- .../persistentvolume/label/admission.go | 2 +- 7 files changed, 325 insertions(+), 310 deletions(-) diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index df406e0645..1d933551d2 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -51,42 +51,54 @@ import ( "k8s.io/kubernetes/pkg/volume" ) +// ProviderName is the name of this cloud provider. const ProviderName = "aws" -// The tag name we use to differentiate multiple logically independent clusters running in the same AZ +// TagNameKubernetesCluster is the tag name we use to differentiate multiple +// logically independent clusters running in the same AZ const TagNameKubernetesCluster = "KubernetesCluster" -// The tag name we use to differentiate multiple services. Used currently for ELBs only. +// TagNameKubernetesService is the tag name we use to differentiate multiple +// services. Used currently for ELBs only. const TagNameKubernetesService = "kubernetes.io/service-name" -// The tag name used on a subnet to designate that it should be used for internal ELBs +// TagNameSubnetInternalELB is the tag name used on a subnet to designate that +// it should be used for internal ELBs const TagNameSubnetInternalELB = "kubernetes.io/role/internal-elb" -// The tag name used on a subnet to designate that it should be used for internet ELBs +// TagNameSubnetPublicELB is the tag name used on a subnet to designate that +// it should be used for internet ELBs const TagNameSubnetPublicELB = "kubernetes.io/role/elb" -// Annotation used on the service to indicate that we want an internal ELB. +// ServiceAnnotationLoadBalancerInternal is the annotation used on the service +// to indicate that we want an internal ELB. // Currently we accept only the value "0.0.0.0/0" - other values are an error. // This lets us define more advanced semantics in future. const ServiceAnnotationLoadBalancerInternal = "service.beta.kubernetes.io/aws-load-balancer-internal" -// Annotation used on the service to enable the proxy protocol on an ELB. Right now we only -// accept the value "*" which means enable the proxy protocol on all ELB backends. In the -// future we could adjust this to allow setting the proxy protocol only on certain backends. +// ServiceAnnotationLoadBalancerProxyProtocol is the annotation used on the +// service to enable the proxy protocol on an ELB. Right now we only accept the +// value "*" which means enable the proxy protocol on all ELB backends. In the +// future we could adjust this to allow setting the proxy protocol only on +// certain backends. const ServiceAnnotationLoadBalancerProxyProtocol = "service.beta.kubernetes.io/aws-load-balancer-proxy-protocol" -// Service annotation requesting a secure listener. Value is a valid certificate ARN. +// ServiceAnnotationLoadBalancerCertificate is the annotation used on the +// service to request a secure listener. Value is a valid certificate ARN. // For more, see http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elb-listener-config.html // CertARN is an IAM or CM certificate ARN, e.g. arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012 const ServiceAnnotationLoadBalancerCertificate = "service.beta.kubernetes.io/aws-load-balancer-ssl-cert" -// Service annotation specifying a comma-separated list of ports that will use SSL/HTTPS +// ServiceAnnotationLoadBalancerSSLPorts is the annotation used on the service +// to specify a comma-separated list of ports that will use SSL/HTTPS // listeners. Defaults to '*' (all). const ServiceAnnotationLoadBalancerSSLPorts = "service.beta.kubernetes.io/aws-load-balancer-ssl-ports" -// Service annotation specifying the protocol spoken by the backend (pod) behind a secure listener. +// ServiceAnnotationLoadBalancerBEProtocol is the annotation used on the service +// to specify the protocol spoken by the backend (pod) behind a secure listener. // Only inspected when `aws-load-balancer-ssl-cert` is used. -// If `http` (default) or `https`, an HTTPS listener that terminates the connection and parses headers is created. +// If `http` (default) or `https`, an HTTPS listener that terminates the +// connection and parses headers is created. // If set to `ssl` or `tcp`, a "raw" SSL listener is used. const ServiceAnnotationLoadBalancerBEProtocol = "service.beta.kubernetes.io/aws-load-balancer-backend-protocol" @@ -98,36 +110,36 @@ var backendProtocolMapping = map[string]string{ "tcp": "ssl", } -// We sometimes read to see if something exists; then try to create it if we didn't find it +// MaxReadThenCreateRetries sets the maximum number of attempts we will make when +// we read to see if something exists and then try to create it if we didn't find it. // This can fail once in a consistent system if done in parallel // In an eventually consistent system, it could fail unboundedly -// MaxReadThenCreateRetries sets the maximum number of attempts we will make const MaxReadThenCreateRetries = 30 -// Default volume type for newly created Volumes +// DefaultVolumeType specifies which storage to use for newly created Volumes // TODO: Remove when user/admin can configure volume types and thus we don't // need hardcoded defaults. const DefaultVolumeType = "gp2" -// Amazon recommends having no more that 40 volumes attached to an instance, -// and at least one of those is for the system root volume. +// DefaultMaxEBSVolumes is the limit for volumes attached to an instance. +// Amazon recommends no more than 40; the system root volume uses at least one. // See http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html#linux-specific-volume-limits const DefaultMaxEBSVolumes = 39 // Used to call aws_credentials.Init() just once var once sync.Once -// Abstraction over AWS, to allow mocking/other implementations -type AWSServices interface { +// Services is an abstraction over AWS, to allow mocking/other implementations +type Services interface { Compute(region string) (EC2, error) LoadBalancing(region string) (ELB, error) Autoscaling(region string) (ASG, error) Metadata() (EC2Metadata, error) } -// TODO: Should we rename this to AWS (EBS & ELB are not technically part of EC2) -// Abstraction over EC2, to allow mocking/other implementations +// EC2 is an abstraction over AWS', to allow mocking/other implementations // Note that the DescribeX functions return a list, so callers don't need to deal with paging +// TODO: Should we rename this to AWS (EBS & ELB are not technically part of EC2) type EC2 interface { // Query EC2 for instances matching the filter DescribeInstances(request *ec2.DescribeInstancesInput) ([]*ec2.Instance, error) @@ -162,7 +174,7 @@ type EC2 interface { ModifyInstanceAttribute(request *ec2.ModifyInstanceAttributeInput) (*ec2.ModifyInstanceAttributeOutput, error) } -// This is a simple pass-through of the ELB client interface, which allows for testing +// ELB is a simple pass-through of AWS' ELB client interface, which allows for testing type ELB interface { CreateLoadBalancer(*elb.CreateLoadBalancerInput) (*elb.CreateLoadBalancerOutput, error) DeleteLoadBalancer(*elb.DeleteLoadBalancerInput) (*elb.DeleteLoadBalancerOutput, error) @@ -183,18 +195,20 @@ type ELB interface { ConfigureHealthCheck(*elb.ConfigureHealthCheckInput) (*elb.ConfigureHealthCheckOutput, error) } -// This is a simple pass-through of the Autoscaling client interface, which allows for testing +// ASG is a simple pass-through of the Autoscaling client interface, which +// allows for testing. type ASG interface { UpdateAutoScalingGroup(*autoscaling.UpdateAutoScalingGroupInput) (*autoscaling.UpdateAutoScalingGroupOutput, error) DescribeAutoScalingGroups(*autoscaling.DescribeAutoScalingGroupsInput) (*autoscaling.DescribeAutoScalingGroupsOutput, error) } -// Abstraction over the AWS metadata service +// EC2Metadata is an abstraction over the AWS metadata service. type EC2Metadata interface { // Query the EC2 metadata service (used to discover instance-id etc) GetMetadata(path string) (string, error) } +// VolumeOptions specifies capacity and tags for a volume. type VolumeOptions struct { CapacityGB int Tags map[string]string @@ -246,13 +260,13 @@ type InstanceGroupInfo interface { CurrentSize() (int, error) } -// AWSCloud is an implementation of Interface, LoadBalancer and Instances for Amazon Web Services. -type AWSCloud struct { +// Cloud is an implementation of Interface, LoadBalancer and Instances for Amazon Web Services. +type Cloud struct { ec2 EC2 elb ELB asg ASG metadata EC2Metadata - cfg *AWSCloudConfig + cfg *CloudConfig region string vpcID string @@ -267,9 +281,10 @@ type AWSCloud struct { lastInstancesByNodeNames []*ec2.Instance } -var _ Volumes = &AWSCloud{} +var _ Volumes = &Cloud{} -type AWSCloudConfig struct { +// CloudConfig wraps the settings for the AWS cloud provider. +type CloudConfig struct { Global struct { // TODO: Is there any use for this? We can get it from the instance metadata service // Maybe if we're not running on AWS, e.g. bootstrap; for now it is not very useful @@ -421,22 +436,24 @@ func newEc2Filter(name string, value string) *ec2.Filter { return filter } -func (self *AWSCloud) AddSSHKeyToAllInstances(user string, keyData []byte) error { +// AddSSHKeyToAllInstances is currently not implemented. +func (c *Cloud) AddSSHKeyToAllInstances(user string, keyData []byte) error { return errors.New("unimplemented") } -func (c *AWSCloud) CurrentNodeName(hostname string) (string, error) { +// CurrentNodeName returns the name of the current node +func (c *Cloud) CurrentNodeName(hostname string) (string, error) { return c.selfAWSInstance.nodeName, nil } // Implementation of EC2.Instances -func (self *awsSdkEC2) DescribeInstances(request *ec2.DescribeInstancesInput) ([]*ec2.Instance, error) { +func (s *awsSdkEC2) DescribeInstances(request *ec2.DescribeInstancesInput) ([]*ec2.Instance, error) { // Instances are paged results := []*ec2.Instance{} var nextToken *string for { - response, err := self.ec2.DescribeInstances(request) + response, err := s.ec2.DescribeInstances(request) if err != nil { return nil, fmt.Errorf("error listing AWS instances: %v", err) } @@ -571,8 +588,8 @@ func init() { } // readAWSCloudConfig reads an instance of AWSCloudConfig from config reader. -func readAWSCloudConfig(config io.Reader, metadata EC2Metadata) (*AWSCloudConfig, error) { - var cfg AWSCloudConfig +func readAWSCloudConfig(config io.Reader, metadata EC2Metadata) (*CloudConfig, error) { + var cfg CloudConfig var err error if config != nil { @@ -627,7 +644,7 @@ func azToRegion(az string) (string, error) { // newAWSCloud creates a new instance of AWSCloud. // AWSProvider and instanceId are primarily for tests -func newAWSCloud(config io.Reader, awsServices AWSServices) (*AWSCloud, error) { +func newAWSCloud(config io.Reader, awsServices Services) (*Cloud, error) { metadata, err := awsServices.Metadata() if err != nil { return nil, fmt.Errorf("error creating AWS metadata client: %v", err) @@ -667,7 +684,7 @@ func newAWSCloud(config io.Reader, awsServices AWSServices) (*AWSCloud, error) { return nil, fmt.Errorf("error creating AWS autoscaling client: %v", err) } - awsCloud := &AWSCloud{ + awsCloud := &Cloud{ ec2: ec2, elb: elb, asg: asg, @@ -719,42 +736,43 @@ func newAWSCloud(config io.Reader, awsServices AWSServices) (*AWSCloud, error) { return awsCloud, nil } -func (aws *AWSCloud) Clusters() (cloudprovider.Clusters, bool) { +// Clusters returns the list of clusters. +func (c *Cloud) Clusters() (cloudprovider.Clusters, bool) { return nil, false } // ProviderName returns the cloud provider ID. -func (aws *AWSCloud) ProviderName() string { +func (c *Cloud) ProviderName() string { return ProviderName } // ScrubDNS filters DNS settings for pods. -func (aws *AWSCloud) ScrubDNS(nameservers, searches []string) (nsOut, srchOut []string) { +func (c *Cloud) ScrubDNS(nameservers, searches []string) (nsOut, srchOut []string) { return nameservers, searches } // LoadBalancer returns an implementation of LoadBalancer for Amazon Web Services. -func (s *AWSCloud) LoadBalancer() (cloudprovider.LoadBalancer, bool) { - return s, true +func (c *Cloud) LoadBalancer() (cloudprovider.LoadBalancer, bool) { + return c, true } // Instances returns an implementation of Instances for Amazon Web Services. -func (aws *AWSCloud) Instances() (cloudprovider.Instances, bool) { - return aws, true +func (c *Cloud) Instances() (cloudprovider.Instances, bool) { + return c, true } // Zones returns an implementation of Zones for Amazon Web Services. -func (aws *AWSCloud) Zones() (cloudprovider.Zones, bool) { - return aws, true +func (c *Cloud) Zones() (cloudprovider.Zones, bool) { + return c, true } // Routes returns an implementation of Routes for Amazon Web Services. -func (aws *AWSCloud) Routes() (cloudprovider.Routes, bool) { - return aws, true +func (c *Cloud) Routes() (cloudprovider.Routes, bool) { + return c, true } // NodeAddresses is an implementation of Instances.NodeAddresses. -func (c *AWSCloud) NodeAddresses(name string) ([]api.NodeAddress, error) { +func (c *Cloud) NodeAddresses(name string) ([]api.NodeAddress, error) { if c.selfAWSInstance.nodeName == name || len(name) == 0 { addresses := []api.NodeAddress{} @@ -810,61 +828,58 @@ func (c *AWSCloud) NodeAddresses(name string) ([]api.NodeAddress, error) { } // ExternalID returns the cloud provider ID of the specified instance (deprecated). -func (c *AWSCloud) ExternalID(name string) (string, error) { +func (c *Cloud) ExternalID(name string) (string, error) { if c.selfAWSInstance.nodeName == name { // We assume that if this is run on the instance itself, the instance exists and is alive return c.selfAWSInstance.awsID, nil - } else { - // We must verify that the instance still exists - // Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound) - instance, err := c.findInstanceByNodeName(name) - if err != nil { - return "", err - } - if instance == nil { - return "", cloudprovider.InstanceNotFound - } - return orEmpty(instance.InstanceId), nil } + // We must verify that the instance still exists + // Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound) + instance, err := c.findInstanceByNodeName(name) + if err != nil { + return "", err + } + if instance == nil { + return "", cloudprovider.InstanceNotFound + } + return orEmpty(instance.InstanceId), nil } // InstanceID returns the cloud provider ID of the specified instance. -func (c *AWSCloud) InstanceID(name string) (string, error) { +func (c *Cloud) InstanceID(name string) (string, error) { // In the future it is possible to also return an endpoint as: // <endpoint>/<zone>/<instanceid> if c.selfAWSInstance.nodeName == name { return "/" + c.selfAWSInstance.availabilityZone + "/" + c.selfAWSInstance.awsID, nil - } else { - inst, err := c.getInstanceByNodeName(name) - if err != nil { - return "", err - } - return "/" + orEmpty(inst.Placement.AvailabilityZone) + "/" + orEmpty(inst.InstanceId), nil } + inst, err := c.getInstanceByNodeName(name) + if err != nil { + return "", err + } + return "/" + orEmpty(inst.Placement.AvailabilityZone) + "/" + orEmpty(inst.InstanceId), nil } // InstanceType returns the type of the specified instance. -func (c *AWSCloud) InstanceType(name string) (string, error) { +func (c *Cloud) InstanceType(name string) (string, error) { if c.selfAWSInstance.nodeName == name { return c.selfAWSInstance.instanceType, nil - } else { - inst, err := c.getInstanceByNodeName(name) - if err != nil { - return "", err - } - return orEmpty(inst.InstanceType), nil } + inst, err := c.getInstanceByNodeName(name) + if err != nil { + return "", err + } + return orEmpty(inst.InstanceType), nil } // Return a list of instances matching regex string. -func (s *AWSCloud) getInstancesByRegex(regex string) ([]string, error) { +func (c *Cloud) getInstancesByRegex(regex string) ([]string, error) { filters := []*ec2.Filter{newEc2Filter("instance-state-name", "running")} - filters = s.addFilters(filters) + filters = c.addFilters(filters) request := &ec2.DescribeInstancesInput{ Filters: filters, } - instances, err := s.ec2.DescribeInstances(request) + instances, err := c.ec2.DescribeInstances(request) if err != nil { return []string{}, err } @@ -910,14 +925,14 @@ func (s *AWSCloud) getInstancesByRegex(regex string) ([]string, error) { } // List is an implementation of Instances.List. -func (aws *AWSCloud) List(filter string) ([]string, error) { +func (c *Cloud) List(filter string) ([]string, error) { // TODO: Should really use tag query. No need to go regexp. - return aws.getInstancesByRegex(filter) + return c.getInstancesByRegex(filter) } // getAllZones retrieves a list of all the zones in which nodes are running // It currently involves querying all instances -func (c *AWSCloud) getAllZones() (sets.String, error) { +func (c *Cloud) getAllZones() (sets.String, error) { // We don't currently cache this; it is currently used only in volume // creation which is expected to be a comparatively rare occurence. @@ -959,7 +974,7 @@ func (c *AWSCloud) getAllZones() (sets.String, error) { } // GetZone implements Zones.GetZone -func (c *AWSCloud) GetZone() (cloudprovider.Zone, error) { +func (c *Cloud) GetZone() (cloudprovider.Zone, error) { return cloudprovider.Zone{ FailureDomain: c.selfAWSInstance.availabilityZone, Region: c.region, @@ -1026,28 +1041,28 @@ func newAWSInstance(ec2Service EC2, instance *ec2.Instance) *awsInstance { } // Gets the awsInstanceType that models the instance type of this instance -func (self *awsInstance) getInstanceType() *awsInstanceType { +func (i *awsInstance) getInstanceType() *awsInstanceType { // TODO: Make this real awsInstanceType := &awsInstanceType{} return awsInstanceType } // Gets the full information about this instance from the EC2 API -func (self *awsInstance) describeInstance() (*ec2.Instance, error) { - instanceID := self.awsID +func (i *awsInstance) describeInstance() (*ec2.Instance, error) { + instanceID := i.awsID request := &ec2.DescribeInstancesInput{ InstanceIds: []*string{&instanceID}, } - instances, err := self.ec2.DescribeInstances(request) + instances, err := i.ec2.DescribeInstances(request) if err != nil { return nil, err } if len(instances) == 0 { - return nil, fmt.Errorf("no instances found for instance: %s", self.awsID) + return nil, fmt.Errorf("no instances found for instance: %s", i.awsID) } if len(instances) > 1 { - return nil, fmt.Errorf("multiple instances found for instance: %s", self.awsID) + return nil, fmt.Errorf("multiple instances found for instance: %s", i.awsID) } return instances[0], nil } @@ -1055,19 +1070,19 @@ func (self *awsInstance) describeInstance() (*ec2.Instance, error) { // Gets the mountDevice already assigned to the volume, or assigns an unused mountDevice. // If the volume is already assigned, this will return the existing mountDevice with alreadyAttached=true. // Otherwise the mountDevice is assigned by finding the first available mountDevice, and it is returned with alreadyAttached=false. -func (self *awsInstance) getMountDevice(volumeID string, assign bool) (assigned mountDevice, alreadyAttached bool, err error) { - instanceType := self.getInstanceType() +func (i *awsInstance) getMountDevice(volumeID string, assign bool) (assigned mountDevice, alreadyAttached bool, err error) { + instanceType := i.getInstanceType() if instanceType == nil { - return "", false, fmt.Errorf("could not get instance type for instance: %s", self.awsID) + return "", false, fmt.Errorf("could not get instance type for instance: %s", i.awsID) } // We lock to prevent concurrent mounts from conflicting // We may still conflict if someone calls the API concurrently, // but the AWS API will then fail one of the two attach operations - self.mutex.Lock() - defer self.mutex.Unlock() + i.mutex.Lock() + defer i.mutex.Unlock() - info, err := self.describeInstance() + info, err := i.describeInstance() if err != nil { return "", false, err } @@ -1086,7 +1101,7 @@ func (self *awsInstance) getMountDevice(volumeID string, assign bool) (assigned deviceMappings[mountDevice(name)] = aws.StringValue(blockDevice.Ebs.VolumeId) } - for mountDevice, volume := range self.attaching { + for mountDevice, volume := range i.attaching { deviceMappings[mountDevice] = volume } @@ -1118,20 +1133,20 @@ func (self *awsInstance) getMountDevice(volumeID string, assign bool) (assigned if chosen == "" { glog.Warningf("Could not assign a mount device (all in use?). mappings=%v", deviceMappings) - return "", false, fmt.Errorf("Too many EBS volumes attached to node %s.", self.nodeName) + return "", false, fmt.Errorf("Too many EBS volumes attached to node %s.", i.nodeName) } - self.attaching[chosen] = volumeID + i.attaching[chosen] = volumeID glog.V(2).Infof("Assigned mount device %s -> volume %s", chosen, volumeID) return chosen, false, nil } -func (self *awsInstance) endAttaching(volumeID string, mountDevice mountDevice) { - self.mutex.Lock() - defer self.mutex.Unlock() +func (i *awsInstance) endAttaching(volumeID string, mountDevice mountDevice) { + i.mutex.Lock() + defer i.mutex.Unlock() - existingVolumeID, found := self.attaching[mountDevice] + existingVolumeID, found := i.attaching[mountDevice] if !found { glog.Errorf("endAttaching on non-allocated device") return @@ -1141,7 +1156,7 @@ func (self *awsInstance) endAttaching(volumeID string, mountDevice mountDevice) return } glog.V(2).Infof("Releasing mount device mapping: %s -> volume %s", mountDevice, volumeID) - delete(self.attaching, mountDevice) + delete(i.attaching, mountDevice) } type awsDisk struct { @@ -1153,7 +1168,7 @@ type awsDisk struct { awsID string } -func newAWSDisk(aws *AWSCloud, name string) (*awsDisk, error) { +func newAWSDisk(aws *Cloud, name string) (*awsDisk, error) { // name looks like aws://availability-zone/id // The original idea of the URL-style name was to put the AZ into the @@ -1191,35 +1206,35 @@ func newAWSDisk(aws *AWSCloud, name string) (*awsDisk, error) { } // Gets the full information about this volume from the EC2 API -func (self *awsDisk) describeVolume() (*ec2.Volume, error) { - volumeID := self.awsID +func (d *awsDisk) describeVolume() (*ec2.Volume, error) { + volumeID := d.awsID request := &ec2.DescribeVolumesInput{ VolumeIds: []*string{&volumeID}, } - volumes, err := self.ec2.DescribeVolumes(request) + volumes, err := d.ec2.DescribeVolumes(request) if err != nil { return nil, fmt.Errorf("error querying ec2 for volume info: %v", err) } if len(volumes) == 0 { - return nil, fmt.Errorf("no volumes found for volume: %s", self.awsID) + return nil, fmt.Errorf("no volumes found for volume: %s", d.awsID) } if len(volumes) > 1 { - return nil, fmt.Errorf("multiple volumes found for volume: %s", self.awsID) + return nil, fmt.Errorf("multiple volumes found for volume: %s", d.awsID) } return volumes[0], nil } // waitForAttachmentStatus polls until the attachment status is the expected value // TODO(justinsb): return (bool, error) -func (self *awsDisk) waitForAttachmentStatus(status string) error { +func (d *awsDisk) waitForAttachmentStatus(status string) error { // TODO: There may be a faster way to get this when we're attaching locally attempt := 0 maxAttempts := 60 for { - info, err := self.describeVolume() + info, err := d.describeVolume() if err != nil { return err } @@ -1258,9 +1273,9 @@ func (self *awsDisk) waitForAttachmentStatus(status string) error { } // Deletes the EBS disk -func (self *awsDisk) deleteVolume() (bool, error) { - request := &ec2.DeleteVolumeInput{VolumeId: aws.String(self.awsID)} - _, err := self.ec2.DeleteVolume(request) +func (d *awsDisk) deleteVolume() (bool, error) { + request := &ec2.DeleteVolumeInput{VolumeId: aws.String(d.awsID)} + _, err := d.ec2.DeleteVolume(request) if err != nil { if awsError, ok := err.(awserr.Error); ok { if awsError.Code() == "InvalidVolume.NotFound" { @@ -1274,11 +1289,11 @@ func (self *awsDisk) deleteVolume() (bool, error) { // Builds the awsInstance for the EC2 instance on which we are running. // This is called when the AWSCloud is initialized, and should not be called otherwise (because the awsInstance for the local instance is a singleton with drive mapping state) -func (c *AWSCloud) buildSelfAWSInstance() (*awsInstance, error) { +func (c *Cloud) buildSelfAWSInstance() (*awsInstance, error) { if c.selfAWSInstance != nil { panic("do not call buildSelfAWSInstance directly") } - instanceId, err := c.metadata.GetMetadata("instance-id") + instanceID, err := c.metadata.GetMetadata("instance-id") if err != nil { return nil, fmt.Errorf("error fetching instance-id from ec2 metadata service: %v", err) } @@ -1291,15 +1306,15 @@ func (c *AWSCloud) buildSelfAWSInstance() (*awsInstance, error) { // information from the instance returned by the EC2 API - it is a // single API call to get all the information, and it means we don't // have two code paths. - instance, err := c.getInstanceByID(instanceId) + instance, err := c.getInstanceByID(instanceID) if err != nil { - return nil, fmt.Errorf("error finding instance %s: %v", instanceId, err) + return nil, fmt.Errorf("error finding instance %s: %v", instanceID, err) } return newAWSInstance(c.ec2, instance), nil } // Gets the awsInstance with node-name nodeName, or the 'self' instance if nodeName == "" -func (c *AWSCloud) getAwsInstance(nodeName string) (*awsInstance, error) { +func (c *Cloud) getAwsInstance(nodeName string) (*awsInstance, error) { var awsInstance *awsInstance if nodeName == "" { awsInstance = c.selfAWSInstance @@ -1315,8 +1330,8 @@ func (c *AWSCloud) getAwsInstance(nodeName string) (*awsInstance, error) { return awsInstance, nil } -// Implements Volumes.AttachDisk -func (c *AWSCloud) AttachDisk(diskName string, instanceName string, readOnly bool) (string, error) { +// AttachDisk implements Volumes.AttachDisk +func (c *Cloud) AttachDisk(diskName string, instanceName string, readOnly bool) (string, error) { disk, err := newAWSDisk(c, diskName) if err != nil { return "", err @@ -1380,14 +1395,14 @@ func (c *AWSCloud) AttachDisk(diskName string, instanceName string, readOnly boo return hostDevice, nil } -// Implements Volumes.DetachDisk -func (aws *AWSCloud) DetachDisk(diskName string, instanceName string) (string, error) { - disk, err := newAWSDisk(aws, diskName) +// DetachDisk implements Volumes.DetachDisk +func (c *Cloud) DetachDisk(diskName string, instanceName string) (string, error) { + disk, err := newAWSDisk(c, diskName) if err != nil { return "", err } - awsInstance, err := aws.getAwsInstance(instanceName) + awsInstance, err := c.getAwsInstance(instanceName) if err != nil { return "", err } @@ -1407,7 +1422,7 @@ func (aws *AWSCloud) DetachDisk(diskName string, instanceName string) (string, e VolumeId: &disk.awsID, } - response, err := aws.ec2.DetachVolume(&request) + response, err := c.ec2.DetachVolume(&request) if err != nil { return "", fmt.Errorf("error detaching EBS volume: %v", err) } @@ -1429,8 +1444,8 @@ func (aws *AWSCloud) DetachDisk(diskName string, instanceName string) (string, e } // CreateDisk implements Volumes.CreateDisk -func (s *AWSCloud) CreateDisk(volumeOptions *VolumeOptions) (string, error) { - allZones, err := s.getAllZones() +func (c *Cloud) CreateDisk(volumeOptions *VolumeOptions) (string, error) { + allZones, err := c.getAllZones() if err != nil { return "", fmt.Errorf("error querying for all zones: %v", err) } @@ -1443,7 +1458,7 @@ func (s *AWSCloud) CreateDisk(volumeOptions *VolumeOptions) (string, error) { volSize := int64(volumeOptions.CapacityGB) request.Size = &volSize request.VolumeType = aws.String(DefaultVolumeType) - response, err := s.ec2.CreateVolume(request) + response, err := c.ec2.CreateVolume(request) if err != nil { return "", err } @@ -1459,14 +1474,14 @@ func (s *AWSCloud) CreateDisk(volumeOptions *VolumeOptions) (string, error) { tags[k] = v } - if s.getClusterName() != "" { - tags[TagNameKubernetesCluster] = s.getClusterName() + if c.getClusterName() != "" { + tags[TagNameKubernetesCluster] = c.getClusterName() } if len(tags) != 0 { - if err := s.createTags(awsID, tags); err != nil { + if err := c.createTags(awsID, tags); err != nil { // delete the volume and hope it succeeds - _, delerr := s.DeleteDisk(volumeName) + _, delerr := c.DeleteDisk(volumeName) if delerr != nil { // delete did not succeed, we have a stray volume! return "", fmt.Errorf("error tagging volume %s, could not delete the volume: %v", volumeName, delerr) @@ -1477,8 +1492,8 @@ func (s *AWSCloud) CreateDisk(volumeOptions *VolumeOptions) (string, error) { return volumeName, nil } -// Implements Volumes.DeleteDisk -func (c *AWSCloud) DeleteDisk(volumeName string) (bool, error) { +// DeleteDisk implements Volumes.DeleteDisk +func (c *Cloud) DeleteDisk(volumeName string) (bool, error) { awsDisk, err := newAWSDisk(c, volumeName) if err != nil { return false, err @@ -1486,8 +1501,8 @@ func (c *AWSCloud) DeleteDisk(volumeName string) (bool, error) { return awsDisk.deleteVolume() } -// Implements Volumes.GetVolumeLabels -func (c *AWSCloud) GetVolumeLabels(volumeName string) (map[string]string, error) { +// GetVolumeLabels implements Volumes.GetVolumeLabels +func (c *Cloud) GetVolumeLabels(volumeName string) (map[string]string, error) { awsDisk, err := newAWSDisk(c, volumeName) if err != nil { return nil, err @@ -1512,8 +1527,8 @@ func (c *AWSCloud) GetVolumeLabels(volumeName string) (map[string]string, error) return labels, nil } -// Implement Volumes.GetDiskPath -func (c *AWSCloud) GetDiskPath(volumeName string) (string, error) { +// GetDiskPath implements Volumes.GetDiskPath +func (c *Cloud) GetDiskPath(volumeName string) (string, error) { awsDisk, err := newAWSDisk(c, volumeName) if err != nil { return "", err @@ -1528,8 +1543,8 @@ func (c *AWSCloud) GetDiskPath(volumeName string) (string, error) { return aws.StringValue(info.Attachments[0].Device), nil } -// Implement Volumes.DiskIsAttached -func (c *AWSCloud) DiskIsAttached(diskName, instanceID string) (bool, error) { +// DiskIsAttached implements Volumes.DiskIsAttached +func (c *Cloud) DiskIsAttached(diskName, instanceID string) (bool, error) { awsInstance, err := c.getAwsInstance(instanceID) if err != nil { return false, err @@ -1549,11 +1564,11 @@ func (c *AWSCloud) DiskIsAttached(diskName, instanceID string) (bool, error) { } // Gets the current load balancer state -func (s *AWSCloud) describeLoadBalancer(name string) (*elb.LoadBalancerDescription, error) { +func (c *Cloud) describeLoadBalancer(name string) (*elb.LoadBalancerDescription, error) { request := &elb.DescribeLoadBalancersInput{} request.LoadBalancerNames = []*string{&name} - response, err := s.elb.DescribeLoadBalancers(request) + response, err := c.elb.DescribeLoadBalancers(request) if err != nil { if awsError, ok := err.(awserr.Error); ok { if awsError.Code() == "LoadBalancerNotFound" { @@ -1574,8 +1589,8 @@ func (s *AWSCloud) describeLoadBalancer(name string) (*elb.LoadBalancerDescripti } // Retrieves instance's vpc id from metadata -func (self *AWSCloud) findVPCID() (string, error) { - macs, err := self.metadata.GetMetadata("network/interfaces/macs/") +func (c *Cloud) findVPCID() (string, error) { + macs, err := c.metadata.GetMetadata("network/interfaces/macs/") if err != nil { return "", fmt.Errorf("Could not list interfaces of the instance: %v", err) } @@ -1586,7 +1601,7 @@ func (self *AWSCloud) findVPCID() (string, error) { continue } url := fmt.Sprintf("network/interfaces/macs/%svpc-id", macPath) - vpcID, err := self.metadata.GetMetadata(url) + vpcID, err := c.metadata.GetMetadata(url) if err != nil { continue } @@ -1596,13 +1611,13 @@ func (self *AWSCloud) findVPCID() (string, error) { } // Retrieves the specified security group from the AWS API, or returns nil if not found -func (s *AWSCloud) findSecurityGroup(securityGroupId string) (*ec2.SecurityGroup, error) { +func (c *Cloud) findSecurityGroup(securityGroupID string) (*ec2.SecurityGroup, error) { describeSecurityGroupsRequest := &ec2.DescribeSecurityGroupsInput{ - GroupIds: []*string{&securityGroupId}, + GroupIds: []*string{&securityGroupID}, } // We don't apply our tag filters because we are retrieving by ID - groups, err := s.ec2.DescribeSecurityGroups(describeSecurityGroupsRequest) + groups, err := c.ec2.DescribeSecurityGroups(describeSecurityGroupsRequest) if err != nil { glog.Warningf("Error retrieving security group: %q", err) return nil, err @@ -1613,7 +1628,7 @@ func (s *AWSCloud) findSecurityGroup(securityGroupId string) (*ec2.SecurityGroup } if len(groups) != 1 { // This should not be possible - ids should be unique - return nil, fmt.Errorf("multiple security groups found with same id %q", securityGroupId) + return nil, fmt.Errorf("multiple security groups found with same id %q", securityGroupID) } group := groups[0] return group, nil @@ -1698,18 +1713,18 @@ func isEqualUserGroupPair(l, r *ec2.UserIdGroupPair, compareGroupUserIDs bool) b // Makes sure the security group ingress is exactly the specified permissions // Returns true if and only if changes were made // The security group must already exist -func (s *AWSCloud) setSecurityGroupIngress(securityGroupId string, permissions IPPermissionSet) (bool, error) { - group, err := s.findSecurityGroup(securityGroupId) +func (c *Cloud) setSecurityGroupIngress(securityGroupID string, permissions IPPermissionSet) (bool, error) { + group, err := c.findSecurityGroup(securityGroupID) if err != nil { glog.Warning("Error retrieving security group", err) return false, err } if group == nil { - return false, fmt.Errorf("security group not found: %s", securityGroupId) + return false, fmt.Errorf("security group not found: %s", securityGroupID) } - glog.V(2).Infof("Existing security group ingress: %s %v", securityGroupId, group.IpPermissions) + glog.V(2).Infof("Existing security group ingress: %s %v", securityGroupID, group.IpPermissions) actual := NewIPPermissionSet(group.IpPermissions...) @@ -1740,23 +1755,23 @@ func (s *AWSCloud) setSecurityGroupIngress(securityGroupId string, permissions I // don't want to accidentally open more than intended while we're // applying changes. if add.Len() != 0 { - glog.V(2).Infof("Adding security group ingress: %s %v", securityGroupId, add.List()) + glog.V(2).Infof("Adding security group ingress: %s %v", securityGroupID, add.List()) request := &ec2.AuthorizeSecurityGroupIngressInput{} - request.GroupId = &securityGroupId + request.GroupId = &securityGroupID request.IpPermissions = add.List() - _, err = s.ec2.AuthorizeSecurityGroupIngress(request) + _, err = c.ec2.AuthorizeSecurityGroupIngress(request) if err != nil { return false, fmt.Errorf("error authorizing security group ingress: %v", err) } } if remove.Len() != 0 { - glog.V(2).Infof("Remove security group ingress: %s %v", securityGroupId, remove.List()) + glog.V(2).Infof("Remove security group ingress: %s %v", securityGroupID, remove.List()) request := &ec2.RevokeSecurityGroupIngressInput{} - request.GroupId = &securityGroupId + request.GroupId = &securityGroupID request.IpPermissions = remove.List() - _, err = s.ec2.RevokeSecurityGroupIngress(request) + _, err = c.ec2.RevokeSecurityGroupIngress(request) if err != nil { return false, fmt.Errorf("error revoking security group ingress: %v", err) } @@ -1768,18 +1783,18 @@ func (s *AWSCloud) setSecurityGroupIngress(securityGroupId string, permissions I // Makes sure the security group includes the specified permissions // Returns true if and only if changes were made // The security group must already exist -func (s *AWSCloud) addSecurityGroupIngress(securityGroupId string, addPermissions []*ec2.IpPermission) (bool, error) { - group, err := s.findSecurityGroup(securityGroupId) +func (c *Cloud) addSecurityGroupIngress(securityGroupID string, addPermissions []*ec2.IpPermission) (bool, error) { + group, err := c.findSecurityGroup(securityGroupID) if err != nil { glog.Warningf("Error retrieving security group: %v", err) return false, err } if group == nil { - return false, fmt.Errorf("security group not found: %s", securityGroupId) + return false, fmt.Errorf("security group not found: %s", securityGroupID) } - glog.V(2).Infof("Existing security group ingress: %s %v", securityGroupId, group.IpPermissions) + glog.V(2).Infof("Existing security group ingress: %s %v", securityGroupID, group.IpPermissions) changes := []*ec2.IpPermission{} for _, addPermission := range addPermissions { @@ -1807,12 +1822,12 @@ func (s *AWSCloud) addSecurityGroupIngress(securityGroupId string, addPermission return false, nil } - glog.V(2).Infof("Adding security group ingress: %s %v", securityGroupId, changes) + glog.V(2).Infof("Adding security group ingress: %s %v", securityGroupID, changes) request := &ec2.AuthorizeSecurityGroupIngressInput{} - request.GroupId = &securityGroupId + request.GroupId = &securityGroupID request.IpPermissions = changes - _, err = s.ec2.AuthorizeSecurityGroupIngress(request) + _, err = c.ec2.AuthorizeSecurityGroupIngress(request) if err != nil { glog.Warning("Error authorizing security group ingress", err) return false, fmt.Errorf("error authorizing security group ingress: %v", err) @@ -1824,15 +1839,15 @@ func (s *AWSCloud) addSecurityGroupIngress(securityGroupId string, addPermission // Makes sure the security group no longer includes the specified permissions // Returns true if and only if changes were made // If the security group no longer exists, will return (false, nil) -func (s *AWSCloud) removeSecurityGroupIngress(securityGroupId string, removePermissions []*ec2.IpPermission) (bool, error) { - group, err := s.findSecurityGroup(securityGroupId) +func (c *Cloud) removeSecurityGroupIngress(securityGroupID string, removePermissions []*ec2.IpPermission) (bool, error) { + group, err := c.findSecurityGroup(securityGroupID) if err != nil { glog.Warningf("Error retrieving security group: %v", err) return false, err } if group == nil { - glog.Warning("Security group not found: ", securityGroupId) + glog.Warning("Security group not found: ", securityGroupID) return false, nil } @@ -1862,12 +1877,12 @@ func (s *AWSCloud) removeSecurityGroupIngress(securityGroupId string, removePerm return false, nil } - glog.V(2).Infof("Removing security group ingress: %s %v", securityGroupId, changes) + glog.V(2).Infof("Removing security group ingress: %s %v", securityGroupID, changes) request := &ec2.RevokeSecurityGroupIngressInput{} - request.GroupId = &securityGroupId + request.GroupId = &securityGroupID request.IpPermissions = changes - _, err = s.ec2.RevokeSecurityGroupIngress(request) + _, err = c.ec2.RevokeSecurityGroupIngress(request) if err != nil { glog.Warningf("Error revoking security group ingress: %v", err) return false, err @@ -1879,14 +1894,14 @@ func (s *AWSCloud) removeSecurityGroupIngress(securityGroupId string, removePerm // Ensure that a resource has the correct tags // If it has no tags, we assume that this was a problem caused by an error in between creation and tagging, // and we add the tags. If it has a different cluster's tags, that is an error. -func (s *AWSCloud) ensureClusterTags(resourceID string, tags []*ec2.Tag) error { +func (c *Cloud) ensureClusterTags(resourceID string, tags []*ec2.Tag) error { actualTags := make(map[string]string) for _, tag := range tags { actualTags[aws.StringValue(tag.Key)] = aws.StringValue(tag.Value) } addTags := make(map[string]string) - for k, expected := range s.filterTags { + for k, expected := range c.filterTags { actual := actualTags[k] if actual == expected { continue @@ -1899,7 +1914,7 @@ func (s *AWSCloud) ensureClusterTags(resourceID string, tags []*ec2.Tag) error { } } - if err := s.createTags(resourceID, addTags); err != nil { + if err := c.createTags(resourceID, addTags); err != nil { return fmt.Errorf("error adding missing tags to resource %q: %v", resourceID, err) } @@ -1909,7 +1924,7 @@ func (s *AWSCloud) ensureClusterTags(resourceID string, tags []*ec2.Tag) error { // Makes sure the security group exists. // For multi-cluster isolation, name must be globally unique, for example derived from the service UUID. // Returns the security group id or error -func (s *AWSCloud) ensureSecurityGroup(name string, description string) (string, error) { +func (c *Cloud) ensureSecurityGroup(name string, description string) (string, error) { groupID := "" attempt := 0 for { @@ -1918,7 +1933,7 @@ func (s *AWSCloud) ensureSecurityGroup(name string, description string) (string, request := &ec2.DescribeSecurityGroupsInput{} filters := []*ec2.Filter{ newEc2Filter("group-name", name), - newEc2Filter("vpc-id", s.vpcID), + newEc2Filter("vpc-id", c.vpcID), } // Note that we do _not_ add our tag filters; group-name + vpc-id is the EC2 primary key. // However, we do check that it matches our tags. @@ -1927,7 +1942,7 @@ func (s *AWSCloud) ensureSecurityGroup(name string, description string) (string, // This shouldn't happen because name is expected to be globally unique (UUID derived) request.Filters = filters - securityGroups, err := s.ec2.DescribeSecurityGroups(request) + securityGroups, err := c.ec2.DescribeSecurityGroups(request) if err != nil { return "", err } @@ -1936,7 +1951,7 @@ func (s *AWSCloud) ensureSecurityGroup(name string, description string) (string, if len(securityGroups) > 1 { glog.Warningf("Found multiple security groups with name: %q", name) } - err := s.ensureClusterTags(aws.StringValue(securityGroups[0].GroupId), securityGroups[0].Tags) + err := c.ensureClusterTags(aws.StringValue(securityGroups[0].GroupId), securityGroups[0].Tags) if err != nil { return "", err } @@ -1945,11 +1960,11 @@ func (s *AWSCloud) ensureSecurityGroup(name string, description string) (string, } createRequest := &ec2.CreateSecurityGroupInput{} - createRequest.VpcId = &s.vpcID + createRequest.VpcId = &c.vpcID createRequest.GroupName = &name createRequest.Description = &description - createResponse, err := s.ec2.CreateSecurityGroup(createRequest) + createResponse, err := c.ec2.CreateSecurityGroup(createRequest) if err != nil { ignore := false switch err := err.(type) { @@ -1973,7 +1988,7 @@ func (s *AWSCloud) ensureSecurityGroup(name string, description string) (string, return "", fmt.Errorf("created security group, but id was not returned: %s", name) } - err := s.createTags(groupID, s.filterTags) + err := c.createTags(groupID, c.filterTags) if err != nil { // If we retry, ensureClusterTags will recover from this - it // will add the missing tags. We could delete the security @@ -1987,7 +2002,7 @@ func (s *AWSCloud) ensureSecurityGroup(name string, description string) (string, // createTags calls EC2 CreateTags, but adds retry-on-failure logic // We retry mainly because if we create an object, we cannot tag it until it is "fully created" (eventual consistency) // The error code varies though (depending on what we are tagging), so we simply retry on all errors -func (s *AWSCloud) createTags(resourceID string, tags map[string]string) error { +func (c *Cloud) createTags(resourceID string, tags map[string]string) error { if tags == nil || len(tags) == 0 { return nil } @@ -2010,7 +2025,7 @@ func (s *AWSCloud) createTags(resourceID string, tags map[string]string) error { maxAttempts := 60 for { - _, err := s.ec2.CreateTags(request) + _, err := c.ec2.CreateTags(request) if err == nil { return nil } @@ -2040,7 +2055,7 @@ func findTag(tags []*ec2.Tag, key string) (string, bool) { // Finds the subnets associated with the cluster, by matching tags. // For maximal backwards compatibility, if no subnets are tagged, it will fall-back to the current subnet. // However, in future this will likely be treated as an error. -func (c *AWSCloud) findSubnets() ([]*ec2.Subnet, error) { +func (c *Cloud) findSubnets() ([]*ec2.Subnet, error) { request := &ec2.DescribeSubnetsInput{} vpcIDFilter := newEc2Filter("vpc-id", c.vpcID) filters := []*ec2.Filter{vpcIDFilter} @@ -2074,17 +2089,17 @@ func (c *AWSCloud) findSubnets() ([]*ec2.Subnet, error) { // Finds the subnets to use for an ELB we are creating. // Normal (Internet-facing) ELBs must use public subnets, so we skip private subnets. // Internal ELBs can use public or private subnets, but if we have a private subnet we should prefer that. -func (s *AWSCloud) findELBSubnets(internalELB bool) ([]string, error) { - vpcIDFilter := newEc2Filter("vpc-id", s.vpcID) +func (c *Cloud) findELBSubnets(internalELB bool) ([]string, error) { + vpcIDFilter := newEc2Filter("vpc-id", c.vpcID) - subnets, err := s.findSubnets() + subnets, err := c.findSubnets() if err != nil { return nil, err } rRequest := &ec2.DescribeRouteTablesInput{} rRequest.Filters = []*ec2.Filter{vpcIDFilter} - rt, err := s.ec2.DescribeRouteTables(rRequest) + rt, err := c.ec2.DescribeRouteTables(rRequest) if err != nil { return nil, fmt.Errorf("error describe route table: %v", err) } @@ -2249,10 +2264,10 @@ func buildListener(port api.ServicePort, annotations map[string]string, sslPorts } // EnsureLoadBalancer implements LoadBalancer.EnsureLoadBalancer -func (s *AWSCloud) EnsureLoadBalancer(apiService *api.Service, hosts []string) (*api.LoadBalancerStatus, error) { +func (c *Cloud) EnsureLoadBalancer(apiService *api.Service, hosts []string) (*api.LoadBalancerStatus, error) { annotations := apiService.Annotations glog.V(2).Infof("EnsureLoadBalancer(%v, %v, %v, %v, %v, %v, %v)", - apiService.Namespace, apiService.Name, s.region, apiService.Spec.LoadBalancerIP, apiService.Spec.Ports, hosts, annotations) + apiService.Namespace, apiService.Name, c.region, apiService.Spec.LoadBalancerIP, apiService.Spec.Ports, hosts, annotations) if apiService.Spec.SessionAffinity != api.ServiceAffinityNone { // ELB supports sticky sessions, but only when configured for HTTP/HTTPS @@ -2286,7 +2301,7 @@ func (s *AWSCloud) EnsureLoadBalancer(apiService *api.Service, hosts []string) ( } hostSet := sets.NewString(hosts...) - instances, err := s.getInstancesByNodeNamesCached(hostSet) + instances, err := c.getInstancesByNodeNamesCached(hostSet) if err != nil { return nil, err } @@ -2321,7 +2336,7 @@ func (s *AWSCloud) EnsureLoadBalancer(apiService *api.Service, hosts []string) ( } // Find the subnets that the ELB will live in - subnetIDs, err := s.findELBSubnets(internalELB) + subnetIDs, err := c.findELBSubnets(internalELB) if err != nil { glog.Error("Error listing subnets in VPC: ", err) return nil, err @@ -2340,7 +2355,7 @@ func (s *AWSCloud) EnsureLoadBalancer(apiService *api.Service, hosts []string) ( { sgName := "k8s-elb-" + loadBalancerName sgDescription := fmt.Sprintf("Security group for Kubernetes ELB %s (%v)", loadBalancerName, serviceName) - securityGroupID, err = s.ensureSecurityGroup(sgName, sgDescription) + securityGroupID, err = c.ensureSecurityGroup(sgName, sgDescription) if err != nil { glog.Error("Error creating load balancer security group: ", err) return nil, err @@ -2377,7 +2392,7 @@ func (s *AWSCloud) EnsureLoadBalancer(apiService *api.Service, hosts []string) ( permissions.Insert(permission) } - _, err = s.setSecurityGroupIngress(securityGroupID, permissions) + _, err = c.setSecurityGroupIngress(securityGroupID, permissions) if err != nil { return nil, err } @@ -2385,7 +2400,7 @@ func (s *AWSCloud) EnsureLoadBalancer(apiService *api.Service, hosts []string) ( securityGroupIDs := []string{securityGroupID} // Build the load balancer itself - loadBalancer, err := s.ensureLoadBalancer( + loadBalancer, err := c.ensureLoadBalancer( serviceName, loadBalancerName, listeners, @@ -2398,18 +2413,18 @@ func (s *AWSCloud) EnsureLoadBalancer(apiService *api.Service, hosts []string) ( return nil, err } - err = s.ensureLoadBalancerHealthCheck(loadBalancer, listeners) + err = c.ensureLoadBalancerHealthCheck(loadBalancer, listeners) if err != nil { return nil, err } - err = s.updateInstanceSecurityGroupsForLoadBalancer(loadBalancer, instances) + err = c.updateInstanceSecurityGroupsForLoadBalancer(loadBalancer, instances) if err != nil { glog.Warningf("Error opening ingress rules for the load balancer to the instances: %v", err) return nil, err } - err = s.ensureLoadBalancerInstances(orEmpty(loadBalancer.LoadBalancerName), loadBalancer.Instances, instances) + err = c.ensureLoadBalancerInstances(orEmpty(loadBalancer.LoadBalancerName), loadBalancer.Instances, instances) if err != nil { glog.Warningf("Error registering instances with the load balancer: %v", err) return nil, err @@ -2424,9 +2439,9 @@ func (s *AWSCloud) EnsureLoadBalancer(apiService *api.Service, hosts []string) ( } // GetLoadBalancer is an implementation of LoadBalancer.GetLoadBalancer -func (s *AWSCloud) GetLoadBalancer(service *api.Service) (*api.LoadBalancerStatus, bool, error) { +func (c *Cloud) GetLoadBalancer(service *api.Service) (*api.LoadBalancerStatus, bool, error) { loadBalancerName := cloudprovider.GetLoadBalancerName(service) - lb, err := s.describeLoadBalancer(loadBalancerName) + lb, err := c.describeLoadBalancer(loadBalancerName) if err != nil { return nil, false, err } @@ -2496,10 +2511,10 @@ func findSecurityGroupForInstance(instance *ec2.Instance, taggedSecurityGroups m } // Return all the security groups that are tagged as being part of our cluster -func (s *AWSCloud) getTaggedSecurityGroups() (map[string]*ec2.SecurityGroup, error) { +func (c *Cloud) getTaggedSecurityGroups() (map[string]*ec2.SecurityGroup, error) { request := &ec2.DescribeSecurityGroupsInput{} - request.Filters = s.addFilters(nil) - groups, err := s.ec2.DescribeSecurityGroups(request) + request.Filters = c.addFilters(nil) + groups, err := c.ec2.DescribeSecurityGroups(request) if err != nil { return nil, fmt.Errorf("error querying security groups: %v", err) } @@ -2518,38 +2533,38 @@ func (s *AWSCloud) getTaggedSecurityGroups() (map[string]*ec2.SecurityGroup, err // Open security group ingress rules on the instances so that the load balancer can talk to them // Will also remove any security groups ingress rules for the load balancer that are _not_ needed for allInstances -func (s *AWSCloud) updateInstanceSecurityGroupsForLoadBalancer(lb *elb.LoadBalancerDescription, allInstances []*ec2.Instance) error { - if s.cfg.Global.DisableSecurityGroupIngress { +func (c *Cloud) updateInstanceSecurityGroupsForLoadBalancer(lb *elb.LoadBalancerDescription, allInstances []*ec2.Instance) error { + if c.cfg.Global.DisableSecurityGroupIngress { return nil } // Determine the load balancer security group id - loadBalancerSecurityGroupId := "" + loadBalancerSecurityGroupID := "" for _, securityGroup := range lb.SecurityGroups { if isNilOrEmpty(securityGroup) { continue } - if loadBalancerSecurityGroupId != "" { + if loadBalancerSecurityGroupID != "" { // We create LBs with one SG glog.Warningf("Multiple security groups for load balancer: %q", orEmpty(lb.LoadBalancerName)) } - loadBalancerSecurityGroupId = *securityGroup + loadBalancerSecurityGroupID = *securityGroup } - if loadBalancerSecurityGroupId == "" { + if loadBalancerSecurityGroupID == "" { return fmt.Errorf("Could not determine security group for load balancer: %s", orEmpty(lb.LoadBalancerName)) } // Get the actual list of groups that allow ingress from the load-balancer describeRequest := &ec2.DescribeSecurityGroupsInput{} filters := []*ec2.Filter{} - filters = append(filters, newEc2Filter("ip-permission.group-id", loadBalancerSecurityGroupId)) - describeRequest.Filters = s.addFilters(filters) - actualGroups, err := s.ec2.DescribeSecurityGroups(describeRequest) + filters = append(filters, newEc2Filter("ip-permission.group-id", loadBalancerSecurityGroupID)) + describeRequest.Filters = c.addFilters(filters) + actualGroups, err := c.ec2.DescribeSecurityGroups(describeRequest) if err != nil { return fmt.Errorf("error querying security groups for ELB: %v", err) } - taggedSecurityGroups, err := s.getTaggedSecurityGroups() + taggedSecurityGroups, err := c.getTaggedSecurityGroups() if err != nil { return fmt.Errorf("error querying for tagged security groups: %v", err) } @@ -2600,38 +2615,38 @@ func (s *AWSCloud) updateInstanceSecurityGroupsForLoadBalancer(lb *elb.LoadBalan } } - for instanceSecurityGroupId, add := range instanceSecurityGroupIds { + for instanceSecurityGroupID, add := range instanceSecurityGroupIds { if add { - glog.V(2).Infof("Adding rule for traffic from the load balancer (%s) to instances (%s)", loadBalancerSecurityGroupId, instanceSecurityGroupId) + glog.V(2).Infof("Adding rule for traffic from the load balancer (%s) to instances (%s)", loadBalancerSecurityGroupID, instanceSecurityGroupID) } else { - glog.V(2).Infof("Removing rule for traffic from the load balancer (%s) to instance (%s)", loadBalancerSecurityGroupId, instanceSecurityGroupId) + glog.V(2).Infof("Removing rule for traffic from the load balancer (%s) to instance (%s)", loadBalancerSecurityGroupID, instanceSecurityGroupID) } - sourceGroupId := &ec2.UserIdGroupPair{} - sourceGroupId.GroupId = &loadBalancerSecurityGroupId + sourceGroupID := &ec2.UserIdGroupPair{} + sourceGroupID.GroupId = &loadBalancerSecurityGroupID allProtocols := "-1" permission := &ec2.IpPermission{} permission.IpProtocol = &allProtocols - permission.UserIdGroupPairs = []*ec2.UserIdGroupPair{sourceGroupId} + permission.UserIdGroupPairs = []*ec2.UserIdGroupPair{sourceGroupID} permissions := []*ec2.IpPermission{permission} if add { - changed, err := s.addSecurityGroupIngress(instanceSecurityGroupId, permissions) + changed, err := c.addSecurityGroupIngress(instanceSecurityGroupID, permissions) if err != nil { return err } if !changed { - glog.Warning("Allowing ingress was not needed; concurrent change? groupId=", instanceSecurityGroupId) + glog.Warning("Allowing ingress was not needed; concurrent change? groupId=", instanceSecurityGroupID) } } else { - changed, err := s.removeSecurityGroupIngress(instanceSecurityGroupId, permissions) + changed, err := c.removeSecurityGroupIngress(instanceSecurityGroupID, permissions) if err != nil { return err } if !changed { - glog.Warning("Revoking ingress was not needed; concurrent change? groupId=", instanceSecurityGroupId) + glog.Warning("Revoking ingress was not needed; concurrent change? groupId=", instanceSecurityGroupID) } } } @@ -2640,9 +2655,9 @@ func (s *AWSCloud) updateInstanceSecurityGroupsForLoadBalancer(lb *elb.LoadBalan } // EnsureLoadBalancerDeleted implements LoadBalancer.EnsureLoadBalancerDeleted. -func (s *AWSCloud) EnsureLoadBalancerDeleted(service *api.Service) error { +func (c *Cloud) EnsureLoadBalancerDeleted(service *api.Service) error { loadBalancerName := cloudprovider.GetLoadBalancerName(service) - lb, err := s.describeLoadBalancer(loadBalancerName) + lb, err := c.describeLoadBalancer(loadBalancerName) if err != nil { return err } @@ -2654,7 +2669,7 @@ func (s *AWSCloud) EnsureLoadBalancerDeleted(service *api.Service) error { { // De-authorize the load balancer security group from the instances security group - err = s.updateInstanceSecurityGroupsForLoadBalancer(lb, nil) + err = c.updateInstanceSecurityGroupsForLoadBalancer(lb, nil) if err != nil { glog.Error("Error deregistering load balancer from instance security groups: ", err) return err @@ -2666,7 +2681,7 @@ func (s *AWSCloud) EnsureLoadBalancerDeleted(service *api.Service) error { request := &elb.DeleteLoadBalancerInput{} request.LoadBalancerName = lb.LoadBalancerName - _, err = s.elb.DeleteLoadBalancer(request) + _, err = c.elb.DeleteLoadBalancer(request) if err != nil { // TODO: Check if error was because load balancer was concurrently deleted glog.Error("Error deleting load balancer: ", err) @@ -2695,7 +2710,7 @@ func (s *AWSCloud) EnsureLoadBalancerDeleted(service *api.Service) error { for securityGroupID := range securityGroupIDs { request := &ec2.DeleteSecurityGroupInput{} request.GroupId = &securityGroupID - _, err := s.ec2.DeleteSecurityGroup(request) + _, err := c.ec2.DeleteSecurityGroup(request) if err == nil { delete(securityGroupIDs, securityGroupID) } else { @@ -2736,15 +2751,15 @@ func (s *AWSCloud) EnsureLoadBalancerDeleted(service *api.Service) error { } // UpdateLoadBalancer implements LoadBalancer.UpdateLoadBalancer -func (s *AWSCloud) UpdateLoadBalancer(service *api.Service, hosts []string) error { +func (c *Cloud) UpdateLoadBalancer(service *api.Service, hosts []string) error { hostSet := sets.NewString(hosts...) - instances, err := s.getInstancesByNodeNamesCached(hostSet) + instances, err := c.getInstancesByNodeNamesCached(hostSet) if err != nil { return err } loadBalancerName := cloudprovider.GetLoadBalancerName(service) - lb, err := s.describeLoadBalancer(loadBalancerName) + lb, err := c.describeLoadBalancer(loadBalancerName) if err != nil { return err } @@ -2753,12 +2768,12 @@ func (s *AWSCloud) UpdateLoadBalancer(service *api.Service, hosts []string) erro return fmt.Errorf("Load balancer not found") } - err = s.ensureLoadBalancerInstances(orEmpty(lb.LoadBalancerName), lb.Instances, instances) + err = c.ensureLoadBalancerInstances(orEmpty(lb.LoadBalancerName), lb.Instances, instances) if err != nil { return nil } - err = s.updateInstanceSecurityGroupsForLoadBalancer(lb, instances) + err = c.updateInstanceSecurityGroupsForLoadBalancer(lb, instances) if err != nil { return err } @@ -2767,8 +2782,8 @@ func (s *AWSCloud) UpdateLoadBalancer(service *api.Service, hosts []string) erro } // Returns the instance with the specified ID -func (a *AWSCloud) getInstanceByID(instanceID string) (*ec2.Instance, error) { - instances, err := a.getInstancesByIDs([]*string{&instanceID}) +func (c *Cloud) getInstanceByID(instanceID string) (*ec2.Instance, error) { + instances, err := c.getInstancesByIDs([]*string{&instanceID}) if err != nil { return nil, err } @@ -2783,7 +2798,7 @@ func (a *AWSCloud) getInstanceByID(instanceID string) (*ec2.Instance, error) { return instances[instanceID], nil } -func (a *AWSCloud) getInstancesByIDs(instanceIDs []*string) (map[string]*ec2.Instance, error) { +func (c *Cloud) getInstancesByIDs(instanceIDs []*string) (map[string]*ec2.Instance, error) { instancesByID := make(map[string]*ec2.Instance) if len(instanceIDs) == 0 { return instancesByID, nil @@ -2793,7 +2808,7 @@ func (a *AWSCloud) getInstancesByIDs(instanceIDs []*string) (map[string]*ec2.Ins InstanceIds: instanceIDs, } - instances, err := a.ec2.DescribeInstances(request) + instances, err := c.ec2.DescribeInstances(request) if err != nil { return nil, err } @@ -2813,15 +2828,15 @@ func (a *AWSCloud) getInstancesByIDs(instanceIDs []*string) (map[string]*ec2.Ins // Fetches and caches instances by node names; returns an error if any cannot be found. // This is implemented with a multi value filter on the node names, fetching the desired instances with a single query. // TODO(therc): make all the caching more rational during the 1.4 timeframe -func (a *AWSCloud) getInstancesByNodeNamesCached(nodeNames sets.String) ([]*ec2.Instance, error) { - a.mutex.Lock() - defer a.mutex.Unlock() - if nodeNames.Equal(a.lastNodeNames) { - if len(a.lastInstancesByNodeNames) > 0 { +func (c *Cloud) getInstancesByNodeNamesCached(nodeNames sets.String) ([]*ec2.Instance, error) { + c.mutex.Lock() + defer c.mutex.Unlock() + if nodeNames.Equal(c.lastNodeNames) { + if len(c.lastInstancesByNodeNames) > 0 { // We assume that if the list of nodes is the same, the underlying // instances have not changed. Later we might guard this with TTLs. glog.V(2).Infof("Returning cached instances for %v", nodeNames) - return a.lastInstancesByNodeNames, nil + return c.lastInstancesByNodeNames, nil } } names := aws.StringSlice(nodeNames.List()) @@ -2836,12 +2851,12 @@ func (a *AWSCloud) getInstancesByNodeNamesCached(nodeNames sets.String) ([]*ec2. newEc2Filter("instance-state-name", "running"), } - filters = a.addFilters(filters) + filters = c.addFilters(filters) request := &ec2.DescribeInstancesInput{ Filters: filters, } - instances, err := a.ec2.DescribeInstances(request) + instances, err := c.ec2.DescribeInstances(request) if err != nil { glog.V(2).Infof("Failed to describe instances %v", nodeNames) return nil, err @@ -2853,24 +2868,24 @@ func (a *AWSCloud) getInstancesByNodeNamesCached(nodeNames sets.String) ([]*ec2. } glog.V(2).Infof("Caching instances for %v", nodeNames) - a.lastNodeNames = nodeNames - a.lastInstancesByNodeNames = instances + c.lastNodeNames = nodeNames + c.lastInstancesByNodeNames = instances return instances, nil } // Returns the instance with the specified node name // Returns nil if it does not exist -func (a *AWSCloud) findInstanceByNodeName(nodeName string) (*ec2.Instance, error) { +func (c *Cloud) findInstanceByNodeName(nodeName string) (*ec2.Instance, error) { filters := []*ec2.Filter{ newEc2Filter("private-dns-name", nodeName), newEc2Filter("instance-state-name", "running"), } - filters = a.addFilters(filters) + filters = c.addFilters(filters) request := &ec2.DescribeInstancesInput{ Filters: filters, } - instances, err := a.ec2.DescribeInstances(request) + instances, err := c.ec2.DescribeInstances(request) if err != nil { return nil, err } @@ -2885,8 +2900,8 @@ func (a *AWSCloud) findInstanceByNodeName(nodeName string) (*ec2.Instance, error // Returns the instance with the specified node name // Like findInstanceByNodeName, but returns error if node not found -func (a *AWSCloud) getInstanceByNodeName(nodeName string) (*ec2.Instance, error) { - instance, err := a.findInstanceByNodeName(nodeName) +func (c *Cloud) getInstanceByNodeName(nodeName string) (*ec2.Instance, error) { + instance, err := c.findInstanceByNodeName(nodeName) if err == nil && instance == nil { return nil, fmt.Errorf("no instances found for name: %s", nodeName) } @@ -2895,8 +2910,8 @@ func (a *AWSCloud) getInstanceByNodeName(nodeName string) (*ec2.Instance, error) // Add additional filters, to match on our tags // This lets us run multiple k8s clusters in a single EC2 AZ -func (s *AWSCloud) addFilters(filters []*ec2.Filter) []*ec2.Filter { - for k, v := range s.filterTags { +func (c *Cloud) addFilters(filters []*ec2.Filter) []*ec2.Filter { + for k, v := range c.filterTags { filters = append(filters, newEc2Filter("tag:"+k, v)) } if len(filters) == 0 { @@ -2909,6 +2924,6 @@ func (s *AWSCloud) addFilters(filters []*ec2.Filter) []*ec2.Filter { } // Returns the cluster name or an empty string -func (s *AWSCloud) getClusterName() string { - return s.filterTags[TagNameKubernetesCluster] +func (c *Cloud) getClusterName() string { + return c.filterTags[TagNameKubernetesCluster] } diff --git a/pkg/cloudprovider/providers/aws/aws_instancegroups.go b/pkg/cloudprovider/providers/aws/aws_instancegroups.go index 563c90de14..5edbb3da99 100644 --- a/pkg/cloudprovider/providers/aws/aws_instancegroups.go +++ b/pkg/cloudprovider/providers/aws/aws_instancegroups.go @@ -25,7 +25,7 @@ import ( ) // AWSCloud implements InstanceGroups -var _ InstanceGroups = &AWSCloud{} +var _ InstanceGroups = &Cloud{} // ResizeInstanceGroup sets the size of the specificed instancegroup Exported // so it can be used by the e2e tests, which don't want to instantiate a full @@ -44,8 +44,8 @@ func ResizeInstanceGroup(asg ASG, instanceGroupName string, size int) error { // Implement InstanceGroups.ResizeInstanceGroup // Set the size to the fixed size -func (a *AWSCloud) ResizeInstanceGroup(instanceGroupName string, size int) error { - return ResizeInstanceGroup(a.asg, instanceGroupName, size) +func (c *Cloud) ResizeInstanceGroup(instanceGroupName string, size int) error { + return ResizeInstanceGroup(c.asg, instanceGroupName, size) } // DescribeInstanceGroup gets info about the specified instancegroup @@ -72,8 +72,8 @@ func DescribeInstanceGroup(asg ASG, instanceGroupName string) (InstanceGroupInfo // Implement InstanceGroups.DescribeInstanceGroup // Queries the cloud provider for information about the specified instance group -func (a *AWSCloud) DescribeInstanceGroup(instanceGroupName string) (InstanceGroupInfo, error) { - return DescribeInstanceGroup(a.asg, instanceGroupName) +func (c *Cloud) DescribeInstanceGroup(instanceGroupName string) (InstanceGroupInfo, error) { + return DescribeInstanceGroup(c.asg, instanceGroupName) } // awsInstanceGroup implements InstanceGroupInfo diff --git a/pkg/cloudprovider/providers/aws/aws_loadbalancer.go b/pkg/cloudprovider/providers/aws/aws_loadbalancer.go index 727675d8f0..85b2f2d50c 100644 --- a/pkg/cloudprovider/providers/aws/aws_loadbalancer.go +++ b/pkg/cloudprovider/providers/aws/aws_loadbalancer.go @@ -30,8 +30,8 @@ import ( const ProxyProtocolPolicyName = "k8s-proxyprotocol-enabled" -func (s *AWSCloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadBalancerName string, listeners []*elb.Listener, subnetIDs []string, securityGroupIDs []string, internalELB, proxyProtocol bool) (*elb.LoadBalancerDescription, error) { - loadBalancer, err := s.describeLoadBalancer(loadBalancerName) +func (c *Cloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadBalancerName string, listeners []*elb.Listener, subnetIDs []string, securityGroupIDs []string, internalELB, proxyProtocol bool) (*elb.LoadBalancerDescription, error) { + loadBalancer, err := c.describeLoadBalancer(loadBalancerName) if err != nil { return nil, err } @@ -55,25 +55,25 @@ func (s *AWSCloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadB createRequest.SecurityGroups = stringPointerArray(securityGroupIDs) createRequest.Tags = []*elb.Tag{ - {Key: aws.String(TagNameKubernetesCluster), Value: aws.String(s.getClusterName())}, + {Key: aws.String(TagNameKubernetesCluster), Value: aws.String(c.getClusterName())}, {Key: aws.String(TagNameKubernetesService), Value: aws.String(namespacedName.String())}, } glog.Infof("Creating load balancer for %v with name: ", namespacedName, loadBalancerName) - _, err := s.elb.CreateLoadBalancer(createRequest) + _, err := c.elb.CreateLoadBalancer(createRequest) if err != nil { return nil, err } if proxyProtocol { - err = s.createProxyProtocolPolicy(loadBalancerName) + err = c.createProxyProtocolPolicy(loadBalancerName) if err != nil { return nil, err } for _, listener := range listeners { glog.V(2).Infof("Adjusting AWS loadbalancer proxy protocol on node port %d. Setting to true", *listener.InstancePort) - err := s.setBackendPolicies(loadBalancerName, *listener.InstancePort, []*string{aws.String(ProxyProtocolPolicyName)}) + err := c.setBackendPolicies(loadBalancerName, *listener.InstancePort, []*string{aws.String(ProxyProtocolPolicyName)}) if err != nil { return nil, err } @@ -97,7 +97,7 @@ func (s *AWSCloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadB request.LoadBalancerName = aws.String(loadBalancerName) request.Subnets = stringSetToPointers(removals) glog.V(2).Info("Detaching load balancer from removed subnets") - _, err := s.elb.DetachLoadBalancerFromSubnets(request) + _, err := c.elb.DetachLoadBalancerFromSubnets(request) if err != nil { return nil, fmt.Errorf("error detaching AWS loadbalancer from subnets: %v", err) } @@ -109,7 +109,7 @@ func (s *AWSCloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadB request.LoadBalancerName = aws.String(loadBalancerName) request.Subnets = stringSetToPointers(additions) glog.V(2).Info("Attaching load balancer to added subnets") - _, err := s.elb.AttachLoadBalancerToSubnets(request) + _, err := c.elb.AttachLoadBalancerToSubnets(request) if err != nil { return nil, fmt.Errorf("error attaching AWS loadbalancer to subnets: %v", err) } @@ -128,7 +128,7 @@ func (s *AWSCloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadB request.LoadBalancerName = aws.String(loadBalancerName) request.SecurityGroups = stringPointerArray(securityGroupIDs) glog.V(2).Info("Applying updated security groups to load balancer") - _, err := s.elb.ApplySecurityGroupsToLoadBalancer(request) + _, err := c.elb.ApplySecurityGroupsToLoadBalancer(request) if err != nil { return nil, fmt.Errorf("error applying AWS loadbalancer security groups: %v", err) } @@ -188,7 +188,7 @@ func (s *AWSCloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadB request.LoadBalancerName = aws.String(loadBalancerName) request.LoadBalancerPorts = removals glog.V(2).Info("Deleting removed load balancer listeners") - _, err := s.elb.DeleteLoadBalancerListeners(request) + _, err := c.elb.DeleteLoadBalancerListeners(request) if err != nil { return nil, fmt.Errorf("error deleting AWS loadbalancer listeners: %v", err) } @@ -200,7 +200,7 @@ func (s *AWSCloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadB request.LoadBalancerName = aws.String(loadBalancerName) request.Listeners = additions glog.V(2).Info("Creating added load balancer listeners") - _, err := s.elb.CreateLoadBalancerListeners(request) + _, err := c.elb.CreateLoadBalancerListeners(request) if err != nil { return nil, fmt.Errorf("error creating AWS loadbalancer listeners: %v", err) } @@ -219,7 +219,7 @@ func (s *AWSCloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadB // back if a policy of the same name already exists. However, the aws-sdk does not // seem to return an error to us in these cases. Therefore this will issue an API // request every time. - err := s.createProxyProtocolPolicy(loadBalancerName) + err := c.createProxyProtocolPolicy(loadBalancerName) if err != nil { return nil, err } @@ -252,7 +252,7 @@ func (s *AWSCloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadB if setPolicy { glog.V(2).Infof("Adjusting AWS loadbalancer proxy protocol on node port %d. Setting to %t", instancePort, proxyProtocol) - err := s.setBackendPolicies(loadBalancerName, instancePort, proxyPolicies) + err := c.setBackendPolicies(loadBalancerName, instancePort, proxyPolicies) if err != nil { return nil, err } @@ -266,7 +266,7 @@ func (s *AWSCloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadB for instancePort, found := range foundBackends { if !found { glog.V(2).Infof("Adjusting AWS loadbalancer proxy protocol on node port %d. Setting to false", instancePort) - err := s.setBackendPolicies(loadBalancerName, instancePort, []*string{}) + err := c.setBackendPolicies(loadBalancerName, instancePort, []*string{}) if err != nil { return nil, err } @@ -277,7 +277,7 @@ func (s *AWSCloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadB } if dirty { - loadBalancer, err = s.describeLoadBalancer(loadBalancerName) + loadBalancer, err = c.describeLoadBalancer(loadBalancerName) if err != nil { glog.Warning("Unable to retrieve load balancer after creation/update") return nil, err @@ -288,7 +288,7 @@ func (s *AWSCloud) ensureLoadBalancer(namespacedName types.NamespacedName, loadB } // Makes sure that the health check for an ELB matches the configured listeners -func (s *AWSCloud) ensureLoadBalancerHealthCheck(loadBalancer *elb.LoadBalancerDescription, listeners []*elb.Listener) error { +func (c *Cloud) ensureLoadBalancerHealthCheck(loadBalancer *elb.LoadBalancerDescription, listeners []*elb.Listener) error { actual := loadBalancer.HealthCheck // Default AWS settings @@ -332,7 +332,7 @@ func (s *AWSCloud) ensureLoadBalancerHealthCheck(loadBalancer *elb.LoadBalancerD request.HealthCheck = healthCheck request.LoadBalancerName = loadBalancer.LoadBalancerName - _, err := s.elb.ConfigureHealthCheck(request) + _, err := c.elb.ConfigureHealthCheck(request) if err != nil { return fmt.Errorf("error configuring load-balancer health-check: %v", err) } @@ -341,7 +341,7 @@ func (s *AWSCloud) ensureLoadBalancerHealthCheck(loadBalancer *elb.LoadBalancerD } // Makes sure that exactly the specified hosts are registered as instances with the load balancer -func (s *AWSCloud) ensureLoadBalancerInstances(loadBalancerName string, lbInstances []*elb.Instance, instances []*ec2.Instance) error { +func (c *Cloud) ensureLoadBalancerInstances(loadBalancerName string, lbInstances []*elb.Instance, instances []*ec2.Instance) error { expected := sets.NewString() for _, instance := range instances { expected.Insert(orEmpty(instance.InstanceId)) @@ -373,7 +373,7 @@ func (s *AWSCloud) ensureLoadBalancerInstances(loadBalancerName string, lbInstan registerRequest := &elb.RegisterInstancesWithLoadBalancerInput{} registerRequest.Instances = addInstances registerRequest.LoadBalancerName = aws.String(loadBalancerName) - _, err := s.elb.RegisterInstancesWithLoadBalancer(registerRequest) + _, err := c.elb.RegisterInstancesWithLoadBalancer(registerRequest) if err != nil { return err } @@ -384,7 +384,7 @@ func (s *AWSCloud) ensureLoadBalancerInstances(loadBalancerName string, lbInstan deregisterRequest := &elb.DeregisterInstancesFromLoadBalancerInput{} deregisterRequest.Instances = removeInstances deregisterRequest.LoadBalancerName = aws.String(loadBalancerName) - _, err := s.elb.DeregisterInstancesFromLoadBalancer(deregisterRequest) + _, err := c.elb.DeregisterInstancesFromLoadBalancer(deregisterRequest) if err != nil { return err } @@ -394,7 +394,7 @@ func (s *AWSCloud) ensureLoadBalancerInstances(loadBalancerName string, lbInstan return nil } -func (s *AWSCloud) createProxyProtocolPolicy(loadBalancerName string) error { +func (c *Cloud) createProxyProtocolPolicy(loadBalancerName string) error { request := &elb.CreateLoadBalancerPolicyInput{ LoadBalancerName: aws.String(loadBalancerName), PolicyName: aws.String(ProxyProtocolPolicyName), @@ -407,7 +407,7 @@ func (s *AWSCloud) createProxyProtocolPolicy(loadBalancerName string) error { }, } glog.V(2).Info("Creating proxy protocol policy on load balancer") - _, err := s.elb.CreateLoadBalancerPolicy(request) + _, err := c.elb.CreateLoadBalancerPolicy(request) if err != nil { return fmt.Errorf("error creating proxy protocol policy on load balancer: %v", err) } @@ -415,7 +415,7 @@ func (s *AWSCloud) createProxyProtocolPolicy(loadBalancerName string) error { return nil } -func (s *AWSCloud) setBackendPolicies(loadBalancerName string, instancePort int64, policies []*string) error { +func (c *Cloud) setBackendPolicies(loadBalancerName string, instancePort int64, policies []*string) error { request := &elb.SetLoadBalancerPoliciesForBackendServerInput{ InstancePort: aws.Int64(instancePort), LoadBalancerName: aws.String(loadBalancerName), @@ -426,7 +426,7 @@ func (s *AWSCloud) setBackendPolicies(loadBalancerName string, instancePort int6 } else { glog.V(2).Infof("Removing AWS loadbalancer backend policies on node port %d", instancePort) } - _, err := s.elb.SetLoadBalancerPoliciesForBackendServer(request) + _, err := c.elb.SetLoadBalancerPoliciesForBackendServer(request) if err != nil { return fmt.Errorf("error adjusting AWS loadbalancer backend policies: %v", err) } diff --git a/pkg/cloudprovider/providers/aws/aws_routes.go b/pkg/cloudprovider/providers/aws/aws_routes.go index a469e5f70b..63a9e2e5ae 100644 --- a/pkg/cloudprovider/providers/aws/aws_routes.go +++ b/pkg/cloudprovider/providers/aws/aws_routes.go @@ -25,14 +25,14 @@ import ( "k8s.io/kubernetes/pkg/cloudprovider" ) -func (s *AWSCloud) findRouteTable(clusterName string) (*ec2.RouteTable, error) { +func (c *Cloud) findRouteTable(clusterName string) (*ec2.RouteTable, error) { // This should be unnecessary (we already filter on TagNameKubernetesCluster, // and something is broken if cluster name doesn't match, but anyway... // TODO: All clouds should be cluster-aware by default filters := []*ec2.Filter{newEc2Filter("tag:"+TagNameKubernetesCluster, clusterName)} - request := &ec2.DescribeRouteTablesInput{Filters: s.addFilters(filters)} + request := &ec2.DescribeRouteTablesInput{Filters: c.addFilters(filters)} - tables, err := s.ec2.DescribeRouteTables(request) + tables, err := c.ec2.DescribeRouteTables(request) if err != nil { return nil, err } @@ -49,8 +49,8 @@ func (s *AWSCloud) findRouteTable(clusterName string) (*ec2.RouteTable, error) { // ListRoutes implements Routes.ListRoutes // List all routes that match the filter -func (s *AWSCloud) ListRoutes(clusterName string) ([]*cloudprovider.Route, error) { - table, err := s.findRouteTable(clusterName) +func (c *Cloud) ListRoutes(clusterName string) ([]*cloudprovider.Route, error) { + table, err := c.findRouteTable(clusterName) if err != nil { return nil, err } @@ -68,7 +68,7 @@ func (s *AWSCloud) ListRoutes(clusterName string) ([]*cloudprovider.Route, error instanceIDs = append(instanceIDs, &instanceID) } - instances, err := s.getInstancesByIDs(instanceIDs) + instances, err := c.getInstancesByIDs(instanceIDs) if err != nil { return nil, err } @@ -95,12 +95,12 @@ func (s *AWSCloud) ListRoutes(clusterName string) ([]*cloudprovider.Route, error } // Sets the instance attribute "source-dest-check" to the specified value -func (s *AWSCloud) configureInstanceSourceDestCheck(instanceID string, sourceDestCheck bool) error { +func (c *Cloud) configureInstanceSourceDestCheck(instanceID string, sourceDestCheck bool) error { request := &ec2.ModifyInstanceAttributeInput{} request.InstanceId = aws.String(instanceID) request.SourceDestCheck = &ec2.AttributeBooleanValue{Value: aws.Bool(sourceDestCheck)} - _, err := s.ec2.ModifyInstanceAttribute(request) + _, err := c.ec2.ModifyInstanceAttribute(request) if err != nil { return fmt.Errorf("error configuring source-dest-check on instance %s: %v", instanceID, err) } @@ -109,20 +109,20 @@ func (s *AWSCloud) configureInstanceSourceDestCheck(instanceID string, sourceDes // CreateRoute implements Routes.CreateRoute // Create the described route -func (s *AWSCloud) CreateRoute(clusterName string, nameHint string, route *cloudprovider.Route) error { - instance, err := s.getInstanceByNodeName(route.TargetInstance) +func (c *Cloud) CreateRoute(clusterName string, nameHint string, route *cloudprovider.Route) error { + instance, err := c.getInstanceByNodeName(route.TargetInstance) if err != nil { return err } // In addition to configuring the route itself, we also need to configure the instance to accept that traffic // On AWS, this requires turning source-dest checks off - err = s.configureInstanceSourceDestCheck(orEmpty(instance.InstanceId), false) + err = c.configureInstanceSourceDestCheck(orEmpty(instance.InstanceId), false) if err != nil { return err } - table, err := s.findRouteTable(clusterName) + table, err := c.findRouteTable(clusterName) if err != nil { return err } @@ -147,7 +147,7 @@ func (s *AWSCloud) CreateRoute(clusterName string, nameHint string, route *cloud request.DestinationCidrBlock = deleteRoute.DestinationCidrBlock request.RouteTableId = table.RouteTableId - _, err = s.ec2.DeleteRoute(request) + _, err = c.ec2.DeleteRoute(request) if err != nil { return fmt.Errorf("error deleting blackholed AWS route (%s): %v", aws.StringValue(deleteRoute.DestinationCidrBlock), err) } @@ -159,7 +159,7 @@ func (s *AWSCloud) CreateRoute(clusterName string, nameHint string, route *cloud request.InstanceId = instance.InstanceId request.RouteTableId = table.RouteTableId - _, err = s.ec2.CreateRoute(request) + _, err = c.ec2.CreateRoute(request) if err != nil { return fmt.Errorf("error creating AWS route (%s): %v", route.DestinationCIDR, err) } @@ -169,8 +169,8 @@ func (s *AWSCloud) CreateRoute(clusterName string, nameHint string, route *cloud // DeleteRoute implements Routes.DeleteRoute // Delete the specified route -func (s *AWSCloud) DeleteRoute(clusterName string, route *cloudprovider.Route) error { - table, err := s.findRouteTable(clusterName) +func (c *Cloud) DeleteRoute(clusterName string, route *cloudprovider.Route) error { + table, err := c.findRouteTable(clusterName) if err != nil { return err } @@ -179,7 +179,7 @@ func (s *AWSCloud) DeleteRoute(clusterName string, route *cloudprovider.Route) e request.DestinationCidrBlock = aws.String(route.DestinationCIDR) request.RouteTableId = table.RouteTableId - _, err = s.ec2.DeleteRoute(request) + _, err = c.ec2.DeleteRoute(request) if err != nil { return fmt.Errorf("error deleting AWS route (%s): %v", route.DestinationCIDR, err) } diff --git a/pkg/cloudprovider/providers/aws/aws_test.go b/pkg/cloudprovider/providers/aws/aws_test.go index fcd7935c5c..5932b059ed 100644 --- a/pkg/cloudprovider/providers/aws/aws_test.go +++ b/pkg/cloudprovider/providers/aws/aws_test.go @@ -43,7 +43,7 @@ func TestReadAWSCloudConfig(t *testing.T) { name string reader io.Reader - aws AWSServices + aws Services expectError bool zone string @@ -198,7 +198,7 @@ func TestNewAWSCloud(t *testing.T) { name string reader io.Reader - awsServices AWSServices + awsServices Services expectError bool region string @@ -508,7 +508,7 @@ func (a *FakeASG) DescribeAutoScalingGroups(*autoscaling.DescribeAutoScalingGrou panic("Not implemented") } -func mockInstancesResp(selfInstance *ec2.Instance, instances []*ec2.Instance) (*AWSCloud, *FakeAWSServices) { +func mockInstancesResp(selfInstance *ec2.Instance, instances []*ec2.Instance) (*Cloud, *FakeAWSServices) { awsServices := NewFakeAWSServices() awsServices.instances = instances awsServices.selfInstance = selfInstance @@ -519,7 +519,7 @@ func mockInstancesResp(selfInstance *ec2.Instance, instances []*ec2.Instance) (* return awsCloud, awsServices } -func mockAvailabilityZone(availabilityZone string) *AWSCloud { +func mockAvailabilityZone(availabilityZone string) *Cloud { awsServices := NewFakeAWSServices().withAz(availabilityZone) awsCloud, err := newAWSCloud(nil, awsServices) if err != nil { diff --git a/pkg/volume/aws_ebs/aws_util.go b/pkg/volume/aws_ebs/aws_util.go index c3097f31c0..76ebe72adc 100644 --- a/pkg/volume/aws_ebs/aws_util.go +++ b/pkg/volume/aws_ebs/aws_util.go @@ -166,8 +166,8 @@ func pathExists(path string) (bool, error) { } // Return cloud provider -func getCloudProvider(cloudProvider cloudprovider.Interface) (*aws.AWSCloud, error) { - awsCloudProvider, ok := cloudProvider.(*aws.AWSCloud) +func getCloudProvider(cloudProvider cloudprovider.Interface) (*aws.Cloud, error) { + awsCloudProvider, ok := cloudProvider.(*aws.Cloud) if !ok || awsCloudProvider == nil { return nil, fmt.Errorf("Failed to get AWS Cloud Provider. GetCloudProvider returned %v instead", cloudProvider) } diff --git a/plugin/pkg/admission/persistentvolume/label/admission.go b/plugin/pkg/admission/persistentvolume/label/admission.go index 67648058ed..915ea63a5a 100644 --- a/plugin/pkg/admission/persistentvolume/label/admission.go +++ b/plugin/pkg/admission/persistentvolume/label/admission.go @@ -136,7 +136,7 @@ func (l *persistentVolumeLabel) getEBSVolumes() (aws.Volumes, error) { if err != nil || cloudProvider == nil { return nil, err } - awsCloudProvider, ok := cloudProvider.(*aws.AWSCloud) + awsCloudProvider, ok := cloudProvider.(*aws.Cloud) if !ok { // GetCloudProvider has gone very wrong return nil, fmt.Errorf("error retrieving AWS cloud provider") From 5c24f0313e6dc6634eaf9af11194af1a3b16e09d Mon Sep 17 00:00:00 2001 From: Brandon Philips <brandon@ifup.org> Date: Fri, 24 Jun 2016 14:20:45 -0700 Subject: [PATCH 186/339] examples/flexvolume: fix README link nginx.yaml wasn't actually linked, fix this. --- examples/flexvolume/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/flexvolume/README.md b/examples/flexvolume/README.md index bedd07ef1a..7b3b2fb702 100644 --- a/examples/flexvolume/README.md +++ b/examples/flexvolume/README.md @@ -111,7 +111,7 @@ In addition to the flags specified by the user in the Options field of the FlexV ### Example of Flexvolume -See nginx.yaml[nginx.yaml] for a quick example on how to use Flexvolume in a pod. +See [nginx.yaml](nginx.yaml) for a quick example on how to use Flexvolume in a pod. <!-- BEGIN MUNGE: GENERATED_ANALYTICS --> [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/flexvolume/README.md?pixel)]() From 886f5c7a8e3cda583afedb39102d7fd1ba01ed13 Mon Sep 17 00:00:00 2001 From: Daniel Smith <dbsmith@google.com> Date: Fri, 24 Jun 2016 14:23:52 -0700 Subject: [PATCH 187/339] disable flaky PD test --- test/e2e/pd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/pd.go b/test/e2e/pd.go index a0c3114633..16ca0fe9a9 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -133,7 +133,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { return }) - It("should schedule a pod w/ a readonly PD on two hosts, then remove both. [Slow]", func() { + It("[Flaky] should schedule a pod w/ a readonly PD on two hosts, then remove both. [Slow]", func() { framework.SkipUnlessProviderIs("gce", "gke") By("creating PD") From c3551ae6cdc3c2779a741fd4a7d3968a762e72e6 Mon Sep 17 00:00:00 2001 From: Buddha Prakash <buddhap@google.com> Date: Mon, 20 Jun 2016 18:28:42 -0700 Subject: [PATCH 188/339] Refactor qos package Signed-off-by: Buddha Prakash <buddhap@google.com> --- pkg/kubectl/describe.go | 4 +-- pkg/kubectl/sorted_resource_name_list.go | 4 +-- pkg/kubelet/eviction/eviction_manager.go | 4 +-- pkg/kubelet/eviction/helpers.go | 18 ++++++------ pkg/kubelet/eviction/helpers_test.go | 6 ++-- pkg/kubelet/qos/policy.go | 7 ++--- pkg/kubelet/qos/{util => }/qos.go | 12 ++------ pkg/kubelet/qos/{util => }/qos_test.go | 4 +-- pkg/kubelet/qos/types.go | 29 +++++++++++++++++++ pkg/quota/evaluator/core/pods.go | 4 +-- .../algorithm/predicates/predicates.go | 4 +-- test/e2e/kubectl.go | 2 +- 12 files changed, 60 insertions(+), 38 deletions(-) rename pkg/kubelet/qos/{util => }/qos.go (96%) rename pkg/kubelet/qos/{util => }/qos_test.go (99%) create mode 100644 pkg/kubelet/qos/types.go diff --git a/pkg/kubectl/describe.go b/pkg/kubectl/describe.go index 487f81b6c6..a29725c381 100644 --- a/pkg/kubectl/describe.go +++ b/pkg/kubectl/describe.go @@ -44,7 +44,7 @@ import ( adapter "k8s.io/kubernetes/pkg/client/unversioned/adapters/internalclientset" "k8s.io/kubernetes/pkg/fieldpath" "k8s.io/kubernetes/pkg/fields" - qosutil "k8s.io/kubernetes/pkg/kubelet/qos/util" + "k8s.io/kubernetes/pkg/kubelet/qos" "k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/types" deploymentutil "k8s.io/kubernetes/pkg/util/deployment" @@ -540,7 +540,7 @@ func describePod(pod *api.Pod, events *api.EventList) (string, error) { } } describeVolumes(pod.Spec.Volumes, out, "") - fmt.Fprintf(out, "QoS Tier:\t%s\n", qosutil.GetPodQos(pod)) + fmt.Fprintf(out, "QoS Class:\t%s\n", qos.GetPodQos(pod)) if events != nil { DescribeEvents(events, out) } diff --git a/pkg/kubectl/sorted_resource_name_list.go b/pkg/kubectl/sorted_resource_name_list.go index 98c67344a3..bf25b1ceba 100644 --- a/pkg/kubectl/sorted_resource_name_list.go +++ b/pkg/kubectl/sorted_resource_name_list.go @@ -20,7 +20,7 @@ import ( "sort" "k8s.io/kubernetes/pkg/api" - qosutil "k8s.io/kubernetes/pkg/kubelet/qos/util" + "k8s.io/kubernetes/pkg/kubelet/qos" ) type SortableResourceNames []api.ResourceName @@ -62,7 +62,7 @@ func (list SortableResourceQuotas) Less(i, j int) bool { } // SortedQoSResourceNames returns the sorted resource names of a QoS list. -func SortedQoSResourceNames(list qosutil.QoSList) []api.ResourceName { +func SortedQoSResourceNames(list qos.QoSList) []api.ResourceName { resources := make([]api.ResourceName, 0, len(list)) for res := range list { resources = append(resources, res) diff --git a/pkg/kubelet/eviction/eviction_manager.go b/pkg/kubelet/eviction/eviction_manager.go index a672ebb9b8..de85bb402b 100644 --- a/pkg/kubelet/eviction/eviction_manager.go +++ b/pkg/kubelet/eviction/eviction_manager.go @@ -25,7 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/kubelet/lifecycle" - qosutil "k8s.io/kubernetes/pkg/kubelet/qos/util" + "k8s.io/kubernetes/pkg/kubelet/qos" "k8s.io/kubernetes/pkg/kubelet/server/stats" "k8s.io/kubernetes/pkg/kubelet/util/format" "k8s.io/kubernetes/pkg/util" @@ -87,7 +87,7 @@ func (m *managerImpl) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAd if len(m.nodeConditions) == 0 { return lifecycle.PodAdmitResult{Admit: true} } - notBestEffort := qosutil.BestEffort != qosutil.GetPodQos(attrs.Pod) + notBestEffort := qos.BestEffort != qos.GetPodQos(attrs.Pod) if notBestEffort { return lifecycle.PodAdmitResult{Admit: true} } diff --git a/pkg/kubelet/eviction/helpers.go b/pkg/kubelet/eviction/helpers.go index d5b95ab197..0fd6a6552c 100644 --- a/pkg/kubelet/eviction/helpers.go +++ b/pkg/kubelet/eviction/helpers.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" statsapi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/stats" - qosutil "k8s.io/kubernetes/pkg/kubelet/qos/util" + "k8s.io/kubernetes/pkg/kubelet/qos" "k8s.io/kubernetes/pkg/kubelet/server/stats" "k8s.io/kubernetes/pkg/quota/evaluator/core" "k8s.io/kubernetes/pkg/util/sets" @@ -300,20 +300,20 @@ func (ms *multiSorter) Less(i, j int) bool { } // qos compares pods by QoS (BestEffort < Burstable < Guaranteed) -func qos(p1, p2 *api.Pod) int { - qosP1 := qosutil.GetPodQos(p1) - qosP2 := qosutil.GetPodQos(p2) +func qosComparator(p1, p2 *api.Pod) int { + qosP1 := qos.GetPodQos(p1) + qosP2 := qos.GetPodQos(p2) // its a tie if qosP1 == qosP2 { return 0 } // if p1 is best effort, we know p2 is burstable or guaranteed - if qosP1 == qosutil.BestEffort { + if qosP1 == qos.BestEffort { return -1 } // we know p1 and p2 are not besteffort, so if p1 is burstable, p2 must be guaranteed - if qosP1 == qosutil.Burstable { - if qosP2 == qosutil.Guaranteed { + if qosP1 == qos.Burstable { + if qosP2 == qos.Guaranteed { return -1 } return 1 @@ -397,12 +397,12 @@ func disk(stats statsFunc) cmpFunc { // rankMemoryPressure orders the input pods for eviction in response to memory pressure. func rankMemoryPressure(pods []*api.Pod, stats statsFunc) { - orderedBy(qos, memory(stats)).Sort(pods) + orderedBy(qosComparator, memory(stats)).Sort(pods) } // rankDiskPressure orders the input pods for eviction in response to disk pressure. func rankDiskPressure(pods []*api.Pod, stats statsFunc) { - orderedBy(qos, disk(stats)).Sort(pods) + orderedBy(qosComparator, disk(stats)).Sort(pods) } // byEvictionPriority implements sort.Interface for []api.ResourceName. diff --git a/pkg/kubelet/eviction/helpers_test.go b/pkg/kubelet/eviction/helpers_test.go index 6d412c9d1c..3063150641 100644 --- a/pkg/kubelet/eviction/helpers_test.go +++ b/pkg/kubelet/eviction/helpers_test.go @@ -166,7 +166,7 @@ func TestOrderedByQoS(t *testing.T) { }) pods := []*api.Pod{guaranteed, burstable, bestEffort} - orderedBy(qos).Sort(pods) + orderedBy(qosComparator).Sort(pods) expected := []*api.Pod{bestEffort, burstable, guaranteed} for i := range expected { @@ -218,7 +218,7 @@ func TestOrderedByMemory(t *testing.T) { } } -// TestOrderedByQoSMemory ensures we order by qos and then memory consumption relative to request. +// TestOrderedByQoSMemory ensures we order by qosComparator and then memory consumption relative to request. func TestOrderedByQoSMemory(t *testing.T) { pod1 := newPod("best-effort-high", []api.Container{ newContainer("best-effort-high", newResourceList("", ""), newResourceList("", "")), @@ -252,7 +252,7 @@ func TestOrderedByQoSMemory(t *testing.T) { } pods := []*api.Pod{pod1, pod2, pod3, pod4, pod5, pod6} expected := []*api.Pod{pod1, pod2, pod4, pod3, pod5, pod6} - orderedBy(qos, memory(statsFn)).Sort(pods) + orderedBy(qosComparator, memory(statsFn)).Sort(pods) for i := range expected { if pods[i] != expected[i] { t.Errorf("Expected pod[%d]: %s, but got: %s", i, expected[i].Name, pods[i].Name) diff --git a/pkg/kubelet/qos/policy.go b/pkg/kubelet/qos/policy.go index 511e629fad..b8b3b619ba 100644 --- a/pkg/kubelet/qos/policy.go +++ b/pkg/kubelet/qos/policy.go @@ -18,7 +18,6 @@ package qos import ( "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/kubelet/qos/util" ) const ( @@ -36,11 +35,11 @@ const ( // and 1000. Containers with higher OOM scores are killed if the system runs out of memory. // See https://lwn.net/Articles/391222/ for more information. func GetContainerOOMScoreAdjust(pod *api.Pod, container *api.Container, memoryCapacity int64) int { - switch util.GetPodQos(pod) { - case util.Guaranteed: + switch GetPodQos(pod) { + case Guaranteed: // Guaranteed containers should be the last to get killed. return guaranteedOOMScoreAdj - case util.BestEffort: + case BestEffort: return besteffortOOMScoreAdj } diff --git a/pkg/kubelet/qos/util/qos.go b/pkg/kubelet/qos/qos.go similarity index 96% rename from pkg/kubelet/qos/util/qos.go rename to pkg/kubelet/qos/qos.go index 9d7a5786a3..27f6efe5f5 100644 --- a/pkg/kubelet/qos/util/qos.go +++ b/pkg/kubelet/qos/qos.go @@ -14,19 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -package util +package qos import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/resource" ) -const ( - Guaranteed = "Guaranteed" - Burstable = "Burstable" - BestEffort = "BestEffort" -) - // isResourceGuaranteed returns true if the container's resource requirements are Guaranteed. func isResourceGuaranteed(container *api.Container, resource api.ResourceName) bool { // A container resource is guaranteed if its request == limit. @@ -51,7 +45,7 @@ func isResourceBestEffort(container *api.Container, resource api.ResourceName) b // A pod is besteffort if none of its containers have specified any requests or limits. // A pod is guaranteed only when requests and limits are specified for all the containers and they are equal. // A pod is burstable if limits and requests do not match across all containers. -func GetPodQos(pod *api.Pod) string { +func GetPodQos(pod *api.Pod) QOSClass { requests := api.ResourceList{} limits := api.ResourceList{} zeroQuantity := resource.MustParse("0") @@ -106,7 +100,7 @@ func GetPodQos(pod *api.Pod) string { } // QoSList is a set of (resource name, QoS class) pairs. -type QoSList map[api.ResourceName]string +type QoSList map[api.ResourceName]QOSClass // GetQoS returns a mapping of resource name to QoS class of a container func GetQoS(container *api.Container) QoSList { diff --git a/pkg/kubelet/qos/util/qos_test.go b/pkg/kubelet/qos/qos_test.go similarity index 99% rename from pkg/kubelet/qos/util/qos_test.go rename to pkg/kubelet/qos/qos_test.go index e7a060fec5..8beaa87855 100644 --- a/pkg/kubelet/qos/util/qos_test.go +++ b/pkg/kubelet/qos/qos_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package util +package qos import ( "testing" @@ -62,7 +62,7 @@ func newPod(name string, containers []api.Container) *api.Pod { func TestGetPodQos(t *testing.T) { testCases := []struct { pod *api.Pod - expected string + expected QOSClass }{ { pod: newPod("guaranteed", []api.Container{ diff --git a/pkg/kubelet/qos/types.go b/pkg/kubelet/qos/types.go new file mode 100644 index 0000000000..587571ef95 --- /dev/null +++ b/pkg/kubelet/qos/types.go @@ -0,0 +1,29 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package qos + +// QOSClass defines the supported qos classes of Pods/Containers. +type QOSClass string + +const ( + // Guaranteed is the Guaranteed qos class. + Guaranteed QOSClass = "Guaranteed" + // Burstable is the Burstable qos class. + Burstable QOSClass = "Burstable" + // BestEffort is the BestEffort qos class. + BestEffort QOSClass = "BestEffort" +) diff --git a/pkg/quota/evaluator/core/pods.go b/pkg/quota/evaluator/core/pods.go index 9fa480b797..ed15d09cd9 100644 --- a/pkg/quota/evaluator/core/pods.go +++ b/pkg/quota/evaluator/core/pods.go @@ -25,7 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api/resource" "k8s.io/kubernetes/pkg/api/validation" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/kubelet/qos/util" + "k8s.io/kubernetes/pkg/kubelet/qos" "k8s.io/kubernetes/pkg/quota" "k8s.io/kubernetes/pkg/quota/generic" "k8s.io/kubernetes/pkg/runtime" @@ -172,7 +172,7 @@ func PodMatchesScopeFunc(scope api.ResourceQuotaScope, object runtime.Object) bo } func isBestEffort(pod *api.Pod) bool { - return util.GetPodQos(pod) == util.BestEffort + return qos.GetPodQos(pod) == qos.BestEffort } func isTerminating(pod *api.Pod) bool { diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates.go b/plugin/pkg/scheduler/algorithm/predicates/predicates.go index 4a9f3b36f1..3be33839a3 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates.go @@ -26,7 +26,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/cache" - qosutil "k8s.io/kubernetes/pkg/kubelet/qos/util" + "k8s.io/kubernetes/pkg/kubelet/qos" "k8s.io/kubernetes/pkg/labels" utilruntime "k8s.io/kubernetes/pkg/util/runtime" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" @@ -1020,7 +1020,7 @@ func tolerationsToleratesTaints(tolerations []api.Toleration, taints []api.Taint // Determine if a pod is scheduled with best-effort QoS func isPodBestEffort(pod *api.Pod) bool { - return qosutil.GetPodQos(pod) == qosutil.BestEffort + return qos.GetPodQos(pod) == qos.BestEffort } // CheckNodeMemoryPressurePredicate checks if a pod can be scheduled on a node diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index 73afbaae49..1adc0980ce 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -509,7 +509,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() { {"Controllers:", "ReplicationController/redis-master"}, {"Image:", redisImage}, {"State:", "Running"}, - {"QoS Tier:", "BestEffort"}, + {"QoS Class:", "BestEffort"}, } checkOutput(output, requiredStrings) }) From 8cd55e8e5288ad11509e76c98bb5025d244a7f59 Mon Sep 17 00:00:00 2001 From: Hongchao Deng <hongchaodeng1@gmail.com> Date: Tue, 21 Jun 2016 09:55:23 -0700 Subject: [PATCH 189/339] refactor scheduler test and include phantom test --- plugin/pkg/scheduler/scheduler_test.go | 269 +++++++++++++------------ 1 file changed, 136 insertions(+), 133 deletions(-) diff --git a/plugin/pkg/scheduler/scheduler_test.go b/plugin/pkg/scheduler/scheduler_test.go index cb326ec0e2..a2a08c6d10 100644 --- a/plugin/pkg/scheduler/scheduler_test.go +++ b/plugin/pkg/scheduler/scheduler_test.go @@ -18,9 +18,7 @@ package scheduler import ( "errors" - "fmt" "reflect" - "sync" "testing" "time" @@ -30,6 +28,7 @@ import ( "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/util/diff" + "k8s.io/kubernetes/pkg/util/wait" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm" "k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates" "k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache" @@ -169,163 +168,167 @@ func TestScheduler(t *testing.T) { } } -func TestSchedulerForgetAssumedPodAfterDelete(t *testing.T) { - // Set up a channel through which we'll funnel log messages from the watcher. - // This way, we can guarantee that when the test ends no thread will still be - // trying to write to t.Logf (which it would if we handed t.Logf directly to - // StartLogging). - ch := make(chan string) - done := make(chan struct{}) - var wg sync.WaitGroup - wg.Add(1) - go func() { - defer wg.Done() - for { - select { - case msg := <-ch: - t.Log(msg) - case <-done: - return - } - } - }() - eventBroadcaster := record.NewBroadcaster() - watcher := eventBroadcaster.StartLogging(func(format string, args ...interface{}) { - ch <- fmt.Sprintf(format, args...) - }) - defer func() { - watcher.Stop() - close(done) - wg.Wait() - }() - - // Setup stores to test pod's workflow: - // - queuedPodStore: pods queued before processing - // - scheduledPodStore: pods that has a scheduling decision - scheduledPodStore := clientcache.NewStore(clientcache.MetaNamespaceKeyFunc) - queuedPodStore := clientcache.NewFIFO(clientcache.MetaNamespaceKeyFunc) - - // Port is the easiest way to cause a fit predicate failure - podPort := 8080 - firstPod := podWithPort("foo", "", podPort) - +func TestSchedulerNoPhantomPodAfterExpire(t *testing.T) { stop := make(chan struct{}) defer close(stop) - cache := schedulercache.New(1*time.Second, stop) + queuedPodStore := clientcache.NewFIFO(clientcache.MetaNamespaceKeyFunc) + scache := schedulercache.New(100*time.Millisecond, stop) + pod := podWithPort("pod.Name", "", 8080) + scheduler, bindingChan, _ := setupTestSchedulerWithOnePod(t, queuedPodStore, scache, pod) + + waitPodExpireChan := make(chan struct{}) + timeout := make(chan struct{}) + go func() { + for { + select { + case <-timeout: + return + default: + } + pods, err := scache.List(labels.Everything()) + if err != nil { + t.Fatalf("cache.List failed: %v", err) + } + if len(pods) == 0 { + close(waitPodExpireChan) + return + } + time.Sleep(100 * time.Millisecond) + } + }() + // waiting for the assumed pod to expire + select { + case <-waitPodExpireChan: + case <-time.After(wait.ForeverTestTimeout): + close(timeout) + t.Fatalf("timeout after %v", wait.ForeverTestTimeout) + } + + // We use conflicted pod ports to incur fit predicate failure if first pod not removed. + secondPod := podWithPort("bar", "", 8080) + queuedPodStore.Add(secondPod) + scheduler.scheduleOne() + select { + case b := <-bindingChan: + expectBinding := &api.Binding{ + ObjectMeta: api.ObjectMeta{Name: "bar"}, + Target: api.ObjectReference{Kind: "Node", Name: "machine1"}, + } + if !reflect.DeepEqual(expectBinding, b) { + t.Errorf("binding want=%v, get=%v", expectBinding, b) + } + case <-time.After(wait.ForeverTestTimeout): + t.Fatalf("timeout after %v", wait.ForeverTestTimeout) + } +} + +func TestSchedulerNoPhantomPodAfterDelete(t *testing.T) { + stop := make(chan struct{}) + defer close(stop) + queuedPodStore := clientcache.NewFIFO(clientcache.MetaNamespaceKeyFunc) + scache := schedulercache.New(10*time.Minute, stop) + firstPod := podWithPort("pod.Name", "", 8080) + scheduler, bindingChan, errChan := setupTestSchedulerWithOnePod(t, queuedPodStore, scache, firstPod) + + // We use conflicted pod ports to incur fit predicate failure. + secondPod := podWithPort("bar", "", 8080) + queuedPodStore.Add(secondPod) + // queuedPodStore: [bar:8080] + // cache: [(assumed)foo:8080] + + scheduler.scheduleOne() + select { + case err := <-errChan: + expectErr := &FitError{ + Pod: secondPod, + FailedPredicates: FailedPredicateMap{"machine1": "PodFitsHostPorts"}, + } + if !reflect.DeepEqual(expectErr, err) { + t.Errorf("err want=%v, get=%v", expectErr, err) + } + case <-time.After(wait.ForeverTestTimeout): + t.Fatalf("timeout after %v", wait.ForeverTestTimeout) + } + + // We mimic the workflow of cache behavior when a pod is removed by user. + // Note: if the schedulercache timeout would be super short, the first pod would expire + // and would be removed itself (without any explicit actions on schedulercache). Even in that case, + // explicitly AddPod will as well correct the behavior. + firstPod.Spec.NodeName = "machine1" + if err := scache.AddPod(firstPod); err != nil { + t.Fatalf("err: %v", err) + } + if err := scache.RemovePod(firstPod); err != nil { + t.Fatalf("err: %v", err) + } + + queuedPodStore.Add(secondPod) + scheduler.scheduleOne() + select { + case b := <-bindingChan: + expectBinding := &api.Binding{ + ObjectMeta: api.ObjectMeta{Name: "bar"}, + Target: api.ObjectReference{Kind: "Node", Name: "machine1"}, + } + if !reflect.DeepEqual(expectBinding, b) { + t.Errorf("binding want=%v, get=%v", expectBinding, b) + } + case <-time.After(wait.ForeverTestTimeout): + t.Fatalf("timeout after %v", wait.ForeverTestTimeout) + } +} + +// queuedPodStore: pods queued before processing. +// cache: scheduler cache that might contain assumed pods. +func setupTestSchedulerWithOnePod(t *testing.T, queuedPodStore *clientcache.FIFO, scache schedulercache.Cache, pod *api.Pod) (*Scheduler, chan *api.Binding, chan error) { // Create the scheduler config algo := NewGenericScheduler( - cache, + scache, map[string]algorithm.FitPredicate{"PodFitsHostPorts": predicates.PodFitsHostPorts}, []algorithm.PriorityConfig{}, []algorithm.SchedulerExtender{}) - - var gotBinding *api.Binding - c := &Config{ - SchedulerCache: cache, + bindingChan := make(chan *api.Binding, 1) + errChan := make(chan error, 1) + cfg := &Config{ + SchedulerCache: scache, NodeLister: algorithm.FakeNodeLister( api.NodeList{Items: []api.Node{{ObjectMeta: api.ObjectMeta{Name: "machine1"}}}}, ), Algorithm: algo, Binder: fakeBinder{func(b *api.Binding) error { - scheduledPodStore.Add(podWithPort(b.Name, b.Target.Name, podPort)) - gotBinding = b + bindingChan <- b return nil }}, NextPod: func() *api.Pod { return clientcache.Pop(queuedPodStore).(*api.Pod) }, Error: func(p *api.Pod, err error) { - t.Errorf("Unexpected error when scheduling pod %+v: %v", p, err) + errChan <- err }, - Recorder: eventBroadcaster.NewRecorder(api.EventSource{Component: "scheduler"}), + Recorder: &record.FakeRecorder{}, + PodConditionUpdater: fakePodConditionUpdater{}, } + scheduler := New(cfg) - // First scheduling pass should schedule the pod - s := New(c) - called := make(chan struct{}) - events := eventBroadcaster.StartEventWatcher(func(e *api.Event) { - if e, a := "Scheduled", e.Reason; e != a { - t.Errorf("expected %v, got %v", e, a) - } - close(called) - }) - - queuedPodStore.Add(firstPod) + queuedPodStore.Add(pod) // queuedPodStore: [foo:8080] - // scheduledPodStore: [] - // assumedPods: [] + // cache: [] - s.scheduleOne() - <-called + scheduler.scheduleOne() // queuedPodStore: [] - // scheduledPodStore: [foo:8080] - // assumedPods: [foo:8080] + // cache: [(assumed)foo:8080] - pod, exists, _ := scheduledPodStore.GetByKey("foo") - if !exists { - t.Errorf("Expected scheduled pod store to contain pod") - } - pod, exists, _ = queuedPodStore.GetByKey("foo") - if exists { - t.Errorf("Did not expect a queued pod, found %+v", pod) - } - - expectBind := &api.Binding{ - ObjectMeta: api.ObjectMeta{Name: "foo"}, - Target: api.ObjectReference{Kind: "Node", Name: "machine1"}, - } - if ex, ac := expectBind, gotBinding; !reflect.DeepEqual(ex, ac) { - t.Errorf("Expected exact match on binding: %s", diff.ObjectDiff(ex, ac)) - } - - events.Stop() - - scheduledPodStore.Delete(pod) - - secondPod := podWithPort("bar", "", podPort) - queuedPodStore.Add(secondPod) - // queuedPodStore: [bar:8080] - // scheduledPodStore: [] - // assumedPods: [foo:8080] - - var waitUntilExpired sync.WaitGroup - waitUntilExpired.Add(1) - // waiting for the assumed pod to expire - go func() { - for { - pods, err := cache.List(labels.Everything()) - if err != nil { - t.Fatalf("cache.List failed: %v", err) - } - if len(pods) == 0 { - waitUntilExpired.Done() - return - } - time.Sleep(1 * time.Second) + select { + case b := <-bindingChan: + expectBinding := &api.Binding{ + ObjectMeta: api.ObjectMeta{Name: "pod.Name"}, + Target: api.ObjectReference{Kind: "Node", Name: "machine1"}, } - }() - waitUntilExpired.Wait() - - // Second scheduling pass will fail to schedule if the store hasn't expired - // the deleted pod. This would normally happen with a timeout. - - called = make(chan struct{}) - events = eventBroadcaster.StartEventWatcher(func(e *api.Event) { - if e, a := "Scheduled", e.Reason; e != a { - t.Errorf("expected %v, got %v", e, a) + if !reflect.DeepEqual(expectBinding, b) { + t.Errorf("binding want=%v, get=%v", expectBinding, b) } - close(called) - }) - - s.scheduleOne() - <-called - - expectBind = &api.Binding{ - ObjectMeta: api.ObjectMeta{Name: "bar"}, - Target: api.ObjectReference{Kind: "Node", Name: "machine1"}, + case <-time.After(wait.ForeverTestTimeout): + t.Fatalf("timeout after %v", wait.ForeverTestTimeout) } - if ex, ac := expectBind, gotBinding; !reflect.DeepEqual(ex, ac) { - t.Errorf("Expected exact match on binding: %s", diff.ObjectDiff(ex, ac)) - } - events.Stop() + return scheduler, bindingChan, errChan } From c8d82fc2a9dce61e1506d7a4a1c1b55681646f48 Mon Sep 17 00:00:00 2001 From: Fabio Yeon <fabioy@google.com> Date: Fri, 24 Jun 2016 16:13:13 -0700 Subject: [PATCH 190/339] Increase kube-dns requirements on CoreOS. --- cluster/gce/coreos/kube-manifests/addons/dns/skydns-rc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/gce/coreos/kube-manifests/addons/dns/skydns-rc.yaml b/cluster/gce/coreos/kube-manifests/addons/dns/skydns-rc.yaml index 3c5f498ad3..6b678c656d 100644 --- a/cluster/gce/coreos/kube-manifests/addons/dns/skydns-rc.yaml +++ b/cluster/gce/coreos/kube-manifests/addons/dns/skydns-rc.yaml @@ -32,7 +32,7 @@ spec: memory: 200Mi requests: cpu: 100m - memory: 50Mi + memory: 100Mi livenessProbe: httpGet: path: /healthz From 8b1b9120c6031f4b6f6919955cd81418470694b3 Mon Sep 17 00:00:00 2001 From: Yifan Gu <yifan.gu@coreos.com> Date: Fri, 24 Jun 2016 16:33:12 -0700 Subject: [PATCH 191/339] rkt: Fix the 'privileged' check when stage1 annotation is provided. Previously when stage1 annotation is provided, we only checks if the kubelet allows privileged, which is not useful as that is a global setting. Instead, we should check if the pod has explicitly set the privileged security context to 'true'. --- pkg/kubelet/rkt/rkt.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go index 8b04c74221..92408033ff 100644 --- a/pkg/kubelet/rkt/rkt.go +++ b/pkg/kubelet/rkt/rkt.go @@ -42,7 +42,6 @@ import ( "golang.org/x/net/context" "google.golang.org/grpc" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/capabilities" "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/credentialprovider" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -733,7 +732,7 @@ func (r *Runtime) makeContainerLogMount(opts *kubecontainer.RunContainerOptions, } func (r *Runtime) newAppcRuntimeApp(pod *api.Pod, podIP string, c api.Container, requiresPrivileged bool, pullSecrets []api.Secret, manifest *appcschema.PodManifest) error { - if requiresPrivileged && !capabilities.Get().AllowPrivileged { + if requiresPrivileged && !securitycontext.HasPrivilegedRequest(&c) { return fmt.Errorf("cannot make %q: running a custom stage1 requires a privileged security context", format.Pod(pod)) } if err, _ := r.imagePuller.PullImage(pod, &c, pullSecrets); err != nil { From 220da9949a36bf5d4d25ae9b49da272f0f4506aa Mon Sep 17 00:00:00 2001 From: Matt Liggett <mml@google.com> Date: Fri, 24 Jun 2016 16:39:28 -0700 Subject: [PATCH 192/339] Remove extra double quotes in --federations. Fixes #28059 --- build/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/common.sh b/build/common.sh index 1d0b17cfd9..61c0245cd3 100755 --- a/build/common.sh +++ b/build/common.sh @@ -960,7 +960,7 @@ function kube::release::package_kube_manifests_tarball() { FEDERATIONS_DOMAIN_MAP="${FEDERATION_NAME}=${DNS_ZONE_NAME}" fi if [[ -n "${FEDERATIONS_DOMAIN_MAP}" ]]; then - sed -i 's/{{ pillar\['"'"'federations_domain_map'"'"'\] }}/- --federations="'"${FEDERATIONS_DOMAIN_MAP}"'"/g' "${dst_dir}/dns/skydns-rc.yaml.in" + sed -i 's/{{ pillar\['"'"'federations_domain_map'"'"'\] }}/- --federations='"${FEDERATIONS_DOMAIN_MAP}"'/g' "${dst_dir}/dns/skydns-rc.yaml.in" else sed -i '/{{ pillar\['"'"'federations_domain_map'"'"'\] }}/d' "${dst_dir}/dns/skydns-rc.yaml.in" fi From 037b25b6d0d0013cc4ab9b7bbbf3c444724c9f14 Mon Sep 17 00:00:00 2001 From: David McMahon <djmm@google.com> Date: Fri, 24 Jun 2016 16:25:15 -0700 Subject: [PATCH 193/339] relnotes ready for use. --- docs/devel/pull-requests.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/devel/pull-requests.md b/docs/devel/pull-requests.md index f45e9b4041..13771c225e 100644 --- a/docs/devel/pull-requests.md +++ b/docs/devel/pull-requests.md @@ -95,9 +95,8 @@ label is required for that non-master PR. ### Reviewing pre-release notes -**NOTE: THIS TOOLING IS NOT YET AVAILABLE, BUT COMING SOON!** - At any time, you can see what the release notes will look like on any branch. +(NOTE: This only works on Linux for now) ``` $ git pull https://github.com/kubernetes/release @@ -105,7 +104,7 @@ $ RELNOTES=$PWD/release/relnotes $ cd /to/your/kubernetes/repo $ $RELNOTES -man # for details on how to use the tool # Show release notes from the last release on a branch to HEAD -$ $RELNOTES --raw --branch=master +$ $RELNOTES --branch=master ``` ## Visual overview From b4f7e67d251741c4f94bab9d3b636a459afa9b50 Mon Sep 17 00:00:00 2001 From: Angus Salkeld <asalkeld@mirantis.com> Date: Sat, 25 Jun 2016 10:15:27 +1000 Subject: [PATCH 194/339] Fix startup type error in initializeCaches The following error was getting logged: PersistentVolumeController can't initialize caches, expected list of volumes, got: &{TypeMeta:{Kind: APIVersion:} ListMeta:{SelfLink:/api/v1/persistentvolumes ResourceVersion:11} Items:[]} --- .../framework/fake_controller_source.go | 106 +++++++++++++++--- .../persistentvolume/controller_base.go | 8 +- .../persistentvolume/controller_test.go | 4 +- .../persistentvolume/framework_test.go | 10 +- 4 files changed, 101 insertions(+), 27 deletions(-) diff --git a/pkg/controller/framework/fake_controller_source.go b/pkg/controller/framework/fake_controller_source.go index bebacb531a..9e90e7c916 100644 --- a/pkg/controller/framework/fake_controller_source.go +++ b/pkg/controller/framework/fake_controller_source.go @@ -31,17 +31,41 @@ import ( func NewFakeControllerSource() *FakeControllerSource { return &FakeControllerSource{ - items: map[nnu]runtime.Object{}, - broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull), + Items: map[nnu]runtime.Object{}, + Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull), } } +func NewFakePVControllerSource() *FakePVControllerSource { + return &FakePVControllerSource{ + FakeControllerSource{ + Items: map[nnu]runtime.Object{}, + Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull), + }} +} + +func NewFakePVCControllerSource() *FakePVCControllerSource { + return &FakePVCControllerSource{ + FakeControllerSource{ + Items: map[nnu]runtime.Object{}, + Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull), + }} +} + // FakeControllerSource implements listing/watching for testing. type FakeControllerSource struct { lock sync.RWMutex - items map[nnu]runtime.Object + Items map[nnu]runtime.Object changes []watch.Event // one change per resourceVersion - broadcaster *watch.Broadcaster + Broadcaster *watch.Broadcaster +} + +type FakePVControllerSource struct { + FakeControllerSource +} + +type FakePVCControllerSource struct { + FakeControllerSource } // namespace, name, uid to be used as a key. @@ -110,22 +134,19 @@ func (f *FakeControllerSource) Change(e watch.Event, watchProbability float64) { key := f.key(accessor) switch e.Type { case watch.Added, watch.Modified: - f.items[key] = e.Object + f.Items[key] = e.Object case watch.Deleted: - delete(f.items, key) + delete(f.Items, key) } if rand.Float64() < watchProbability { - f.broadcaster.Action(e.Type, e.Object) + f.Broadcaster.Action(e.Type, e.Object) } } -// List returns a list object, with its resource version set. -func (f *FakeControllerSource) List(options api.ListOptions) (runtime.Object, error) { - f.lock.RLock() - defer f.lock.RUnlock() - list := make([]runtime.Object, 0, len(f.items)) - for _, obj := range f.items { +func (f *FakeControllerSource) getListItemsLocked() ([]runtime.Object, error) { + list := make([]runtime.Object, 0, len(f.Items)) + for _, obj := range f.Items { // Must make a copy to allow clients to modify the object. // Otherwise, if they make a change and write it back, they // will inadvertently change our canonical copy (in @@ -136,6 +157,17 @@ func (f *FakeControllerSource) List(options api.ListOptions) (runtime.Object, er } list = append(list, objCopy.(runtime.Object)) } + return list, nil +} + +// List returns a list object, with its resource version set. +func (f *FakeControllerSource) List(options api.ListOptions) (runtime.Object, error) { + f.lock.RLock() + defer f.lock.RUnlock() + list, err := f.getListItemsLocked() + if err != nil { + return nil, err + } listObj := &api.List{} if err := meta.SetList(listObj, list); err != nil { return nil, err @@ -149,6 +181,48 @@ func (f *FakeControllerSource) List(options api.ListOptions) (runtime.Object, er return listObj, nil } +// List returns a list object, with its resource version set. +func (f *FakePVControllerSource) List(options api.ListOptions) (runtime.Object, error) { + f.lock.RLock() + defer f.lock.RUnlock() + list, err := f.FakeControllerSource.getListItemsLocked() + if err != nil { + return nil, err + } + listObj := &api.PersistentVolumeList{} + if err := meta.SetList(listObj, list); err != nil { + return nil, err + } + objMeta, err := api.ListMetaFor(listObj) + if err != nil { + return nil, err + } + resourceVersion := len(f.changes) + objMeta.ResourceVersion = strconv.Itoa(resourceVersion) + return listObj, nil +} + +// List returns a list object, with its resource version set. +func (f *FakePVCControllerSource) List(options api.ListOptions) (runtime.Object, error) { + f.lock.RLock() + defer f.lock.RUnlock() + list, err := f.FakeControllerSource.getListItemsLocked() + if err != nil { + return nil, err + } + listObj := &api.PersistentVolumeClaimList{} + if err := meta.SetList(listObj, list); err != nil { + return nil, err + } + objMeta, err := api.ListMetaFor(listObj) + if err != nil { + return nil, err + } + resourceVersion := len(f.changes) + objMeta.ResourceVersion = strconv.Itoa(resourceVersion) + return listObj, nil +} + // Watch returns a watch, which will be pre-populated with all changes // after resourceVersion. func (f *FakeControllerSource) Watch(options api.ListOptions) (watch.Interface, error) { @@ -172,11 +246,11 @@ func (f *FakeControllerSource) Watch(options api.ListOptions) (watch.Interface, } changes = append(changes, watch.Event{Type: c.Type, Object: objCopy.(runtime.Object)}) } - return f.broadcaster.WatchWithPrefix(changes), nil + return f.Broadcaster.WatchWithPrefix(changes), nil } else if rc > len(f.changes) { return nil, errors.New("resource version in the future not supported by this fake") } - return f.broadcaster.Watch(), nil + return f.Broadcaster.Watch(), nil } // Shutdown closes the underlying broadcaster, waiting for events to be @@ -184,5 +258,5 @@ func (f *FakeControllerSource) Watch(options api.ListOptions) (watch.Interface, // enforced by Shutdown() leaving f locked. func (f *FakeControllerSource) Shutdown() { f.lock.Lock() // Purposely no unlock. - f.broadcaster.Shutdown() + f.Broadcaster.Shutdown() } diff --git a/pkg/controller/persistentvolume/controller_base.go b/pkg/controller/persistentvolume/controller_base.go index abface5f21..9cf03a81a2 100644 --- a/pkg/controller/persistentvolume/controller_base.go +++ b/pkg/controller/persistentvolume/controller_base.go @@ -139,14 +139,14 @@ func (ctrl *PersistentVolumeController) initializeCaches(volumeSource, claimSour glog.Errorf("PersistentVolumeController can't initialize caches: %v", err) return } - volumeList, ok := volumeListObj.(*api.List) + volumeList, ok := volumeListObj.(*api.PersistentVolumeList) if !ok { glog.Errorf("PersistentVolumeController can't initialize caches, expected list of volumes, got: %+v", volumeListObj) return } for _, volume := range volumeList.Items { // Ignore template volumes from kubernetes 1.2 - deleted := ctrl.upgradeVolumeFrom1_2(volume.(*api.PersistentVolume)) + deleted := ctrl.upgradeVolumeFrom1_2(&volume) if !deleted { storeObjectUpdate(ctrl.volumes.store, volume, "volume") } @@ -157,9 +157,9 @@ func (ctrl *PersistentVolumeController) initializeCaches(volumeSource, claimSour glog.Errorf("PersistentVolumeController can't initialize caches: %v", err) return } - claimList, ok := claimListObj.(*api.List) + claimList, ok := claimListObj.(*api.PersistentVolumeClaimList) if !ok { - glog.Errorf("PersistentVolumeController can't initialize caches, expected list of claims, got: %+v", volumeListObj) + glog.Errorf("PersistentVolumeController can't initialize caches, expected list of claims, got: %+v", claimListObj) return } for _, claim := range claimList.Items { diff --git a/pkg/controller/persistentvolume/controller_test.go b/pkg/controller/persistentvolume/controller_test.go index 6dea329633..4233e1b6bd 100644 --- a/pkg/controller/persistentvolume/controller_test.go +++ b/pkg/controller/persistentvolume/controller_test.go @@ -162,8 +162,8 @@ func TestControllerSync(t *testing.T) { // Initialize the controller client := &fake.Clientset{} - volumeSource := framework.NewFakeControllerSource() - claimSource := framework.NewFakeControllerSource() + volumeSource := framework.NewFakePVControllerSource() + claimSource := framework.NewFakePVCControllerSource() ctrl := newTestController(client, volumeSource, claimSource, true) reactor := newVolumeReactor(client, ctrl, volumeSource, claimSource, test.errors) for _, claim := range test.initialClaims { diff --git a/pkg/controller/persistentvolume/framework_test.go b/pkg/controller/persistentvolume/framework_test.go index a2fd6dc1b3..c4b5752560 100644 --- a/pkg/controller/persistentvolume/framework_test.go +++ b/pkg/controller/persistentvolume/framework_test.go @@ -123,8 +123,8 @@ type volumeReactor struct { changedObjects []interface{} changedSinceLastSync int ctrl *PersistentVolumeController - volumeSource *framework.FakeControllerSource - claimSource *framework.FakeControllerSource + volumeSource *framework.FakePVControllerSource + claimSource *framework.FakePVCControllerSource lock sync.Mutex errors []reactorError } @@ -542,7 +542,7 @@ func (r *volumeReactor) addClaimEvent(claim *api.PersistentVolumeClaim) { r.claimSource.Add(claim) } -func newVolumeReactor(client *fake.Clientset, ctrl *PersistentVolumeController, volumeSource, claimSource *framework.FakeControllerSource, errors []reactorError) *volumeReactor { +func newVolumeReactor(client *fake.Clientset, ctrl *PersistentVolumeController, volumeSource *framework.FakePVControllerSource, claimSource *framework.FakePVCControllerSource, errors []reactorError) *volumeReactor { reactor := &volumeReactor{ volumes: make(map[string]*api.PersistentVolume), claims: make(map[string]*api.PersistentVolumeClaim), @@ -557,10 +557,10 @@ func newVolumeReactor(client *fake.Clientset, ctrl *PersistentVolumeController, func newTestController(kubeClient clientset.Interface, volumeSource, claimSource cache.ListerWatcher, enableDynamicProvisioning bool) *PersistentVolumeController { if volumeSource == nil { - volumeSource = framework.NewFakeControllerSource() + volumeSource = framework.NewFakePVControllerSource() } if claimSource == nil { - claimSource = framework.NewFakeControllerSource() + claimSource = framework.NewFakePVCControllerSource() } ctrl := NewPersistentVolumeController( kubeClient, From 6aeb5da23935a264a7622b616cc3ca55762dbf4a Mon Sep 17 00:00:00 2001 From: Mike Spreitzer <mspreitz@us.ibm.com> Date: Fri, 24 Jun 2016 22:21:35 -0400 Subject: [PATCH 195/339] Fixed deployAddons.sh to use sed template for skydns-svc.yaml My original change neglected to change the template from the salt one to the sed one. --- cluster/ubuntu/deployAddons.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/ubuntu/deployAddons.sh b/cluster/ubuntu/deployAddons.sh index 87e7d6b738..568dbe96dc 100755 --- a/cluster/ubuntu/deployAddons.sh +++ b/cluster/ubuntu/deployAddons.sh @@ -42,7 +42,7 @@ function init { function deploy_dns { echo "Deploying DNS on Kubernetes" sed -e "s/\\\$DNS_REPLICAS/${DNS_REPLICAS}/g;s/\\\$DNS_DOMAIN/${DNS_DOMAIN}/g;" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed" > skydns-rc.yaml - sed -e "s/\\\$DNS_SERVER_IP/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in" > skydns-svc.yaml + sed -e "s/\\\$DNS_SERVER_IP/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.sed" > skydns-svc.yaml KUBEDNS=`eval "${KUBECTL} get services --namespace=kube-system | grep kube-dns | cat"` From 33e176eb9a7d677859979fc725655c4998899184 Mon Sep 17 00:00:00 2001 From: Mike Spreitzer <mspreitz@us.ibm.com> Date: Fri, 24 Jun 2016 22:29:40 -0400 Subject: [PATCH 196/339] Added note to developers about adding parameters to skydns Added a friendly note, with a suggestion of how to find the scripts. --- cluster/saltbase/salt/kube-dns/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cluster/saltbase/salt/kube-dns/README.md b/cluster/saltbase/salt/kube-dns/README.md index a9ee8e4e69..c658f26663 100644 --- a/cluster/saltbase/salt/kube-dns/README.md +++ b/cluster/saltbase/salt/kube-dns/README.md @@ -7,6 +7,14 @@ Due to a varied preference in templating language choices, the transform Makefile in this directory should be enhanced to generate all required formats from the base underscore templates. +**NOTE WELL**: Developers, when you add a parameter you should also +update the various scripts that supply values for your new parameter. +Here is one way you might find those scripts: +``` +cd kubernetes +find [a-zA-Z0-9]* -type f -exec grep skydns-rc.yaml \{\} \; -print -exec echo \; +``` + ## Base Template files These are the authoritative base templates. From 876d77a6998ebd25a0003dcef4e871488691aa2f Mon Sep 17 00:00:00 2001 From: Mike Spreitzer <mspreitz@us.ibm.com> Date: Sat, 25 Jun 2016 16:06:33 -0400 Subject: [PATCH 197/339] Fixed typos - privileged not priviliged This fixes a bug introduced in #26596. Fixes #28074 --- cluster/ubuntu/util.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cluster/ubuntu/util.sh b/cluster/ubuntu/util.sh index 54815e2c56..b4939b2501 100755 --- a/cluster/ubuntu/util.sh +++ b/cluster/ubuntu/util.sh @@ -281,7 +281,7 @@ EOF # $3: If non-empty then the DNS server IP to configure in each pod. # $4: If non-empty then added to each pod's domain search list. # $5: Pathname of the kubelet config file or directory. -# $6: Whether or not we run kubelet in priviliged mode +# $6: Whether or not we run kubelet in privileged mode # $7: If empty then flannel is used otherwise CNI is used. function create-kubelet-opts() { if [ -n "$7" ] ; then @@ -477,7 +477,7 @@ function provision-master() { '${ADMISSION_CONTROL}' \ '${SERVICE_NODE_PORT_RANGE}' \ '${MASTER_IP}' \ - '${ALLOW_PRIVILIGED}' + '${ALLOW_PRIVILEGED}' create-kube-controller-manager-opts '${NODE_IPS}' create-kube-scheduler-opts create-flanneld-opts '127.0.0.1' '${MASTER_IP}' From 622696ca85dbd089c2db753d291317311da843d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= <lucas.kaldstrom@hotmail.co.uk> Date: Mon, 27 Jun 2016 00:03:20 +0300 Subject: [PATCH 198/339] Hotfix: Fixup the dns configuration from a breaking feredation PR --- cluster/images/hyperkube/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cluster/images/hyperkube/Makefile b/cluster/images/hyperkube/Makefile index 94bee1addd..643edef6b2 100644 --- a/cluster/images/hyperkube/Makefile +++ b/cluster/images/hyperkube/Makefile @@ -72,7 +72,8 @@ endif cd ${TEMP_DIR} && sed -i.back "s|ARCH|${QEMUARCH}|g" Dockerfile cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile cd ${TEMP_DIR} && sed -i.back "s|-amd64|-${ARCH}|g" addons/*.yaml - cd ${TEMP_DIR} && sed -i.back "s|__PILLAR__DNS__REPLICAS__|1|g;s|__PILLAR__DNS__SERVER__|10.0.0.10|g;s|__PILLAR__DNS__DOMAIN__|cluster.local|g" addons/skydns*.yaml + cd ${TEMP_DIR} && sed -i.back "s|__PILLAR__DNS__REPLICAS__|1|g;s|__PILLAR__DNS__SERVER__|10.0.0.10|g;" addons/skydns*.yaml + cd ${TEMP_DIR} && sed -i.back "s|__PILLAR__DNS__DOMAIN__|cluster.local|g;s|__PILLAR__FEDERATIONS__DOMAIN__MAP__||g;" addons/skydns*.yaml rm ${TEMP_DIR}/addons/*.back # Make scripts executable before they are copied into the Docker image. If we make them executable later, in another layer From ebcde947994e85488f1511dfcae0295e2a6bd67e Mon Sep 17 00:00:00 2001 From: Brandon Philips <brandon@ifup.org> Date: Sun, 26 Jun 2016 14:44:09 -0700 Subject: [PATCH 199/339] docs: proposals: self-hosted-kubelet fix link Broken link caused by inversed markdown formatting. --- docs/proposals/self-hosted-kubelet.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/proposals/self-hosted-kubelet.md b/docs/proposals/self-hosted-kubelet.md index 55aae23c76..d174a1232e 100644 --- a/docs/proposals/self-hosted-kubelet.md +++ b/docs/proposals/self-hosted-kubelet.md @@ -36,8 +36,8 @@ Documentation for other releases can be found at ## Abstract -In a self-hosted Kubernetes deployment (see (this -comment)[https://github.com/kubernetes/kubernetes/issues/246#issuecomment-64533959] +In a self-hosted Kubernetes deployment (see [this +comment](https://github.com/kubernetes/kubernetes/issues/246#issuecomment-64533959) for background on self hosted kubernetes), we have the initial bootstrap problem. When running self-hosted components, there needs to be a mechanism for pivoting from the initial bootstrap state to the kubernetes-managed (self-hosted) state. From b94442f470122f100fab7c09706a2051529cb7f1 Mon Sep 17 00:00:00 2001 From: saadali <saadali@google.com> Date: Sun, 26 Jun 2016 15:33:32 -0700 Subject: [PATCH 200/339] Mark "RW PD, remove it, then schedule" test flaky --- test/e2e/pd.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/e2e/pd.go b/test/e2e/pd.go index 16ca0fe9a9..55a7ef23e5 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -74,7 +74,8 @@ var _ = framework.KubeDescribe("Pod Disks", func() { mathrand.Seed(time.Now().UTC().UnixNano()) }) - It("should schedule a pod w/ a RW PD, remove it, then schedule it on another host [Slow]", func() { + // Flaky-- Issue #27691 + It("[Flaky] should schedule a pod w/ a RW PD, remove it, then schedule it on another host [Slow]", func() { framework.SkipUnlessProviderIs("gce", "gke", "aws") By("creating PD") @@ -133,6 +134,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { return }) + // Flaky-- Issue #27477 It("[Flaky] should schedule a pod w/ a readonly PD on two hosts, then remove both. [Slow]", func() { framework.SkipUnlessProviderIs("gce", "gke") From a5ead79d4362f9bc248fd95cdeef6beee96fb6a5 Mon Sep 17 00:00:00 2001 From: Buddha Prakash <buddhap@google.com> Date: Mon, 20 Jun 2016 22:03:59 -0700 Subject: [PATCH 201/339] Add support for basic cgroup management --- pkg/kubelet/cm/cgroup_manager_linux.go | 113 +++++++++++++++++++ pkg/kubelet/cm/cgroup_manager_unsupported.go | 42 +++++++ pkg/kubelet/cm/helpers_linux.go | 98 ++++++++++++++++ pkg/kubelet/cm/types.go | 56 +++++++++ 4 files changed, 309 insertions(+) create mode 100644 pkg/kubelet/cm/cgroup_manager_linux.go create mode 100644 pkg/kubelet/cm/cgroup_manager_unsupported.go create mode 100644 pkg/kubelet/cm/helpers_linux.go create mode 100644 pkg/kubelet/cm/types.go diff --git a/pkg/kubelet/cm/cgroup_manager_linux.go b/pkg/kubelet/cm/cgroup_manager_linux.go new file mode 100644 index 0000000000..e147319ec6 --- /dev/null +++ b/pkg/kubelet/cm/cgroup_manager_linux.go @@ -0,0 +1,113 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cm + +import ( + "fmt" + + libcontainerconfigs "github.com/opencontainers/runc/libcontainer/configs" +) + +// cgroupManagerImpl implements the CgroupManager interface. +// Its a stateless object which can be used to +// update,create or delete any number of cgroups +// It uses the Libcontainer raw fs cgroup manager for cgroup management. +type cgroupManagerImpl struct { + // subsystems holds information about all the + // mounted cgroup subsytems on the node + subsystems *cgroupSubsystems +} + +// Make sure that cgroupManagerImpl implements the CgroupManager interface +var _ CgroupManager = &cgroupManagerImpl{} + +// NewCgroupManager is a factory method that returns a CgroupManager +func NewCgroupManager(cs *cgroupSubsystems) CgroupManager { + return &cgroupManagerImpl{ + subsystems: cs, + } +} + +// Destroy destroys the specified cgroup +func (m *cgroupManagerImpl) Destroy(cgroupConfig *CgroupConfig) error { + //cgroup name + name := cgroupConfig.Name + + // get the fscgroup Manager with the specified cgroup configuration + fsCgroupManager, err := getLibcontainerCgroupManager(cgroupConfig, m.subsystems) + + if err != nil { + return fmt.Errorf("Unable to destroy cgroup paths for cgroup %v : %v", name, err) + } + // Delete cgroups using libcontainers Managers Destroy() method + if err := fsCgroupManager.Destroy(); err != nil { + return fmt.Errorf("Unable to destroy cgroup paths for cgroup %v : %v", name, err) + } + return nil +} + +// Update updates the cgroup with the specified Cgroup Configuration +func (m *cgroupManagerImpl) Update(cgroupConfig *CgroupConfig) error { + //cgroup name + name := cgroupConfig.Name + + // get the fscgroup Manager with the specified cgroup configuration + fsCgroupManager, err := getLibcontainerCgroupManager(cgroupConfig, m.subsystems) + if err != nil { + return fmt.Errorf("Failed to update cgroup for %v : %v", name, err) + } + // get config object for passing to Set() + config := &libcontainerconfigs.Config{ + Cgroups: fsCgroupManager.Cgroups, + } + + // Update cgroup configuration using libcontainers Managers Set() method + if err := fsCgroupManager.Set(config); err != nil { + return fmt.Errorf("Failed to update cgroup for %v: %v", name, err) + } + return nil +} + +// Create creates the specified cgroup +func (m *cgroupManagerImpl) Create(cgroupConfig *CgroupConfig) error { + //cgroup name + name := cgroupConfig.Name + + // get the fscgroup Manager with the specified cgroup configuration + fsCgroupManager, err := getLibcontainerCgroupManager(cgroupConfig, m.subsystems) + if err != nil { + return fmt.Errorf("Failed to create cgroup for %v : %v", name, err) + } + // get config object for passing to libcontainer's Set() method + config := &libcontainerconfigs.Config{ + Cgroups: fsCgroupManager.Cgroups, + } + //Apply(0) is a hack to create the cgroup directories for each resource + // subsystem. The function [cgroups.Manager.apply()] applies cgroup + // configuration to the process with the specified pid. + // It creates cgroup files for each subsytems and writes the pid + // in the tasks file. We use the function to create all the required + // cgroup files but not attach any "real" pid to the cgroup. + if err := fsCgroupManager.Apply(0); err != nil { + return fmt.Errorf("Failed to create cgroup for %v: %v", name, err) + } + // Update cgroup configuration using libcontainers Managers Set() method + if err := fsCgroupManager.Set(config); err != nil { + return fmt.Errorf("Failed to create cgroup for %v: %v", name, err) + } + return nil +} diff --git a/pkg/kubelet/cm/cgroup_manager_unsupported.go b/pkg/kubelet/cm/cgroup_manager_unsupported.go new file mode 100644 index 0000000000..a00e030a2e --- /dev/null +++ b/pkg/kubelet/cm/cgroup_manager_unsupported.go @@ -0,0 +1,42 @@ +// +build !linux + +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cm + +import "fmt" + +type unsupportedCgroupManager struct{} + +// Make sure that unsupportedCgroupManager implements the CgroupManager interface +var _ CgroupManager = &unsupportedCgroupManager{} + +func NewCgroupManager(_ *cgroupSubsystems) CgroupManager { + return &unsupportedCgroupManager{} +} + +func (m *unsupportedCgroupManager) Destroy(_ *CgroupConfig) error { + return nil +} + +func (m *unsupportedCgroupManager) Update(_ *CgroupConfig) error { + return nil +} + +func (m *unsupportedCgroupManager) Create(_ *CgroupConfig) error { + return fmt.Errorf("Cgroup Manager is not supported in this build") +} diff --git a/pkg/kubelet/cm/helpers_linux.go b/pkg/kubelet/cm/helpers_linux.go new file mode 100644 index 0000000000..12a0b315c6 --- /dev/null +++ b/pkg/kubelet/cm/helpers_linux.go @@ -0,0 +1,98 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cm + +import ( + "fmt" + "path" + + libcontainercgroups "github.com/opencontainers/runc/libcontainer/cgroups" + cgroupfs "github.com/opencontainers/runc/libcontainer/cgroups/fs" + libcontainerconfigs "github.com/opencontainers/runc/libcontainer/configs" +) + +// cgroupSubsystems holds information about the mounted cgroup subsytems +type cgroupSubsystems struct { + // Cgroup subsystem mounts. + // e.g.: "/sys/fs/cgroup/cpu" -> ["cpu", "cpuacct"] + mounts []libcontainercgroups.Mount + + // Cgroup subsystem to their mount location. + // e.g.: "cpu" -> "/sys/fs/cgroup/cpu" + mountPoints map[string]string +} + +// GetCgroupSubsystems returns information about the mounted cgroup subsystems +func getCgroupSubsystems() (*cgroupSubsystems, error) { + // Get all cgroup mounts. + allCgroups, err := libcontainercgroups.GetCgroupMounts() + if err != nil { + return &cgroupSubsystems{}, err + } + if len(allCgroups) == 0 { + return &cgroupSubsystems{}, fmt.Errorf("failed to find cgroup mounts") + } + + //TODO(@dubstack) should we trim to only the supported ones + mountPoints := make(map[string]string, len(allCgroups)) + for _, mount := range allCgroups { + for _, subsystem := range mount.Subsystems { + mountPoints[subsystem] = mount.Mountpoint + } + } + return &cgroupSubsystems{ + mounts: allCgroups, + mountPoints: mountPoints, + }, nil +} + +// getLibcontainerCgroupManager returns libcontainer's cgroups manager +// object with the specified cgroup configuration +func getLibcontainerCgroupManager(cgroupConfig *CgroupConfig, subsystems *cgroupSubsystems) (*cgroupfs.Manager, error) { + // get cgroup name + name := cgroupConfig.Name + + // Get map of all cgroup paths on the system for the particular cgroup + cgroupPaths := make(map[string]string, len(subsystems.mountPoints)) + for key, val := range subsystems.mountPoints { + cgroupPaths[key] = path.Join(val, name) + } + + // Extract the cgroup resource parameters + resourceConfig := cgroupConfig.ResourceParameters + resources := &libcontainerconfigs.Resources{} + resources.AllowAllDevices = true + if resourceConfig.Memory != nil { + resources.Memory = *resourceConfig.Memory + } + if resourceConfig.CpuShares != nil { + resources.CpuShares = *resourceConfig.CpuShares + } + if resourceConfig.CpuQuota != nil { + resources.CpuQuota = *resourceConfig.CpuQuota + } + // Initialize libcontainer's cgroup config + libcontainerCgroupConfig := &libcontainerconfigs.Cgroup{ + Name: path.Base(name), + Parent: path.Dir(name), + Resources: resources, + } + return &cgroupfs.Manager{ + Cgroups: libcontainerCgroupConfig, + Paths: cgroupPaths, + }, nil +} diff --git a/pkg/kubelet/cm/types.go b/pkg/kubelet/cm/types.go new file mode 100644 index 0000000000..a225bb8d6d --- /dev/null +++ b/pkg/kubelet/cm/types.go @@ -0,0 +1,56 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cm + +// ResourceConfig holds information about all the supported cgroup resource parameters. +type ResourceConfig struct { + // Memory limit (in bytes). + Memory *int64 + // CPU shares (relative weight vs. other containers). + CpuShares *int64 + // CPU hardcap limit (in usecs). Allowed cpu time in a given period. + CpuQuota *int64 +} + +// CgroupConfig holds the cgroup configuration information. +// This is common object which is used to specify +// cgroup information to both systemd and raw cgroup fs +// implementation of the Cgroup Manager interface. +type CgroupConfig struct { + // We would expect systemd implementation to make appropriate + // name conversion. For example, if we pass /foo/bar + // then systemd should convert the name to something like + // foo.slice/foo-bar.slice + + // Fully qualified name + Name string + // ResourceParameters contains various cgroups settings to apply. + ResourceParameters *ResourceConfig +} + +// CgroupManager allows for cgroup management. +// Supports Cgroup Creation ,Deletion and Updates. +type CgroupManager interface { + // Create creates and applies the cgroup configurations on the cgroup. + // It just creates the leaf cgroups. + // It expects the parent cgroup to already exist. + Create(*CgroupConfig) error + // Destroys the cgroup. + Destroy(*CgroupConfig) error + // Update cgroup configuration. + Update(*CgroupConfig) error +} From 4acb64f8bd7eb3ff22f5197143e87ae6cbe1c518 Mon Sep 17 00:00:00 2001 From: Buddha Prakash <buddhap@google.com> Date: Sun, 26 Jun 2016 16:08:18 -0700 Subject: [PATCH 202/339] Make Qos naming consistent across the codebase --- pkg/kubectl/describe.go | 2 +- pkg/kubectl/sorted_resource_name_list.go | 2 +- pkg/kubelet/eviction/eviction_manager.go | 2 +- pkg/kubelet/eviction/helpers.go | 6 ++--- pkg/kubelet/qos/policy.go | 2 +- pkg/kubelet/qos/qos.go | 22 +++++++++---------- pkg/kubelet/qos/qos_test.go | 4 ++-- pkg/quota/evaluator/core/pods.go | 2 +- .../algorithm/predicates/predicates.go | 2 +- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pkg/kubectl/describe.go b/pkg/kubectl/describe.go index a29725c381..266e054f68 100644 --- a/pkg/kubectl/describe.go +++ b/pkg/kubectl/describe.go @@ -540,7 +540,7 @@ func describePod(pod *api.Pod, events *api.EventList) (string, error) { } } describeVolumes(pod.Spec.Volumes, out, "") - fmt.Fprintf(out, "QoS Class:\t%s\n", qos.GetPodQos(pod)) + fmt.Fprintf(out, "QoS Class:\t%s\n", qos.GetPodQOS(pod)) if events != nil { DescribeEvents(events, out) } diff --git a/pkg/kubectl/sorted_resource_name_list.go b/pkg/kubectl/sorted_resource_name_list.go index bf25b1ceba..2bce7dfc2d 100644 --- a/pkg/kubectl/sorted_resource_name_list.go +++ b/pkg/kubectl/sorted_resource_name_list.go @@ -62,7 +62,7 @@ func (list SortableResourceQuotas) Less(i, j int) bool { } // SortedQoSResourceNames returns the sorted resource names of a QoS list. -func SortedQoSResourceNames(list qos.QoSList) []api.ResourceName { +func SortedQoSResourceNames(list qos.QOSList) []api.ResourceName { resources := make([]api.ResourceName, 0, len(list)) for res := range list { resources = append(resources, res) diff --git a/pkg/kubelet/eviction/eviction_manager.go b/pkg/kubelet/eviction/eviction_manager.go index de85bb402b..ca9c98e3be 100644 --- a/pkg/kubelet/eviction/eviction_manager.go +++ b/pkg/kubelet/eviction/eviction_manager.go @@ -87,7 +87,7 @@ func (m *managerImpl) Admit(attrs *lifecycle.PodAdmitAttributes) lifecycle.PodAd if len(m.nodeConditions) == 0 { return lifecycle.PodAdmitResult{Admit: true} } - notBestEffort := qos.BestEffort != qos.GetPodQos(attrs.Pod) + notBestEffort := qos.BestEffort != qos.GetPodQOS(attrs.Pod) if notBestEffort { return lifecycle.PodAdmitResult{Admit: true} } diff --git a/pkg/kubelet/eviction/helpers.go b/pkg/kubelet/eviction/helpers.go index 0fd6a6552c..f4b58051eb 100644 --- a/pkg/kubelet/eviction/helpers.go +++ b/pkg/kubelet/eviction/helpers.go @@ -299,10 +299,10 @@ func (ms *multiSorter) Less(i, j int) bool { return ms.cmp[k](p1, p2) < 0 } -// qos compares pods by QoS (BestEffort < Burstable < Guaranteed) +// qosComparator compares pods by QoS (BestEffort < Burstable < Guaranteed) func qosComparator(p1, p2 *api.Pod) int { - qosP1 := qos.GetPodQos(p1) - qosP2 := qos.GetPodQos(p2) + qosP1 := qos.GetPodQOS(p1) + qosP2 := qos.GetPodQOS(p2) // its a tie if qosP1 == qosP2 { return 0 diff --git a/pkg/kubelet/qos/policy.go b/pkg/kubelet/qos/policy.go index b8b3b619ba..50961bfe3d 100644 --- a/pkg/kubelet/qos/policy.go +++ b/pkg/kubelet/qos/policy.go @@ -35,7 +35,7 @@ const ( // and 1000. Containers with higher OOM scores are killed if the system runs out of memory. // See https://lwn.net/Articles/391222/ for more information. func GetContainerOOMScoreAdjust(pod *api.Pod, container *api.Container, memoryCapacity int64) int { - switch GetPodQos(pod) { + switch GetPodQOS(pod) { case Guaranteed: // Guaranteed containers should be the last to get killed. return guaranteedOOMScoreAdj diff --git a/pkg/kubelet/qos/qos.go b/pkg/kubelet/qos/qos.go index 27f6efe5f5..4e10587fe9 100644 --- a/pkg/kubelet/qos/qos.go +++ b/pkg/kubelet/qos/qos.go @@ -41,11 +41,11 @@ func isResourceBestEffort(container *api.Container, resource api.ResourceName) b return !hasReq || req.Value() == 0 } -// GetPodQos returns the QoS class of a pod. +// GetPodQOS returns the QoS class of a pod. // A pod is besteffort if none of its containers have specified any requests or limits. // A pod is guaranteed only when requests and limits are specified for all the containers and they are equal. // A pod is burstable if limits and requests do not match across all containers. -func GetPodQos(pod *api.Pod) QOSClass { +func GetPodQOS(pod *api.Pod) QOSClass { requests := api.ResourceList{} limits := api.ResourceList{} zeroQuantity := resource.MustParse("0") @@ -99,23 +99,23 @@ func GetPodQos(pod *api.Pod) QOSClass { return Burstable } -// QoSList is a set of (resource name, QoS class) pairs. -type QoSList map[api.ResourceName]QOSClass +// QOSList is a set of (resource name, QoS class) pairs. +type QOSList map[api.ResourceName]QOSClass -// GetQoS returns a mapping of resource name to QoS class of a container -func GetQoS(container *api.Container) QoSList { - resourceToQoS := QoSList{} +// GetQOS returns a mapping of resource name to QoS class of a container +func GetQOS(container *api.Container) QOSList { + resourceToQOS := QOSList{} for resource := range allResources(container) { switch { case isResourceGuaranteed(container, resource): - resourceToQoS[resource] = Guaranteed + resourceToQOS[resource] = Guaranteed case isResourceBestEffort(container, resource): - resourceToQoS[resource] = BestEffort + resourceToQOS[resource] = BestEffort default: - resourceToQoS[resource] = Burstable + resourceToQOS[resource] = Burstable } } - return resourceToQoS + return resourceToQOS } // supportedComputeResources is the list of supported compute resources diff --git a/pkg/kubelet/qos/qos_test.go b/pkg/kubelet/qos/qos_test.go index 8beaa87855..512d9e0098 100644 --- a/pkg/kubelet/qos/qos_test.go +++ b/pkg/kubelet/qos/qos_test.go @@ -59,7 +59,7 @@ func newPod(name string, containers []api.Container) *api.Pod { } } -func TestGetPodQos(t *testing.T) { +func TestGetPodQOS(t *testing.T) { testCases := []struct { pod *api.Pod expected QOSClass @@ -125,7 +125,7 @@ func TestGetPodQos(t *testing.T) { }, } for _, testCase := range testCases { - if actual := GetPodQos(testCase.pod); testCase.expected != actual { + if actual := GetPodQOS(testCase.pod); testCase.expected != actual { t.Errorf("invalid qos pod %s, expected: %s, actual: %s", testCase.pod.Name, testCase.expected, actual) } } diff --git a/pkg/quota/evaluator/core/pods.go b/pkg/quota/evaluator/core/pods.go index ed15d09cd9..1ffc9ac9e4 100644 --- a/pkg/quota/evaluator/core/pods.go +++ b/pkg/quota/evaluator/core/pods.go @@ -172,7 +172,7 @@ func PodMatchesScopeFunc(scope api.ResourceQuotaScope, object runtime.Object) bo } func isBestEffort(pod *api.Pod) bool { - return qos.GetPodQos(pod) == qos.BestEffort + return qos.GetPodQOS(pod) == qos.BestEffort } func isTerminating(pod *api.Pod) bool { diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates.go b/plugin/pkg/scheduler/algorithm/predicates/predicates.go index 3be33839a3..f97b3c0078 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates.go @@ -1020,7 +1020,7 @@ func tolerationsToleratesTaints(tolerations []api.Toleration, taints []api.Taint // Determine if a pod is scheduled with best-effort QoS func isPodBestEffort(pod *api.Pod) bool { - return qos.GetPodQos(pod) == qos.BestEffort + return qos.GetPodQOS(pod) == qos.BestEffort } // CheckNodeMemoryPressurePredicate checks if a pod can be scheduled on a node From aecb5357a60d47abd16047edce49eff8baaf4396 Mon Sep 17 00:00:00 2001 From: Random-Liu <taotaotheripper@gmail.com> Date: Sun, 26 Jun 2016 16:34:25 -0700 Subject: [PATCH 203/339] Fix node problem detector e2e flake --- test/e2e/node_problem_detector.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/node_problem_detector.go b/test/e2e/node_problem_detector.go index 9b49948cbb..5dc5dc0576 100644 --- a/test/e2e/node_problem_detector.go +++ b/test/e2e/node_problem_detector.go @@ -198,8 +198,8 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() { Consistently(func() error { return verifyNoEvents(c.Events(eventNamespace), eventListOptions) }, pollConsistent, pollInterval).Should(Succeed()) - By("Make sure the default node condition is false") - Consistently(func() error { + By("Make sure the default node condition is generated") + Eventually(func() error { return verifyCondition(c.Nodes(), node.Name, condition, api.ConditionFalse, defaultReason, defaultMessage) }, pollConsistent, pollInterval).Should(Succeed()) From 1d08218c1b9e5f3662485812461008963d136eaa Mon Sep 17 00:00:00 2001 From: Girish Kalele <gkalele@google.com> Date: Fri, 17 Jun 2016 17:33:18 -0700 Subject: [PATCH 204/339] Enhance kubedns container health checks to cover kubedns container --- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base | 2 +- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in | 2 +- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base index caf97c7088..1adb7dd628 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base @@ -107,7 +107,7 @@ spec: cpu: 10m memory: 20Mi args: - - -cmd=nslookup kubernetes.default.svc.__PILLAR__DNS__DOMAIN__ 127.0.0.1 >/dev/null + - -cmd=nslookup kubernetes.default.svc.__PILLAR__DNS__DOMAIN__ 127.0.0.1 >/dev/null && nslookup kubernetes.default.svc.__PILLAR__DNS__DOMAIN__ 127.0.0.1:10053 >/dev/null - -port=8080 - -quiet ports: diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in index 138d3d9853..5e847a5447 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in @@ -107,7 +107,7 @@ spec: cpu: 10m memory: 20Mi args: - - -cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1 >/dev/null + - -cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1 >/dev/null && nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1:10053 >/dev/null - -port=8080 - -quiet ports: diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed index 960a6c5e3d..ac1c3a829b 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed @@ -106,7 +106,7 @@ spec: cpu: 10m memory: 20Mi args: - - -cmd=nslookup kubernetes.default.svc.$DNS_DOMAIN 127.0.0.1 >/dev/null + - -cmd=nslookup kubernetes.default.svc.$DNS_DOMAIN 127.0.0.1 >/dev/null && nslookup kubernetes.default.svc.$DNS_DOMAIN 127.0.0.1:10053 >/dev/null - -port=8080 - -quiet ports: From 77cfa34fd923e15e22adcab9421a04d6ef8af25c Mon Sep 17 00:00:00 2001 From: Michael Rubin <mrubin@google.com> Date: Thu, 19 May 2016 15:22:43 -0700 Subject: [PATCH 205/339] Add dedent pkg --- Godeps/Godeps.json | 5 ++ Godeps/LICENSES | 29 +++++++++++ vendor/github.com/renstrom/dedent/.travis.yml | 11 ++++ vendor/github.com/renstrom/dedent/LICENSE | 21 ++++++++ vendor/github.com/renstrom/dedent/README.md | 50 +++++++++++++++++++ vendor/github.com/renstrom/dedent/dedent.go | 49 ++++++++++++++++++ 6 files changed, 165 insertions(+) create mode 100644 vendor/github.com/renstrom/dedent/.travis.yml create mode 100644 vendor/github.com/renstrom/dedent/LICENSE create mode 100644 vendor/github.com/renstrom/dedent/README.md create mode 100644 vendor/github.com/renstrom/dedent/dedent.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 2ac71a977d..cd23ec1760 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1773,6 +1773,11 @@ "Comment": "v1.0.0-920-g934dbf8", "Rev": "934dbf81977c67c521c75492dc1f55ca74dc5b04" }, + { + "ImportPath": "github.com/renstrom/dedent", + "Comment": "v1.0.0-3-g020d11c", + "Rev": "020d11c3b9c0c7a3c2efcc8e5cf5b9ef7bcea21f" + }, { "ImportPath": "github.com/robfig/cron", "Comment": "v1-16-g0f39cf7", diff --git a/Godeps/LICENSES b/Godeps/LICENSES index 0413ce310c..7a658ec42a 100644 --- a/Godeps/LICENSES +++ b/Godeps/LICENSES @@ -57322,6 +57322,35 @@ specific language governing permissions and limitations under the License. ================================================================================ +================================================================================ += vendor/github.com/renstrom/dedent licensed under: = + +The MIT License (MIT) + +Copyright (c) 2015 Peter Renström + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + += vendor/github.com/renstrom/dedent/LICENSE 285693e07a6e1fd790cb3f3b8b5127db - +================================================================================ + + ================================================================================ = vendor/github.com/robfig/cron licensed under: = diff --git a/vendor/github.com/renstrom/dedent/.travis.yml b/vendor/github.com/renstrom/dedent/.travis.yml new file mode 100644 index 0000000000..e61f42b872 --- /dev/null +++ b/vendor/github.com/renstrom/dedent/.travis.yml @@ -0,0 +1,11 @@ +language: go + +go: + - 1.0 + - 1.1 + - 1.2 + - 1.3 + - 1.4 + - 1.5 + +sudo: false diff --git a/vendor/github.com/renstrom/dedent/LICENSE b/vendor/github.com/renstrom/dedent/LICENSE new file mode 100644 index 0000000000..66a9870fcf --- /dev/null +++ b/vendor/github.com/renstrom/dedent/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Peter Renström + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/renstrom/dedent/README.md b/vendor/github.com/renstrom/dedent/README.md new file mode 100644 index 0000000000..35b5aa1341 --- /dev/null +++ b/vendor/github.com/renstrom/dedent/README.md @@ -0,0 +1,50 @@ +# Dedent + +[![Build Status](https://travis-ci.org/renstrom/dedent.svg?branch=master)](https://travis-ci.org/renstrom/dedent) +[![Godoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/renstrom/dedent) + +Removes common leading whitespace from multiline strings. Inspired by [`textwrap.dedent`](https://docs.python.org/3/library/textwrap.html#textwrap.dedent) in Python. + +## Usage / example + +Imagine the following snippet that prints a multiline string. You want the indentation to both look nice in the code as well as in the actual output. + +```go +package main + +import ( + "fmt" + + "github.com/renstrom/dedent" +) + +func main() { + s := `Lorem ipsum dolor sit amet, + consectetur adipiscing elit. + Curabitur justo tellus, facilisis nec efficitur dictum, + fermentum vitae ligula. Sed eu convallis sapien.` + fmt.Println(dedent.Dedent(s)) + fmt.Println("-------------") + fmt.Println(s) +} +``` + +To illustrate the difference, here's the output: + + +```bash +$ go run main.go +Lorem ipsum dolor sit amet, +consectetur adipiscing elit. +Curabitur justo tellus, facilisis nec efficitur dictum, +fermentum vitae ligula. Sed eu convallis sapien. +------------- +Lorem ipsum dolor sit amet, + consectetur adipiscing elit. + Curabitur justo tellus, facilisis nec efficitur dictum, + fermentum vitae ligula. Sed eu convallis sapien. +``` + +## License + +MIT diff --git a/vendor/github.com/renstrom/dedent/dedent.go b/vendor/github.com/renstrom/dedent/dedent.go new file mode 100644 index 0000000000..9d5bfbabd1 --- /dev/null +++ b/vendor/github.com/renstrom/dedent/dedent.go @@ -0,0 +1,49 @@ +package dedent + +import ( + "regexp" + "strings" +) + +var ( + whitespaceOnly = regexp.MustCompile("(?m)^[ \t]+$") + leadingWhitespace = regexp.MustCompile("(?m)(^[ \t]*)(?:[^ \t\n])") +) + +// Dedent removes any common leading whitespace from every line in text. +// +// This can be used to make multiline strings to line up with the left edge of +// the display, while still presenting them in the source code in indented +// form. +func Dedent(text string) string { + var margin string + + text = whitespaceOnly.ReplaceAllString(text, "") + indents := leadingWhitespace.FindAllStringSubmatch(text, -1) + + // Look for the longest leading string of spaces and tabs common to all + // lines. + for i, indent := range indents { + if i == 0 { + margin = indent[1] + } else if strings.HasPrefix(indent[1], margin) { + // Current line more deeply indented than previous winner: + // no change (previous winner is still on top). + continue + } else if strings.HasPrefix(margin, indent[1]) { + // Current line consistent with and no deeper than previous winner: + // it's the new winner. + margin = indent[1] + } else { + // Current line and previous winner have no common whitespace: + // there is no margin. + margin = "" + break + } + } + + if margin != "" { + text = regexp.MustCompile("(?m)^"+margin).ReplaceAllString(text, "") + } + return text +} From 760b04e294d82cd2d2d0ff5a32e8999b34d3f229 Mon Sep 17 00:00:00 2001 From: Michael Rubin <mrubin@google.com> Date: Fri, 20 May 2016 10:49:56 -0700 Subject: [PATCH 206/339] Use dedent for the kubectl commands The one side effect is that for the "kubectl help" commands a newline is prepended to output, which will alter the yaml output. Here we use dedent to format the code to match the output. hack/update-generated-docs.sh has been run and the affected files have been added. Note: for describe.go we added a period to the end of an output message. --- pkg/kubectl/cmd/annotate.go | 48 +++++++------- pkg/kubectl/cmd/apply.go | 22 ++++--- pkg/kubectl/cmd/attach.go | 18 +++--- pkg/kubectl/cmd/autoscale.go | 20 +++--- pkg/kubectl/cmd/config/create_authinfo.go | 21 +++--- pkg/kubectl/cmd/config/create_cluster.go | 21 +++--- pkg/kubectl/cmd/config/create_context.go | 13 ++-- pkg/kubectl/cmd/config/current_context.go | 11 ++-- pkg/kubectl/cmd/config/set.go | 8 ++- pkg/kubectl/cmd/config/unset.go | 6 +- pkg/kubectl/cmd/config/view.go | 17 +++-- pkg/kubectl/cmd/convert.go | 39 +++++++----- pkg/kubectl/cmd/create.go | 17 +++-- pkg/kubectl/cmd/create_configmap.go | 33 +++++----- pkg/kubectl/cmd/create_namespace.go | 12 ++-- pkg/kubectl/cmd/create_secret.go | 74 ++++++++++++---------- pkg/kubectl/cmd/create_serviceaccount.go | 12 ++-- pkg/kubectl/cmd/delete.go | 45 +++++++------ pkg/kubectl/cmd/describe.go | 46 ++++++++------ pkg/kubectl/cmd/drain.go | 71 ++++++++++++--------- pkg/kubectl/cmd/edit.go | 49 +++++++------- pkg/kubectl/cmd/exec.go | 18 +++--- pkg/kubectl/cmd/explain.go | 17 +++-- pkg/kubectl/cmd/expose.go | 57 +++++++++-------- pkg/kubectl/cmd/get.go | 45 +++++++------ pkg/kubectl/cmd/label.go | 39 ++++++------ pkg/kubectl/cmd/logs.go | 24 +++---- pkg/kubectl/cmd/patch.go | 29 +++++---- pkg/kubectl/cmd/portforward.go | 21 +++--- pkg/kubectl/cmd/proxy.go | 39 ++++++------ pkg/kubectl/cmd/replace.go | 31 +++++---- pkg/kubectl/cmd/rollingupdate.go | 37 ++++++----- pkg/kubectl/cmd/rollout/rollout.go | 18 ++++-- pkg/kubectl/cmd/rollout/rollout_history.go | 15 +++-- pkg/kubectl/cmd/rollout/rollout_pause.go | 21 +++--- pkg/kubectl/cmd/rollout/rollout_resume.go | 17 +++-- pkg/kubectl/cmd/rollout/rollout_status.go | 11 ++-- pkg/kubectl/cmd/rollout/rollout_undo.go | 15 +++-- pkg/kubectl/cmd/run.go | 49 +++++++------- pkg/kubectl/cmd/scale.go | 35 +++++----- pkg/kubectl/cmd/set/set.go | 10 +-- pkg/kubectl/cmd/set/set_image.go | 25 ++++---- pkg/kubectl/cmd/stop.go | 31 +++++---- pkg/kubectl/cmd/taint.go | 27 ++++---- 44 files changed, 686 insertions(+), 548 deletions(-) diff --git a/pkg/kubectl/cmd/annotate.go b/pkg/kubectl/cmd/annotate.go index 50d0806e4e..789967aed7 100644 --- a/pkg/kubectl/cmd/annotate.go +++ b/pkg/kubectl/cmd/annotate.go @@ -25,6 +25,7 @@ import ( "strings" "github.com/golang/glog" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" @@ -58,42 +59,43 @@ type AnnotateOptions struct { recursive bool } -const ( +var ( annotate_resources = ` pod (po), service (svc), replicationcontroller (rc), node (no), event (ev), componentstatuse (cs), limitrange (limits), persistentvolume (pv), persistentvolumeclaim (pvc), - horizontalpodautoscaler (hpa), resourcequota (quota), secret -` + horizontalpodautoscaler (hpa), resourcequota (quota), secret` - annotate_long = `Update the annotations on one or more resources. + annotate_long = dedent.Dedent(` + Update the annotations on one or more resources. -An annotation is a key/value pair that can hold larger (compared to a label), and possibly not human-readable, data. -It is intended to store non-identifying auxiliary data, especially data manipulated by tools and system extensions. -If --overwrite is true, then existing annotations can be overwritten, otherwise attempting to overwrite an annotation will result in an error. -If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used. + An annotation is a key/value pair that can hold larger (compared to a label), and possibly not human-readable, data. + It is intended to store non-identifying auxiliary data, especially data manipulated by tools and system extensions. + If --overwrite is true, then existing annotations can be overwritten, otherwise attempting to overwrite an annotation will result in an error. + If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used. -Possible resources include (case insensitive):` + annotate_resources + Possible resources include (case insensitive):`) + annotate_resources - annotate_example = `# Update pod 'foo' with the annotation 'description' and the value 'my frontend'. -# If the same annotation is set multiple times, only the last value will be applied -kubectl annotate pods foo description='my frontend' + annotate_example = dedent.Dedent(` + # Update pod 'foo' with the annotation 'description' and the value 'my frontend'. + # If the same annotation is set multiple times, only the last value will be applied + kubectl annotate pods foo description='my frontend' -# Update a pod identified by type and name in "pod.json" -kubectl annotate -f pod.json description='my frontend' + # Update a pod identified by type and name in "pod.json" + kubectl annotate -f pod.json description='my frontend' -# Update pod 'foo' with the annotation 'description' and the value 'my frontend running nginx', overwriting any existing value. -kubectl annotate --overwrite pods foo description='my frontend running nginx' + # Update pod 'foo' with the annotation 'description' and the value 'my frontend running nginx', overwriting any existing value. + kubectl annotate --overwrite pods foo description='my frontend running nginx' -# Update all pods in the namespace -kubectl annotate pods --all description='my frontend running nginx' + # Update all pods in the namespace + kubectl annotate pods --all description='my frontend running nginx' -# Update pod 'foo' only if the resource is unchanged from version 1. -kubectl annotate pods foo description='my frontend running nginx' --resource-version=1 + # Update pod 'foo' only if the resource is unchanged from version 1. + kubectl annotate pods foo description='my frontend running nginx' --resource-version=1 -# Update pod 'foo' by removing an annotation named 'description' if it exists. -# Does not require the --overwrite flag. -kubectl annotate pods foo description-` + # Update pod 'foo' by removing an annotation named 'description' if it exists. + # Does not require the --overwrite flag. + kubectl annotate pods foo description-`) ) func NewCmdAnnotate(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/apply.go b/pkg/kubectl/cmd/apply.go index 8236662d27..bb073759b5 100644 --- a/pkg/kubectl/cmd/apply.go +++ b/pkg/kubectl/cmd/apply.go @@ -22,6 +22,7 @@ import ( "time" "github.com/jonboulle/clockwork" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" @@ -50,17 +51,20 @@ const ( triesBeforeBackOff = 1 ) -const ( - apply_long = `Apply a configuration to a resource by filename or stdin. -The resource will be created if it doesn't exist yet. -To use 'apply', always create the resource initially with either 'apply' or 'create --save-config'. +var ( + apply_long = dedent.Dedent(` + Apply a configuration to a resource by filename or stdin. + This resource will be created if it doesn't exist yet. + To use 'apply', always create the resource initially with either 'apply' or 'create --save-config'. -JSON and YAML formats are accepted.` - apply_example = `# Apply the configuration in pod.json to a pod. -kubectl apply -f ./pod.json + JSON and YAML formats are accepted.`) -# Apply the JSON passed into stdin to a pod. -cat pod.json | kubectl apply -f -` + apply_example = dedent.Dedent(` + # Apply the configuration in pod.json to a pod. + kubectl apply -f ./pod.json + + # Apply the JSON passed into stdin to a pod. + cat pod.json | kubectl apply -f -`) ) func NewCmdApply(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/attach.go b/pkg/kubectl/cmd/attach.go index ed083ac239..241dac3327 100644 --- a/pkg/kubectl/cmd/attach.go +++ b/pkg/kubectl/cmd/attach.go @@ -22,6 +22,7 @@ import ( "net/url" "github.com/golang/glog" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" @@ -35,16 +36,17 @@ import ( "k8s.io/kubernetes/pkg/util/term" ) -const ( - attach_example = `# Get output from running pod 123456-7890, using the first container by default -kubectl attach 123456-7890 +var ( + attach_example = dedent.Dedent(` + # Get output from running pod 123456-7890, using the first container by default + kubectl attach 123456-7890 -# Get output from ruby-container from pod 123456-7890 -kubectl attach 123456-7890 -c ruby-container + # Get output from ruby-container from pod 123456-7890 + kubectl attach 123456-7890 -c ruby-container -# Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-7890 -# and sends stdout/stderr from 'bash' back to the client -kubectl attach 123456-7890 -c ruby-container -i -t` + # Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-7890 + # and sends stdout/stderr from 'bash' back to the client + kubectl attach 123456-7890 -c ruby-container -i -t`) ) func NewCmdAttach(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/autoscale.go b/pkg/kubectl/cmd/autoscale.go index 8419ee8ec9..8b77b3b441 100644 --- a/pkg/kubectl/cmd/autoscale.go +++ b/pkg/kubectl/cmd/autoscale.go @@ -20,6 +20,8 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" + "k8s.io/kubernetes/pkg/kubectl" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/kubectl/resource" @@ -35,17 +37,19 @@ type AutoscaleOptions struct { Recursive bool } -const ( - autoscaleLong = `Creates an autoscaler that automatically chooses and sets the number of pods that run in a kubernetes cluster. +var ( + autoscaleLong = dedent.Dedent(` + Creates an autoscaler that automatically chooses and sets the number of pods that run in a kubernetes cluster. -Looks up a Deployment, ReplicaSet, or ReplicationController by name and creates an autoscaler that uses the given resource as a reference. -An autoscaler can automatically increase or decrease number of pods deployed within the system as needed.` + Looks up a Deployment, ReplicaSet, or ReplicationController by name and creates an autoscaler that uses the given resource as a reference. + An autoscaler can automatically increase or decrease number of pods deployed within the system as needed.`) - autoscaleExample = `# Auto scale a deployment "foo", with the number of pods between 2 to 10, no target CPU utilization specfied so a default autoscaling policy will be used: -kubectl autoscale deployment foo --min=2 --max=10 + autoscaleExample = dedent.Dedent(` + # Auto scale a deployment "foo", with the number of pods between 2 to 10, target CPU utilization specified so a default autoscaling policy will be used: + kubectl autoscale deployment foo --min=2 --max=10 -# Auto scale a replication controller "foo", with the number of pods between 1 to 5, target CPU utilization at 80%: -kubectl autoscale rc foo --max=5 --cpu-percent=80` + # Auto scale a replication controller "foo", with the number of pods between 1 to 5, target CPU utilization at 80%: + kubectl autoscale rc foo --max=5 --cpu-percent=80`) ) func NewCmdAutoscale(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/config/create_authinfo.go b/pkg/kubectl/cmd/config/create_authinfo.go index 2fd8cf2cb1..41fd2501d4 100644 --- a/pkg/kubectl/cmd/config/create_authinfo.go +++ b/pkg/kubectl/cmd/config/create_authinfo.go @@ -24,6 +24,7 @@ import ( "path/filepath" "strings" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" @@ -44,7 +45,9 @@ type createAuthInfoOptions struct { embedCertData flag.Tristate } -var create_authinfo_long = fmt.Sprintf(`Sets a user entry in kubeconfig +var ( + create_authinfo_long = fmt.Sprintf(` +Sets a user entry in kubeconfig Specifying a name that already exists will merge new fields on top of existing values. Client-certificate flags: @@ -59,15 +62,17 @@ Specifying a name that already exists will merge new fields on top of existing v Bearer token and basic auth are mutually exclusive. `, clientcmd.FlagCertFile, clientcmd.FlagKeyFile, clientcmd.FlagBearerToken, clientcmd.FlagUsername, clientcmd.FlagPassword) -const create_authinfo_example = `# Set only the "client-key" field on the "cluster-admin" -# entry, without touching other values: -kubectl config set-credentials cluster-admin --client-key=~/.kube/admin.key + create_authinfo_example = dedent.Dedent(` + # Set only the "client-key" field on the "cluster-admin" + # entry, without touching other values: + kubectl config set-credentials cluster-admin --client-key=~/.kube/admin.key -# Set basic auth for the "cluster-admin" entry -kubectl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif + # Set basic auth for the "cluster-admin" entry + kubectl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif -# Embed client certificate data in the "cluster-admin" entry -kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true` + # Embed client certificate data in the "cluster-admin" entry + kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true`) +) func NewCmdConfigSetAuthInfo(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command { options := &createAuthInfoOptions{configAccess: configAccess} diff --git a/pkg/kubectl/cmd/config/create_cluster.go b/pkg/kubectl/cmd/config/create_cluster.go index dc9de40a09..e6a6f7f222 100644 --- a/pkg/kubectl/cmd/config/create_cluster.go +++ b/pkg/kubectl/cmd/config/create_cluster.go @@ -23,6 +23,7 @@ import ( "io/ioutil" "path/filepath" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" @@ -41,17 +42,19 @@ type createClusterOptions struct { embedCAData flag.Tristate } -const ( - create_cluster_long = `Sets a cluster entry in kubeconfig. -Specifying a name that already exists will merge new fields on top of existing values for those fields.` - create_cluster_example = `# Set only the server field on the e2e cluster entry without touching other values. -kubectl config set-cluster e2e --server=https://1.2.3.4 +var ( + create_cluster_long = dedent.Dedent(` + Sets a cluster entry in kubeconfig. + Specifying a name that already exists will merge new fields on top of existing values for those fields.`) + create_cluster_example = dedent.Dedent(` + # Set only the server field on the e2e cluster entry without touching other values. + kubectl config set-cluster e2e --server=https://1.2.3.4 -# Embed certificate authority data for the e2e cluster entry -kubectl config set-cluster e2e --certificate-authority=~/.kube/e2e/kubernetes.ca.crt + # Embed certificate authority data for the e2e cluster entry + kubectl config set-cluster e2e --certificate-authority=~/.kube/e2e/kubernetes.ca.crt -# Disable cert checking for the dev cluster entry -kubectl config set-cluster e2e --insecure-skip-tls-verify=true` + # Disable cert checking for the dev cluster entry + kubectl config set-cluster e2e --insecure-skip-tls-verify=true`) ) func NewCmdConfigSetCluster(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command { diff --git a/pkg/kubectl/cmd/config/create_context.go b/pkg/kubectl/cmd/config/create_context.go index 7f0ca2170d..f72671cdc0 100644 --- a/pkg/kubectl/cmd/config/create_context.go +++ b/pkg/kubectl/cmd/config/create_context.go @@ -21,6 +21,7 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" @@ -36,11 +37,13 @@ type createContextOptions struct { namespace util.StringFlag } -const ( - create_context_long = `Sets a context entry in kubeconfig -Specifying a name that already exists will merge new fields on top of existing values for those fields.` - create_context_example = `# Set the user field on the gce context entry without touching other values -kubectl config set-context gce --user=cluster-admin` +var ( + create_context_long = dedent.Dedent(` + Sets a context entry in kubeconfig + Specifying a name that already exists will merge new fields on top of existing values for those fields.`) + create_context_example = dedent.Dedent(` + # Set the user field on the gce context entry without touching other values + kubectl config set-context gce --user=cluster-admin`) ) func NewCmdConfigSetContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command { diff --git a/pkg/kubectl/cmd/config/current_context.go b/pkg/kubectl/cmd/config/current_context.go index f2941c6dbd..4422add714 100644 --- a/pkg/kubectl/cmd/config/current_context.go +++ b/pkg/kubectl/cmd/config/current_context.go @@ -20,6 +20,7 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" @@ -30,10 +31,12 @@ type CurrentContextOptions struct { ConfigAccess clientcmd.ConfigAccess } -const ( - current_context_long = `Displays the current-context` - current_context_example = `# Display the current-context -kubectl config current-context` +var ( + current_context_long = dedent.Dedent(` + Displays the current-context`) + current_context_example = dedent.Dedent(` + # Display the current-context + kubectl config current-context`) ) func NewCmdConfigCurrentContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command { diff --git a/pkg/kubectl/cmd/config/set.go b/pkg/kubectl/cmd/config/set.go index c1c078bcb8..9c06caaef2 100644 --- a/pkg/kubectl/cmd/config/set.go +++ b/pkg/kubectl/cmd/config/set.go @@ -24,6 +24,7 @@ import ( "reflect" "strings" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" @@ -42,9 +43,10 @@ type setOptions struct { setRawBytes flag.Tristate } -const set_long = `Sets an individual value in a kubeconfig file -PROPERTY_NAME is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots. -PROPERTY_VALUE is the new value you wish to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless the --set-raw-bytes flag is used.` +var set_long = dedent.Dedent(` + Sets an individual value in a kubeconfig file + PROPERTY_NAME is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots. + PROPERTY_VALUE is the new value you wish to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless the --set-raw-bytes flag is used.`) func NewCmdConfigSet(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command { options := &setOptions{configAccess: configAccess} diff --git a/pkg/kubectl/cmd/config/unset.go b/pkg/kubectl/cmd/config/unset.go index f9446df516..40e150745f 100644 --- a/pkg/kubectl/cmd/config/unset.go +++ b/pkg/kubectl/cmd/config/unset.go @@ -22,6 +22,7 @@ import ( "io" "reflect" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" @@ -32,8 +33,9 @@ type unsetOptions struct { propertyName string } -const unset_long = `Unsets an individual value in a kubeconfig file -PROPERTY_NAME is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots.` +var unset_long = dedent.Dedent(` + Unsets an individual value in a kubeconfig file + PROPERTY_NAME is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots.`) func NewCmdConfigUnset(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command { options := &unsetOptions{configAccess: configAccess} diff --git a/pkg/kubectl/cmd/config/view.go b/pkg/kubectl/cmd/config/view.go index 1c1ae5df3a..38a011123e 100644 --- a/pkg/kubectl/cmd/config/view.go +++ b/pkg/kubectl/cmd/config/view.go @@ -21,6 +21,7 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" @@ -39,15 +40,17 @@ type ViewOptions struct { RawByteData bool } -const ( - view_long = `Displays merged kubeconfig settings or a specified kubeconfig file. +var ( + view_long = dedent.Dedent(` + Displays merged kubeconfig settings or a specified kubeconfig file. -You can use --output jsonpath={...} to extract specific values using a jsonpath expression.` - view_example = `# Show Merged kubeconfig settings. -kubectl config view + You can use --output jsonpath={...} to extract specific values using a jsonpath expression.`) + view_example = dedent.Dedent(` + # Show Merged kubeconfig settings. + kubectl config view -# Get the password for the e2e user -kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}'` + # Get the password for the e2e user + kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}'`) ) func NewCmdConfigView(out io.Writer, ConfigAccess clientcmd.ConfigAccess) *cobra.Command { diff --git a/pkg/kubectl/cmd/convert.go b/pkg/kubectl/cmd/convert.go index e6810aa21f..c6dc0ef13e 100644 --- a/pkg/kubectl/cmd/convert.go +++ b/pkg/kubectl/cmd/convert.go @@ -20,6 +20,8 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apimachinery/registered" @@ -31,27 +33,30 @@ import ( "github.com/spf13/cobra" ) -const ( - convert_long = `Convert config files between different API versions. Both YAML -and JSON formats are accepted. +var ( + convert_long = dedent.Dedent(` + Convert config files between different API versions. Both YAML + and JSON formats are accepted. -The command takes filename, directory, or URL as input, and convert it into format -of version specified by --output-version flag. If target version is not specified or -not supported, convert to latest version. + The command takes filename, directory, or URL as input, and convert it into format + of version specified by --output-version flag. If target version is not specified or + not supported, convert to latest version. -The default output will be printed to stdout in YAML format. One can use -o option -to change to output destination. -` - convert_example = `# Convert 'pod.yaml' to latest version and print to stdout. -kubectl convert -f pod.yaml + The default output will be printed to stdout in YAML format. One can use -o option + to change to output destination. + `) -# Convert the live state of the resource specified by 'pod.yaml' to the latest version -# and print to stdout in json format. -kubectl convert -f pod.yaml --local -o json + convert_example = dedent.Dedent(` + # Convert 'pod.yaml' to latest version and print to stdout. + kubectl convert -f pod.yaml -# Convert all files under current directory to latest version and create them all. -kubectl convert -f . | kubectl create -f - -` + # Convert the live state of the resource specified by 'pod.yaml' to the latest version + # and print to stdout in json format. + kubectl convert -f pod.yaml --local -o json + + # Convert all files under current directory to latest version and create them all. + kubectl convert -f . | kubectl create -f - + `) ) // NewCmdConvert creates a command object for the generic "convert" action, which diff --git a/pkg/kubectl/cmd/create.go b/pkg/kubectl/cmd/create.go index 1fd923aacb..6a2c93a919 100644 --- a/pkg/kubectl/cmd/create.go +++ b/pkg/kubectl/cmd/create.go @@ -20,6 +20,7 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api/unversioned" @@ -35,15 +36,17 @@ type CreateOptions struct { Recursive bool } -const ( - create_long = `Create a resource by filename or stdin. +var ( + create_long = dedent.Dedent(` + Create a resource by filename or stdin. -JSON and YAML formats are accepted.` - create_example = `# Create a pod using the data in pod.json. -kubectl create -f ./pod.json + JSON and YAML formats are accepted.`) + create_example = dedent.Dedent(` + # Create a pod using the data in pod.json. + kubectl create -f ./pod.json -# Create a pod based on the JSON passed into stdin. -cat pod.json | kubectl create -f -` + # Create a pod based on the JSON passed into stdin. + cat pod.json | kubectl create -f -`) ) func NewCmdCreate(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/create_configmap.go b/pkg/kubectl/cmd/create_configmap.go index a81e4c1966..4643405fc3 100644 --- a/pkg/kubectl/cmd/create_configmap.go +++ b/pkg/kubectl/cmd/create_configmap.go @@ -20,33 +20,36 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/kubectl" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) -const ( - configMapLong = `Create a configmap based on a file, directory, or specified literal value. +var ( + configMapLong = dedent.Dedent(` + Create a configmap based on a file, directory, or specified literal value. -A single configmap may package one or more key/value pairs. + A single configmap may package one or more key/value pairs. -When creating a configmap based on a file, the key will default to the basename of the file, and the value will -default to the file content. If the basename is an invalid key, you may specify an alternate key. + When creating a configmap based on a file, the key will default to the basename of the file, and the value will + default to the file content. If the basename is an invalid key, you may specify an alternate key. -When creating a configmap based on a directory, each file whose basename is a valid key in the directory will be -packaged into the configmap. Any directory entries except regular files are ignored (e.g. subdirectories, -symlinks, devices, pipes, etc). -` + When creating a configmap based on a directory, each file whose basename is a valid key in the directory will be + packaged into the configmap. Any directory entries except regular files are ignored (e.g. subdirectories, + symlinks, devices, pipes, etc). + `) - configMapExample = ` # Create a new configmap named my-config with keys for each file in folder bar - kubectl create configmap my-config --from-file=path/to/bar + configMapExample = dedent.Dedent(` + # Create a new configmap named my-config with keys for each file in folder bar + kubectl create configmap my-config --from-file=path/to/bar - # Create a new configmap named my-config with specified keys instead of names on disk - kubectl create configmap my-config --from-file=key1=/path/to/bar/file1.txt --from-file=key2=/path/to/bar/file2.txt + # Create a new configmap named my-config with specified keys instead of names on disk + kubectl create configmap my-config --from-file=key1=/path/to/bar/file1.txt --from-file=key2=/path/to/bar/file2.txt - # Create a new configMap named my-config with key1=config1 and key2=config2 - kubectl create configmap my-config --from-literal=key1=config1 --from-literal=key2=config2` + # Create a new configMap named my-config with key1=config1 and key2=config2 + kubectl create configmap my-config --from-literal=key1=config1 --from-literal=key2=config2`) ) // ConfigMap is a command to ease creating ConfigMaps. diff --git a/pkg/kubectl/cmd/create_namespace.go b/pkg/kubectl/cmd/create_namespace.go index 49da9518f6..11c516784d 100644 --- a/pkg/kubectl/cmd/create_namespace.go +++ b/pkg/kubectl/cmd/create_namespace.go @@ -20,18 +20,20 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/kubectl" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) -const ( - namespaceLong = ` -Create a namespace with the specified name.` +var ( + namespaceLong = dedent.Dedent(` + Create a namespace with the specified name.`) - namespaceExample = ` # Create a new namespace named my-namespace - kubectl create namespace my-namespace` + namespaceExample = dedent.Dedent(` + # Create a new namespace named my-namespace + kubectl create namespace my-namespace`) ) // NewCmdCreateNamespace is a macro command to create a new namespace diff --git a/pkg/kubectl/cmd/create_secret.go b/pkg/kubectl/cmd/create_secret.go index 227c1e0ce4..38268f263b 100644 --- a/pkg/kubectl/cmd/create_secret.go +++ b/pkg/kubectl/cmd/create_secret.go @@ -20,6 +20,7 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/kubectl" @@ -43,28 +44,29 @@ func NewCmdCreateSecret(f *cmdutil.Factory, cmdOut io.Writer) *cobra.Command { return cmd } -const ( - secretLong = ` -Create a secret based on a file, directory, or specified literal value. +var ( + secretLong = dedent.Dedent(` + Create a secret based on a file, directory, or specified literal value. -A single secret may package one or more key/value pairs. + A single secret may package one or more key/value pairs. -When creating a secret based on a file, the key will default to the basename of the file, and the value will -default to the file content. If the basename is an invalid key, you may specify an alternate key. + When creating a secret based on a file, the key will default to the basename of the file, and the value will + default to the file content. If the basename is an invalid key, you may specify an alternate key. -When creating a secret based on a directory, each file whose basename is a valid key in the directory will be -packaged into the secret. Any directory entries except regular files are ignored (e.g. subdirectories, -symlinks, devices, pipes, etc). -` + When creating a secret based on a directory, each file whose basename is a valid key in the directory will be + packaged into the secret. Any directory entries except regular files are ignored (e.g. subdirectories, + symlinks, devices, pipes, etc). + `) - secretExample = ` # Create a new secret named my-secret with keys for each file in folder bar - kubectl create secret generic my-secret --from-file=path/to/bar + secretExample = dedent.Dedent(` + # Create a new secret named my-secret with keys for each file in folder bar + kubectl create secret generic my-secret --from-file=path/to/bar - # Create a new secret named my-secret with specified keys instead of names on disk - kubectl create secret generic my-secret --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub + # Create a new secret named my-secret with specified keys instead of names on disk + kubectl create secret generic my-secret --from-file=ssh-privatekey=~/.ssh/id_rsa --from-file=ssh-publickey=~/.ssh/id_rsa.pub - # Create a new secret named my-secret with key1=supersecret and key2=topsecret - kubectl create secret generic my-secret --from-literal=key1=supersecret --from-literal=key2=topsecret` + # Create a new secret named my-secret with key1=supersecret and key2=topsecret + kubectl create secret generic my-secret --from-literal=key1=supersecret --from-literal=key2=topsecret`) ) // NewCmdCreateSecretGeneric is a command to create generic secrets from files, directories, or literal values @@ -115,23 +117,24 @@ func CreateSecretGeneric(f *cmdutil.Factory, cmdOut io.Writer, cmd *cobra.Comman }) } -const ( - secretForDockerRegistryLong = ` -Create a new secret for use with Docker registries. +var ( + secretForDockerRegistryLong = dedent.Dedent(` + Create a new secret for use with Docker registries. -Dockercfg secrets are used to authenticate against Docker registries. + Dockercfg secrets are used to authenticate against Docker registries. -When using the Docker command line to push images, you can authenticate to a given registry by running - 'docker login DOCKER_REGISTRY_SERVER --username=DOCKER_USER --password=DOCKER_PASSWORD --email=DOCKER_EMAIL'. -That produces a ~/.dockercfg file that is used by subsequent 'docker push' and 'docker pull' commands to -authenticate to the registry. + When using the Docker command line to push images, you can authenticate to a given registry by running + 'docker login DOCKER_REGISTRY_SERVER --username=DOCKER_USER --password=DOCKER_PASSWORD --email=DOCKER_EMAIL'. + That produces a ~/.dockercfg file that is used by subsequent 'docker push' and 'docker pull' commands to + authenticate to the registry. -When creating applications, you may have a Docker registry that requires authentication. In order for the -nodes to pull images on your behalf, they have to have the credentials. You can provide this information -by creating a dockercfg secret and attaching it to your service account.` + When creating applications, you may have a Docker registry that requires authentication. In order for the + nodes to pull images on your behalf, they have to have the credentials. You can provide this information + by creating a dockercfg secret and attaching it to your service account.`) - secretForDockerRegistryExample = ` # If you don't already have a .dockercfg file, you can create a dockercfg secret directly by using: - kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL` + secretForDockerRegistryExample = dedent.Dedent(` + # If you don't already have a .dockercfg file, you can create a dockercfg secret directly by using: + kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL`) ) // NewCmdCreateSecretDockerRegistry is a macro command for creating secrets to work with Docker registries @@ -194,14 +197,15 @@ func CreateSecretDockerRegistry(f *cmdutil.Factory, cmdOut io.Writer, cmd *cobra }) } -const ( - secretForTLSLong = ` -Create a TLS secret from the given public/private key pair. +var ( + secretForTLSLong = dedent.Dedent(` + Create a TLS secret from the given public/private key pair. -The public/private key pair must exist before hand. The public key certificate must be .PEM encoded and match the given private key.` + The public/private key pair must exist before hand. The public key certificate must be .PEM encoded and match the given private key.`) - secretForTLSExample = ` # Create a new TLS secret named tls-secret with the given key pair: - kubectl create secret tls tls-secret --cert=path/to/tls.cert --key=path/to/tls.key` + secretForTLSExample = dedent.Dedent(` + # Create a new TLS secret named tls-secret with the given key pair: + kubectl create secret tls tls-secret --cert=path/to/tls.cert --key=path/to/tls.key`) ) // NewCmdCreateSecretTLS is a macro command for creating secrets to work with Docker registries diff --git a/pkg/kubectl/cmd/create_serviceaccount.go b/pkg/kubectl/cmd/create_serviceaccount.go index 89d1882c0b..d83c0994c5 100644 --- a/pkg/kubectl/cmd/create_serviceaccount.go +++ b/pkg/kubectl/cmd/create_serviceaccount.go @@ -20,18 +20,20 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/kubectl" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) -const ( - serviceAccountLong = ` -Create a service account with the specified name.` +var ( + serviceAccountLong = dedent.Dedent(` + Create a service account with the specified name.`) - serviceAccountExample = ` # Create a new service account named my-service-account - $ kubectl create serviceaccount my-service-account` + serviceAccountExample = dedent.Dedent(` + # Create a new service account named my-service-account + $ kubectl create serviceaccount my-service-account`) ) // NewCmdCreateServiceAccount is a macro command to create a new service account diff --git a/pkg/kubectl/cmd/delete.go b/pkg/kubectl/cmd/delete.go index 1e5aadfe25..a6d7c937fd 100644 --- a/pkg/kubectl/cmd/delete.go +++ b/pkg/kubectl/cmd/delete.go @@ -21,6 +21,7 @@ import ( "io" "time" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" @@ -38,36 +39,38 @@ type DeleteOptions struct { Recursive bool } -const ( - delete_long = `Delete resources by filenames, stdin, resources and names, or by resources and label selector. +var ( + delete_long = dedent.Dedent(` + Delete resources by filenames, stdin, resources and names, or by resources and label selector. -JSON and YAML formats are accepted. + JSON and YAML formats are accepted. -Only one type of the arguments may be specified: filenames, resources and names, or resources and label selector + Only one type of the arguments may be specified: filenames, resources and names, or resources and label selector -Note that the delete command does NOT do resource version checks, so if someone -submits an update to a resource right when you submit a delete, their update -will be lost along with the rest of the resource.` - delete_example = `# Delete a pod using the type and name specified in pod.json. -kubectl delete -f ./pod.json + Note that the delete command does NOT do resource version checks, so if someone + submits an update to a resource right when you submit a delete, their update + will be lost along with the rest of the resource.`) + delete_example = dedent.Dedent(` + # Delete a pod using the type and name specified in pod.json. + kubectl delete -f ./pod.json -# Delete a pod based on the type and name in the JSON passed into stdin. -cat pod.json | kubectl delete -f - + # Delete a pod based on the type and name in the JSON passed into stdin. + cat pod.json | kubectl delete -f - -# Delete pods and services with same names "baz" and "foo" -kubectl delete pod,service baz foo + # Delete pods and services with same names "baz" and "foo" + kubectl delete pod,service baz foo -# Delete pods and services with label name=myLabel. -kubectl delete pods,services -l name=myLabel + # Delete pods and services with label name=myLabel. + kubectl delete pods,services -l name=myLabel -# Delete a pod immediately (no graceful shutdown) -kubectl delete pod foo --now + # Delete a pod immediately (no graceful shutdown) + kubectl delete pod foo --now -# Delete a pod with UID 1234-56-7890-234234-456456. -kubectl delete pod 1234-56-7890-234234-456456 + # Delete a pod with UID 1234-56-7890-234234-456456. + kubectl delete pod 1234-56-7890-234234-456456 -# Delete all pods -kubectl delete pods --all` + # Delete all pods + kubectl delete pods --all`) ) func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/describe.go b/pkg/kubectl/cmd/describe.go index e16c5756d2..93bd3d2c24 100644 --- a/pkg/kubectl/cmd/describe.go +++ b/pkg/kubectl/cmd/describe.go @@ -21,6 +21,7 @@ import ( "io" "strings" + "github.com/renstrom/dedent" "github.com/spf13/cobra" apierrors "k8s.io/kubernetes/pkg/api/errors" @@ -39,36 +40,39 @@ type DescribeOptions struct { Recursive bool } -const ( - describe_long = `Show details of a specific resource or group of resources. +var ( + describe_long = dedent.Dedent(` + Show details of a specific resource or group of resources. + This command joins many API calls together to form a detailed description of a + given resource or group of resources. -This command joins many API calls together to form a detailed description of a -given resource or group of resources. + $ kubectl describe TYPE NAME_PREFIX -$ kubectl describe TYPE NAME_PREFIX + will first check for an exact match on TYPE and NAME_PREFIX. If no such resource + exists, it will output details for every resource that has a name prefixed with NAME_PREFIX. -will first check for an exact match on TYPE and NAME_PREFIX. If no such resource -exists, it will output details for every resource that has a name prefixed with NAME_PREFIX + `) + + kubectl.PossibleResourceTypes -` + kubectl.PossibleResourceTypes - describe_example = `# Describe a node -kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal + describe_example = dedent.Dedent(` + # Describe a node + kubectl describe nodes kubernetes-minion-emt8.c.myproject.internal -# Describe a pod -kubectl describe pods/nginx + # Describe a pod + kubectl describe pods/nginx -# Describe a pod identified by type and name in "pod.json" -kubectl describe -f pod.json + # Describe a pod identified by type and name in "pod.json" + kubectl describe -f pod.json -# Describe all pods -kubectl describe pods + # Describe all pods + kubectl describe pods -# Describe pods by label name=myLabel -kubectl describe po -l name=myLabel + # Describe pods by label name=myLabel + kubectl describe po -l name=myLabel -# Describe all pods managed by the 'frontend' replication controller (rc-created pods -# get the name of the rc as a prefix in the pod the name). -kubectl describe pods frontend` + # Describe all pods managed by the 'frontend' replication controller (rc-created pods + # get the name of the rc as a prefix in the pod the name). + kubectl describe pods frontend`) ) func NewCmdDescribe(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/drain.go b/pkg/kubectl/cmd/drain.go index 944707d43e..07e79d790c 100644 --- a/pkg/kubectl/cmd/drain.go +++ b/pkg/kubectl/cmd/drain.go @@ -23,6 +23,7 @@ import ( "reflect" "strings" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" @@ -66,11 +67,16 @@ const ( kLocalStorageWarning = "Deleting pods with local storage" kUnmanagedFatal = "pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet (use --force to override)" kUnmanagedWarning = "Deleting pods not managed by ReplicationController, ReplicaSet, Job, or DaemonSet" - cordon_long = `Mark node as unschedulable. -` - cordon_example = `# Mark node "foo" as unschedulable. -kubectl cordon foo -` +) + +var ( + cordon_long = dedent.Dedent(` + Mark node as unschedulable. + `) + cordon_example = dedent.Dedent(` + # Mark node "foo" as unschedulable. + kubectl cordon foo + `) ) func NewCmdCordon(f *cmdutil.Factory, out io.Writer) *cobra.Command { @@ -89,12 +95,14 @@ func NewCmdCordon(f *cmdutil.Factory, out io.Writer) *cobra.Command { return cmd } -const ( - uncordon_long = `Mark node as schedulable. -` - uncordon_example = `# Mark node "foo" as schedulable. -$ kubectl uncordon foo -` +var ( + uncordon_long = dedent.Dedent(` + Mark node as schedulable. + `) + uncordon_example = dedent.Dedent(` + # Mark node "foo" as schedulable. + $ kubectl uncordon foo + `) ) func NewCmdUncordon(f *cmdutil.Factory, out io.Writer) *cobra.Command { @@ -113,28 +121,31 @@ func NewCmdUncordon(f *cmdutil.Factory, out io.Writer) *cobra.Command { return cmd } -const ( - drain_long = `Drain node in preparation for maintenance. +var ( + drain_long = dedent.Dedent(` + Drain node in preparation for maintenance. -The given node will be marked unschedulable to prevent new pods from arriving. -Then drain deletes all pods except mirror pods (which cannot be deleted through -the API server). If there are DaemonSet-managed pods, drain will not proceed -without --ignore-daemonsets, and regardless it will not delete any -DaemonSet-managed pods, because those pods would be immediately replaced by the -DaemonSet controller, which ignores unschedulable markings. If there are any -pods that are neither mirror pods nor managed--by ReplicationController, -ReplicaSet, DaemonSet or Job--, then drain will not delete any pods unless you -use --force. + The given node will be marked unschedulable to prevent new pods from arriving. + Then drain deletes all pods except mirror pods (which cannot be deleted through + the API server). If there are DaemonSet-managed pods, drain will not proceed + without --ignore-daemonsets, and regardless it will not delete any + DaemonSet-managed pods, because those pods would be immediately replaced by the + DaemonSet controller, which ignores unschedulable markings. If there are any + pods that are neither mirror pods nor managed--by ReplicationController, + ReplicaSet, DaemonSet or Job--, then drain will not delete any pods unless you + use --force. -When you are ready to put the node back into service, use kubectl uncordon, which -will make the node schedulable again. -` - drain_example = `# Drain node "foo", even if there are pods not managed by a ReplicationController, ReplicaSet, Job, or DaemonSet on it. -$ kubectl drain foo --force + When you are ready to put the node back into service, use kubectl uncordon, which + will make the node schedulable again. + `) -# As above, but abort if there are pods not managed by a ReplicationController, ReplicaSet, Job, or DaemonSet, and use a grace period of 15 minutes. -$ kubectl drain foo --grace-period=900 -` + drain_example = dedent.Dedent(` + # Drain node "foo", even if there are pods not managed by a ReplicationController, ReplicaSet, Job, or DaemonSet on it. + $ kubectl drain foo --force + + # As above, but abort if there are pods not managed by a ReplicationController, ReplicaSet, Job, or DaemonSet, and use a grace period of 15 minutes. + $ kubectl drain foo --grace-period=900 + `) ) func NewCmdDrain(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/edit.go b/pkg/kubectl/cmd/edit.go index ed77f7747a..d3e60405dc 100644 --- a/pkg/kubectl/cmd/edit.go +++ b/pkg/kubectl/cmd/edit.go @@ -27,6 +27,7 @@ import ( gruntime "runtime" "strings" + "github.com/renstrom/dedent" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/meta" @@ -45,35 +46,37 @@ import ( "github.com/spf13/cobra" ) -const ( - editLong = `Edit a resource from the default editor. +var ( + editLong = dedent.Dedent(` + Edit a resource from the default editor. -The edit command allows you to directly edit any API resource you can retrieve via the -command line tools. It will open the editor defined by your KUBE_EDITOR, or EDITOR -environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows. -You can edit multiple objects, although changes are applied one at a time. The command -accepts filenames as well as command line arguments, although the files you point to must -be previously saved versions of resources. + The edit command allows you to directly edit any API resource you can retrieve via the + command line tools. It will open the editor defined by your KUBE_EDITOR, or EDITOR + environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows. + You can edit multiple objects, although changes are applied one at a time. The command + accepts filenames as well as command line arguments, although the files you point to must + be previously saved versions of resources. -The files to edit will be output in the default API version, or a version specified -by --output-version. The default format is YAML - if you would like to edit in JSON -pass -o json. The flag --windows-line-endings can be used to force Windows line endings, -otherwise the default for your operating system will be used. + The files to edit will be output in the default API version, or a version specified + by --output-version. The default format is YAML - if you would like to edit in JSON + pass -o json. The flag --windows-line-endings can be used to force Windows line endings, + otherwise the default for your operating system will be used. -In the event an error occurs while updating, a temporary file will be created on disk -that contains your unapplied changes. The most common error when updating a resource -is another editor changing the resource on the server. When this occurs, you will have -to apply your changes to the newer version of the resource, or update your temporary -saved copy to include the latest resource version.` + In the event an error occurs while updating, a temporary file will be created on disk + that contains your unapplied changes. The most common error when updating a resource + is another editor changing the resource on the server. When this occurs, you will have + to apply your changes to the newer version of the resource, or update your temporary + saved copy to include the latest resource version.`) - editExample = ` # Edit the service named 'docker-registry': - kubectl edit svc/docker-registry + editExample = dedent.Dedent(` + # Edit the service named 'docker-registry': + kubectl edit svc/docker-registry - # Use an alternative editor - KUBE_EDITOR="nano" kubectl edit svc/docker-registry + # Use an alternative editor + KUBE_EDITOR="nano" kubectl edit svc/docker-registry - # Edit the service 'docker-registry' in JSON using the v1 API format: - kubectl edit svc/docker-registry --output-version=v1 -o json` + # Edit the service 'docker-registry' in JSON using the v1 API format: + kubectl edit svc/docker-registry --output-version=v1 -o json`) ) // EditOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of diff --git a/pkg/kubectl/cmd/exec.go b/pkg/kubectl/cmd/exec.go index 522aec181f..0ad6de373d 100644 --- a/pkg/kubectl/cmd/exec.go +++ b/pkg/kubectl/cmd/exec.go @@ -26,6 +26,7 @@ import ( "github.com/docker/docker/pkg/term" "github.com/golang/glog" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" @@ -35,16 +36,17 @@ import ( remotecommandserver "k8s.io/kubernetes/pkg/kubelet/server/remotecommand" ) -const ( - exec_example = `# Get output from running 'date' from pod 123456-7890, using the first container by default -kubectl exec 123456-7890 date +var ( + exec_example = dedent.Dedent(` + # Get output from running 'date' from pod 123456-7890, using the first container by default + kubectl exec 123456-7890 date -# Get output from running 'date' in ruby-container from pod 123456-7890 -kubectl exec 123456-7890 -c ruby-container date + # Get output from running 'date' in ruby-container from pod 123456-7890 + kubectl exec 123456-7890 -c ruby-container date -# Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-7890 -# and sends stdout/stderr from 'bash' back to the client -kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il` + # Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-7890 + # and sends stdout/stderr from 'bash' back to the client + kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il`) ) func NewCmdExec(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/explain.go b/pkg/kubectl/cmd/explain.go index ce959e3940..ade8949b88 100644 --- a/pkg/kubectl/cmd/explain.go +++ b/pkg/kubectl/cmd/explain.go @@ -19,6 +19,7 @@ package cmd import ( "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api/unversioned" @@ -27,16 +28,18 @@ import ( cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) -const ( - explainExamples = `# Get the documentation of the resource and its fields -kubectl explain pods +var ( + explainExamples = dedent.Dedent(` + # Get the documentation of the resource and its fields + kubectl explain pods -# Get the documentation of a specific field of a resource -kubectl explain pods.spec.containers` + # Get the documentation of a specific field of a resource + kubectl explain pods.spec.containers`) - explainLong = `Documentation of resources. + explainLong = dedent.Dedent(` + Documentation of resources. -` + kubectl.PossibleResourceTypes + `) + kubectl.PossibleResourceTypes ) // NewCmdExplain returns a cobra command for swagger docs diff --git a/pkg/kubectl/cmd/expose.go b/pkg/kubectl/cmd/expose.go index 7ed7529c34..0ef3230732 100644 --- a/pkg/kubectl/cmd/expose.go +++ b/pkg/kubectl/cmd/expose.go @@ -22,6 +22,7 @@ import ( "regexp" "strings" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/kubectl" @@ -38,43 +39,45 @@ type ExposeOptions struct { Recursive bool } -const ( - expose_resources = ` - pod (po), service (svc), replicationcontroller (rc), - deployment, replicaset (rs) -` +var ( + expose_resources = dedent.Dedent(` + pod (po), service (svc), replicationcontroller (rc), + deployment, replicaset (rs) + `) - expose_long = `Expose a resource as a new Kubernetes service. + expose_long = dedent.Dedent(` + Expose a resource as a new Kubernetes service. -Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector -for that resource as the selector for a new service on the specified port. A deployment or replica set -will be exposed as a service only if its selector is convertible to a selector that service supports, -i.e. when the selector contains only the matchLabels component. Note that if no port is specified via ---port and the exposed resource has multiple ports, all will be re-used by the new service. Also if no -labels are specified, the new service will re-use the labels from the resource it exposes. + Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector + for that resource as the selector for a new service on the specified port. A deployment or replica set + will be exposed as a service only if its selector is convertible to a selector that service supports, + i.e. when the selector contains only the matchLabels component. Note that if no port is specified via + --port and the exposed resource has multiple ports, all will be re-used by the new service. Also if no + labels are specified, the new service will re-use the labels from the resource it exposes. -Possible resources include (case insensitive):` + expose_resources + Possible resources include (case insensitive): `) + expose_resources - expose_example = `# Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000. -kubectl expose rc nginx --port=80 --target-port=8000 + expose_example = dedent.Dedent(` + # Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000. + kubectl expose rc nginx --port=80 --target-port=8000 -# Create a service for a replication controller identified by type and name specified in "nginx-controller.yaml", which serves on port 80 and connects to the containers on port 8000. -kubectl expose -f nginx-controller.yaml --port=80 --target-port=8000 + # Create a service for a replication controller identified by type and name specified in "nginx-controller.yaml", which serves on port 80 and connects to the containers on port 8000. + kubectl expose -f nginx-controller.yaml --port=80 --target-port=8000 -# Create a service for a pod valid-pod, which serves on port 444 with the name "frontend" -kubectl expose pod valid-pod --port=444 --name=frontend + # Create a service for a pod valid-pod, which serves on port 444 with the name "frontend" + kubectl expose pod valid-pod --port=444 --name=frontend -# Create a second service based on the above service, exposing the container port 8443 as port 443 with the name "nginx-https" -kubectl expose service nginx --port=443 --target-port=8443 --name=nginx-https + # Create a second service based on the above service, exposing the container port 8443 as port 443 with the name "nginx-https" + kubectl expose service nginx --port=443 --target-port=8443 --name=nginx-https -# Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video-stream'. -kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream + # Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video-stream'. + kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream -# Create a service for a replicated nginx using replica set, which serves on port 80 and connects to the containers on port 8000. -kubectl expose rs nginx --port=80 --target-port=8000 + # Create a service for a replicated nginx using replica set, which serves on port 80 and connects to the containers on port 8000. + kubectl expose rs nginx --port=80 --target-port=8000 -# Create a service for an nginx deployment, which serves on port 80 and connects to the containers on port 8000. -kubectl expose deployment nginx --port=80 --target-port=8000` + # Create a service for an nginx deployment, which serves on port 80 and connects to the containers on port 8000. + kubectl expose deployment nginx --port=80 --target-port=8000`) ) func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/get.go b/pkg/kubectl/cmd/get.go index 84c308b22c..0887cc1bd8 100644 --- a/pkg/kubectl/cmd/get.go +++ b/pkg/kubectl/cmd/get.go @@ -20,6 +20,7 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/kubectl" @@ -37,36 +38,38 @@ type GetOptions struct { Recursive bool } -const ( - get_long = `Display one or many resources. +var ( + get_long = dedent.Dedent(` + Display one or many resources. -` + kubectl.PossibleResourceTypes + ` + `) + kubectl.PossibleResourceTypes + dedent.Dedent(` -By specifying the output as 'template' and providing a Go template as the value -of the --template flag, you can filter the attributes of the fetched resource(s).` - get_example = `# List all pods in ps output format. -kubectl get pods + By specifying the output as 'template' and providing a Go template as the value + of the --template flag, you can filter the attributes of the fetched resource(s).`) + get_example = dedent.Dedent(` + # List all pods in ps output format. + kubectl get pods -# List all pods in ps output format with more information (such as node name). -kubectl get pods -o wide + # List all pods in ps output format with more information (such as node name). + kubectl get pods -o wide -# List a single replication controller with specified NAME in ps output format. -kubectl get replicationcontroller web + # List a single replication controller with specified NAME in ps output format. + kubectl get replicationcontroller web -# List a single pod in JSON output format. -kubectl get -o json pod web-pod-13je7 + # List a single pod in JSON output format. + kubectl get -o json pod web-pod-13je7 -# List a pod identified by type and name specified in "pod.yaml" in JSON output format. -kubectl get -f pod.yaml -o json + # List a pod identified by type and name specified in "pod.yaml" in JSON output format. + kubectl get -f pod.yaml -o json -# Return only the phase value of the specified pod. -kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}} + # Return only the phase value of the specified pod. + kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}} -# List all replication controllers and services together in ps output format. -kubectl get rc,services + # List all replication controllers and services together in ps output format. + kubectl get rc,services -# List one or more resources by their type and names. -kubectl get rc/web service/frontend pods/web-pod-13je7` + # List one or more resources by their type and names. + kubectl get rc/web service/frontend pods/web-pod-13je7`) ) // NewCmdGet creates a command object for the generic "get" action, which diff --git a/pkg/kubectl/cmd/label.go b/pkg/kubectl/cmd/label.go index ee8ade2e46..6fade577e5 100644 --- a/pkg/kubectl/cmd/label.go +++ b/pkg/kubectl/cmd/label.go @@ -24,6 +24,7 @@ import ( "strings" "github.com/golang/glog" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" @@ -43,30 +44,32 @@ type LabelOptions struct { Recursive bool } -const ( - label_long = `Update the labels on a resource. +var ( + label_long = dedent.Dedent(` + Update the labels on a resource. -A label must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters. -If --overwrite is true, then existing labels can be overwritten, otherwise attempting to overwrite a label will result in an error. -If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used.` - label_example = `# Update pod 'foo' with the label 'unhealthy' and the value 'true'. -kubectl label pods foo unhealthy=true + A label must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters. + If --overwrite is true, then existing labels can be overwritten, otherwise attempting to overwrite a label will result in an error. + If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used.`) + label_example = dedent.Dedent(` + # Update pod 'foo' with the label 'unhealthy' and the value 'true'. + kubectl label pods foo unhealthy=true -# Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value. -kubectl label --overwrite pods foo status=unhealthy + # Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value. + kubectl label --overwrite pods foo status=unhealthy -# Update all pods in the namespace -kubectl label pods --all status=unhealthy + # Update all pods in the namespace + kubectl label pods --all status=unhealthy -# Update a pod identified by the type and name in "pod.json" -kubectl label -f pod.json status=unhealthy + # Update a pod identified by the type and name in "pod.json" + kubectl label -f pod.json status=unhealthy -# Update pod 'foo' only if the resource is unchanged from version 1. -kubectl label pods foo status=unhealthy --resource-version=1 + # Update pod 'foo' only if the resource is unchanged from version 1. + kubectl label pods foo status=unhealthy --resource-version=1 -# Update pod 'foo' by removing a label named 'bar' if it exists. -# Does not require the --overwrite flag. -kubectl label pods foo bar-` + # Update pod 'foo' by removing a label named 'bar' if it exists. + # Does not require the --overwrite flag. + kubectl label pods foo bar-`) ) func NewCmdLabel(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/logs.go b/pkg/kubectl/cmd/logs.go index b79d8c07d1..3d9a960c78 100644 --- a/pkg/kubectl/cmd/logs.go +++ b/pkg/kubectl/cmd/logs.go @@ -23,6 +23,7 @@ import ( "os" "time" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" @@ -34,21 +35,22 @@ import ( "k8s.io/kubernetes/pkg/runtime" ) -const ( - logs_example = `# Return snapshot logs from pod nginx with only one container -kubectl logs nginx +var ( + logs_example = dedent.Dedent(` + # Return snapshot logs from pod nginx with only one container + kubectl logs nginx -# Return snapshot of previous terminated ruby container logs from pod web-1 -kubectl logs -p -c ruby web-1 + # Return snapshot of previous terminated ruby container logs from pod web-1 + kubectl logs -p -c ruby web-1 -# Begin streaming the logs of the ruby container in pod web-1 -kubectl logs -f -c ruby web-1 + # Begin streaming the logs of the ruby container in pod web-1 + kubectl logs -f -c ruby web-1 -# Display only the most recent 20 lines of output in pod nginx -kubectl logs --tail=20 nginx + # Display only the most recent 20 lines of output in pod nginx + kubectl logs --tail=20 nginx -# Show all logs from pod nginx written in the last hour -kubectl logs --since=1h nginx` + # Show all logs from pod nginx written in the last hour + kubectl logs --since=1h nginx`) ) type LogsOptions struct { diff --git a/pkg/kubectl/cmd/patch.go b/pkg/kubectl/cmd/patch.go index 88b15b5baf..be03af38da 100644 --- a/pkg/kubectl/cmd/patch.go +++ b/pkg/kubectl/cmd/patch.go @@ -22,6 +22,7 @@ import ( "strings" "github.com/evanphx/json-patch" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" @@ -46,24 +47,26 @@ type PatchOptions struct { OutputFormat string } -const ( - patch_long = `Update field(s) of a resource using strategic merge patch +var ( + patch_long = dedent.Dedent(` + Update field(s) of a resource using strategic merge patch -JSON and YAML formats are accepted. + JSON and YAML formats are accepted. -Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/HEAD/docs/api-reference/v1/definitions.html to find if a field is mutable.` - patch_example = ` -# Partially update a node using strategic merge patch -kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}' + Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/HEAD/docs/api-reference/v1/definitions.html to find if a field is mutable.`) + patch_example = dedent.Dedent(` -# Partially update a node identified by the type and name specified in "node.json" using strategic merge patch -kubectl patch -f node.json -p '{"spec":{"unschedulable":true}}' + # Partially update a node using strategic merge patch + kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}' -# Update a container's image; spec.containers[*].name is required because it's a merge key -kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve-hostname","image":"new image"}]}}' + # Partially update a node identified by the type and name specified in "node.json" using strategic merge patch + kubectl patch -f node.json -p '{"spec":{"unschedulable":true}}' -# Update a container's image using a json patch with positional arrays -kubectl patch pod valid-pod --type='json' -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"new image"}]'` + # Update a container's image; spec.containers[*].name is required because it's a merge key + kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve-hostname","image":"new image"}]}}' + + # Update a container's image using a json patch with positional arrays + kubectl patch pod valid-pod --type='json' -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"new image"}]'`) ) func NewCmdPatch(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/portforward.go b/pkg/kubectl/cmd/portforward.go index 3d705466f1..64e8281cd0 100644 --- a/pkg/kubectl/cmd/portforward.go +++ b/pkg/kubectl/cmd/portforward.go @@ -23,6 +23,7 @@ import ( "os/signal" "github.com/golang/glog" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" @@ -31,19 +32,19 @@ import ( cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) -const ( - portforward_example = ` -# Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod -kubectl port-forward mypod 5000 6000 +var ( + portforward_example = dedent.Dedent(` + # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod + kubectl port-forward mypod 5000 6000 -# Listen on port 8888 locally, forwarding to 5000 in the pod -kubectl port-forward mypod 8888:5000 + # Listen on port 8888 locally, forwarding to 5000 in the pod + kubectl port-forward mypod 8888:5000 -# Listen on a random port locally, forwarding to 5000 in the pod -kubectl port-forward mypod :5000 + # Listen on a random port locally, forwarding to 5000 in the pod + kubectl port-forward mypod :5000 -# Listen on a random port locally, forwarding to 5000 in the pod -kubectl port-forward mypod 0:5000` + # Listen on a random port locally, forwarding to 5000 in the pod + kubectl port-forward mypod 0:5000`) ) func NewCmdPortForward(f *cmdutil.Factory, cmdOut, cmdErr io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/proxy.go b/pkg/kubectl/cmd/proxy.go index 77330af761..a14584db6c 100644 --- a/pkg/kubectl/cmd/proxy.go +++ b/pkg/kubectl/cmd/proxy.go @@ -24,45 +24,48 @@ import ( "strings" "github.com/golang/glog" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/kubectl" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) -const ( +var ( default_port = 8001 - proxy_example = `# Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/ -kubectl proxy --port=8011 --www=./local/www/ + proxy_example = dedent.Dedent(` + # Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/ + kubectl proxy --port=8011 --www=./local/www/ -# Run a proxy to kubernetes apiserver on an arbitrary local port. -# The chosen port for the server will be output to stdout. -kubectl proxy --port=0 + # Run a proxy to kubernetes apiserver on an arbitrary local port. + # The chosen port for the server will be output to stdout. + kubectl proxy --port=0 -# Run a proxy to kubernetes apiserver, changing the api prefix to k8s-api -# This makes e.g. the pods api available at localhost:8011/k8s-api/v1/pods/ -kubectl proxy --api-prefix=/k8s-api` + # Run a proxy to kubernetes apiserver, changing the api prefix to k8s-api + # This makes e.g. the pods api available at localhost:8011/k8s-api/v1/pods/ + kubectl proxy --api-prefix=/k8s-api`) ) func NewCmdProxy(f *cmdutil.Factory, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix]", Short: "Run a proxy to the Kubernetes API server", - Long: `To proxy all of the kubernetes api and nothing else, use: + Long: dedent.Dedent(` + To proxy all of the kubernetes api and nothing else, use: -kubectl proxy --api-prefix=/ + kubectl proxy --api-prefix=/ -To proxy only part of the kubernetes api and also some static files: + To proxy only part of the kubernetes api and also some static files: -kubectl proxy --www=/my/files --www-prefix=/static/ --api-prefix=/api/ + kubectl proxy --www=/my/files --www-prefix=/static/ --api-prefix=/api/ -The above lets you 'curl localhost:8001/api/v1/pods'. + The above lets you 'curl localhost:8001/api/v1/pods'. -To proxy the entire kubernetes api at a different root, use: + To proxy the entire kubernetes api at a different root, use: -kubectl proxy --api-prefix=/custom/ + kubectl proxy --api-prefix=/custom/ -The above lets you 'curl localhost:8001/custom/api/v1/pods' -`, + The above lets you 'curl localhost:8001/custom/api/v1/pods' + `), Example: proxy_example, Run: func(cmd *cobra.Command, args []string) { err := RunProxy(f, out, cmd) diff --git a/pkg/kubectl/cmd/replace.go b/pkg/kubectl/cmd/replace.go index 8b98402aaa..9dc44c3110 100644 --- a/pkg/kubectl/cmd/replace.go +++ b/pkg/kubectl/cmd/replace.go @@ -23,6 +23,7 @@ import ( "os" "path/filepath" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "github.com/golang/glog" @@ -38,25 +39,27 @@ type ReplaceOptions struct { Recursive bool } -const ( - replace_long = `Replace a resource by filename or stdin. +var ( + replace_long = dedent.Dedent(` + Replace a resource by filename or stdin. -JSON and YAML formats are accepted. If replacing an existing resource, the -complete resource spec must be provided. This can be obtained by -$ kubectl get TYPE NAME -o yaml + JSON and YAML formats are accepted. If replacing an existing resource, the + complete resource spec must be provided. This can be obtained by + $ kubectl get TYPE NAME -o yaml -Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/HEAD/docs/api-reference/v1/definitions.html to find if a field is mutable.` - replace_example = `# Replace a pod using the data in pod.json. -kubectl replace -f ./pod.json + Please refer to the models in https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/blob/HEAD/docs/api-reference/v1/definitions.html to find if a field is mutable.`) + replace_example = dedent.Dedent(` + # Replace a pod using the data in pod.json. + kubectl replace -f ./pod.json -# Replace a pod based on the JSON passed into stdin. -cat pod.json | kubectl replace -f - + # Replace a pod based on the JSON passed into stdin. + cat pod.json | kubectl replace -f - -# Update a single-container pod's image version (tag) to v4 -kubectl get pod mypod -o yaml | sed 's/\(image: myimage\):.*$/\1:v4/' | kubectl replace -f - + # Update a single-container pod's image version (tag) to v4 + kubectl get pod mypod -o yaml | sed 's/\(image: myimage\):.*$/\1:v4/' | kubectl replace -f - -# Force replace, delete and then re-create the resource -kubectl replace --force -f ./pod.json` + # Force replace, delete and then re-create the resource + kubectl replace --force -f ./pod.json`) ) func NewCmdReplace(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/rollingupdate.go b/pkg/kubectl/cmd/rollingupdate.go index d47bfaf0ae..5570bd25d3 100644 --- a/pkg/kubectl/cmd/rollingupdate.go +++ b/pkg/kubectl/cmd/rollingupdate.go @@ -25,6 +25,7 @@ import ( "github.com/golang/glog" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" @@ -42,28 +43,30 @@ type RollingUpdateOptions struct { Filenames []string } -const ( - rollingUpdate_long = `Perform a rolling update of the given ReplicationController. +var ( + rollingUpdate_long = dedent.Dedent(` + Perform a rolling update of the given ReplicationController. -Replaces the specified replication controller with a new replication controller by updating one pod at a time to use the -new PodTemplate. The new-controller.json must specify the same namespace as the -existing replication controller and overwrite at least one (common) label in its replicaSelector.` - rollingUpdate_example = `# Update pods of frontend-v1 using new replication controller data in frontend-v2.json. -kubectl rolling-update frontend-v1 -f frontend-v2.json + Replaces the specified replication controller with a new replication controller by updating one pod at a time to use the + new PodTemplate. The new-controller.json must specify the same namespace as the + existing replication controller and overwrite at least one (common) label in its replicaSelector.`) + rollingUpdate_example = dedent.Dedent(` + # Update pods of frontend-v1 using new replication controller data in frontend-v2.json. + kubectl rolling-update frontend-v1 -f frontend-v2.json -# Update pods of frontend-v1 using JSON data passed into stdin. -cat frontend-v2.json | kubectl rolling-update frontend-v1 -f - + # Update pods of frontend-v1 using JSON data passed into stdin. + cat frontend-v2.json | kubectl rolling-update frontend-v1 -f - -# Update the pods of frontend-v1 to frontend-v2 by just changing the image, and switching the -# name of the replication controller. -kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2 + # Update the pods of frontend-v1 to frontend-v2 by just changing the image, and switching the + # name of the replication controller. + kubectl rolling-update frontend-v1 frontend-v2 --image=image:v2 -# Update the pods of frontend by just changing the image, and keeping the old name. -kubectl rolling-update frontend --image=image:v2 + # Update the pods of frontend by just changing the image, and keeping the old name. + kubectl rolling-update frontend --image=image:v2 -# Abort and reverse an existing rollout in progress (from frontend-v1 to frontend-v2). -kubectl rolling-update frontend-v1 frontend-v2 --rollback -` + # Abort and reverse an existing rollout in progress (from frontend-v1 to frontend-v2). + kubectl rolling-update frontend-v1 frontend-v2 --rollback + `) ) var ( diff --git a/pkg/kubectl/cmd/rollout/rollout.go b/pkg/kubectl/cmd/rollout/rollout.go index 998edfb64e..a586f7b2d8 100644 --- a/pkg/kubectl/cmd/rollout/rollout.go +++ b/pkg/kubectl/cmd/rollout/rollout.go @@ -19,17 +19,21 @@ package rollout import ( "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) -const ( - rollout_long = `Manages a deployment using subcommands like "kubectl rollout undo deployment/abc"` - rollout_example = `# Rollback to the previous deployment -kubectl rollout undo deployment/abc` - rollout_valid_resources = `Valid resource types include: - * deployments -` +var ( + rollout_long = dedent.Dedent(` + Manages a deployment using subcommands like "kubectl rollout undo deployment/abc"`) + rollout_example = dedent.Dedent(` + # Rollback to the previous deployment + kubectl rollout undo deployment/abc`) + rollout_valid_resources = dedent.Dedent(` + Valid resource types include: + * deployments + `) ) func NewCmdRollout(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/rollout/rollout_history.go b/pkg/kubectl/cmd/rollout/rollout_history.go index febb204500..467de122f9 100644 --- a/pkg/kubectl/cmd/rollout/rollout_history.go +++ b/pkg/kubectl/cmd/rollout/rollout_history.go @@ -20,6 +20,7 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "k8s.io/kubernetes/pkg/kubectl" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/kubectl/resource" @@ -34,13 +35,15 @@ type HistoryOptions struct { Recursive bool } -const ( - history_long = `View previous rollout revisions and configurations.` - history_example = `# View the rollout history of a deployment -kubectl rollout history deployment/abc +var ( + history_long = dedent.Dedent(` + View previous rollout revisions and configurations.`) + history_example = dedent.Dedent(` + # View the rollout history of a deployment + kubectl rollout history deployment/abc -# View the details of deployment revision 3 -kubectl rollout history deployment/abc --revision=3` + # View the details of deployment revision 3 + kubectl rollout history deployment/abc --revision=3`) ) func NewCmdRolloutHistory(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/rollout/rollout_pause.go b/pkg/kubectl/cmd/rollout/rollout_pause.go index 734f62ef38..cdc1f133e8 100644 --- a/pkg/kubectl/cmd/rollout/rollout_pause.go +++ b/pkg/kubectl/cmd/rollout/rollout_pause.go @@ -19,6 +19,7 @@ package rollout import ( "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api/meta" @@ -42,17 +43,19 @@ type PauseConfig struct { Recursive bool } -const ( - pause_long = `Mark the provided resource as paused +var ( + pause_long = dedent.Dedent(` + Mark the provided resource as paused -Paused resources will not be reconciled by a controller. -Use \"kubectl rollout resume\" to resume a paused resource. -Currently only deployments support being paused.` + Paused resources will not be reconciled by a controller. + Use \"kubectl rollout resume\" to resume a paused resource. + Currently only deployments support being paused.`) - pause_example = `# Mark the nginx deployment as paused. Any current state of -# the deployment will continue its function, new updates to the deployment will not -# have an effect as long as the deployment is paused. -kubectl rollout pause deployment/nginx` + pause_example = dedent.Dedent(` + # Mark the nginx deployment as paused. Any current state of + # the deployment will continue its function, new updates to the deployment will not + # have an effect as long as the deployment is paused. + kubectl rollout pause deployment/nginx`) ) func NewCmdRolloutPause(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/rollout/rollout_resume.go b/pkg/kubectl/cmd/rollout/rollout_resume.go index 101d3e67cd..5c563c02fc 100644 --- a/pkg/kubectl/cmd/rollout/rollout_resume.go +++ b/pkg/kubectl/cmd/rollout/rollout_resume.go @@ -19,6 +19,7 @@ package rollout import ( "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api/meta" @@ -42,15 +43,17 @@ type ResumeConfig struct { Recursive bool } -const ( - resume_long = `Resume a paused resource +var ( + resume_long = dedent.Dedent(` + Resume a paused resource -Paused resources will not be reconciled by a controller. By resuming a -resource, we allow it to be reconciled again. -Currently only deployments support being resumed.` + Paused resources will not be reconciled by a controller. By resuming a + resource, we allow it to be reconciled again. + Currently only deployments support being resumed.`) - resume_example = `# Resume an already paused deployment -kubectl rollout resume deployment/nginx` + resume_example = dedent.Dedent(` + # Resume an already paused deployment + kubectl rollout resume deployment/nginx`) ) func NewCmdRolloutResume(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/rollout/rollout_status.go b/pkg/kubectl/cmd/rollout/rollout_status.go index e0cf32716e..0b3f623041 100644 --- a/pkg/kubectl/cmd/rollout/rollout_status.go +++ b/pkg/kubectl/cmd/rollout/rollout_status.go @@ -20,6 +20,7 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "k8s.io/kubernetes/pkg/kubectl" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/kubectl/resource" @@ -35,10 +36,12 @@ type StatusOptions struct { Recursive bool } -const ( - status_long = `Watch the status of current rollout, until it's done.` - status_example = `# Watch the rollout status of a deployment -kubectl rollout status deployment/nginx` +var ( + status_long = dedent.Dedent(` + Watch the status of current rollout, until it's done.`) + status_example = dedent.Dedent(` + # Watch the rollout status of a deployment + kubectl rollout status deployment/nginx`) ) func NewCmdRolloutStatus(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/rollout/rollout_undo.go b/pkg/kubectl/cmd/rollout/rollout_undo.go index b0c84a717e..6173be6be2 100644 --- a/pkg/kubectl/cmd/rollout/rollout_undo.go +++ b/pkg/kubectl/cmd/rollout/rollout_undo.go @@ -19,6 +19,7 @@ package rollout import ( "io" + "github.com/renstrom/dedent" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/kubectl" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" @@ -43,13 +44,15 @@ type UndoOptions struct { Recursive bool } -const ( - undo_long = `Rollback to a previous rollout.` - undo_example = `# Rollback to the previous deployment -kubectl rollout undo deployment/abc +var ( + undo_long = dedent.Dedent(` + Rollback to a previous rollout.`) + undo_example = dedent.Dedent(` + # Rollback to the previous deployment + kubectl rollout undo deployment/abc -# Rollback to deployment revision 3 -kubectl rollout undo deployment/abc --to-revision=3` + # Rollback to deployment revision 3 + kubectl rollout undo deployment/abc --to-revision=3`) ) func NewCmdRolloutUndo(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/run.go b/pkg/kubectl/cmd/run.go index 915c61d83f..6c3362894e 100644 --- a/pkg/kubectl/cmd/run.go +++ b/pkg/kubectl/cmd/run.go @@ -22,6 +22,7 @@ import ( "os" "time" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" @@ -35,38 +36,40 @@ import ( "k8s.io/kubernetes/pkg/runtime" ) -const ( - run_long = `Create and run a particular image, possibly replicated. -Creates a deployment or job to manage the created container(s).` - run_example = `# Start a single instance of nginx. -kubectl run nginx --image=nginx +var ( + run_long = dedent.Dedent(` + Create and run a particular image, possibly replicated. + Creates a deployment or job to manage the created container(s).`) + run_example = dedent.Dedent(` + # Start a single instance of nginx. + kubectl run nginx --image=nginx -# Start a single instance of hazelcast and let the container expose port 5701 . -kubectl run hazelcast --image=hazelcast --port=5701 + # Start a single instance of hazelcast and let the container expose port 5701 . + kubectl run hazelcast --image=hazelcast --port=5701 -# Start a single instance of hazelcast and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default" in the container. -kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default" + # Start a single instance of hazelcast and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default" in the container. + kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default" -# Start a replicated instance of nginx. -kubectl run nginx --image=nginx --replicas=5 + # Start a replicated instance of nginx. + kubectl run nginx --image=nginx --replicas=5 -# Dry run. Print the corresponding API objects without creating them. -kubectl run nginx --image=nginx --dry-run + # Dry run. Print the corresponding API objects without creating them. + kubectl run nginx --image=nginx --dry-run -# Start a single instance of nginx, but overload the spec of the deployment with a partial set of values parsed from JSON. -kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }' + # Start a single instance of nginx, but overload the spec of the deployment with a partial set of values parsed from JSON. + kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }' -# Start a pod of busybox and keep it in the foreground, don't restart it if it exits. -kubectl run -i -t busybox --image=busybox --restart=Never + # Start a pod of busybox and keep it in the foreground, don't restart it if it exits. + kubectl run -i -t busybox --image=busybox --restart=Never -# Start the nginx container using the default command, but use custom arguments (arg1 .. argN) for that command. -kubectl run nginx --image=nginx -- <arg1> <arg2> ... <argN> + # Start the nginx container using the default command, but use custom arguments (arg1 .. argN) for that command. + kubectl run nginx --image=nginx -- <arg1> <arg2> ... <argN> -# Start the nginx container using a different command and custom arguments. -kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN> + # Start the nginx container using a different command and custom arguments. + kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN> -# Start the perl container to compute π to 2000 places and print it out. -kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)'` + # Start the perl container to compute π to 2000 places and print it out. + kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)'`) ) func NewCmdRun(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/scale.go b/pkg/kubectl/cmd/scale.go index bbd629a7d5..7001b7c17d 100644 --- a/pkg/kubectl/cmd/scale.go +++ b/pkg/kubectl/cmd/scale.go @@ -21,6 +21,7 @@ import ( "io" "os" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" @@ -36,27 +37,29 @@ type ScaleOptions struct { Recursive bool } -const ( - scale_long = `Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job. +var ( + scale_long = dedent.Dedent(` + Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job. -Scale also allows users to specify one or more preconditions for the scale action. -If --current-replicas or --resource-version is specified, it is validated before the -scale is attempted, and it is guaranteed that the precondition holds true when the -scale is sent to the server.` - scale_example = `# Scale a replicaset named 'foo' to 3. -kubectl scale --replicas=3 rs/foo + Scale also allows users to specify one or more preconditions for the scale action. + If --current-replicas or --resource-version is specified, it is validated before the + scale is attempted, and it is guaranteed that the precondition holds true when the + scale is sent to the server.`) + scale_example = dedent.Dedent(` + # Scale a replicaset named 'foo' to 3. + kubectl scale --replicas=3 rs/foo -# Scale a resource identified by type and name specified in "foo.yaml" to 3. -kubectl scale --replicas=3 -f foo.yaml + # Scale a resource identified by type and name specified in "foo.yaml" to 3. + kubectl scale --replicas=3 -f foo.yaml -# If the deployment named mysql's current size is 2, scale mysql to 3. -kubectl scale --current-replicas=2 --replicas=3 deployment/mysql + # If the deployment named mysql's current size is 2, scale mysql to 3. + kubectl scale --current-replicas=2 --replicas=3 deployment/mysql -# Scale multiple replication controllers. -kubectl scale --replicas=5 rc/foo rc/bar rc/baz + # Scale multiple replication controllers. + kubectl scale --replicas=5 rc/foo rc/bar rc/baz -# Scale job named 'cron' to 3. -kubectl scale --replicas=3 job/cron` + # Scale job named 'cron' to 3. + kubectl scale --replicas=3 job/cron`) ) // NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale diff --git a/pkg/kubectl/cmd/set/set.go b/pkg/kubectl/cmd/set/set.go index 10d3d37901..945322e787 100644 --- a/pkg/kubectl/cmd/set/set.go +++ b/pkg/kubectl/cmd/set/set.go @@ -19,15 +19,17 @@ package set import ( "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" ) -const ( - set_long = `Configure application resources +var ( + set_long = dedent.Dedent(` + Configure application resources -These commands help you make changes to existing application resources.` - set_example = `` + These commands help you make changes to existing application resources.`) + set_example = dedent.Dedent(``) ) func NewCmdSet(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/set/set_image.go b/pkg/kubectl/cmd/set/set_image.go index afe65adf4d..5ffc6ad4cd 100644 --- a/pkg/kubectl/cmd/set/set_image.go +++ b/pkg/kubectl/cmd/set/set_image.go @@ -20,6 +20,7 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" @@ -55,25 +56,27 @@ type ImageOptions struct { ContainerImages map[string]string } -const ( +var ( image_resources = ` pod (po), replicationcontroller (rc), deployment, daemonset (ds), job, replicaset (rs)` - image_long = `Update existing container image(s) of resources. + image_long = dedent.Dedent(` + Update existing container image(s) of resources. -Possible resources include (case insensitive):` + image_resources + Possible resources include (case insensitive):`) + image_resources - image_example = `# Set a deployment's nginx container image to 'nginx:1.9.1', and its busybox container image to 'busybox'. -kubectl set image deployment/nginx busybox=busybox nginx=nginx:1.9.1 + image_example = dedent.Dedent(` + # Set a deployment's nginx container image to 'nginx:1.9.1', and its busybox container image to 'busybox'. + kubectl set image deployment/nginx busybox=busybox nginx=nginx:1.9.1 -# Update all deployments' and rc's nginx container's image to 'nginx:1.9.1' -kubectl set image deployments,rc nginx=nginx:1.9.1 --all + # Update all deployments' and rc's nginx container's image to 'nginx:1.9.1' + kubectl set image deployments,rc nginx=nginx:1.9.1 --all -# Update image of all containers of daemonset abc to 'nginx:1.9.1' -kubectl set image daemonset abc *=nginx:1.9.1 + # Update image of all containers of daemonset abc to 'nginx:1.9.1' + kubectl set image daemonset abc *=nginx:1.9.1 -# Print result (in yaml format) of updating nginx container image from local file, without hitting the server -kubectl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml` + # Print result (in yaml format) of updating nginx container image from local file, without hitting the server + kubectl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml`) ) func NewCmdImage(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/stop.go b/pkg/kubectl/cmd/stop.go index fc25be9aeb..b180583bc2 100644 --- a/pkg/kubectl/cmd/stop.go +++ b/pkg/kubectl/cmd/stop.go @@ -20,6 +20,7 @@ import ( "fmt" "io" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/kubectl" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" @@ -33,25 +34,27 @@ type StopOptions struct { Recursive bool } -const ( - stop_long = `Deprecated: Gracefully shut down a resource by name or filename. +var ( + stop_long = dedent.Dedent(` + Deprecated: Gracefully shut down a resource by name or filename. -The stop command is deprecated, all its functionalities are covered by delete command. -See 'kubectl delete --help' for more details. + The stop command is deprecated, all its functionalities are covered by delete command. + See 'kubectl delete --help' for more details. -Attempts to shut down and delete a resource that supports graceful termination. -If the resource is scalable it will be scaled to 0 before deletion.` - stop_example = `# Shut down foo. -kubectl stop replicationcontroller foo + Attempts to shut down and delete a resource that supports graceful termination. + If the resource is scalable it will be scaled to 0 before deletion.`) + stop_example = dedent.Dedent(` + # Shut down foo. + kubectl stop replicationcontroller foo -# Stop pods and services with label name=myLabel. -kubectl stop pods,services -l name=myLabel + # Stop pods and services with label name=myLabel. + kubectl stop pods,services -l name=myLabel -# Shut down the service defined in service.json -kubectl stop -f service.json + # Shut down the service defined in service.json + kubectl stop -f service.json -# Shut down all resources in the path/to/resources directory -kubectl stop -f path/to/resources` + # Shut down all resources in the path/to/resources directory + kubectl stop -f path/to/resources`) ) func NewCmdStop(f *cmdutil.Factory, out io.Writer) *cobra.Command { diff --git a/pkg/kubectl/cmd/taint.go b/pkg/kubectl/cmd/taint.go index 8f85b88f65..73bc80e03c 100644 --- a/pkg/kubectl/cmd/taint.go +++ b/pkg/kubectl/cmd/taint.go @@ -23,6 +23,7 @@ import ( "encoding/json" "github.com/golang/glog" + "github.com/renstrom/dedent" "github.com/spf13/cobra" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" @@ -49,19 +50,21 @@ type TaintOptions struct { cmd *cobra.Command } -const ( - taint_long = `Update the taints on one or more nodes. +var ( + taint_long = dedent.Dedent(` + Update the taints on one or more nodes. -A taint consists of a key, value, and effect. As an argument here, it is expressed as key=value:effect. -The key must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters. -The value must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters. -The effect must be NoSchedule or PreferNoSchedule. -Currently taint can only apply to node.` - taint_example = `# Update node 'foo' with a taint with key 'dedicated' and value 'special-user' and effect 'NoSchedule'. -# If a taint with that key already exists, its value and effect are replaced as specified. -kubectl taint nodes foo dedicated=special-user:NoSchedule -# Remove from node 'foo' the taint with key 'dedicated' if one exists. -kubectl taint nodes foo dedicated-` + A taint consists of a key, value, and effect. As an argument here, it is expressed as key=value:effect. + The key must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters. + The value must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to %[1]d characters. + The effect must be NoSchedule or PreferNoSchedule. + Currently taint can only apply to node.`) + taint_example = dedent.Dedent(` + # Update node 'foo' with a taint with key 'dedicated' and value 'special-user' and effect 'NoSchedule'. + # If a taint with that key already exists, its value and effect are replaced as specified. + kubectl taint nodes foo dedicated=special-user:NoSchedule + # Remove from node 'foo' the taint with key 'dedicated' if one exists. + kubectl taint nodes foo dedicated-`) ) func NewCmdTaint(f *cmdutil.Factory, out io.Writer) *cobra.Command { From 37f9647dfe81dd82bb44df0000aeb14ccf6af762 Mon Sep 17 00:00:00 2001 From: Michael Rubin <mrubin@google.com> Date: Tue, 24 May 2016 16:36:17 -0700 Subject: [PATCH 207/339] Document usage of dedent for kubectl commands --- docs/devel/kubectl-conventions.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/devel/kubectl-conventions.md b/docs/devel/kubectl-conventions.md index 4d11fc0234..0beb95a7ca 100644 --- a/docs/devel/kubectl-conventions.md +++ b/docs/devel/kubectl-conventions.md @@ -279,15 +279,17 @@ type MineConfig struct { mineLatest bool } -const ( - mineLong = `Some long description -for my command.` +var ( + mineLong = dedent.Dedent(` + mine which is described here + with lots of details.`) - mineExample = ` # Run my command's first action - $ %[1]s first + mineExample = dedent.Dedent(` + # Run my command's first action + kubectl mine first_action - # Run my command's second action on latest stuff - $ %[1]s second --latest` + # Run my command's second action on latest stuff + kubectl mine second_action --flag`) ) // NewCmdMine implements the kubectl mine command. From 2d24d981c0eee3faafd41e47de2323e69aac5112 Mon Sep 17 00:00:00 2001 From: Jan Safranek <jsafrane@redhat.com> Date: Mon, 27 Jun 2016 10:16:02 +0200 Subject: [PATCH 208/339] Remove duplicate deleteAllEtcdKeys(). --- test/integration/client_test.go | 2 +- test/integration/persistent_volumes_test.go | 26 ++++++++++----------- test/integration/service_account_test.go | 2 +- test/integration/utils.go | 14 ----------- 4 files changed, 15 insertions(+), 29 deletions(-) diff --git a/test/integration/client_test.go b/test/integration/client_test.go index 314aa1fb18..338d9dc941 100644 --- a/test/integration/client_test.go +++ b/test/integration/client_test.go @@ -442,7 +442,7 @@ func TestSingleWatch(t *testing.T) { defer s.Close() ns := "blargh" - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() client := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) mkEvent := func(i int) *api.Event { diff --git a/test/integration/persistent_volumes_test.go b/test/integration/persistent_volumes_test.go index e6e0ccee08..c1631a2e34 100644 --- a/test/integration/persistent_volumes_test.go +++ b/test/integration/persistent_volumes_test.go @@ -108,7 +108,7 @@ func TestPersistentVolumeRecycler(t *testing.T) { _, s := framework.RunAMaster(t) defer s.Close() - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() testClient, ctrl, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -156,7 +156,7 @@ func TestPersistentVolumeDeleter(t *testing.T) { _, s := framework.RunAMaster(t) defer s.Close() - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() testClient, ctrl, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -208,7 +208,7 @@ func TestPersistentVolumeBindRace(t *testing.T) { _, s := framework.RunAMaster(t) defer s.Close() - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() testClient, ctrl, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -273,7 +273,7 @@ func TestPersistentVolumeClaimLabelSelector(t *testing.T) { _, s := framework.RunAMaster(t) defer s.Close() - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() testClient, controller, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -346,7 +346,7 @@ func TestPersistentVolumeClaimLabelSelectorMatchExpressions(t *testing.T) { _, s := framework.RunAMaster(t) defer s.Close() - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() testClient, controller, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -438,7 +438,7 @@ func TestPersistentVolumeMultiPVs(t *testing.T) { _, s := framework.RunAMaster(t) defer s.Close() - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() testClient, controller, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -513,7 +513,7 @@ func TestPersistentVolumeMultiPVs(t *testing.T) { waitForAnyPersistentVolumePhase(watchPV, api.VolumeReleased) t.Log("volumes released") - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() } // TestPersistentVolumeMultiPVsPVCs tests binding of 100 PVC to 100 PVs. @@ -522,7 +522,7 @@ func TestPersistentVolumeMultiPVsPVCs(t *testing.T) { _, s := framework.RunAMaster(t) defer s.Close() - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() testClient, binder, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -593,7 +593,7 @@ func TestPersistentVolumeMultiPVsPVCs(t *testing.T) { glog.V(2).Infof("PVC %q is bound to PV %q", pvc.Name, pvc.Spec.VolumeName) } testSleep() - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() } // TestPersistentVolumeProvisionMultiPVCs tests provisioning of many PVCs. @@ -602,7 +602,7 @@ func TestPersistentVolumeProvisionMultiPVCs(t *testing.T) { _, s := framework.RunAMaster(t) defer s.Close() - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() testClient, binder, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -672,7 +672,7 @@ func TestPersistentVolumeProvisionMultiPVCs(t *testing.T) { } glog.V(2).Infof("TestPersistentVolumeProvisionMultiPVCs: volumes are deleted") - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() } // TestPersistentVolumeMultiPVsDiffAccessModes tests binding of one PVC to two @@ -681,7 +681,7 @@ func TestPersistentVolumeMultiPVsDiffAccessModes(t *testing.T) { _, s := framework.RunAMaster(t) defer s.Close() - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() testClient, controller, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -747,7 +747,7 @@ func TestPersistentVolumeMultiPVsDiffAccessModes(t *testing.T) { waitForAnyPersistentVolumePhase(watchPV, api.VolumeReleased) t.Log("volume released") - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() } func waitForPersistentVolumePhase(client *clientset.Clientset, pvName string, w watch.Interface, phase api.PersistentVolumePhase) { diff --git a/test/integration/service_account_test.go b/test/integration/service_account_test.go index 63d2712590..0bbd507c4b 100644 --- a/test/integration/service_account_test.go +++ b/test/integration/service_account_test.go @@ -337,7 +337,7 @@ func TestServiceAccountTokenAuthentication(t *testing.T) { // It is the responsibility of the caller to ensure the returned stopFunc is called func startServiceAccountTestServer(t *testing.T) (*clientset.Clientset, restclient.Config, func()) { - deleteAllEtcdKeys() + framework.DeleteAllEtcdKeys() // Listener var m *master.Master diff --git a/test/integration/utils.go b/test/integration/utils.go index 290cc8a94c..16070ba816 100644 --- a/test/integration/utils.go +++ b/test/integration/utils.go @@ -51,20 +51,6 @@ func withEtcdKey(f func(string)) { f(prefix) } -func deleteAllEtcdKeys() { - keysAPI := etcd.NewKeysAPI(newEtcdClient()) - keys, err := keysAPI.Get(context.TODO(), "/", nil) - if err != nil { - glog.Fatalf("Unable to list root etcd keys: %v", err) - } - for _, node := range keys.Node.Nodes { - if _, err := keysAPI.Delete(context.TODO(), node.Key, &etcd.DeleteOptions{Recursive: true}); err != nil { - glog.Fatalf("Unable delete key: %v", err) - } - } - -} - func deletePodOrErrorf(t *testing.T, c *client.Client, ns, name string) { if err := c.Pods(ns).Delete(name, nil); err != nil { t.Errorf("unable to delete pod %v: %v", name, err) From d8a7b4948b8946d574da11a67f71a8043c0ed838 Mon Sep 17 00:00:00 2001 From: xiangpengzhao <zhao.xiangpeng@zte.com.cn> Date: Thu, 23 Jun 2016 05:39:53 -0400 Subject: [PATCH 209/339] Should verify port value when starting kube-apiserver --- pkg/genericapiserver/genericapiserver.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkg/genericapiserver/genericapiserver.go b/pkg/genericapiserver/genericapiserver.go index 9d7fe36068..32b102a7c4 100644 --- a/pkg/genericapiserver/genericapiserver.go +++ b/pkg/genericapiserver/genericapiserver.go @@ -572,6 +572,10 @@ func NewConfig(options *options.ServerRunOptions) *Config { } func verifyServiceNodePort(options *options.ServerRunOptions) { + if options.KubernetesServiceNodePort < 0 || options.KubernetesServiceNodePort > 65535 { + glog.Fatalf("--kubernetes-service-node-port %v must be between 0 and 65535, inclusive. If 0, the Kubernetes master service will be of type ClusterIP.", options.KubernetesServiceNodePort) + } + if options.KubernetesServiceNodePort > 0 && !options.ServiceNodePortRange.Contains(options.KubernetesServiceNodePort) { glog.Fatalf("Kubernetes service port range %v doesn't contain %v", options.ServiceNodePortRange, (options.KubernetesServiceNodePort)) } @@ -583,10 +587,25 @@ func verifyEtcdServersList(options *options.ServerRunOptions) { } } +func verifySecurePort(options *options.ServerRunOptions) { + if options.SecurePort < 0 || options.SecurePort > 65535 { + glog.Fatalf("--secure-port %v must be between 0 and 65535, inclusive. 0 for turning off secure port.", options.SecurePort) + } +} + +// TODO: Allow 0 to turn off insecure port. +func verifyInsecurePort(options *options.ServerRunOptions) { + if options.InsecurePort < 1 || options.InsecurePort > 65535 { + glog.Fatalf("--insecure-port %v must be between 1 and 65535, inclusive.", options.InsecurePort) + } +} + func ValidateRunOptions(options *options.ServerRunOptions) { verifyClusterIPFlags(options) verifyServiceNodePort(options) verifyEtcdServersList(options) + verifySecurePort(options) + verifyInsecurePort(options) } func DefaultAndValidateRunOptions(options *options.ServerRunOptions) { From 169076e7da8bf1edcb03a4435f5e5032f61726b0 Mon Sep 17 00:00:00 2001 From: Jan Safranek <jsafrane@redhat.com> Date: Mon, 27 Jun 2016 13:08:02 +0200 Subject: [PATCH 210/339] Fix initialization of volume controller caches. Fix PersistentVolumeController.initializeCaches() to pass pointers to volume or claim to storeObjectUpdate() and add extra functions to enforce that the right types are checked in the future. Fixes #28076 --- pkg/controller/persistentvolume/controller.go | 12 ++--- .../persistentvolume/controller_base.go | 53 +++++++++++++------ 2 files changed, 43 insertions(+), 22 deletions(-) diff --git a/pkg/controller/persistentvolume/controller.go b/pkg/controller/persistentvolume/controller.go index 69e1ba54d9..87dc695c27 100644 --- a/pkg/controller/persistentvolume/controller.go +++ b/pkg/controller/persistentvolume/controller.go @@ -506,7 +506,7 @@ func (ctrl *PersistentVolumeController) updateClaimPhase(claim *api.PersistentVo glog.V(4).Infof("updating PersistentVolumeClaim[%s]: set phase %s failed: %v", claimToClaimKey(claim), phase, err) return newClaim, err } - _, err = storeObjectUpdate(ctrl.claims, newClaim, "claim") + _, err = ctrl.storeClaimUpdate(newClaim) if err != nil { glog.V(4).Infof("updating PersistentVolumeClaim[%s]: cannot update internal cache: %v", claimToClaimKey(claim), err) return newClaim, err @@ -565,7 +565,7 @@ func (ctrl *PersistentVolumeController) updateVolumePhase(volume *api.Persistent glog.V(4).Infof("updating PersistentVolume[%s]: set phase %s failed: %v", volume.Name, phase, err) return newVol, err } - _, err = storeObjectUpdate(ctrl.volumes.store, newVol, "volume") + _, err = ctrl.storeVolumeUpdate(newVol) if err != nil { glog.V(4).Infof("updating PersistentVolume[%s]: cannot update internal cache: %v", volume.Name, err) return newVol, err @@ -650,7 +650,7 @@ func (ctrl *PersistentVolumeController) bindVolumeToClaim(volume *api.Persistent glog.V(4).Infof("updating PersistentVolume[%s]: binding to %q failed: %v", volume.Name, claimToClaimKey(claim), err) return newVol, err } - _, err = storeObjectUpdate(ctrl.volumes.store, newVol, "volume") + _, err = ctrl.storeVolumeUpdate(newVol) if err != nil { glog.V(4).Infof("updating PersistentVolume[%s]: cannot update internal cache: %v", volume.Name, err) return newVol, err @@ -712,7 +712,7 @@ func (ctrl *PersistentVolumeController) bindClaimToVolume(claim *api.PersistentV glog.V(4).Infof("updating PersistentVolumeClaim[%s]: binding to %q failed: %v", claimToClaimKey(claim), volume.Name, err) return newClaim, err } - _, err = storeObjectUpdate(ctrl.claims, newClaim, "claim") + _, err = ctrl.storeClaimUpdate(newClaim) if err != nil { glog.V(4).Infof("updating PersistentVolumeClaim[%s]: cannot update internal cache: %v", claimToClaimKey(claim), err) return newClaim, err @@ -806,7 +806,7 @@ func (ctrl *PersistentVolumeController) unbindVolume(volume *api.PersistentVolum glog.V(4).Infof("updating PersistentVolume[%s]: rollback failed: %v", volume.Name, err) return err } - _, err = storeObjectUpdate(ctrl.volumes.store, newVol, "volume") + _, err = ctrl.storeVolumeUpdate(newVol) if err != nil { glog.V(4).Infof("updating PersistentVolume[%s]: cannot update internal cache: %v", volume.Name, err) return err @@ -1171,7 +1171,7 @@ func (ctrl *PersistentVolumeController) provisionClaimOperation(claimObj interfa // Save succeeded. glog.V(3).Infof("volume %q for claim %q saved", volume.Name, claimToClaimKey(claim)) - _, err = storeObjectUpdate(ctrl.volumes.store, newVol, "volume") + _, err = ctrl.storeVolumeUpdate(newVol) if err != nil { // We will get an "volume added" event soon, this is not a big error glog.V(4).Infof("provisionClaimOperation [%s]: cannot update internal cache: %v", volume.Name, err) diff --git a/pkg/controller/persistentvolume/controller_base.go b/pkg/controller/persistentvolume/controller_base.go index 9cf03a81a2..73915973e2 100644 --- a/pkg/controller/persistentvolume/controller_base.go +++ b/pkg/controller/persistentvolume/controller_base.go @@ -30,6 +30,7 @@ import ( "k8s.io/kubernetes/pkg/client/record" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/controller/framework" + "k8s.io/kubernetes/pkg/conversion" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/util/goroutinemap" vol "k8s.io/kubernetes/pkg/volume" @@ -148,7 +149,12 @@ func (ctrl *PersistentVolumeController) initializeCaches(volumeSource, claimSour // Ignore template volumes from kubernetes 1.2 deleted := ctrl.upgradeVolumeFrom1_2(&volume) if !deleted { - storeObjectUpdate(ctrl.volumes.store, volume, "volume") + clone, err := conversion.NewCloner().DeepCopy(&volume) + if err != nil { + glog.Errorf("error cloning volume %q: %v", volume.Name, err) + } + volumeClone := clone.(*api.PersistentVolume) + ctrl.storeVolumeUpdate(volumeClone) } } @@ -163,11 +169,24 @@ func (ctrl *PersistentVolumeController) initializeCaches(volumeSource, claimSour return } for _, claim := range claimList.Items { - storeObjectUpdate(ctrl.claims, claim, "claim") + clone, err := conversion.NewCloner().DeepCopy(&claim) + if err != nil { + glog.Errorf("error cloning claim %q: %v", claimToClaimKey(&claim), err) + } + claimClone := clone.(*api.PersistentVolumeClaim) + ctrl.storeClaimUpdate(claimClone) } glog.V(4).Infof("controller initialized") } +func (ctrl *PersistentVolumeController) storeVolumeUpdate(volume *api.PersistentVolume) (bool, error) { + return storeObjectUpdate(ctrl.volumes.store, volume, "volume") +} + +func (ctrl *PersistentVolumeController) storeClaimUpdate(claim *api.PersistentVolumeClaim) (bool, error) { + return storeObjectUpdate(ctrl.claims, claim, "claim") +} + // addVolume is callback from framework.Controller watching PersistentVolume // events. func (ctrl *PersistentVolumeController) addVolume(obj interface{}) { @@ -184,7 +203,7 @@ func (ctrl *PersistentVolumeController) addVolume(obj interface{}) { // Store the new volume version in the cache and do not process it if this // is an old version. - new, err := storeObjectUpdate(ctrl.volumes.store, obj, "volume") + new, err := ctrl.storeVolumeUpdate(pv) if err != nil { glog.Errorf("%v", err) } @@ -219,7 +238,7 @@ func (ctrl *PersistentVolumeController) updateVolume(oldObj, newObj interface{}) // Store the new volume version in the cache and do not process it if this // is an old version. - new, err := storeObjectUpdate(ctrl.volumes.store, newObj, "volume") + new, err := ctrl.storeVolumeUpdate(newVolume) if err != nil { glog.Errorf("%v", err) } @@ -291,7 +310,13 @@ func (ctrl *PersistentVolumeController) deleteVolume(obj interface{}) { func (ctrl *PersistentVolumeController) addClaim(obj interface{}) { // Store the new claim version in the cache and do not process it if this is // an old version. - new, err := storeObjectUpdate(ctrl.claims, obj, "claim") + claim, ok := obj.(*api.PersistentVolumeClaim) + if !ok { + glog.Errorf("Expected PersistentVolumeClaim but addClaim received %+v", obj) + return + } + + new, err := ctrl.storeClaimUpdate(claim) if err != nil { glog.Errorf("%v", err) } @@ -299,11 +324,6 @@ func (ctrl *PersistentVolumeController) addClaim(obj interface{}) { return } - claim, ok := obj.(*api.PersistentVolumeClaim) - if !ok { - glog.Errorf("Expected PersistentVolumeClaim but addClaim received %+v", obj) - return - } if err := ctrl.syncClaim(claim); err != nil { if errors.IsConflict(err) { // Version conflict error happens quite often and the controller @@ -320,7 +340,13 @@ func (ctrl *PersistentVolumeController) addClaim(obj interface{}) { func (ctrl *PersistentVolumeController) updateClaim(oldObj, newObj interface{}) { // Store the new claim version in the cache and do not process it if this is // an old version. - new, err := storeObjectUpdate(ctrl.claims, newObj, "claim") + newClaim, ok := newObj.(*api.PersistentVolumeClaim) + if !ok { + glog.Errorf("Expected PersistentVolumeClaim but updateClaim received %+v", newObj) + return + } + + new, err := ctrl.storeClaimUpdate(newClaim) if err != nil { glog.Errorf("%v", err) } @@ -328,11 +354,6 @@ func (ctrl *PersistentVolumeController) updateClaim(oldObj, newObj interface{}) return } - newClaim, ok := newObj.(*api.PersistentVolumeClaim) - if !ok { - glog.Errorf("Expected PersistentVolumeClaim but updateClaim received %+v", newObj) - return - } if err := ctrl.syncClaim(newClaim); err != nil { if errors.IsConflict(err) { // Version conflict error happens quite often and the controller From b55cede866aa81bbf726423b64de809c45924979 Mon Sep 17 00:00:00 2001 From: Andy Goldstein <agoldste@redhat.com> Date: Fri, 24 Jun 2016 11:25:46 -0400 Subject: [PATCH 211/339] Add EndpointReconcilerConfig to master Config Add EndpointReconcilerConfig to master Config to allow downstream integrators to customize the reconciler and reconciliation interval when starting a customized master. --- pkg/master/master.go | 45 ++++++++++++++++++++++++------ pkg/master/master_test.go | 21 ++++++++++++-- test/integration/openshift_test.go | 2 +- 3 files changed, 56 insertions(+), 12 deletions(-) diff --git a/pkg/master/master.go b/pkg/master/master.go index a6c4b32366..d3bfc9f398 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -115,19 +115,33 @@ import ( "k8s.io/kubernetes/pkg/registry/service/portallocator" ) +const ( + // DefaultEndpointReconcilerInterval is the default amount of time for how often the endpoints for + // the kubernetes Service are reconciled. + DefaultEndpointReconcilerInterval = 10 * time.Second +) + type Config struct { *genericapiserver.Config - EnableCoreControllers bool - DeleteCollectionWorkers int - EventTTL time.Duration - KubeletClient kubeletclient.KubeletClient + EnableCoreControllers bool + EndpointReconcilerConfig EndpointReconcilerConfig + DeleteCollectionWorkers int + EventTTL time.Duration + KubeletClient kubeletclient.KubeletClient // Used to start and monitor tunneling Tunneler genericapiserver.Tunneler disableThirdPartyControllerForTesting bool } +// EndpointReconcilerConfig holds the endpoint reconciler and endpoint reconciliation interval to be +// used by the master. +type EndpointReconcilerConfig struct { + Reconciler EndpointReconciler + Interval time.Duration +} + // Master contains state for a Kubernetes cluster master/api server. type Master struct { *genericapiserver.GenericAPIServer @@ -193,7 +207,7 @@ func New(c *Config) (*Master, error) { // TODO: Attempt clean shutdown? if m.enableCoreControllers { - m.NewBootstrapController().Start() + m.NewBootstrapController(c.EndpointReconcilerConfig).Start() } return m, nil @@ -585,14 +599,27 @@ func (m *Master) initV1ResourcesStorage(c *Config) { } } -// NewBootstrapController returns a controller for watching the core capabilities of the master. -func (m *Master) NewBootstrapController() *Controller { +// NewBootstrapController returns a controller for watching the core capabilities of the master. If +// endpointReconcilerConfig.Interval is 0, the default value of DefaultEndpointReconcilerInterval +// will be used instead. If endpointReconcilerConfig.Reconciler is nil, the default +// MasterCountEndpointReconciler will be used. +func (m *Master) NewBootstrapController(endpointReconcilerConfig EndpointReconcilerConfig) *Controller { + if endpointReconcilerConfig.Interval == 0 { + endpointReconcilerConfig.Interval = DefaultEndpointReconcilerInterval + } + + if endpointReconcilerConfig.Reconciler == nil { + // use a default endpoint reconciler if nothing is set + // m.endpointRegistry is set via m.InstallAPIs -> m.initV1ResourcesStorage + endpointReconcilerConfig.Reconciler = NewMasterCountEndpointReconciler(m.MasterCount, m.endpointRegistry) + } + return &Controller{ NamespaceRegistry: m.namespaceRegistry, ServiceRegistry: m.serviceRegistry, - EndpointReconciler: NewMasterCountEndpointReconciler(m.MasterCount, m.endpointRegistry), - EndpointInterval: 10 * time.Second, + EndpointReconciler: endpointReconcilerConfig.Reconciler, + EndpointInterval: endpointReconcilerConfig.Interval, SystemNamespaces: []string{api.NamespaceSystem}, SystemNamespacesInterval: 1 * time.Minute, diff --git a/pkg/master/master_test.go b/pkg/master/master_test.go index 317f0f32e6..1d8d89c331 100644 --- a/pkg/master/master_test.go +++ b/pkg/master/master_test.go @@ -28,6 +28,7 @@ import ( "reflect" "strings" "testing" + "time" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" @@ -237,6 +238,12 @@ func TestFindExternalAddress(t *testing.T) { assert.Error(err, "expected findExternalAddress to fail on a node with missing ip information") } +type fakeEndpointReconciler struct{} + +func (*fakeEndpointReconciler) ReconcileEndpoints(serviceName string, ip net.IP, endpointPorts []api.EndpointPort, reconcilePorts bool) error { + return nil +} + // TestNewBootstrapController verifies master fields are properly copied into controller func TestNewBootstrapController(t *testing.T) { // Tests a subset of inputs to ensure they are set properly in the controller @@ -254,14 +261,24 @@ func TestNewBootstrapController(t *testing.T) { master.ServiceReadWritePort = 1000 master.PublicReadWritePort = 1010 - controller := master.NewBootstrapController() + // test with an empty EndpointReconcilerConfig to ensure the defaults are applied + controller := master.NewBootstrapController(EndpointReconcilerConfig{}) assert.Equal(controller.NamespaceRegistry, master.namespaceRegistry) assert.Equal(controller.EndpointReconciler, NewMasterCountEndpointReconciler(master.MasterCount, master.endpointRegistry)) + assert.Equal(controller.EndpointInterval, DefaultEndpointReconcilerInterval) assert.Equal(controller.ServiceRegistry, master.serviceRegistry) assert.Equal(controller.ServiceNodePortRange, portRange) assert.Equal(controller.ServicePort, master.ServiceReadWritePort) assert.Equal(controller.PublicServicePort, master.PublicReadWritePort) + + // test with a filled-in EndpointReconcilerConfig to make sure its values are used + controller = master.NewBootstrapController(EndpointReconcilerConfig{ + Reconciler: &fakeEndpointReconciler{}, + Interval: 5 * time.Second, + }) + assert.Equal(controller.EndpointReconciler, &fakeEndpointReconciler{}) + assert.Equal(controller.EndpointInterval, 5*time.Second) } // TestControllerServicePorts verifies master extraServicePorts are @@ -289,7 +306,7 @@ func TestControllerServicePorts(t *testing.T) { }, } - controller := master.NewBootstrapController() + controller := master.NewBootstrapController(EndpointReconcilerConfig{}) assert.Equal(int32(1000), controller.ExtraServicePorts[0].Port) assert.Equal(int32(1010), controller.ExtraServicePorts[1].Port) diff --git a/test/integration/openshift_test.go b/test/integration/openshift_test.go index e345602706..90f058bdcd 100644 --- a/test/integration/openshift_test.go +++ b/test/integration/openshift_test.go @@ -37,5 +37,5 @@ func TestMasterExportsSymbols(t *testing.T) { m := &master.Master{ GenericAPIServer: &genericapiserver.GenericAPIServer{}, } - _ = (m).NewBootstrapController() + _ = (m).NewBootstrapController(master.EndpointReconcilerConfig{}) } From d00cdf75e879432a93a58e6f92efe7f5bf096da2 Mon Sep 17 00:00:00 2001 From: Jerzy Szczepkowski <jsz@google.com> Date: Tue, 21 Jun 2016 09:43:36 +0200 Subject: [PATCH 212/339] Influxdb migrated to PetSet and PersistentVolumes. Influxdb migrated to PetSet and PersistentVolumes. --- .../influxdb/influxdb-claim.yaml | 15 ++++ ...ller.yaml => influxdb-grafana-petset.yaml} | 12 ++- .../influxdb/influxdb-pv.yaml | 20 +++++ cluster/gce/configure-vm.sh | 1 + .../influxdb/influxdb-grafana-controller.yaml | 74 ------------------- cluster/gce/gci/configure-helper.sh | 6 ++ cluster/gce/util.sh | 22 ++++++ .../salt/kube-addons/kube-addon-manager.yaml | 2 +- test/e2e/monitoring.go | 21 +++++- 9 files changed, 90 insertions(+), 83 deletions(-) create mode 100644 cluster/addons/cluster-monitoring/influxdb/influxdb-claim.yaml rename cluster/addons/cluster-monitoring/influxdb/{influxdb-grafana-controller.yaml => influxdb-grafana-petset.yaml} (94%) create mode 100644 cluster/addons/cluster-monitoring/influxdb/influxdb-pv.yaml delete mode 100644 cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml diff --git a/cluster/addons/cluster-monitoring/influxdb/influxdb-claim.yaml b/cluster/addons/cluster-monitoring/influxdb/influxdb-claim.yaml new file mode 100644 index 0000000000..d58bca264c --- /dev/null +++ b/cluster/addons/cluster-monitoring/influxdb/influxdb-claim.yaml @@ -0,0 +1,15 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: influxdb-claim + namespace: kube-system + labels: + kubernetes.io/cluster-service: "true" +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + volumeName: influxdb-pv + diff --git a/cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml b/cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-petset.yaml similarity index 94% rename from cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml rename to cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-petset.yaml index e6249666b7..e9048c2611 100644 --- a/cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml +++ b/cluster/addons/cluster-monitoring/influxdb/influxdb-grafana-petset.yaml @@ -1,5 +1,5 @@ -apiVersion: v1 -kind: ReplicationController +apiVersion: apps/v1alpha1 +kind: PetSet metadata: name: monitoring-influxdb-grafana-v3 namespace: kube-system @@ -9,9 +9,6 @@ metadata: kubernetes.io/cluster-service: "true" spec: replicas: 1 - selector: - k8s-app: influxGrafana - version: v3 template: metadata: labels: @@ -68,7 +65,8 @@ spec: mountPath: /var volumes: - name: influxdb-persistent-storage - emptyDir: {} + persistentVolumeClaim: + claimName: influxdb-claim - name: grafana-persistent-storage emptyDir: {} - + serviceName: monitoring-influxdb diff --git a/cluster/addons/cluster-monitoring/influxdb/influxdb-pv.yaml b/cluster/addons/cluster-monitoring/influxdb/influxdb-pv.yaml new file mode 100644 index 0000000000..76d091cdd6 --- /dev/null +++ b/cluster/addons/cluster-monitoring/influxdb/influxdb-pv.yaml @@ -0,0 +1,20 @@ +{% set pd_prefix = pillar.get('master_name', '') -%} +{% set pd_name = pd_prefix + '-influxdb-pd') -%} + +kind: PersistentVolume +apiVersion: v1 +metadata: + name: influxdb-pv + namespace: kube-system + labels: + kubernetes.io/cluster-service: "true" +spec: + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + - ReadOnlyMany + gcePersistentDisk: + pdName: {{ pd_name }} + fsType: ext4 + persistentVolumeReclaimPolicy: Delete diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index 61a0d261fb..255d7eab40 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -451,6 +451,7 @@ network_policy_provider: '$(echo "$NETWORK_POLICY_PROVIDER" | sed -e "s/'/''/g") enable_manifest_url: '$(echo "${ENABLE_MANIFEST_URL:-}" | sed -e "s/'/''/g")' manifest_url: '$(echo "${MANIFEST_URL:-}" | sed -e "s/'/''/g")' manifest_url_header: '$(echo "${MANIFEST_URL_HEADER:-}" | sed -e "s/'/''/g")' +master_name: '$(echo "${MASTER_NAME:-}" | sed -e "s/'/''/g")' num_nodes: $(echo "${NUM_NODES:-}" | sed -e "s/'/''/g") e2e_storage_test_environment: '$(echo "$E2E_STORAGE_TEST_ENVIRONMENT" | sed -e "s/'/''/g")' kube_uid: '$(echo "${KUBE_UID}" | sed -e "s/'/''/g")' diff --git a/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml b/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml deleted file mode 100644 index e6249666b7..0000000000 --- a/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml +++ /dev/null @@ -1,74 +0,0 @@ -apiVersion: v1 -kind: ReplicationController -metadata: - name: monitoring-influxdb-grafana-v3 - namespace: kube-system - labels: - k8s-app: influxGrafana - version: v3 - kubernetes.io/cluster-service: "true" -spec: - replicas: 1 - selector: - k8s-app: influxGrafana - version: v3 - template: - metadata: - labels: - k8s-app: influxGrafana - version: v3 - kubernetes.io/cluster-service: "true" - spec: - containers: - - image: gcr.io/google_containers/heapster_influxdb:v0.5 - name: influxdb - resources: - # keep request = limit to keep this container in guaranteed class - limits: - cpu: 100m - memory: 500Mi - requests: - cpu: 100m - memory: 500Mi - ports: - - containerPort: 8083 - - containerPort: 8086 - volumeMounts: - - name: influxdb-persistent-storage - mountPath: /data - - image: gcr.io/google_containers/heapster_grafana:v2.6.0-2 - name: grafana - env: - resources: - # keep request = limit to keep this container in guaranteed class - limits: - cpu: 100m - memory: 100Mi - requests: - cpu: 100m - memory: 100Mi - env: - # This variable is required to setup templates in Grafana. - - name: INFLUXDB_SERVICE_URL - value: http://monitoring-influxdb:8086 - # The following env variables are required to make Grafana accessible via - # the kubernetes api-server proxy. On production clusters, we recommend - # removing these env variables, setup auth for grafana, and expose the grafana - # service using a LoadBalancer or a public IP. - - name: GF_AUTH_BASIC_ENABLED - value: "false" - - name: GF_AUTH_ANONYMOUS_ENABLED - value: "true" - - name: GF_AUTH_ANONYMOUS_ORG_ROLE - value: Admin - - name: GF_SERVER_ROOT_URL - value: /api/v1/proxy/namespaces/kube-system/services/monitoring-grafana/ - volumeMounts: - - name: grafana-persistent-storage - mountPath: /var - volumes: - - name: influxdb-persistent-storage - emptyDir: {} - - name: grafana-persistent-storage - emptyDir: {} - diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 83b6957574..a4a26311bf 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -821,6 +821,12 @@ function start-kube-addons { sed -i -e "s@{{ *nanny_memory *}}@${nanny_memory}@g" "${controller_yaml}" sed -i -e "s@{{ *metrics_cpu_per_node *}}@${metrics_cpu_per_node}@g" "${controller_yaml}" fi + if [[ "${ENABLE_CLUSTER_MONITORING:-}" == "influxdb" ]]; then + pv_yaml="${dst_dir}/${file_dir}/influxdb-pv.yaml" + pd_name="${INSTANCE_PREFIX}-influxdb-pd" + remove-salt-config-comments "${pv_yaml}" + sed -i -e "s@{{ *pd_name *}}@${pd_name}@g" "${pv_yaml}" + fi if [[ "${ENABLE_CLUSTER_DNS:-}" == "true" ]]; then setup-addon-manifests "addons" "dns" local -r dns_rc_file="${dst_dir}/dns/skydns-rc.yaml" diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index 121920bbe2..d8ff03a769 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -693,6 +693,14 @@ function create-master() { --size "${CLUSTER_REGISTRY_DISK_SIZE}" & fi + # Create disk for influxdb if enabled + if [[ "${ENABLE_CLUSTER_MONITORING:-}" == "influxdb" ]]; then + gcloud compute disks create "${INSTANCE_PREFIX}-influxdb-pd" \ + --project "${PROJECT}" \ + --zone "${ZONE}" \ + --size "10GiB" & + fi + # Generate a bearer token for this cluster. We push this separately # from the other cluster variables so that the client (this # computer) can forget it later. This should disappear with @@ -1076,6 +1084,15 @@ function kube-down { "${MASTER_NAME}-ip" fi + # Delete persistent disk for influx-db. + if gcloud compute disks describe "${INSTANCE_PREFIX}"-influxdb-pd --zone "${ZONE}" --project "${PROJECT}" &>/dev/null; then + gcloud compute disks delete \ + --project "${PROJECT}" \ + --quiet \ + --zone "${ZONE}" \ + "${INSTANCE_PREFIX}"-influxdb-pd + fi + export CONTEXT="${PROJECT}_${INSTANCE_PREFIX}" clear-kubeconfig set -e @@ -1132,6 +1149,11 @@ function check-resources { return 1 fi + if gcloud compute disks describe --project "${PROJECT}" "${INSTANCE_PREFIX}-influxdb-pd" --zone "${ZONE}" &>/dev/null; then + KUBE_RESOURCE_FOUND="Persistent disk ${INSTANCE_PREFIX}-influxdb-pd" + return 1 + fi + # Find out what minions are running. local -a minions minions=( $(gcloud compute instances list \ diff --git a/cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml b/cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml index 8057314f80..426034f0a1 100644 --- a/cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml +++ b/cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml @@ -10,7 +10,7 @@ spec: hostNetwork: true containers: - name: kube-addon-manager - image: gcr.io/google-containers/kube-addon-manager:v4 + image: gcr.io/google-containers/kube-addon-manager:v5 resources: requests: cpu: 5m diff --git a/test/e2e/monitoring.go b/test/e2e/monitoring.go index a4d591064e..137c5b0f27 100644 --- a/test/e2e/monitoring.go +++ b/test/e2e/monitoring.go @@ -110,7 +110,11 @@ func verifyExpectedRcsExistAndGetExpectedPods(c *client.Client) ([]string, error if err != nil { return nil, err } - if (len(rcList.Items) + len(deploymentList.Items)) != 1 { + psList, err := c.Apps().PetSets(api.NamespaceSystem).List(options) + if err != nil { + return nil, err + } + if (len(rcList.Items) + len(deploymentList.Items) + len(psList.Items)) != 1 { return nil, fmt.Errorf("expected to find one replica for RC or deployment with label %s but got %d", rcLabel, len(rcList.Items)) } @@ -144,6 +148,21 @@ func verifyExpectedRcsExistAndGetExpectedPods(c *client.Client) ([]string, error expectedPods = append(expectedPods, string(pod.UID)) } } + // And for pet sets. + for _, ps := range psList.Items { + selector := labels.Set(ps.Spec.Selector.MatchLabels).AsSelector() + options := api.ListOptions{LabelSelector: selector} + podList, err := c.Pods(api.NamespaceSystem).List(options) + if err != nil { + return nil, err + } + for _, pod := range podList.Items { + if pod.DeletionTimestamp != nil { + continue + } + expectedPods = append(expectedPods, string(pod.UID)) + } + } } return expectedPods, nil } From efe25553cdb28c8ce69e8e1c381bf011637ef718 Mon Sep 17 00:00:00 2001 From: "Timothy St. Clair" <tstclair@redhat.com> Date: Mon, 27 Jun 2016 09:36:41 -0500 Subject: [PATCH 213/339] Follow on for 1.4 to default HTTP2 on by default --- pkg/util/net/http.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/util/net/http.go b/pkg/util/net/http.go index 68073776af..497e33ef5d 100644 --- a/pkg/util/net/http.go +++ b/pkg/util/net/http.go @@ -77,8 +77,10 @@ func SetOldTransportDefaults(t *http.Transport) *http.Transport { // for the Proxy, Dial, and TLSHandshakeTimeout fields if unset func SetTransportDefaults(t *http.Transport) *http.Transport { t = SetOldTransportDefaults(t) - // Allow HTTP2 clients but default off for now - if s := os.Getenv("ENABLE_HTTP2"); len(s) > 0 { + // Allow clients to disable http2 if needed. + if s := os.Getenv("DISABLE_HTTP2"); len(s) > 0 { + glog.Infof("HTTP2 has been explicitly disabled") + } else { if err := http2.ConfigureTransport(t); err != nil { glog.Warningf("Transport failed http2 configuration: %v", err) } From c202a405cd88216a81f58ae2dc2a504e38be5dd6 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt <jliggitt@redhat.com> Date: Mon, 27 Jun 2016 11:13:49 -0400 Subject: [PATCH 214/339] Fix reference to linux-only struct --- pkg/kubelet/cm/cgroup_manager_unsupported.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kubelet/cm/cgroup_manager_unsupported.go b/pkg/kubelet/cm/cgroup_manager_unsupported.go index a00e030a2e..0c9b4b433f 100644 --- a/pkg/kubelet/cm/cgroup_manager_unsupported.go +++ b/pkg/kubelet/cm/cgroup_manager_unsupported.go @@ -25,7 +25,7 @@ type unsupportedCgroupManager struct{} // Make sure that unsupportedCgroupManager implements the CgroupManager interface var _ CgroupManager = &unsupportedCgroupManager{} -func NewCgroupManager(_ *cgroupSubsystems) CgroupManager { +func NewCgroupManager(_ interface{}) CgroupManager { return &unsupportedCgroupManager{} } From fa91b3e461d3c19a241e064375e78595113b26b4 Mon Sep 17 00:00:00 2001 From: pprokop <piotr.prokop@intel.com> Date: Thu, 16 Jun 2016 16:01:54 +0200 Subject: [PATCH 215/339] Adding option to deploy fluentd-elasticsearch in diffrent namespace then kube-system --- .../es-image/elasticsearch_logging_discovery.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go b/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go index fd8422f5be..f2221112f8 100644 --- a/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go +++ b/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go @@ -19,6 +19,7 @@ package main import ( "flag" "fmt" + "os" "strings" "time" @@ -45,12 +46,20 @@ func main() { if err != nil { glog.Fatalf("Failed to make client: %v", err) } + namespace := api.NamespaceSystem + envNamespace := os.Getenv("NAMESPACE") + if envNamespace != "" { + if _, err := c.Namespaces().Get(envNamespace); err != nil { + glog.Fatalf("%s namespace doesn't exist: %v", envNamespace, err) + } + namespace = envNamespace + } var elasticsearch *api.Service // Look for endpoints associated with the Elasticsearch loggging service. // First wait for the service to become available. for t := time.Now(); time.Since(t) < 5*time.Minute; time.Sleep(10 * time.Second) { - elasticsearch, err = c.Services(api.NamespaceSystem).Get("elasticsearch-logging") + elasticsearch, err = c.Services(namespace).Get("elasticsearch-logging") if err == nil { break } @@ -67,7 +76,7 @@ func main() { // Wait for some endpoints. count := 0 for t := time.Now(); time.Since(t) < 5*time.Minute; time.Sleep(10 * time.Second) { - endpoints, err = c.Endpoints(api.NamespaceSystem).Get("elasticsearch-logging") + endpoints, err = c.Endpoints(namespace).Get("elasticsearch-logging") if err != nil { continue } From f45d9dc2f8339e649262ae760fabc1e8486ab2d9 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt <jliggitt@redhat.com> Date: Mon, 23 May 2016 12:51:02 -0400 Subject: [PATCH 216/339] Convert service account token controller to use a work queue --- .../app/controllermanager.go | 4 +- .../app/options/options.go | 2 + .../controllermanager/controllermanager.go | 4 +- hack/verify-flags/known-flags.txt | 1 + .../componentconfig/deep_copy_generated.go | 1 + pkg/apis/componentconfig/types.generated.go | 1541 +++++++++-------- pkg/apis/componentconfig/types.go | 3 + .../serviceaccount/tokens_controller.go | 661 ++++--- .../serviceaccount/tokens_controller_test.go | 204 ++- test/integration/service_account_test.go | 5 +- 10 files changed, 1401 insertions(+), 1025 deletions(-) diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index d10e660eac..1353f2b293 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -439,13 +439,13 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig if err != nil { glog.Errorf("Error reading key for service account token controller: %v", err) } else { - serviceaccountcontroller.NewTokensController( + go serviceaccountcontroller.NewTokensController( clientset.NewForConfigOrDie(restclient.AddUserAgent(kubeconfig, "tokens-controller")), serviceaccountcontroller.TokensControllerOptions{ TokenGenerator: serviceaccount.JWTTokenGenerator(privateKey), RootCA: rootCA, }, - ).Run() + ).Run(int(s.ConcurrentSATokenSyncs), wait.NeverStop) time.Sleep(wait.Jitter(s.ControllerStartInterval.Duration, ControllerStartJitter)) } } diff --git a/cmd/kube-controller-manager/app/options/options.go b/cmd/kube-controller-manager/app/options/options.go index b862ba4db9..5944a5b639 100644 --- a/cmd/kube-controller-manager/app/options/options.go +++ b/cmd/kube-controller-manager/app/options/options.go @@ -53,6 +53,7 @@ func NewCMServer() *CMServer { ConcurrentResourceQuotaSyncs: 5, ConcurrentDeploymentSyncs: 5, ConcurrentNamespaceSyncs: 2, + ConcurrentSATokenSyncs: 5, LookupCacheSizeForRC: 4096, LookupCacheSizeForRS: 4096, LookupCacheSizeForDaemonSet: 1024, @@ -108,6 +109,7 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) { fs.Int32Var(&s.ConcurrentResourceQuotaSyncs, "concurrent-resource-quota-syncs", s.ConcurrentResourceQuotaSyncs, "The number of resource quotas that are allowed to sync concurrently. Larger number = more responsive quota management, but more CPU (and network) load") fs.Int32Var(&s.ConcurrentDeploymentSyncs, "concurrent-deployment-syncs", s.ConcurrentDeploymentSyncs, "The number of deployment objects that are allowed to sync concurrently. Larger number = more responsive deployments, but more CPU (and network) load") fs.Int32Var(&s.ConcurrentNamespaceSyncs, "concurrent-namespace-syncs", s.ConcurrentNamespaceSyncs, "The number of namespace objects that are allowed to sync concurrently. Larger number = more responsive namespace termination, but more CPU (and network) load") + fs.Int32Var(&s.ConcurrentSATokenSyncs, "concurrent-serviceaccount-token-syncs", s.ConcurrentSATokenSyncs, "The number of service account token objects that are allowed to sync concurrently. Larger number = more responsive token generation, but more CPU (and network) load") fs.Int32Var(&s.LookupCacheSizeForRC, "replication-controller-lookup-cache-size", s.LookupCacheSizeForRC, "The the size of lookup cache for replication controllers. Larger number = more responsive replica management, but more MEM load.") fs.Int32Var(&s.LookupCacheSizeForRS, "replicaset-lookup-cache-size", s.LookupCacheSizeForRS, "The the size of lookup cache for replicatsets. Larger number = more responsive replica management, but more MEM load.") fs.Int32Var(&s.LookupCacheSizeForDaemonSet, "daemonset-lookup-cache-size", s.LookupCacheSizeForDaemonSet, "The the size of lookup cache for daemonsets. Larger number = more responsive daemonsets, but more MEM load.") diff --git a/contrib/mesos/pkg/controllermanager/controllermanager.go b/contrib/mesos/pkg/controllermanager/controllermanager.go index 757c1db384..ca9dc076a4 100644 --- a/contrib/mesos/pkg/controllermanager/controllermanager.go +++ b/contrib/mesos/pkg/controllermanager/controllermanager.go @@ -310,13 +310,13 @@ func (s *CMServer) Run(_ []string) error { if err != nil { glog.Errorf("Error reading key for service account token controller: %v", err) } else { - serviceaccountcontroller.NewTokensController( + go serviceaccountcontroller.NewTokensController( clientset.NewForConfigOrDie(restclient.AddUserAgent(kubeconfig, "tokens-controller")), serviceaccountcontroller.TokensControllerOptions{ TokenGenerator: serviceaccount.JWTTokenGenerator(privateKey), RootCA: rootCA, }, - ).Run() + ).Run(int(s.ConcurrentSATokenSyncs), wait.NeverStop) } } diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index 44185ce93b..2bc21c823b 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -65,6 +65,7 @@ concurrent-namespace-syncs concurrent-replicaset-syncs concurrent-service-syncs concurrent-resource-quota-syncs +concurrent-serviceaccount-token-syncs config-sync-period configure-cbr0 configure-cloud-routes diff --git a/pkg/apis/componentconfig/deep_copy_generated.go b/pkg/apis/componentconfig/deep_copy_generated.go index c18e2e5c31..e4f82bcb2a 100644 --- a/pkg/apis/componentconfig/deep_copy_generated.go +++ b/pkg/apis/componentconfig/deep_copy_generated.go @@ -70,6 +70,7 @@ func DeepCopy_componentconfig_KubeControllerManagerConfiguration(in KubeControll out.ConcurrentDaemonSetSyncs = in.ConcurrentDaemonSetSyncs out.ConcurrentJobSyncs = in.ConcurrentJobSyncs out.ConcurrentNamespaceSyncs = in.ConcurrentNamespaceSyncs + out.ConcurrentSATokenSyncs = in.ConcurrentSATokenSyncs out.LookupCacheSizeForRC = in.LookupCacheSizeForRC out.LookupCacheSizeForRS = in.LookupCacheSizeForRS out.LookupCacheSizeForDaemonSet = in.LookupCacheSizeForDaemonSet diff --git a/pkg/apis/componentconfig/types.generated.go b/pkg/apis/componentconfig/types.generated.go index b76ca11f99..d821232e4a 100644 --- a/pkg/apis/componentconfig/types.generated.go +++ b/pkg/apis/componentconfig/types.generated.go @@ -6518,16 +6518,16 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [49]bool + var yyq2 [50]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false - yyq2[47] = x.Kind != "" - yyq2[48] = x.APIVersion != "" + yyq2[48] = x.Kind != "" + yyq2[49] = x.APIVersion != "" var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(49) + r.EncodeArrayStart(50) } else { - yynn2 = 47 + yynn2 = 48 for _, b := range yyq2 { if b { yynn2++ @@ -6770,17 +6770,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym40 if false { } else { - r.EncodeInt(int64(x.LookupCacheSizeForRC)) + r.EncodeInt(int64(x.ConcurrentSATokenSyncs)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForRC")) + r.EncodeString(codecSelferC_UTF81234, string("concurrentSATokenSyncs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym41 := z.EncBinary() _ = yym41 if false { } else { - r.EncodeInt(int64(x.LookupCacheSizeForRC)) + r.EncodeInt(int64(x.ConcurrentSATokenSyncs)) } } if yyr2 || yy2arr2 { @@ -6789,17 +6789,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym43 if false { } else { - r.EncodeInt(int64(x.LookupCacheSizeForRS)) + r.EncodeInt(int64(x.LookupCacheSizeForRC)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForRS")) + r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForRC")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym44 := z.EncBinary() _ = yym44 if false { } else { - r.EncodeInt(int64(x.LookupCacheSizeForRS)) + r.EncodeInt(int64(x.LookupCacheSizeForRC)) } } if yyr2 || yy2arr2 { @@ -6807,6 +6807,25 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode yym46 := z.EncBinary() _ = yym46 if false { + } else { + r.EncodeInt(int64(x.LookupCacheSizeForRS)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForRS")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym47 := z.EncBinary() + _ = yym47 + if false { + } else { + r.EncodeInt(int64(x.LookupCacheSizeForRS)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym49 := z.EncBinary() + _ = yym49 + if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForDaemonSet)) } @@ -6814,8 +6833,8 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("lookupCacheSizeForDaemonSet")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym47 := z.EncBinary() - _ = yym47 + yym50 := z.EncBinary() + _ = yym50 if false { } else { r.EncodeInt(int64(x.LookupCacheSizeForDaemonSet)) @@ -6823,34 +6842,21 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy49 := &x.ServiceSyncPeriod - yym50 := z.EncBinary() - _ = yym50 + yy52 := &x.ServiceSyncPeriod + yym53 := z.EncBinary() + _ = yym53 if false { - } else if z.HasExtensions() && z.EncExt(yy49) { - } else if !yym50 && z.IsJSONHandle() { - z.EncJSONMarshal(yy49) + } else if z.HasExtensions() && z.EncExt(yy52) { + } else if !yym53 && z.IsJSONHandle() { + z.EncJSONMarshal(yy52) } else { - z.EncFallback(yy49) + z.EncFallback(yy52) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("serviceSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy51 := &x.ServiceSyncPeriod - yym52 := z.EncBinary() - _ = yym52 - if false { - } else if z.HasExtensions() && z.EncExt(yy51) { - } else if !yym52 && z.IsJSONHandle() { - z.EncJSONMarshal(yy51) - } else { - z.EncFallback(yy51) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy54 := &x.NodeSyncPeriod + yy54 := &x.ServiceSyncPeriod yym55 := z.EncBinary() _ = yym55 if false { @@ -6860,24 +6866,24 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } else { z.EncFallback(yy54) } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy57 := &x.NodeSyncPeriod + yym58 := z.EncBinary() + _ = yym58 + if false { + } else if z.HasExtensions() && z.EncExt(yy57) { + } else if !yym58 && z.IsJSONHandle() { + z.EncJSONMarshal(yy57) + } else { + z.EncFallback(yy57) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy56 := &x.NodeSyncPeriod - yym57 := z.EncBinary() - _ = yym57 - if false { - } else if z.HasExtensions() && z.EncExt(yy56) { - } else if !yym57 && z.IsJSONHandle() { - z.EncJSONMarshal(yy56) - } else { - z.EncFallback(yy56) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy59 := &x.ResourceQuotaSyncPeriod + yy59 := &x.NodeSyncPeriod yym60 := z.EncBinary() _ = yym60 if false { @@ -6887,24 +6893,24 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } else { z.EncFallback(yy59) } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy62 := &x.ResourceQuotaSyncPeriod + yym63 := z.EncBinary() + _ = yym63 + if false { + } else if z.HasExtensions() && z.EncExt(yy62) { + } else if !yym63 && z.IsJSONHandle() { + z.EncJSONMarshal(yy62) + } else { + z.EncFallback(yy62) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("resourceQuotaSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy61 := &x.ResourceQuotaSyncPeriod - yym62 := z.EncBinary() - _ = yym62 - if false { - } else if z.HasExtensions() && z.EncExt(yy61) { - } else if !yym62 && z.IsJSONHandle() { - z.EncJSONMarshal(yy61) - } else { - z.EncFallback(yy61) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy64 := &x.NamespaceSyncPeriod + yy64 := &x.ResourceQuotaSyncPeriod yym65 := z.EncBinary() _ = yym65 if false { @@ -6914,24 +6920,24 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } else { z.EncFallback(yy64) } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy67 := &x.NamespaceSyncPeriod + yym68 := z.EncBinary() + _ = yym68 + if false { + } else if z.HasExtensions() && z.EncExt(yy67) { + } else if !yym68 && z.IsJSONHandle() { + z.EncJSONMarshal(yy67) + } else { + z.EncFallback(yy67) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("namespaceSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy66 := &x.NamespaceSyncPeriod - yym67 := z.EncBinary() - _ = yym67 - if false { - } else if z.HasExtensions() && z.EncExt(yy66) { - } else if !yym67 && z.IsJSONHandle() { - z.EncJSONMarshal(yy66) - } else { - z.EncFallback(yy66) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy69 := &x.PVClaimBinderSyncPeriod + yy69 := &x.NamespaceSyncPeriod yym70 := z.EncBinary() _ = yym70 if false { @@ -6941,24 +6947,24 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } else { z.EncFallback(yy69) } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy72 := &x.PVClaimBinderSyncPeriod + yym73 := z.EncBinary() + _ = yym73 + if false { + } else if z.HasExtensions() && z.EncExt(yy72) { + } else if !yym73 && z.IsJSONHandle() { + z.EncJSONMarshal(yy72) + } else { + z.EncFallback(yy72) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("pvClaimBinderSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy71 := &x.PVClaimBinderSyncPeriod - yym72 := z.EncBinary() - _ = yym72 - if false { - } else if z.HasExtensions() && z.EncExt(yy71) { - } else if !yym72 && z.IsJSONHandle() { - z.EncJSONMarshal(yy71) - } else { - z.EncFallback(yy71) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy74 := &x.MinResyncPeriod + yy74 := &x.PVClaimBinderSyncPeriod yym75 := z.EncBinary() _ = yym75 if false { @@ -6968,25 +6974,38 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } else { z.EncFallback(yy74) } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy77 := &x.MinResyncPeriod + yym78 := z.EncBinary() + _ = yym78 + if false { + } else if z.HasExtensions() && z.EncExt(yy77) { + } else if !yym78 && z.IsJSONHandle() { + z.EncJSONMarshal(yy77) + } else { + z.EncFallback(yy77) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("minResyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy76 := &x.MinResyncPeriod - yym77 := z.EncBinary() - _ = yym77 + yy79 := &x.MinResyncPeriod + yym80 := z.EncBinary() + _ = yym80 if false { - } else if z.HasExtensions() && z.EncExt(yy76) { - } else if !yym77 && z.IsJSONHandle() { - z.EncJSONMarshal(yy76) + } else if z.HasExtensions() && z.EncExt(yy79) { + } else if !yym80 && z.IsJSONHandle() { + z.EncJSONMarshal(yy79) } else { - z.EncFallback(yy76) + z.EncFallback(yy79) } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym79 := z.EncBinary() - _ = yym79 + yym82 := z.EncBinary() + _ = yym82 if false { } else { r.EncodeInt(int64(x.TerminatedPodGCThreshold)) @@ -6995,8 +7014,8 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("terminatedPodGCThreshold")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym80 := z.EncBinary() - _ = yym80 + yym83 := z.EncBinary() + _ = yym83 if false { } else { r.EncodeInt(int64(x.TerminatedPodGCThreshold)) @@ -7004,34 +7023,21 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy82 := &x.HorizontalPodAutoscalerSyncPeriod - yym83 := z.EncBinary() - _ = yym83 + yy85 := &x.HorizontalPodAutoscalerSyncPeriod + yym86 := z.EncBinary() + _ = yym86 if false { - } else if z.HasExtensions() && z.EncExt(yy82) { - } else if !yym83 && z.IsJSONHandle() { - z.EncJSONMarshal(yy82) + } else if z.HasExtensions() && z.EncExt(yy85) { + } else if !yym86 && z.IsJSONHandle() { + z.EncJSONMarshal(yy85) } else { - z.EncFallback(yy82) + z.EncFallback(yy85) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("horizontalPodAutoscalerSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy84 := &x.HorizontalPodAutoscalerSyncPeriod - yym85 := z.EncBinary() - _ = yym85 - if false { - } else if z.HasExtensions() && z.EncExt(yy84) { - } else if !yym85 && z.IsJSONHandle() { - z.EncJSONMarshal(yy84) - } else { - z.EncFallback(yy84) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy87 := &x.DeploymentControllerSyncPeriod + yy87 := &x.HorizontalPodAutoscalerSyncPeriod yym88 := z.EncBinary() _ = yym88 if false { @@ -7041,24 +7047,24 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } else { z.EncFallback(yy87) } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy90 := &x.DeploymentControllerSyncPeriod + yym91 := z.EncBinary() + _ = yym91 + if false { + } else if z.HasExtensions() && z.EncExt(yy90) { + } else if !yym91 && z.IsJSONHandle() { + z.EncJSONMarshal(yy90) + } else { + z.EncFallback(yy90) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("deploymentControllerSyncPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy89 := &x.DeploymentControllerSyncPeriod - yym90 := z.EncBinary() - _ = yym90 - if false { - } else if z.HasExtensions() && z.EncExt(yy89) { - } else if !yym90 && z.IsJSONHandle() { - z.EncJSONMarshal(yy89) - } else { - z.EncFallback(yy89) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy92 := &x.PodEvictionTimeout + yy92 := &x.DeploymentControllerSyncPeriod yym93 := z.EncBinary() _ = yym93 if false { @@ -7068,38 +7074,32 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } else { z.EncFallback(yy92) } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy95 := &x.PodEvictionTimeout + yym96 := z.EncBinary() + _ = yym96 + if false { + } else if z.HasExtensions() && z.EncExt(yy95) { + } else if !yym96 && z.IsJSONHandle() { + z.EncJSONMarshal(yy95) + } else { + z.EncFallback(yy95) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("podEvictionTimeout")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy94 := &x.PodEvictionTimeout - yym95 := z.EncBinary() - _ = yym95 - if false { - } else if z.HasExtensions() && z.EncExt(yy94) { - } else if !yym95 && z.IsJSONHandle() { - z.EncJSONMarshal(yy94) - } else { - z.EncFallback(yy94) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym97 := z.EncBinary() - _ = yym97 - if false { - } else { - r.EncodeFloat32(float32(x.DeletingPodsQps)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("deletingPodsQps")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy97 := &x.PodEvictionTimeout yym98 := z.EncBinary() _ = yym98 if false { + } else if z.HasExtensions() && z.EncExt(yy97) { + } else if !yym98 && z.IsJSONHandle() { + z.EncJSONMarshal(yy97) } else { - r.EncodeFloat32(float32(x.DeletingPodsQps)) + z.EncFallback(yy97) } } if yyr2 || yy2arr2 { @@ -7107,6 +7107,25 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode yym100 := z.EncBinary() _ = yym100 if false { + } else { + r.EncodeFloat32(float32(x.DeletingPodsQps)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("deletingPodsQps")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym101 := z.EncBinary() + _ = yym101 + if false { + } else { + r.EncodeFloat32(float32(x.DeletingPodsQps)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym103 := z.EncBinary() + _ = yym103 + if false { } else { r.EncodeInt(int64(x.DeletingPodsBurst)) } @@ -7114,8 +7133,8 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("deletingPodsBurst")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym101 := z.EncBinary() - _ = yym101 + yym104 := z.EncBinary() + _ = yym104 if false { } else { r.EncodeInt(int64(x.DeletingPodsBurst)) @@ -7123,35 +7142,35 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy103 := &x.NodeMonitorGracePeriod - yym104 := z.EncBinary() - _ = yym104 + yy106 := &x.NodeMonitorGracePeriod + yym107 := z.EncBinary() + _ = yym107 if false { - } else if z.HasExtensions() && z.EncExt(yy103) { - } else if !yym104 && z.IsJSONHandle() { - z.EncJSONMarshal(yy103) + } else if z.HasExtensions() && z.EncExt(yy106) { + } else if !yym107 && z.IsJSONHandle() { + z.EncJSONMarshal(yy106) } else { - z.EncFallback(yy103) + z.EncFallback(yy106) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorGracePeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy105 := &x.NodeMonitorGracePeriod - yym106 := z.EncBinary() - _ = yym106 + yy108 := &x.NodeMonitorGracePeriod + yym109 := z.EncBinary() + _ = yym109 if false { - } else if z.HasExtensions() && z.EncExt(yy105) { - } else if !yym106 && z.IsJSONHandle() { - z.EncJSONMarshal(yy105) + } else if z.HasExtensions() && z.EncExt(yy108) { + } else if !yym109 && z.IsJSONHandle() { + z.EncJSONMarshal(yy108) } else { - z.EncFallback(yy105) + z.EncFallback(yy108) } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym108 := z.EncBinary() - _ = yym108 + yym111 := z.EncBinary() + _ = yym111 if false { } else { r.EncodeInt(int64(x.RegisterRetryCount)) @@ -7160,8 +7179,8 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("registerRetryCount")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym109 := z.EncBinary() - _ = yym109 + yym112 := z.EncBinary() + _ = yym112 if false { } else { r.EncodeInt(int64(x.RegisterRetryCount)) @@ -7169,34 +7188,21 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy111 := &x.NodeStartupGracePeriod - yym112 := z.EncBinary() - _ = yym112 + yy114 := &x.NodeStartupGracePeriod + yym115 := z.EncBinary() + _ = yym115 if false { - } else if z.HasExtensions() && z.EncExt(yy111) { - } else if !yym112 && z.IsJSONHandle() { - z.EncJSONMarshal(yy111) + } else if z.HasExtensions() && z.EncExt(yy114) { + } else if !yym115 && z.IsJSONHandle() { + z.EncJSONMarshal(yy114) } else { - z.EncFallback(yy111) + z.EncFallback(yy114) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeStartupGracePeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy113 := &x.NodeStartupGracePeriod - yym114 := z.EncBinary() - _ = yym114 - if false { - } else if z.HasExtensions() && z.EncExt(yy113) { - } else if !yym114 && z.IsJSONHandle() { - z.EncJSONMarshal(yy113) - } else { - z.EncFallback(yy113) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy116 := &x.NodeMonitorPeriod + yy116 := &x.NodeStartupGracePeriod yym117 := z.EncBinary() _ = yym117 if false { @@ -7206,38 +7212,32 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } else { z.EncFallback(yy116) } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy119 := &x.NodeMonitorPeriod + yym120 := z.EncBinary() + _ = yym120 + if false { + } else if z.HasExtensions() && z.EncExt(yy119) { + } else if !yym120 && z.IsJSONHandle() { + z.EncJSONMarshal(yy119) + } else { + z.EncFallback(yy119) + } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("nodeMonitorPeriod")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy118 := &x.NodeMonitorPeriod - yym119 := z.EncBinary() - _ = yym119 - if false { - } else if z.HasExtensions() && z.EncExt(yy118) { - } else if !yym119 && z.IsJSONHandle() { - z.EncJSONMarshal(yy118) - } else { - z.EncFallback(yy118) - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym121 := z.EncBinary() - _ = yym121 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountKeyFile)) - } - } else { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("serviceAccountKeyFile")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy121 := &x.NodeMonitorPeriod yym122 := z.EncBinary() _ = yym122 if false { + } else if z.HasExtensions() && z.EncExt(yy121) { + } else if !yym122 && z.IsJSONHandle() { + z.EncJSONMarshal(yy121) } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountKeyFile)) + z.EncFallback(yy121) } } if yyr2 || yy2arr2 { @@ -7246,17 +7246,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym124 if false { } else { - r.EncodeBool(bool(x.EnableProfiling)) + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountKeyFile)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("enableProfiling")) + r.EncodeString(codecSelferC_UTF81234, string("serviceAccountKeyFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym125 := z.EncBinary() _ = yym125 if false { } else { - r.EncodeBool(bool(x.EnableProfiling)) + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceAccountKeyFile)) } } if yyr2 || yy2arr2 { @@ -7265,17 +7265,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym127 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) + r.EncodeBool(bool(x.EnableProfiling)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("clusterName")) + r.EncodeString(codecSelferC_UTF81234, string("enableProfiling")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym128 := z.EncBinary() _ = yym128 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) + r.EncodeBool(bool(x.EnableProfiling)) } } if yyr2 || yy2arr2 { @@ -7284,17 +7284,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym130 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR)) + r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("clusterCIDR")) + r.EncodeString(codecSelferC_UTF81234, string("clusterName")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym131 := z.EncBinary() _ = yym131 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR)) + r.EncodeString(codecSelferC_UTF81234, string(x.ClusterName)) } } if yyr2 || yy2arr2 { @@ -7303,17 +7303,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym133 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceCIDR)) + r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("serviceCIDR")) + r.EncodeString(codecSelferC_UTF81234, string("clusterCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym134 := z.EncBinary() _ = yym134 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ServiceCIDR)) + r.EncodeString(codecSelferC_UTF81234, string(x.ClusterCIDR)) } } if yyr2 || yy2arr2 { @@ -7322,17 +7322,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym136 if false { } else { - r.EncodeInt(int64(x.NodeCIDRMaskSize)) + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceCIDR)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("nodeCIDRMaskSize")) + r.EncodeString(codecSelferC_UTF81234, string("serviceCIDR")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym137 := z.EncBinary() _ = yym137 if false { } else { - r.EncodeInt(int64(x.NodeCIDRMaskSize)) + r.EncodeString(codecSelferC_UTF81234, string(x.ServiceCIDR)) } } if yyr2 || yy2arr2 { @@ -7341,17 +7341,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym139 if false { } else { - r.EncodeBool(bool(x.AllocateNodeCIDRs)) + r.EncodeInt(int64(x.NodeCIDRMaskSize)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("allocateNodeCIDRs")) + r.EncodeString(codecSelferC_UTF81234, string("nodeCIDRMaskSize")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym140 := z.EncBinary() _ = yym140 if false { } else { - r.EncodeBool(bool(x.AllocateNodeCIDRs)) + r.EncodeInt(int64(x.NodeCIDRMaskSize)) } } if yyr2 || yy2arr2 { @@ -7360,17 +7360,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym142 if false { } else { - r.EncodeBool(bool(x.ConfigureCloudRoutes)) + r.EncodeBool(bool(x.AllocateNodeCIDRs)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("configureCloudRoutes")) + r.EncodeString(codecSelferC_UTF81234, string("allocateNodeCIDRs")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym143 := z.EncBinary() _ = yym143 if false { } else { - r.EncodeBool(bool(x.ConfigureCloudRoutes)) + r.EncodeBool(bool(x.AllocateNodeCIDRs)) } } if yyr2 || yy2arr2 { @@ -7379,17 +7379,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym145 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RootCAFile)) + r.EncodeBool(bool(x.ConfigureCloudRoutes)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("rootCAFile")) + r.EncodeString(codecSelferC_UTF81234, string("configureCloudRoutes")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym146 := z.EncBinary() _ = yym146 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.RootCAFile)) + r.EncodeBool(bool(x.ConfigureCloudRoutes)) } } if yyr2 || yy2arr2 { @@ -7398,17 +7398,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym148 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) + r.EncodeString(codecSelferC_UTF81234, string(x.RootCAFile)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("contentType")) + r.EncodeString(codecSelferC_UTF81234, string("rootCAFile")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym149 := z.EncBinary() _ = yym149 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) + r.EncodeString(codecSelferC_UTF81234, string(x.RootCAFile)) } } if yyr2 || yy2arr2 { @@ -7417,17 +7417,17 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym151 if false { } else { - r.EncodeFloat32(float32(x.KubeAPIQPS)) + r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) + r.EncodeString(codecSelferC_UTF81234, string("contentType")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym152 := z.EncBinary() _ = yym152 if false { } else { - r.EncodeFloat32(float32(x.KubeAPIQPS)) + r.EncodeString(codecSelferC_UTF81234, string(x.ContentType)) } } if yyr2 || yy2arr2 { @@ -7435,6 +7435,25 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode yym154 := z.EncBinary() _ = yym154 if false { + } else { + r.EncodeFloat32(float32(x.KubeAPIQPS)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kubeAPIQPS")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym155 := z.EncBinary() + _ = yym155 + if false { + } else { + r.EncodeFloat32(float32(x.KubeAPIQPS)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yym157 := z.EncBinary() + _ = yym157 + if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) } @@ -7442,8 +7461,8 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("kubeAPIBurst")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym155 := z.EncBinary() - _ = yym155 + yym158 := z.EncBinary() + _ = yym158 if false { } else { r.EncodeInt(int64(x.KubeAPIBurst)) @@ -7451,57 +7470,57 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy157 := &x.LeaderElection - yy157.CodecEncodeSelf(e) + yy160 := &x.LeaderElection + yy160.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("leaderElection")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy159 := &x.LeaderElection - yy159.CodecEncodeSelf(e) + yy162 := &x.LeaderElection + yy162.CodecEncodeSelf(e) } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy162 := &x.VolumeConfiguration - yy162.CodecEncodeSelf(e) + yy165 := &x.VolumeConfiguration + yy165.CodecEncodeSelf(e) } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("volumeConfiguration")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy164 := &x.VolumeConfiguration - yy164.CodecEncodeSelf(e) + yy167 := &x.VolumeConfiguration + yy167.CodecEncodeSelf(e) } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yy167 := &x.ControllerStartInterval - yym168 := z.EncBinary() - _ = yym168 + yy170 := &x.ControllerStartInterval + yym171 := z.EncBinary() + _ = yym171 if false { - } else if z.HasExtensions() && z.EncExt(yy167) { - } else if !yym168 && z.IsJSONHandle() { - z.EncJSONMarshal(yy167) + } else if z.HasExtensions() && z.EncExt(yy170) { + } else if !yym171 && z.IsJSONHandle() { + z.EncJSONMarshal(yy170) } else { - z.EncFallback(yy167) + z.EncFallback(yy170) } } else { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("controllerStartInterval")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yy169 := &x.ControllerStartInterval - yym170 := z.EncBinary() - _ = yym170 + yy172 := &x.ControllerStartInterval + yym173 := z.EncBinary() + _ = yym173 if false { - } else if z.HasExtensions() && z.EncExt(yy169) { - } else if !yym170 && z.IsJSONHandle() { - z.EncJSONMarshal(yy169) + } else if z.HasExtensions() && z.EncExt(yy172) { + } else if !yym173 && z.IsJSONHandle() { + z.EncJSONMarshal(yy172) } else { - z.EncFallback(yy169) + z.EncFallback(yy172) } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - yym172 := z.EncBinary() - _ = yym172 + yym175 := z.EncBinary() + _ = yym175 if false { } else { r.EncodeBool(bool(x.EnableGarbageCollector)) @@ -7510,38 +7529,13 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("enableGarbageCollector")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym173 := z.EncBinary() - _ = yym173 + yym176 := z.EncBinary() + _ = yym176 if false { } else { r.EncodeBool(bool(x.EnableGarbageCollector)) } } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[47] { - yym175 := z.EncBinary() - _ = yym175 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[47] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym176 := z.EncBinary() - _ = yym176 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } - } - } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[48] { @@ -7549,7 +7543,7 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode _ = yym178 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } else { r.EncodeString(codecSelferC_UTF81234, "") @@ -7557,11 +7551,36 @@ func (x *KubeControllerManagerConfiguration) CodecEncodeSelf(e *codec1978.Encode } else { if yyq2[48] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym179 := z.EncBinary() _ = yym179 if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[49] { + yym181 := z.EncBinary() + _ = yym181 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[49] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym182 := z.EncBinary() + _ = yym182 + if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } @@ -7700,6 +7719,12 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co } else { x.ConcurrentNamespaceSyncs = int32(r.DecodeInt(32)) } + case "concurrentSATokenSyncs": + if r.TryDecodeAsNil() { + x.ConcurrentSATokenSyncs = 0 + } else { + x.ConcurrentSATokenSyncs = int32(r.DecodeInt(32)) + } case "lookupCacheSizeForRC": if r.TryDecodeAsNil() { x.LookupCacheSizeForRC = 0 @@ -7722,90 +7747,90 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.ServiceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv19 := &x.ServiceSyncPeriod - yym20 := z.DecBinary() - _ = yym20 + yyv20 := &x.ServiceSyncPeriod + yym21 := z.DecBinary() + _ = yym21 if false { - } else if z.HasExtensions() && z.DecExt(yyv19) { - } else if !yym20 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv19) + } else if z.HasExtensions() && z.DecExt(yyv20) { + } else if !yym21 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv20) } else { - z.DecFallback(yyv19, false) + z.DecFallback(yyv20, false) } } case "nodeSyncPeriod": if r.TryDecodeAsNil() { x.NodeSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv21 := &x.NodeSyncPeriod - yym22 := z.DecBinary() - _ = yym22 + yyv22 := &x.NodeSyncPeriod + yym23 := z.DecBinary() + _ = yym23 if false { - } else if z.HasExtensions() && z.DecExt(yyv21) { - } else if !yym22 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv21) + } else if z.HasExtensions() && z.DecExt(yyv22) { + } else if !yym23 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv22) } else { - z.DecFallback(yyv21, false) + z.DecFallback(yyv22, false) } } case "resourceQuotaSyncPeriod": if r.TryDecodeAsNil() { x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv23 := &x.ResourceQuotaSyncPeriod - yym24 := z.DecBinary() - _ = yym24 + yyv24 := &x.ResourceQuotaSyncPeriod + yym25 := z.DecBinary() + _ = yym25 if false { - } else if z.HasExtensions() && z.DecExt(yyv23) { - } else if !yym24 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv23) + } else if z.HasExtensions() && z.DecExt(yyv24) { + } else if !yym25 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv24) } else { - z.DecFallback(yyv23, false) + z.DecFallback(yyv24, false) } } case "namespaceSyncPeriod": if r.TryDecodeAsNil() { x.NamespaceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv25 := &x.NamespaceSyncPeriod - yym26 := z.DecBinary() - _ = yym26 + yyv26 := &x.NamespaceSyncPeriod + yym27 := z.DecBinary() + _ = yym27 if false { - } else if z.HasExtensions() && z.DecExt(yyv25) { - } else if !yym26 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv25) + } else if z.HasExtensions() && z.DecExt(yyv26) { + } else if !yym27 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv26) } else { - z.DecFallback(yyv25, false) + z.DecFallback(yyv26, false) } } case "pvClaimBinderSyncPeriod": if r.TryDecodeAsNil() { x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv27 := &x.PVClaimBinderSyncPeriod - yym28 := z.DecBinary() - _ = yym28 + yyv28 := &x.PVClaimBinderSyncPeriod + yym29 := z.DecBinary() + _ = yym29 if false { - } else if z.HasExtensions() && z.DecExt(yyv27) { - } else if !yym28 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv27) + } else if z.HasExtensions() && z.DecExt(yyv28) { + } else if !yym29 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv28) } else { - z.DecFallback(yyv27, false) + z.DecFallback(yyv28, false) } } case "minResyncPeriod": if r.TryDecodeAsNil() { x.MinResyncPeriod = pkg1_unversioned.Duration{} } else { - yyv29 := &x.MinResyncPeriod - yym30 := z.DecBinary() - _ = yym30 + yyv30 := &x.MinResyncPeriod + yym31 := z.DecBinary() + _ = yym31 if false { - } else if z.HasExtensions() && z.DecExt(yyv29) { - } else if !yym30 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv29) + } else if z.HasExtensions() && z.DecExt(yyv30) { + } else if !yym31 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv30) } else { - z.DecFallback(yyv29, false) + z.DecFallback(yyv30, false) } } case "terminatedPodGCThreshold": @@ -7818,45 +7843,45 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv32 := &x.HorizontalPodAutoscalerSyncPeriod - yym33 := z.DecBinary() - _ = yym33 + yyv33 := &x.HorizontalPodAutoscalerSyncPeriod + yym34 := z.DecBinary() + _ = yym34 if false { - } else if z.HasExtensions() && z.DecExt(yyv32) { - } else if !yym33 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv32) + } else if z.HasExtensions() && z.DecExt(yyv33) { + } else if !yym34 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv33) } else { - z.DecFallback(yyv32, false) + z.DecFallback(yyv33, false) } } case "deploymentControllerSyncPeriod": if r.TryDecodeAsNil() { x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv34 := &x.DeploymentControllerSyncPeriod - yym35 := z.DecBinary() - _ = yym35 + yyv35 := &x.DeploymentControllerSyncPeriod + yym36 := z.DecBinary() + _ = yym36 if false { - } else if z.HasExtensions() && z.DecExt(yyv34) { - } else if !yym35 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv34) + } else if z.HasExtensions() && z.DecExt(yyv35) { + } else if !yym36 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv35) } else { - z.DecFallback(yyv34, false) + z.DecFallback(yyv35, false) } } case "podEvictionTimeout": if r.TryDecodeAsNil() { x.PodEvictionTimeout = pkg1_unversioned.Duration{} } else { - yyv36 := &x.PodEvictionTimeout - yym37 := z.DecBinary() - _ = yym37 + yyv37 := &x.PodEvictionTimeout + yym38 := z.DecBinary() + _ = yym38 if false { - } else if z.HasExtensions() && z.DecExt(yyv36) { - } else if !yym37 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv36) + } else if z.HasExtensions() && z.DecExt(yyv37) { + } else if !yym38 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv37) } else { - z.DecFallback(yyv36, false) + z.DecFallback(yyv37, false) } } case "deletingPodsQps": @@ -7875,15 +7900,15 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.NodeMonitorGracePeriod = pkg1_unversioned.Duration{} } else { - yyv40 := &x.NodeMonitorGracePeriod - yym41 := z.DecBinary() - _ = yym41 + yyv41 := &x.NodeMonitorGracePeriod + yym42 := z.DecBinary() + _ = yym42 if false { - } else if z.HasExtensions() && z.DecExt(yyv40) { - } else if !yym41 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv40) + } else if z.HasExtensions() && z.DecExt(yyv41) { + } else if !yym42 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv41) } else { - z.DecFallback(yyv40, false) + z.DecFallback(yyv41, false) } } case "registerRetryCount": @@ -7896,30 +7921,30 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.NodeStartupGracePeriod = pkg1_unversioned.Duration{} } else { - yyv43 := &x.NodeStartupGracePeriod - yym44 := z.DecBinary() - _ = yym44 + yyv44 := &x.NodeStartupGracePeriod + yym45 := z.DecBinary() + _ = yym45 if false { - } else if z.HasExtensions() && z.DecExt(yyv43) { - } else if !yym44 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv43) + } else if z.HasExtensions() && z.DecExt(yyv44) { + } else if !yym45 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv44) } else { - z.DecFallback(yyv43, false) + z.DecFallback(yyv44, false) } } case "nodeMonitorPeriod": if r.TryDecodeAsNil() { x.NodeMonitorPeriod = pkg1_unversioned.Duration{} } else { - yyv45 := &x.NodeMonitorPeriod - yym46 := z.DecBinary() - _ = yym46 + yyv46 := &x.NodeMonitorPeriod + yym47 := z.DecBinary() + _ = yym47 if false { - } else if z.HasExtensions() && z.DecExt(yyv45) { - } else if !yym46 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv45) + } else if z.HasExtensions() && z.DecExt(yyv46) { + } else if !yym47 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv46) } else { - z.DecFallback(yyv45, false) + z.DecFallback(yyv46, false) } } case "serviceAccountKeyFile": @@ -7998,29 +8023,29 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromMap(l int, d *co if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv59 := &x.LeaderElection - yyv59.CodecDecodeSelf(d) + yyv60 := &x.LeaderElection + yyv60.CodecDecodeSelf(d) } case "volumeConfiguration": if r.TryDecodeAsNil() { x.VolumeConfiguration = VolumeConfiguration{} } else { - yyv60 := &x.VolumeConfiguration - yyv60.CodecDecodeSelf(d) + yyv61 := &x.VolumeConfiguration + yyv61.CodecDecodeSelf(d) } case "controllerStartInterval": if r.TryDecodeAsNil() { x.ControllerStartInterval = pkg1_unversioned.Duration{} } else { - yyv61 := &x.ControllerStartInterval - yym62 := z.DecBinary() - _ = yym62 + yyv62 := &x.ControllerStartInterval + yym63 := z.DecBinary() + _ = yym63 if false { - } else if z.HasExtensions() && z.DecExt(yyv61) { - } else if !yym62 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv61) + } else if z.HasExtensions() && z.DecExt(yyv62) { + } else if !yym63 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv62) } else { - z.DecFallback(yyv61, false) + z.DecFallback(yyv62, false) } } case "enableGarbageCollector": @@ -8052,16 +8077,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj66 int - var yyb66 bool - var yyhl66 bool = l >= 0 - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + var yyj67 int + var yyb67 bool + var yyhl67 bool = l >= 0 + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8071,13 +8096,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.Port = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8087,13 +8112,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.Address = string(r.DecodeString()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8103,13 +8128,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.CloudProvider = string(r.DecodeString()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8119,13 +8144,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.CloudConfigFile = string(r.DecodeString()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8135,13 +8160,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentEndpointSyncs = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8151,13 +8176,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentRSSyncs = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8167,13 +8192,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentRCSyncs = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8183,13 +8208,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentResourceQuotaSyncs = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8199,13 +8224,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentDeploymentSyncs = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8215,13 +8240,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentDaemonSetSyncs = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8231,13 +8256,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentJobSyncs = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8247,13 +8272,29 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConcurrentNamespaceSyncs = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ConcurrentSATokenSyncs = 0 + } else { + x.ConcurrentSATokenSyncs = int32(r.DecodeInt(32)) + } + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l + } else { + yyb67 = r.CheckBreak() + } + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8263,13 +8304,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LookupCacheSizeForRC = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8279,13 +8320,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LookupCacheSizeForRS = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8295,13 +8336,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.LookupCacheSizeForDaemonSet = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8309,32 +8350,7 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.ServiceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv82 := &x.ServiceSyncPeriod - yym83 := z.DecBinary() - _ = yym83 - if false { - } else if z.HasExtensions() && z.DecExt(yyv82) { - } else if !yym83 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv82) - } else { - z.DecFallback(yyv82, false) - } - } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l - } else { - yyb66 = r.CheckBreak() - } - if yyb66 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NodeSyncPeriod = pkg1_unversioned.Duration{} - } else { - yyv84 := &x.NodeSyncPeriod + yyv84 := &x.ServiceSyncPeriod yym85 := z.DecBinary() _ = yym85 if false { @@ -8345,21 +8361,21 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * z.DecFallback(yyv84, false) } } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{} + x.NodeSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv86 := &x.ResourceQuotaSyncPeriod + yyv86 := &x.NodeSyncPeriod yym87 := z.DecBinary() _ = yym87 if false { @@ -8370,21 +8386,21 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * z.DecFallback(yyv86, false) } } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.NamespaceSyncPeriod = pkg1_unversioned.Duration{} + x.ResourceQuotaSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv88 := &x.NamespaceSyncPeriod + yyv88 := &x.ResourceQuotaSyncPeriod yym89 := z.DecBinary() _ = yym89 if false { @@ -8395,21 +8411,21 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * z.DecFallback(yyv88, false) } } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{} + x.NamespaceSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv90 := &x.PVClaimBinderSyncPeriod + yyv90 := &x.NamespaceSyncPeriod yym91 := z.DecBinary() _ = yym91 if false { @@ -8420,21 +8436,21 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * z.DecFallback(yyv90, false) } } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.MinResyncPeriod = pkg1_unversioned.Duration{} + x.PVClaimBinderSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv92 := &x.MinResyncPeriod + yyv92 := &x.PVClaimBinderSyncPeriod yym93 := z.DecBinary() _ = yym93 if false { @@ -8445,13 +8461,38 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * z.DecFallback(yyv92, false) } } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.MinResyncPeriod = pkg1_unversioned.Duration{} + } else { + yyv94 := &x.MinResyncPeriod + yym95 := z.DecBinary() + _ = yym95 + if false { + } else if z.HasExtensions() && z.DecExt(yyv94) { + } else if !yym95 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv94) + } else { + z.DecFallback(yyv94, false) + } + } + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l + } else { + yyb67 = r.CheckBreak() + } + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8461,13 +8502,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.TerminatedPodGCThreshold = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8475,32 +8516,7 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.HorizontalPodAutoscalerSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv95 := &x.HorizontalPodAutoscalerSyncPeriod - yym96 := z.DecBinary() - _ = yym96 - if false { - } else if z.HasExtensions() && z.DecExt(yyv95) { - } else if !yym96 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv95) - } else { - z.DecFallback(yyv95, false) - } - } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l - } else { - yyb66 = r.CheckBreak() - } - if yyb66 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{} - } else { - yyv97 := &x.DeploymentControllerSyncPeriod + yyv97 := &x.HorizontalPodAutoscalerSyncPeriod yym98 := z.DecBinary() _ = yym98 if false { @@ -8511,21 +8527,21 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * z.DecFallback(yyv97, false) } } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } z.DecSendContainerState(codecSelfer_containerArrayElem1234) if r.TryDecodeAsNil() { - x.PodEvictionTimeout = pkg1_unversioned.Duration{} + x.DeploymentControllerSyncPeriod = pkg1_unversioned.Duration{} } else { - yyv99 := &x.PodEvictionTimeout + yyv99 := &x.DeploymentControllerSyncPeriod yym100 := z.DecBinary() _ = yym100 if false { @@ -8536,13 +8552,38 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * z.DecFallback(yyv99, false) } } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.PodEvictionTimeout = pkg1_unversioned.Duration{} + } else { + yyv101 := &x.PodEvictionTimeout + yym102 := z.DecBinary() + _ = yym102 + if false { + } else if z.HasExtensions() && z.DecExt(yyv101) { + } else if !yym102 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv101) + } else { + z.DecFallback(yyv101, false) + } + } + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l + } else { + yyb67 = r.CheckBreak() + } + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8552,13 +8593,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.DeletingPodsQps = float32(r.DecodeFloat(true)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8568,13 +8609,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.DeletingPodsBurst = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8582,24 +8623,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NodeMonitorGracePeriod = pkg1_unversioned.Duration{} } else { - yyv103 := &x.NodeMonitorGracePeriod - yym104 := z.DecBinary() - _ = yym104 + yyv105 := &x.NodeMonitorGracePeriod + yym106 := z.DecBinary() + _ = yym106 if false { - } else if z.HasExtensions() && z.DecExt(yyv103) { - } else if !yym104 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv103) + } else if z.HasExtensions() && z.DecExt(yyv105) { + } else if !yym106 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv105) } else { - z.DecFallback(yyv103, false) + z.DecFallback(yyv105, false) } } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8609,13 +8650,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.RegisterRetryCount = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8623,32 +8664,7 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.NodeStartupGracePeriod = pkg1_unversioned.Duration{} } else { - yyv106 := &x.NodeStartupGracePeriod - yym107 := z.DecBinary() - _ = yym107 - if false { - } else if z.HasExtensions() && z.DecExt(yyv106) { - } else if !yym107 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv106) - } else { - z.DecFallback(yyv106, false) - } - } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l - } else { - yyb66 = r.CheckBreak() - } - if yyb66 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.NodeMonitorPeriod = pkg1_unversioned.Duration{} - } else { - yyv108 := &x.NodeMonitorPeriod + yyv108 := &x.NodeStartupGracePeriod yym109 := z.DecBinary() _ = yym109 if false { @@ -8659,13 +8675,38 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * z.DecFallback(yyv108, false) } } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.NodeMonitorPeriod = pkg1_unversioned.Duration{} + } else { + yyv110 := &x.NodeMonitorPeriod + yym111 := z.DecBinary() + _ = yym111 + if false { + } else if z.HasExtensions() && z.DecExt(yyv110) { + } else if !yym111 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv110) + } else { + z.DecFallback(yyv110, false) + } + } + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l + } else { + yyb67 = r.CheckBreak() + } + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8675,13 +8716,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ServiceAccountKeyFile = string(r.DecodeString()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8691,13 +8732,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.EnableProfiling = bool(r.DecodeBool()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8707,13 +8748,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ClusterName = string(r.DecodeString()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8723,13 +8764,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ClusterCIDR = string(r.DecodeString()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8739,13 +8780,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ServiceCIDR = string(r.DecodeString()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8755,13 +8796,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.NodeCIDRMaskSize = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8771,13 +8812,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.AllocateNodeCIDRs = bool(r.DecodeBool()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8787,13 +8828,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ConfigureCloudRoutes = bool(r.DecodeBool()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8803,13 +8844,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.RootCAFile = string(r.DecodeString()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8819,13 +8860,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.ContentType = string(r.DecodeString()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8835,13 +8876,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.KubeAPIQPS = float32(r.DecodeFloat(true)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8851,13 +8892,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.KubeAPIBurst = int32(r.DecodeInt(32)) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8865,16 +8906,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.LeaderElection = LeaderElectionConfiguration{} } else { - yyv122 := &x.LeaderElection - yyv122.CodecDecodeSelf(d) + yyv124 := &x.LeaderElection + yyv124.CodecDecodeSelf(d) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8882,16 +8923,16 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.VolumeConfiguration = VolumeConfiguration{} } else { - yyv123 := &x.VolumeConfiguration - yyv123.CodecDecodeSelf(d) + yyv125 := &x.VolumeConfiguration + yyv125.CodecDecodeSelf(d) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8899,24 +8940,24 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * if r.TryDecodeAsNil() { x.ControllerStartInterval = pkg1_unversioned.Duration{} } else { - yyv124 := &x.ControllerStartInterval - yym125 := z.DecBinary() - _ = yym125 + yyv126 := &x.ControllerStartInterval + yym127 := z.DecBinary() + _ = yym127 if false { - } else if z.HasExtensions() && z.DecExt(yyv124) { - } else if !yym125 && z.IsJSONHandle() { - z.DecJSONUnmarshal(yyv124) + } else if z.HasExtensions() && z.DecExt(yyv126) { + } else if !yym127 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv126) } else { - z.DecFallback(yyv124, false) + z.DecFallback(yyv126, false) } } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8926,13 +8967,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.EnableGarbageCollector = bool(r.DecodeBool()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8942,13 +8983,13 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * } else { x.Kind = string(r.DecodeString()) } - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -8959,17 +9000,17 @@ func (x *KubeControllerManagerConfiguration) codecDecodeSelfFromArray(l int, d * x.APIVersion = string(r.DecodeString()) } for { - yyj66++ - if yyhl66 { - yyb66 = yyj66 > l + yyj67++ + if yyhl67 { + yyb67 = yyj67 > l } else { - yyb66 = r.CheckBreak() + yyb67 = r.CheckBreak() } - if yyb66 { + if yyb67 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj66-1, "") + z.DecStructFieldNotFound(yyj67-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index 6121048b47..0c7dfc9a33 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -471,6 +471,9 @@ type KubeControllerManagerConfiguration struct { // concurrentNamespaceSyncs is the number of namespace objects that are // allowed to sync concurrently. ConcurrentNamespaceSyncs int32 `json:"concurrentNamespaceSyncs"` + // concurrentSATokenSyncs is the number of service account token syncing operations + // that will be done concurrently. + ConcurrentSATokenSyncs int32 `json:"concurrentSATokenSyncs"` // lookupCacheSizeForRC is the size of lookup cache for replication controllers. // Larger number = more responsive replica management, but more MEM load. LookupCacheSizeForRC int32 `json:"lookupCacheSizeForRC"` diff --git a/pkg/controller/serviceaccount/tokens_controller.go b/pkg/controller/serviceaccount/tokens_controller.go index b660afc963..e7a25f2b6c 100644 --- a/pkg/controller/serviceaccount/tokens_controller.go +++ b/pkg/controller/serviceaccount/tokens_controller.go @@ -32,10 +32,13 @@ import ( "k8s.io/kubernetes/pkg/registry/secret" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/serviceaccount" + "k8s.io/kubernetes/pkg/types" + utilerrors "k8s.io/kubernetes/pkg/util/errors" "k8s.io/kubernetes/pkg/util/metrics" utilruntime "k8s.io/kubernetes/pkg/util/runtime" "k8s.io/kubernetes/pkg/util/sets" "k8s.io/kubernetes/pkg/util/wait" + "k8s.io/kubernetes/pkg/util/workqueue" "k8s.io/kubernetes/pkg/watch" ) @@ -58,21 +61,36 @@ type TokensControllerOptions struct { // SecretResync is the time.Duration at which to fully re-list secrets. // If zero, re-list will be delayed as long as possible SecretResync time.Duration - // This CA will be added in the secretes of service accounts + // This CA will be added in the secrets of service accounts RootCA []byte + + // MaxRetries controls the maximum number of times a particular key is retried before giving up + // If zero, a default max is used + MaxRetries int } // NewTokensController returns a new *TokensController. func NewTokensController(cl clientset.Interface, options TokensControllerOptions) *TokensController { + maxRetries := options.MaxRetries + if maxRetries == 0 { + maxRetries = 10 + } + e := &TokensController{ client: cl, token: options.TokenGenerator, rootCA: options.RootCA, + + syncServiceAccountQueue: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), + syncSecretQueue: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), + + maxRetries: maxRetries, } if cl != nil && cl.Core().GetRESTClient().GetRateLimiter() != nil { metrics.RegisterMetricAndTrackRateLimiterUsage("serviceaccount_controller", cl.Core().GetRESTClient().GetRateLimiter()) } - e.serviceAccounts, e.serviceAccountController = framework.NewIndexerInformer( + + e.serviceAccounts, e.serviceAccountController = framework.NewInformer( &cache.ListWatch{ ListFunc: func(options api.ListOptions) (runtime.Object, error) { return e.client.Core().ServiceAccounts(api.NamespaceAll).List(options) @@ -84,11 +102,10 @@ func NewTokensController(cl clientset.Interface, options TokensControllerOptions &api.ServiceAccount{}, options.ServiceAccountResync, framework.ResourceEventHandlerFuncs{ - AddFunc: e.serviceAccountAdded, - UpdateFunc: e.serviceAccountUpdated, - DeleteFunc: e.serviceAccountDeleted, + AddFunc: e.queueServiceAccountSync, + UpdateFunc: e.queueServiceAccountUpdateSync, + DeleteFunc: e.queueServiceAccountSync, }, - cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}, ) tokenSelector := fields.SelectorFromSet(map[string]string{api.SecretTypeField: string(api.SecretTypeServiceAccountToken)}) @@ -106,206 +123,277 @@ func NewTokensController(cl clientset.Interface, options TokensControllerOptions &api.Secret{}, options.SecretResync, framework.ResourceEventHandlerFuncs{ - AddFunc: e.secretAdded, - UpdateFunc: e.secretUpdated, - DeleteFunc: e.secretDeleted, + AddFunc: e.queueSecretSync, + UpdateFunc: e.queueSecretUpdateSync, + DeleteFunc: e.queueSecretSync, }, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}, ) - e.serviceAccountsSynced = e.serviceAccountController.HasSynced - e.secretsSynced = e.secretController.HasSynced - return e } // TokensController manages ServiceAccountToken secrets for ServiceAccount objects type TokensController struct { - stopChan chan struct{} - client clientset.Interface token serviceaccount.TokenGenerator rootCA []byte - serviceAccounts cache.Indexer + serviceAccounts cache.Store secrets cache.Indexer // Since we join two objects, we'll watch both of them with controllers. serviceAccountController *framework.Controller secretController *framework.Controller - // These are here so tests can inject a 'return true'. - serviceAccountsSynced func() bool - secretsSynced func() bool + // syncServiceAccountQueue handles service account events: + // * ensures a referenced token exists for service accounts which still exist + // * ensures tokens are removed for service accounts which no longer exist + // key is "<namespace>/<name>/<uid>" + syncServiceAccountQueue workqueue.RateLimitingInterface + + // syncSecretQueue handles secret events: + // * deletes tokens whose service account no longer exists + // * updates tokens with missing token or namespace data, or mismatched ca data + // * ensures service account secret references are removed for tokens which are deleted + // key is a secretQueueKey{} + syncSecretQueue workqueue.RateLimitingInterface + + maxRetries int } -// Runs controller loops and returns immediately -func (e *TokensController) Run() { - if e.stopChan == nil { - e.stopChan = make(chan struct{}) - go e.serviceAccountController.Run(e.stopChan) - go e.secretController.Run(e.stopChan) +// Runs controller blocks until stopCh is closed +func (e *TokensController) Run(workers int, stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + + // Start controllers (to fill stores, call informers, fill work queues) + go e.serviceAccountController.Run(stopCh) + go e.secretController.Run(stopCh) + + // Wait for stores to fill + for !e.serviceAccountController.HasSynced() || !e.secretController.HasSynced() { + time.Sleep(100 * time.Millisecond) + } + + // Spawn workers to process work queues + for i := 0; i < workers; i++ { + go wait.Until(e.syncServiceAccount, 0, stopCh) + go wait.Until(e.syncSecret, 0, stopCh) + } + + // Block until stop channel is closed + <-stopCh + + // Shut down queues + e.syncServiceAccountQueue.ShutDown() + e.syncSecretQueue.ShutDown() +} + +func (e *TokensController) queueServiceAccountSync(obj interface{}) { + if serviceAccount, ok := obj.(*api.ServiceAccount); ok { + e.syncServiceAccountQueue.Add(makeServiceAccountKey(serviceAccount)) } } -// Stop gracefully shuts down this controller -func (e *TokensController) Stop() { - if e.stopChan != nil { - close(e.stopChan) - e.stopChan = nil +func (e *TokensController) queueServiceAccountUpdateSync(oldObj interface{}, newObj interface{}) { + if serviceAccount, ok := newObj.(*api.ServiceAccount); ok { + e.syncServiceAccountQueue.Add(makeServiceAccountKey(serviceAccount)) } } -// serviceAccountAdded reacts to a ServiceAccount creation by creating a corresponding ServiceAccountToken Secret -func (e *TokensController) serviceAccountAdded(obj interface{}) { - serviceAccount := obj.(*api.ServiceAccount) - err := e.createSecretIfNeeded(serviceAccount) - if err != nil { - glog.Error(err) - } -} - -// serviceAccountUpdated reacts to a ServiceAccount update (or re-list) by ensuring a corresponding ServiceAccountToken Secret exists -func (e *TokensController) serviceAccountUpdated(oldObj interface{}, newObj interface{}) { - newServiceAccount := newObj.(*api.ServiceAccount) - err := e.createSecretIfNeeded(newServiceAccount) - if err != nil { - glog.Error(err) - } -} - -// serviceAccountDeleted reacts to a ServiceAccount deletion by deleting all corresponding ServiceAccountToken Secrets -func (e *TokensController) serviceAccountDeleted(obj interface{}) { - serviceAccount, ok := obj.(*api.ServiceAccount) - if !ok { - // Unknown type. If we missed a ServiceAccount deletion, the - // corresponding secrets will be cleaned up during the Secret re-list +// complete optionally requeues key, then calls queue.Done(key) +func (e *TokensController) retryOrForget(queue workqueue.RateLimitingInterface, key interface{}, requeue bool) { + if !requeue { + queue.Forget(key) return } - secrets, err := e.listTokenSecrets(serviceAccount) + + requeueCount := queue.NumRequeues(key) + if requeueCount < e.maxRetries { + queue.AddRateLimited(key) + return + } + + glog.V(4).Infof("retried %d times: %#v", requeueCount, key) + queue.Forget(key) +} + +func (e *TokensController) queueSecretSync(obj interface{}) { + if secret, ok := obj.(*api.Secret); ok { + e.syncSecretQueue.Add(makeSecretQueueKey(secret)) + } +} + +func (e *TokensController) queueSecretUpdateSync(oldObj interface{}, newObj interface{}) { + if secret, ok := newObj.(*api.Secret); ok { + e.syncSecretQueue.Add(makeSecretQueueKey(secret)) + } +} + +func (e *TokensController) syncServiceAccount() { + key, quit := e.syncServiceAccountQueue.Get() + if quit { + return + } + defer e.syncServiceAccountQueue.Done(key) + + retry := false + defer func() { + e.retryOrForget(e.syncServiceAccountQueue, key, retry) + }() + + saInfo, err := parseServiceAccountKey(key) if err != nil { glog.Error(err) return } - for _, secret := range secrets { - glog.V(4).Infof("Deleting secret %s/%s because service account %s was deleted", secret.Namespace, secret.Name, serviceAccount.Name) - if err := e.deleteSecret(secret); err != nil { - glog.Errorf("Error deleting secret %s/%s: %v", secret.Namespace, secret.Name, err) + + sa, err := e.getServiceAccount(saInfo.namespace, saInfo.name, saInfo.uid, false) + switch { + case err != nil: + glog.Error(err) + retry = true + case sa == nil: + // service account no longer exists, so delete related tokens + glog.V(4).Infof("syncServiceAccount(%s/%s), service account deleted, removing tokens", saInfo.namespace, saInfo.name) + sa = &api.ServiceAccount{ObjectMeta: api.ObjectMeta{Namespace: saInfo.namespace, Name: saInfo.name, UID: saInfo.uid}} + if retriable, err := e.deleteTokens(sa); err != nil { + glog.Errorf("error deleting serviceaccount tokens for %s/%s: %v", saInfo.namespace, saInfo.name, err) + retry = retriable + } + default: + // ensure a token exists and is referenced by this service account + if retriable, err := e.ensureReferencedToken(sa); err != nil { + glog.Errorf("error synchronizing serviceaccount %s/%s: %v", saInfo.namespace, saInfo.name, err) + retry = retriable } } } -// secretAdded reacts to a Secret create by ensuring the referenced ServiceAccount exists, and by adding a token to the secret if needed -func (e *TokensController) secretAdded(obj interface{}) { - secret := obj.(*api.Secret) - serviceAccount, err := e.getServiceAccount(secret, true) +func (e *TokensController) syncSecret() { + key, quit := e.syncSecretQueue.Get() + if quit { + return + } + defer e.syncSecretQueue.Done(key) + + // Track whether or not we should retry this sync + retry := false + defer func() { + e.retryOrForget(e.syncSecretQueue, key, retry) + }() + + secretInfo, err := parseSecretQueueKey(key) if err != nil { glog.Error(err) return } - if serviceAccount == nil { - glog.V(2).Infof( - "Deleting new secret %s/%s because service account %s (uid=%s) was not found", - secret.Namespace, secret.Name, - secret.Annotations[api.ServiceAccountNameKey], secret.Annotations[api.ServiceAccountUIDKey]) - if err := e.deleteSecret(secret); err != nil { - glog.Errorf("Error deleting secret %s/%s: %v", secret.Namespace, secret.Name, err) - } - } else { - e.generateTokenIfNeeded(serviceAccount, secret) - } -} -// secretUpdated reacts to a Secret update (or re-list) by deleting the secret (if the referenced ServiceAccount does not exist) -func (e *TokensController) secretUpdated(oldObj interface{}, newObj interface{}) { - newSecret := newObj.(*api.Secret) - newServiceAccount, err := e.getServiceAccount(newSecret, true) - if err != nil { + secret, err := e.getSecret(secretInfo.namespace, secretInfo.name, secretInfo.uid, false) + switch { + case err != nil: glog.Error(err) - return - } - if newServiceAccount == nil { - glog.V(2).Infof( - "Deleting updated secret %s/%s because service account %s (uid=%s) was not found", - newSecret.Namespace, newSecret.Name, - newSecret.Annotations[api.ServiceAccountNameKey], newSecret.Annotations[api.ServiceAccountUIDKey]) - if err := e.deleteSecret(newSecret); err != nil { - glog.Errorf("Error deleting secret %s/%s: %v", newSecret.Namespace, newSecret.Name, err) + retry = true + case secret == nil: + // If the service account exists + if sa, saErr := e.getServiceAccount(secretInfo.namespace, secretInfo.saName, secretInfo.saUID, false); saErr == nil && sa != nil { + // secret no longer exists, so delete references to this secret from the service account + if err := client.RetryOnConflict(RemoveTokenBackoff, func() error { + return e.removeSecretReference(secretInfo.namespace, secretInfo.saName, secretInfo.saUID, secretInfo.name) + }); err != nil { + glog.Error(err) + } + } + default: + // Ensure service account exists + sa, saErr := e.getServiceAccount(secretInfo.namespace, secretInfo.saName, secretInfo.saUID, true) + switch { + case saErr != nil: + glog.Error(saErr) + retry = true + case sa == nil: + // Delete token + glog.V(4).Infof("syncSecret(%s/%s), service account does not exist, deleting token", secretInfo.namespace, secretInfo.name) + if retriable, err := e.deleteToken(secretInfo.namespace, secretInfo.name, secretInfo.uid); err != nil { + glog.Errorf("error deleting serviceaccount token %s/%s for service account %s: %v", secretInfo.namespace, secretInfo.name, secretInfo.saName, err) + retry = retriable + } + default: + // Update token if needed + if retriable, err := e.generateTokenIfNeeded(sa, secret); err != nil { + glog.Errorf("error populating serviceaccount token %s/%s for service account %s: %v", secretInfo.namespace, secretInfo.name, secretInfo.saName, err) + retry = retriable + } } - } else { - e.generateTokenIfNeeded(newServiceAccount, newSecret) } } -// secretDeleted reacts to a Secret being deleted by removing a reference from the corresponding ServiceAccount if needed -func (e *TokensController) secretDeleted(obj interface{}) { - secret, ok := obj.(*api.Secret) - if !ok { - // Unknown type. If we missed a Secret deletion, the corresponding ServiceAccount (if it exists) - // will get a secret recreated (if needed) during the ServiceAccount re-list - return - } - - serviceAccount, err := e.getServiceAccount(secret, false) +func (e *TokensController) deleteTokens(serviceAccount *api.ServiceAccount) ( /*retry*/ bool, error) { + tokens, err := e.listTokenSecrets(serviceAccount) if err != nil { - glog.Error(err) - return + // don't retry on cache lookup errors + return false, err } - if serviceAccount == nil { - return - } - - if err := client.RetryOnConflict(RemoveTokenBackoff, func() error { - return e.removeSecretReferenceIfNeeded(serviceAccount, secret.Name) - }); err != nil { - utilruntime.HandleError(err) + retry := false + errs := []error{} + for _, token := range tokens { + r, err := e.deleteToken(token.Namespace, token.Name, token.UID) + if err != nil { + errs = append(errs, err) + } + if r { + retry = true + } } + return retry, utilerrors.NewAggregate(errs) } -// createSecretIfNeeded makes sure at least one ServiceAccountToken secret exists, and is included in the serviceAccount's Secrets list -func (e *TokensController) createSecretIfNeeded(serviceAccount *api.ServiceAccount) error { - // If the service account references no secrets, short-circuit and create a new one - if len(serviceAccount.Secrets) == 0 { - return e.createSecret(serviceAccount) +func (e *TokensController) deleteToken(ns, name string, uid types.UID) ( /*retry*/ bool, error) { + var opts *api.DeleteOptions + if len(uid) > 0 { + opts = &api.DeleteOptions{Preconditions: &api.Preconditions{UID: &uid}} } + err := e.client.Core().Secrets(ns).Delete(name, opts) + // NotFound doesn't need a retry (it's already been deleted) + // Conflict doesn't need a retry (the UID precondition failed) + if err == nil || apierrors.IsNotFound(err) || apierrors.IsConflict(err) { + return false, nil + } + // Retry for any other error + return true, err +} - // We shouldn't try to validate secret references until the secrets store is synced - if !e.secretsSynced() { - return nil - } - - // If any existing token secrets are referenced by the service account, return - allSecrets, err := e.listTokenSecrets(serviceAccount) - if err != nil { - return err - } - referencedSecrets := getSecretReferences(serviceAccount) - for _, secret := range allSecrets { - if referencedSecrets.Has(secret.Name) { - return nil +// ensureReferencedToken makes sure at least one ServiceAccountToken secret exists, and is included in the serviceAccount's Secrets list +func (e *TokensController) ensureReferencedToken(serviceAccount *api.ServiceAccount) ( /* retry */ bool, error) { + if len(serviceAccount.Secrets) > 0 { + allSecrets, err := e.listTokenSecrets(serviceAccount) + if err != nil { + // Don't retry cache lookup errors + return false, err + } + referencedSecrets := getSecretReferences(serviceAccount) + for _, secret := range allSecrets { + if referencedSecrets.Has(secret.Name) { + // A service account token already exists, and is referenced, short-circuit + return false, nil + } } } - // Otherwise create a new token secret - return e.createSecret(serviceAccount) -} - -// createSecret creates a secret of type ServiceAccountToken for the given ServiceAccount -func (e *TokensController) createSecret(serviceAccount *api.ServiceAccount) error { // We don't want to update the cache's copy of the service account // so add the secret to a freshly retrieved copy of the service account serviceAccounts := e.client.Core().ServiceAccounts(serviceAccount.Namespace) liveServiceAccount, err := serviceAccounts.Get(serviceAccount.Name) if err != nil { - return err + // Retry for any error other than a NotFound + return !apierrors.IsNotFound(err), err } if liveServiceAccount.ResourceVersion != serviceAccount.ResourceVersion { // our view of the service account is not up to date // we'll get notified of an update event later and get to try again - // this only prevent interactions between successive runs of this controller's event handlers, but that is useful - glog.V(2).Infof("View of ServiceAccount %s/%s is not up to date, skipping token creation", serviceAccount.Namespace, serviceAccount.Name) - return nil + glog.V(2).Infof("serviceaccount %s/%s is not up to date, skipping token creation", serviceAccount.Namespace, serviceAccount.Name) + return false, nil } // Build the secret @@ -325,7 +413,8 @@ func (e *TokensController) createSecret(serviceAccount *api.ServiceAccount) erro // Generate the token token, err := e.token.GenerateToken(*serviceAccount, *secret) if err != nil { - return err + // retriable error + return true, err } secret.Data[api.ServiceAccountTokenKey] = []byte(token) secret.Data[api.ServiceAccountNamespaceKey] = []byte(serviceAccount.Namespace) @@ -334,41 +423,39 @@ func (e *TokensController) createSecret(serviceAccount *api.ServiceAccount) erro } // Save the secret - if createdToken, err := e.client.Core().Secrets(serviceAccount.Namespace).Create(secret); err != nil { - return err - } else { - // Manually add the new token to the cache store. - // This prevents the service account update (below) triggering another token creation, if the referenced token couldn't be found in the store - e.secrets.Add(createdToken) + createdToken, err := e.client.Core().Secrets(serviceAccount.Namespace).Create(secret) + if err != nil { + // retriable error + return true, err } + // Manually add the new token to the cache store. + // This prevents the service account update (below) triggering another token creation, if the referenced token couldn't be found in the store + e.secrets.Add(createdToken) liveServiceAccount.Secrets = append(liveServiceAccount.Secrets, api.ObjectReference{Name: secret.Name}) - _, err = serviceAccounts.Update(liveServiceAccount) - if err != nil { + if _, err = serviceAccounts.Update(liveServiceAccount); err != nil { // we weren't able to use the token, try to clean it up. - glog.V(2).Infof("Deleting secret %s/%s because reference couldn't be added (%v)", secret.Namespace, secret.Name, err) - if err := e.client.Core().Secrets(secret.Namespace).Delete(secret.Name, nil); err != nil { - glog.Error(err) // if we fail, just log it + glog.V(2).Infof("deleting secret %s/%s because reference couldn't be added (%v)", secret.Namespace, secret.Name, err) + deleteOpts := &api.DeleteOptions{Preconditions: &api.Preconditions{UID: &createdToken.UID}} + if deleteErr := e.client.Core().Secrets(createdToken.Namespace).Delete(createdToken.Name, deleteOpts); deleteErr != nil { + glog.Error(deleteErr) // if we fail, just log it } - } - if apierrors.IsConflict(err) { - // nothing to do. We got a conflict, that means that the service account was updated. We simply need to return because we'll get an update notification later - return nil + + if apierrors.IsConflict(err) || apierrors.IsNotFound(err) { + // if we got a Conflict error, the service account was updated by someone else, and we'll get an update notification later + // if we got a NotFound error, the service account no longer exists, and we don't need to create a token for it + return false, nil + } + // retry in all other cases + return true, err } - return err + // success! + return false, nil } -// generateTokenIfNeeded populates the token data for the given Secret if not already set -func (e *TokensController) generateTokenIfNeeded(serviceAccount *api.ServiceAccount, secret *api.Secret) error { - if secret.Annotations == nil { - secret.Annotations = map[string]string{} - } - if secret.Data == nil { - secret.Data = map[string][]byte{} - } - +func (e *TokensController) secretUpdateNeeded(secret *api.Secret) (bool, bool, bool) { caData := secret.Data[api.ServiceAccountRootCAKey] needsCA := len(e.rootCA) > 0 && bytes.Compare(caData, e.rootCA) != 0 @@ -377,60 +464,103 @@ func (e *TokensController) generateTokenIfNeeded(serviceAccount *api.ServiceAcco tokenData := secret.Data[api.ServiceAccountTokenKey] needsToken := len(tokenData) == 0 + return needsCA, needsNamespace, needsToken +} + +// generateTokenIfNeeded populates the token data for the given Secret if not already set +func (e *TokensController) generateTokenIfNeeded(serviceAccount *api.ServiceAccount, cachedSecret *api.Secret) ( /* retry */ bool, error) { + // Check the cached secret to see if changes are needed + if needsCA, needsNamespace, needsToken := e.secretUpdateNeeded(cachedSecret); !needsCA && !needsToken && !needsNamespace { + return false, nil + } + + // We don't want to update the cache's copy of the secret + // so add the token to a freshly retrieved copy of the secret + secrets := e.client.Core().Secrets(cachedSecret.Namespace) + liveSecret, err := secrets.Get(cachedSecret.Name) + if err != nil { + // Retry for any error other than a NotFound + return !apierrors.IsNotFound(err), err + } + if liveSecret.ResourceVersion != cachedSecret.ResourceVersion { + // our view of the secret is not up to date + // we'll get notified of an update event later and get to try again + glog.V(2).Infof("secret %s/%s is not up to date, skipping token population", liveSecret.Namespace, liveSecret.Name) + return false, nil + } + + needsCA, needsNamespace, needsToken := e.secretUpdateNeeded(liveSecret) if !needsCA && !needsToken && !needsNamespace { - return nil + return false, nil + } + + if liveSecret.Annotations == nil { + liveSecret.Annotations = map[string]string{} + } + if liveSecret.Data == nil { + liveSecret.Data = map[string][]byte{} } // Set the CA if needsCA { - secret.Data[api.ServiceAccountRootCAKey] = e.rootCA + liveSecret.Data[api.ServiceAccountRootCAKey] = e.rootCA } // Set the namespace if needsNamespace { - secret.Data[api.ServiceAccountNamespaceKey] = []byte(secret.Namespace) + liveSecret.Data[api.ServiceAccountNamespaceKey] = []byte(liveSecret.Namespace) } // Generate the token if needsToken { - token, err := e.token.GenerateToken(*serviceAccount, *secret) + token, err := e.token.GenerateToken(*serviceAccount, *liveSecret) if err != nil { - return err + return false, err } - secret.Data[api.ServiceAccountTokenKey] = []byte(token) + liveSecret.Data[api.ServiceAccountTokenKey] = []byte(token) } // Set annotations - secret.Annotations[api.ServiceAccountNameKey] = serviceAccount.Name - secret.Annotations[api.ServiceAccountUIDKey] = string(serviceAccount.UID) + liveSecret.Annotations[api.ServiceAccountNameKey] = serviceAccount.Name + liveSecret.Annotations[api.ServiceAccountUIDKey] = string(serviceAccount.UID) // Save the secret - if _, err := e.client.Core().Secrets(secret.Namespace).Update(secret); err != nil { - return err + _, err = secrets.Update(liveSecret) + if apierrors.IsConflict(err) || apierrors.IsNotFound(err) { + // if we got a Conflict error, the secret was updated by someone else, and we'll get an update notification later + // if we got a NotFound error, the secret no longer exists, and we don't need to populate a token + return false, nil } - return nil + if err != nil { + return true, err + } + return false, nil } -// deleteSecret deletes the given secret -func (e *TokensController) deleteSecret(secret *api.Secret) error { - return e.client.Core().Secrets(secret.Namespace).Delete(secret.Name, nil) -} - -// removeSecretReferenceIfNeeded updates the given ServiceAccount to remove a reference to the given secretName if needed. -// Returns whether an update was performed, and any error that occurred -func (e *TokensController) removeSecretReferenceIfNeeded(serviceAccount *api.ServiceAccount, secretName string) error { +// removeSecretReference updates the given ServiceAccount to remove a reference to the given secretName if needed. +func (e *TokensController) removeSecretReference(saNamespace string, saName string, saUID types.UID, secretName string) error { // We don't want to update the cache's copy of the service account // so remove the secret from a freshly retrieved copy of the service account - serviceAccounts := e.client.Core().ServiceAccounts(serviceAccount.Namespace) - serviceAccount, err := serviceAccounts.Get(serviceAccount.Name) + serviceAccounts := e.client.Core().ServiceAccounts(saNamespace) + serviceAccount, err := serviceAccounts.Get(saName) + // Ignore NotFound errors when attempting to remove a reference + if apierrors.IsNotFound(err) { + return nil + } if err != nil { return err } - // Double-check to see if the account still references the secret + // Short-circuit if the UID doesn't match + if len(saUID) > 0 && saUID != serviceAccount.UID { + return nil + } + + // Short-circuit if the secret is no longer referenced if !getSecretReferences(serviceAccount).Has(secretName) { return nil } + // Remove the secret secrets := []api.ObjectReference{} for _, s := range serviceAccount.Secrets { if s.Name != secretName { @@ -438,59 +568,90 @@ func (e *TokensController) removeSecretReferenceIfNeeded(serviceAccount *api.Ser } } serviceAccount.Secrets = secrets - _, err = serviceAccounts.Update(serviceAccount) - if err != nil { - return err + // Ignore NotFound errors when attempting to remove a reference + if apierrors.IsNotFound(err) { + return nil } - - return nil + return err } -// getServiceAccount returns the ServiceAccount referenced by the given secret. If the secret is not -// of type ServiceAccountToken, or if the referenced ServiceAccount does not exist, nil is returned -func (e *TokensController) getServiceAccount(secret *api.Secret, fetchOnCacheMiss bool) (*api.ServiceAccount, error) { - name, _ := serviceAccountNameAndUID(secret) - if len(name) == 0 { - return nil, nil - } - - key := &api.ServiceAccount{ObjectMeta: api.ObjectMeta{Namespace: secret.Namespace}} - namespaceAccounts, err := e.serviceAccounts.Index("namespace", key) +func (e *TokensController) getServiceAccount(ns string, name string, uid types.UID, fetchOnCacheMiss bool) (*api.ServiceAccount, error) { + // Look up in cache + obj, exists, err := e.serviceAccounts.GetByKey(makeCacheKey(ns, name)) if err != nil { return nil, err } - - for _, obj := range namespaceAccounts { - serviceAccount := obj.(*api.ServiceAccount) - - if serviceaccount.IsServiceAccountToken(secret, serviceAccount) { - return serviceAccount, nil + if exists { + sa, ok := obj.(*api.ServiceAccount) + if !ok { + return nil, fmt.Errorf("expected *api.ServiceAccount, got %#v", sa) + } + // Ensure UID matches if given + if len(uid) == 0 || uid == sa.UID { + return sa, nil } } - if fetchOnCacheMiss { - serviceAccount, err := e.client.Core().ServiceAccounts(secret.Namespace).Get(name) - if apierrors.IsNotFound(err) { - return nil, nil - } - if err != nil { - return nil, err - } + if !fetchOnCacheMiss { + return nil, nil + } - if serviceaccount.IsServiceAccountToken(secret, serviceAccount) { - return serviceAccount, nil + // Live lookup + sa, err := e.client.Core().ServiceAccounts(ns).Get(name) + if apierrors.IsNotFound(err) { + return nil, nil + } + if err != nil { + return nil, err + } + // Ensure UID matches if given + if len(uid) == 0 || uid == sa.UID { + return sa, nil + } + return nil, nil +} + +func (e *TokensController) getSecret(ns string, name string, uid types.UID, fetchOnCacheMiss bool) (*api.Secret, error) { + // Look up in cache + obj, exists, err := e.secrets.GetByKey(makeCacheKey(ns, name)) + if err != nil { + return nil, err + } + if exists { + secret, ok := obj.(*api.Secret) + if !ok { + return nil, fmt.Errorf("expected *api.Secret, got %#v", secret) + } + // Ensure UID matches if given + if len(uid) == 0 || uid == secret.UID { + return secret, nil } } + if !fetchOnCacheMiss { + return nil, nil + } + + // Live lookup + secret, err := e.client.Core().Secrets(ns).Get(name) + if apierrors.IsNotFound(err) { + return nil, nil + } + if err != nil { + return nil, err + } + // Ensure UID matches if given + if len(uid) == 0 || uid == secret.UID { + return secret, nil + } return nil, nil } // listTokenSecrets returns a list of all of the ServiceAccountToken secrets that // reference the given service account's name and uid func (e *TokensController) listTokenSecrets(serviceAccount *api.ServiceAccount) ([]*api.Secret, error) { - key := &api.Secret{ObjectMeta: api.ObjectMeta{Namespace: serviceAccount.Namespace}} - namespaceSecrets, err := e.secrets.Index("namespace", key) + namespaceSecrets, err := e.secrets.ByIndex("namespace", serviceAccount.Namespace) if err != nil { return nil, err } @@ -523,3 +684,63 @@ func getSecretReferences(serviceAccount *api.ServiceAccount) sets.String { } return references } + +// serviceAccountQueueKey holds information we need to sync a service account. +// It contains enough information to look up the cached service account, +// or delete owned tokens if the service account no longer exists. +type serviceAccountQueueKey struct { + namespace string + name string + uid types.UID +} + +func makeServiceAccountKey(sa *api.ServiceAccount) interface{} { + return serviceAccountQueueKey{ + namespace: sa.Namespace, + name: sa.Name, + uid: sa.UID, + } +} + +func parseServiceAccountKey(key interface{}) (serviceAccountQueueKey, error) { + queueKey, ok := key.(serviceAccountQueueKey) + if !ok || len(queueKey.namespace) == 0 || len(queueKey.name) == 0 || len(queueKey.uid) == 0 { + return serviceAccountQueueKey{}, fmt.Errorf("invalid serviceaccount key: %#v", key) + } + return queueKey, nil +} + +// secretQueueKey holds information we need to sync a service account token secret. +// It contains enough information to look up the cached service account, +// or delete the secret reference if the secret no longer exists. +type secretQueueKey struct { + namespace string + name string + uid types.UID + saName string + // optional, will be blank when syncing tokens missing the service account uid annotation + saUID types.UID +} + +func makeSecretQueueKey(secret *api.Secret) interface{} { + return secretQueueKey{ + namespace: secret.Namespace, + name: secret.Name, + uid: secret.UID, + saName: secret.Annotations[api.ServiceAccountNameKey], + saUID: types.UID(secret.Annotations[api.ServiceAccountUIDKey]), + } +} + +func parseSecretQueueKey(key interface{}) (secretQueueKey, error) { + queueKey, ok := key.(secretQueueKey) + if !ok || len(queueKey.namespace) == 0 || len(queueKey.name) == 0 || len(queueKey.uid) == 0 || len(queueKey.saName) == 0 { + return secretQueueKey{}, fmt.Errorf("invalid secret key: %#v", key) + } + return queueKey, nil +} + +// produce the same key format as cache.MetaNamespaceKeyFunc +func makeCacheKey(namespace, name string) string { + return namespace + "/" + name +} diff --git a/pkg/controller/serviceaccount/tokens_controller_test.go b/pkg/controller/serviceaccount/tokens_controller_test.go index 4f2ff6fb53..4fad277527 100644 --- a/pkg/controller/serviceaccount/tokens_controller_test.go +++ b/pkg/controller/serviceaccount/tokens_controller_test.go @@ -17,10 +17,15 @@ limitations under the License. package serviceaccount import ( + "errors" "reflect" "testing" + "time" + + "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" + apierrors "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" "k8s.io/kubernetes/pkg/client/testing/core" @@ -63,7 +68,12 @@ func tokenSecretReferences() []api.ObjectReference { // addTokenSecretReference adds a reference to the ServiceAccountToken that will be created func addTokenSecretReference(refs []api.ObjectReference) []api.ObjectReference { - return append(refs, api.ObjectReference{Name: "default-token-fplln"}) + return addNamedTokenSecretReference(refs, "default-token-fplln") +} + +// addNamedTokenSecretReference adds a reference to the named ServiceAccountToken +func addNamedTokenSecretReference(refs []api.ObjectReference, name string) []api.ObjectReference { + return append(refs, api.ObjectReference{Name: name}) } // serviceAccount returns a service account with the given secret refs @@ -104,10 +114,15 @@ func opaqueSecret() *api.Secret { // createdTokenSecret returns the ServiceAccountToken secret posted when creating a new token secret. // Named "default-token-fplln", since that is the first generated name after rand.Seed(1) -func createdTokenSecret() *api.Secret { +func createdTokenSecret(overrideName ...string) *api.Secret { + return namedCreatedTokenSecret("default-token-fplln") +} + +// namedTokenSecret returns the ServiceAccountToken secret posted when creating a new token secret with the given name. +func namedCreatedTokenSecret(name string) *api.Secret { return &api.Secret{ ObjectMeta: api.ObjectMeta{ - Name: "default-token-fplln", + Name: name, Namespace: "default", Annotations: map[string]string{ api.ServiceAccountNameKey: "default", @@ -180,12 +195,20 @@ func serviceAccountTokenSecretWithNamespaceData(data []byte) *api.Secret { return secret } +type reaction struct { + verb string + resource string + reactor func(t *testing.T) core.ReactionFunc +} + func TestTokenCreation(t *testing.T) { testcases := map[string]struct { ClientObjects []runtime.Object - SecretsSyncPending bool - ServiceAccountsSyncPending bool + IsAsync bool + MaxRetries int + + Reactors []reaction ExistingServiceAccount *api.ServiceAccount ExistingSecrets []*api.Secret @@ -209,16 +232,66 @@ func TestTokenCreation(t *testing.T) { core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), }, }, - "new serviceaccount with no secrets with unsynced secret store": { + "new serviceaccount with no secrets encountering create error": { ClientObjects: []runtime.Object{serviceAccount(emptySecretReferences()), createdTokenSecret()}, - - SecretsSyncPending: true, + MaxRetries: 10, + IsAsync: true, + Reactors: []reaction{{ + verb: "create", + resource: "secrets", + reactor: func(t *testing.T) core.ReactionFunc { + i := 0 + return func(core.Action) (bool, runtime.Object, error) { + i++ + if i < 3 { + return true, nil, apierrors.NewForbidden(api.Resource("secrets"), "foo", errors.New("No can do")) + } + return false, nil, nil + } + }, + }}, AddedServiceAccount: serviceAccount(emptySecretReferences()), ExpectedActions: []core.Action{ + // Attempt 1 core.NewGetAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, "default"), core.NewCreateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, createdTokenSecret()), - core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), + + // Attempt 2 + core.NewGetAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, "default"), + core.NewCreateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, namedCreatedTokenSecret("default-token-gziey")), + + // Attempt 3 + core.NewGetAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, "default"), + core.NewCreateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, namedCreatedTokenSecret("default-token-oh43e")), + core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, serviceAccount(addNamedTokenSecretReference(emptySecretReferences(), "default-token-oh43e"))), + }, + }, + "new serviceaccount with no secrets encountering unending create error": { + ClientObjects: []runtime.Object{serviceAccount(emptySecretReferences()), createdTokenSecret()}, + MaxRetries: 2, + IsAsync: true, + Reactors: []reaction{{ + verb: "create", + resource: "secrets", + reactor: func(t *testing.T) core.ReactionFunc { + return func(core.Action) (bool, runtime.Object, error) { + return true, nil, apierrors.NewForbidden(api.Resource("secrets"), "foo", errors.New("No can do")) + } + }, + }}, + + AddedServiceAccount: serviceAccount(emptySecretReferences()), + ExpectedActions: []core.Action{ + // Attempt + core.NewGetAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, "default"), + core.NewCreateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, createdTokenSecret()), + // Retry 1 + core.NewGetAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, "default"), + core.NewCreateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, namedCreatedTokenSecret("default-token-gziey")), + // Retry 2 + core.NewGetAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, "default"), + core.NewCreateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, namedCreatedTokenSecret("default-token-oh43e")), }, }, "new serviceaccount with missing secrets": { @@ -231,14 +304,6 @@ func TestTokenCreation(t *testing.T) { core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, serviceAccount(addTokenSecretReference(missingSecretReferences()))), }, }, - "new serviceaccount with missing secrets with unsynced secret store": { - ClientObjects: []runtime.Object{serviceAccount(missingSecretReferences()), createdTokenSecret()}, - - SecretsSyncPending: true, - - AddedServiceAccount: serviceAccount(missingSecretReferences()), - ExpectedActions: []core.Action{}, - }, "new serviceaccount with non-token secrets": { ClientObjects: []runtime.Object{serviceAccount(regularSecretReferences()), createdTokenSecret(), opaqueSecret()}, @@ -275,18 +340,6 @@ func TestTokenCreation(t *testing.T) { core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), }, }, - "updated serviceaccount with no secrets with unsynced secret store": { - ClientObjects: []runtime.Object{serviceAccount(emptySecretReferences()), createdTokenSecret()}, - - SecretsSyncPending: true, - - UpdatedServiceAccount: serviceAccount(emptySecretReferences()), - ExpectedActions: []core.Action{ - core.NewGetAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, "default"), - core.NewCreateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, createdTokenSecret()), - core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, serviceAccount(addTokenSecretReference(emptySecretReferences()))), - }, - }, "updated serviceaccount with missing secrets": { ClientObjects: []runtime.Object{serviceAccount(missingSecretReferences()), createdTokenSecret()}, @@ -297,14 +350,6 @@ func TestTokenCreation(t *testing.T) { core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, serviceAccount(addTokenSecretReference(missingSecretReferences()))), }, }, - "updated serviceaccount with missing secrets with unsynced secret store": { - ClientObjects: []runtime.Object{serviceAccount(missingSecretReferences()), createdTokenSecret()}, - - SecretsSyncPending: true, - - UpdatedServiceAccount: serviceAccount(missingSecretReferences()), - ExpectedActions: []core.Action{}, - }, "updated serviceaccount with non-token secrets": { ClientObjects: []runtime.Object{serviceAccount(regularSecretReferences()), createdTokenSecret(), opaqueSecret()}, @@ -375,6 +420,7 @@ func TestTokenCreation(t *testing.T) { AddedSecret: serviceAccountTokenSecretWithoutTokenData(), ExpectedActions: []core.Action{ + core.NewGetAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, "token-secret-1"), core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, serviceAccountTokenSecret()), }, }, @@ -384,6 +430,7 @@ func TestTokenCreation(t *testing.T) { AddedSecret: serviceAccountTokenSecretWithoutCAData(), ExpectedActions: []core.Action{ + core.NewGetAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, "token-secret-1"), core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, serviceAccountTokenSecret()), }, }, @@ -393,6 +440,7 @@ func TestTokenCreation(t *testing.T) { AddedSecret: serviceAccountTokenSecretWithCAData([]byte("mismatched")), ExpectedActions: []core.Action{ + core.NewGetAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, "token-secret-1"), core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, serviceAccountTokenSecret()), }, }, @@ -402,6 +450,7 @@ func TestTokenCreation(t *testing.T) { AddedSecret: serviceAccountTokenSecretWithoutNamespaceData(), ExpectedActions: []core.Action{ + core.NewGetAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, "token-secret-1"), core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, serviceAccountTokenSecret()), }, }, @@ -436,6 +485,7 @@ func TestTokenCreation(t *testing.T) { UpdatedSecret: serviceAccountTokenSecretWithoutTokenData(), ExpectedActions: []core.Action{ + core.NewGetAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, "token-secret-1"), core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, serviceAccountTokenSecret()), }, }, @@ -445,6 +495,7 @@ func TestTokenCreation(t *testing.T) { UpdatedSecret: serviceAccountTokenSecretWithoutCAData(), ExpectedActions: []core.Action{ + core.NewGetAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, "token-secret-1"), core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, serviceAccountTokenSecret()), }, }, @@ -454,6 +505,7 @@ func TestTokenCreation(t *testing.T) { UpdatedSecret: serviceAccountTokenSecretWithCAData([]byte("mismatched")), ExpectedActions: []core.Action{ + core.NewGetAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, "token-secret-1"), core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, serviceAccountTokenSecret()), }, }, @@ -463,6 +515,7 @@ func TestTokenCreation(t *testing.T) { UpdatedSecret: serviceAccountTokenSecretWithoutNamespaceData(), ExpectedActions: []core.Action{ + core.NewGetAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, "token-secret-1"), core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "secrets"}, api.NamespaceDefault, serviceAccountTokenSecret()), }, }, @@ -501,6 +554,7 @@ func TestTokenCreation(t *testing.T) { } for k, tc := range testcases { + glog.Infof(k) // Re-seed to reset name generation utilrand.Seed(1) @@ -508,12 +562,11 @@ func TestTokenCreation(t *testing.T) { generator := &testGenerator{Token: "ABC"} client := fake.NewSimpleClientset(tc.ClientObjects...) + for _, reactor := range tc.Reactors { + client.Fake.PrependReactor(reactor.verb, reactor.resource, reactor.reactor(t)) + } - controller := NewTokensController(client, TokensControllerOptions{TokenGenerator: generator, RootCA: []byte("CA Data")}) - - // Tell the token controller whether its stores have been synced - controller.serviceAccountsSynced = func() bool { return !tc.ServiceAccountsSyncPending } - controller.secretsSynced = func() bool { return !tc.SecretsSyncPending } + controller := NewTokensController(client, TokensControllerOptions{TokenGenerator: generator, RootCA: []byte("CA Data"), MaxRetries: tc.MaxRetries}) if tc.ExistingServiceAccount != nil { controller.serviceAccounts.Add(tc.ExistingServiceAccount) @@ -523,22 +576,72 @@ func TestTokenCreation(t *testing.T) { } if tc.AddedServiceAccount != nil { - controller.serviceAccountAdded(tc.AddedServiceAccount) + controller.serviceAccounts.Add(tc.AddedServiceAccount) + controller.queueServiceAccountSync(tc.AddedServiceAccount) } if tc.UpdatedServiceAccount != nil { - controller.serviceAccountUpdated(nil, tc.UpdatedServiceAccount) + controller.serviceAccounts.Add(tc.UpdatedServiceAccount) + controller.queueServiceAccountUpdateSync(nil, tc.UpdatedServiceAccount) } if tc.DeletedServiceAccount != nil { - controller.serviceAccountDeleted(tc.DeletedServiceAccount) + controller.serviceAccounts.Delete(tc.DeletedServiceAccount) + controller.queueServiceAccountSync(tc.DeletedServiceAccount) } if tc.AddedSecret != nil { - controller.secretAdded(tc.AddedSecret) + controller.secrets.Add(tc.AddedSecret) + controller.queueSecretSync(tc.AddedSecret) } if tc.UpdatedSecret != nil { - controller.secretUpdated(nil, tc.UpdatedSecret) + controller.secrets.Add(tc.UpdatedSecret) + controller.queueSecretUpdateSync(nil, tc.UpdatedSecret) } if tc.DeletedSecret != nil { - controller.secretDeleted(tc.DeletedSecret) + controller.secrets.Delete(tc.DeletedSecret) + controller.queueSecretSync(tc.DeletedSecret) + } + + // This is the longest we'll wait for async tests + timeout := time.Now().Add(30 * time.Second) + waitedForAdditionalActions := false + + for { + if controller.syncServiceAccountQueue.Len() > 0 { + controller.syncServiceAccount() + } + if controller.syncSecretQueue.Len() > 0 { + controller.syncSecret() + } + + // The queues still have things to work on + if controller.syncServiceAccountQueue.Len() > 0 || controller.syncSecretQueue.Len() > 0 { + continue + } + + // If we expect this test to work asynchronously... + if tc.IsAsync { + // if we're still missing expected actions within our test timeout + if len(client.Actions()) < len(tc.ExpectedActions) && time.Now().Before(timeout) { + // wait for the expected actions (without hotlooping) + time.Sleep(time.Millisecond) + continue + } + + // if we exactly match our expected actions, wait a bit to make sure no other additional actions show up + if len(client.Actions()) == len(tc.ExpectedActions) && !waitedForAdditionalActions { + time.Sleep(time.Second) + waitedForAdditionalActions = true + continue + } + } + + break + } + + if controller.syncServiceAccountQueue.Len() > 0 { + t.Errorf("%s: unexpected items in service account queue: %d", k, controller.syncServiceAccountQueue.Len()) + } + if controller.syncSecretQueue.Len() > 0 { + t.Errorf("%s: unexpected items in secret queue: %d", k, controller.syncSecretQueue.Len()) } actions := client.Actions() @@ -556,7 +659,10 @@ func TestTokenCreation(t *testing.T) { } if len(tc.ExpectedActions) > len(actions) { - t.Errorf("%s: %d additional expected actions:%+v", k, len(tc.ExpectedActions)-len(actions), tc.ExpectedActions[len(actions):]) + t.Errorf("%s: %d additional expected actions", k, len(tc.ExpectedActions)-len(actions)) + for _, a := range tc.ExpectedActions[len(actions):] { + t.Logf(" %+v", a) + } } } } diff --git a/test/integration/service_account_test.go b/test/integration/service_account_test.go index 63d2712590..e05c315e0e 100644 --- a/test/integration/service_account_test.go +++ b/test/integration/service_account_test.go @@ -415,15 +415,16 @@ func startServiceAccountTestServer(t *testing.T) (*clientset.Clientset, restclie } // Start the service account and service account token controllers + stopCh := make(chan struct{}) tokenController := serviceaccountcontroller.NewTokensController(rootClientset, serviceaccountcontroller.TokensControllerOptions{TokenGenerator: serviceaccount.JWTTokenGenerator(serviceAccountKey)}) - tokenController.Run() + go tokenController.Run(1, stopCh) serviceAccountController := serviceaccountcontroller.NewServiceAccountsController(rootClientset, serviceaccountcontroller.DefaultServiceAccountsControllerOptions()) serviceAccountController.Run() // Start the admission plugin reflectors serviceAccountAdmission.Run() stop := func() { - tokenController.Stop() + close(stopCh) serviceAccountController.Stop() serviceAccountAdmission.Stop() apiServer.Close() From ec3f0e9f079b056db47357f826db4cc0b436cf55 Mon Sep 17 00:00:00 2001 From: Minhan Xia <mixia@google.com> Date: Wed, 22 Jun 2016 16:40:23 -0700 Subject: [PATCH 217/339] fork sh2ju to accommendate existing testing tools --- third_party/forked/shell2junit/sh2ju.sh | 44 +++++++++++++++---------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/third_party/forked/shell2junit/sh2ju.sh b/third_party/forked/shell2junit/sh2ju.sh index 097d13bf93..866ea504e5 100755 --- a/third_party/forked/shell2junit/sh2ju.sh +++ b/third_party/forked/shell2junit/sh2ju.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash ### Copyright 2010 Manuel Carrasco Moñino. (manolo at apache.org) ### ### Licensed under the Apache License, Version 2.0. @@ -18,6 +18,7 @@ ### -name="TestName" : the test name which will be shown in the junit report ### -error="RegExp" : a regexp which sets the test as failure when the output matches it ### -ierror="RegExp" : same as -error but case insensitive +### -output="Path" : path to output directory, defaults to "./results" ### - Junit reports are left in the folder 'result' under the directory where the script is executed. ### - Configure Jenkins to parse junit files from the generated folder ### @@ -25,29 +26,28 @@ asserts=00; errors=0; total=0; content="" date=`which gdate 2>/dev/null || which date` -# create output folder +# default output folder juDIR=`pwd`/results -mkdir -p "$juDIR" || exit # The name of the suite is calculated based in your script name suite="" # A wrapper for the eval method witch allows catching seg-faults and use tee errfile=/tmp/evErr.$$.log -eVal() { - eval "$1" +function eVal() { + (eval "$1") # stdout and stderr may currently be inverted (see below) so echo may write to stderr echo $? 2>&1 | tr -d "\n" > $errfile } # Method to clean old tests -juLogClean() { +function juLogClean() { echo "+++ Removing old junit reports from: $juDIR " rm -f "$juDIR"/TEST-* } # Execute a command and record its results -juLog() { +function juLog() { suite=""; errfile=/tmp/evErr.$$.log date=`which gdate || which date` @@ -61,10 +61,13 @@ juLog() { -class=*) class=`echo "$1" | sed -e 's/-class=//'`; shift;; -ierror=*) ereg=`echo "$1" | sed -e 's/-ierror=//'`; icase="-i"; shift;; -error=*) ereg=`echo "$1" | sed -e 's/-error=//'`; shift;; + -output=*) juDIR=`echo "$1" | sed -e 's/-output=//'`; shift;; *) ya=1;; esac done + # create output directory + mkdir -p "$juDIR" || exit # use first arg as name if it was not given if [ -z "$name" ]; then name="$asserts-$1" @@ -75,9 +78,6 @@ juLog() { class="default" fi - echo "name is: $name" - echo "class is: $class" - suite=$class # calculate command to eval @@ -100,7 +100,7 @@ juLog() { ini=`$date +%s.%N` # execute the command, temporarily swapping stderr and stdout so they can be tee'd to separate files, # then swapping them back again so that the streams are written correctly for the invoking process - ((eVal "$cmd" | tee -a $outf) 3>&1 1>&2 2>&3 | tee $errf) 3>&1 1>&2 2>&3 + ( (eVal "$cmd" | tee -a $outf) 3>&1 1>&2 2>&3 | tee $errf) 3>&1 1>&2 2>&3 evErr=`cat $errfile` rm -f $errfile end=`$date +%s.%N` @@ -119,19 +119,23 @@ juLog() { errMsg=`cat $errf` rm -f $errf # calculate vars - asserts=`expr $asserts + 1` - errors=`expr $errors + $err` + asserts=$(($asserts+1)) + errors=$(($errors+$err)) time=`echo "$end - $ini" | bc -l` total=`echo "$total + $time" | bc -l` # write the junit xml report ## failure tag [ $err = 0 ] && failure="" || failure=" - <failure type=\"ScriptError\" message=\"Script Error\"><![CDATA[$errMsg]]></failure> + <failure type=\"ScriptError\" message=\"Script Error\"> + <![CDATA[ + $errMsg + ]]> + </failure> " ## testcase tag content="$content - <testcase assertions=\"1\" name=\"$name\" time=\"$time\"> + <testcase assertions=\"1\" name=\"$name\" time=\"$time\" classname=\"$class\"> $failure <system-out> <![CDATA[ @@ -148,6 +152,11 @@ $errMsg ## testsuite block if [[ -e "$juDIR/TEST-$suite.xml" ]]; then + # file exists. first update the failures count + failCount=`sed -n "s/.*testsuite.*failures=\"\([0-9]*\)\".*/\1/p" "$juDIR/TEST-$suite.xml"` + errors=$(($failCount+$errors)) + sed -i "0,/failures=\"$failCount\"/ s/failures=\"$failCount\"/failures=\"$errors\"/" "$juDIR/TEST-$suite.xml" + sed -i "0,/errors=\"$failCount\"/ s/errors=\"$failCount\"/errors=\"$errors\"/" "$juDIR/TEST-$suite.xml" # file exists. Need to append to it. If we remove the testsuite end tag, we can just add it in after. sed -i "s^</testsuite>^^g" $juDIR/TEST-$suite.xml ## remove testSuite so we can add it later @@ -159,11 +168,10 @@ EOF else # no file exists. Adding a new file cat <<EOF > "$juDIR/TEST-$suite.xml" - <testsuite failures="0" assertions="$assertions" name="$suite" tests="1" errors="$errors" time="$total"> + <testsuite failures="$errors" assertions="$assertions" name="$suite" tests="1" errors="$errors" time="$total"> $content </testsuite> EOF fi -} - +} \ No newline at end of file From 880432ca717262032b232a807b897906a5abaf8d Mon Sep 17 00:00:00 2001 From: Xiang Li <xiangli.cs@gmail.com> Date: Mon, 6 Jun 2016 00:07:28 -0700 Subject: [PATCH 218/339] daemon/controller.go: minor code cleanup --- pkg/controller/daemon/controller.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/controller/daemon/controller.go b/pkg/controller/daemon/controller.go index 2726beb2d9..44ce50f3e5 100644 --- a/pkg/controller/daemon/controller.go +++ b/pkg/controller/daemon/controller.go @@ -17,14 +17,14 @@ limitations under the License. package daemon import ( + "fmt" "reflect" "sort" "sync" "time" - "fmt" - "github.com/golang/glog" + "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/validation" @@ -298,7 +298,7 @@ func (dsc *DaemonSetsController) getPodDaemonSet(pod *api.Pod) *extensions.Daemo glog.Errorf("lookup cache does not retuen a ReplicationController object") return nil } - if cached && dsc.isCacheValid(pod, ds) { + if dsc.isCacheValid(pod, ds) { return ds } } @@ -497,17 +497,18 @@ func (dsc *DaemonSetsController) manage(ds *extensions.DaemonSet) { daemonPods, isRunning := nodeToDaemonPods[node.Name] - if shouldRun && !isRunning { + switch { + case shouldRun && !isRunning: // If daemon pod is supposed to be running on node, but isn't, create daemon pod. nodesNeedingDaemonPods = append(nodesNeedingDaemonPods, node.Name) - } else if shouldRun && len(daemonPods) > 1 { + case shouldRun && len(daemonPods) > 1: // If daemon pod is supposed to be running on node, but more than 1 daemon pod is running, delete the excess daemon pods. // Sort the daemon pods by creation time, so the the oldest is preserved. sort.Sort(podByCreationTimestamp(daemonPods)) for i := 1; i < len(daemonPods); i++ { podsToDelete = append(podsToDelete, daemonPods[i].Name) } - } else if !shouldRun && isRunning { + case !shouldRun && isRunning: // If daemon pod isn't supposed to run on node, but it is, delete all daemon pods on node. for i := range daemonPods { podsToDelete = append(podsToDelete, daemonPods[i].Name) From 444ce193538a58f76750c9d02d8b6ba5630e7832 Mon Sep 17 00:00:00 2001 From: David McMahon <djmm@google.com> Date: Mon, 27 Jun 2016 11:20:14 -0700 Subject: [PATCH 219/339] Update CHANGELOG.md for v1.2.5. --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6252ea605..206cc157bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ <!-- BEGIN MUNGE: GENERATED_TOC --> +- [v1.2.5](#v125) + - [Downloads](#downloads) + - [Changes since v1.2.4](#changes-since-v124) + - [Other notable changes](#other-notable-changes) - [v1.3.0-beta.2](#v130-beta2) - [Downloads](#downloads) - [Changes since v1.3.0-beta.1](#changes-since-v130-beta1) @@ -71,6 +75,32 @@ <!-- NEW RELEASE NOTES ENTRY --> +# v1.2.5 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.2/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.2.5/kubernetes.tar.gz) | `ddf12d7f37dfef25308798d71ad547761d0785ac` | `69d770df8fa4eceb57167e34df3962ca` + +## Changes since v1.2.4 + +### Other notable changes + +* Retry Pod/RC updates in kubectl rolling-update ([#27509](https://github.com/kubernetes/kubernetes/pull/27509), [@janetkuo](https://github.com/janetkuo)) +* GCE provider: Create TargetPool with 200 instances, then update with rest ([#27865](https://github.com/kubernetes/kubernetes/pull/27865), [@zmerlynn](https://github.com/zmerlynn)) +* GCE provider: Limit Filter calls to regexps rather than large blobs ([#27741](https://github.com/kubernetes/kubernetes/pull/27741), [@zmerlynn](https://github.com/zmerlynn)) +* Fix strategic merge diff list diff bug ([#26418](https://github.com/kubernetes/kubernetes/pull/26418), [@AdoHe](https://github.com/AdoHe)) +* AWS: Fix long-standing bug in stringSetToPointers ([#26331](https://github.com/kubernetes/kubernetes/pull/26331), [@therc](https://github.com/therc)) +* AWS kube-up: Increase timeout waiting for docker start ([#25405](https://github.com/kubernetes/kubernetes/pull/25405), [@justinsb](https://github.com/justinsb)) +* Fix hyperkube flag parsing ([#25512](https://github.com/kubernetes/kubernetes/pull/25512), [@colhom](https://github.com/colhom)) +* kubectl rolling-update support for same image ([#24645](https://github.com/kubernetes/kubernetes/pull/24645), [@jlowdermilk](https://github.com/jlowdermilk)) +* Return "410 Gone" errors via watch stream when using watch cache ([#25369](https://github.com/kubernetes/kubernetes/pull/25369), [@liggitt](https://github.com/liggitt)) + + + # v1.3.0-beta.2 [Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) From a04e6f8635522514119e5c3e527f97937efa9ed4 Mon Sep 17 00:00:00 2001 From: derekwaynecarr <decarr@redhat.com> Date: Wed, 22 Jun 2016 17:20:42 -0400 Subject: [PATCH 220/339] Add additional testing scenarios for compute resource requests=0 --- pkg/api/v1/defaults_test.go | 17 +++++++++++------ pkg/kubelet/qos/qos_test.go | 6 ++++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/pkg/api/v1/defaults_test.go b/pkg/api/v1/defaults_test.go index b1a78e758e..b21b5a4025 100644 --- a/pkg/api/v1/defaults_test.go +++ b/pkg/api/v1/defaults_test.go @@ -509,13 +509,17 @@ func TestSetDefaultObjectFieldSelectorAPIVersion(t *testing.T) { } func TestSetDefaultRequestsPod(t *testing.T) { - // verify we default if limits are specified + // verify we default if limits are specified (and that request=0 is preserved) s := versioned.PodSpec{} s.Containers = []versioned.Container{ { Resources: versioned.ResourceRequirements{ + Requests: versioned.ResourceList{ + versioned.ResourceMemory: resource.MustParse("0"), + }, Limits: versioned.ResourceList{ - versioned.ResourceCPU: resource.MustParse("100m"), + versioned.ResourceCPU: resource.MustParse("100m"), + versioned.ResourceMemory: resource.MustParse("1Gi"), }, }, }, @@ -526,10 +530,12 @@ func TestSetDefaultRequestsPod(t *testing.T) { output := roundTrip(t, runtime.Object(pod)) pod2 := output.(*versioned.Pod) defaultRequest := pod2.Spec.Containers[0].Resources.Requests - requestValue := defaultRequest[versioned.ResourceCPU] - if requestValue.String() != "100m" { + if requestValue := defaultRequest[versioned.ResourceCPU]; requestValue.String() != "100m" { t.Errorf("Expected request cpu: %s, got: %s", "100m", requestValue.String()) } + if requestValue := defaultRequest[versioned.ResourceMemory]; requestValue.String() != "0" { + t.Errorf("Expected request memory: %s, got: %s", "0", requestValue.String()) + } // verify we do nothing if no limits are specified s = versioned.PodSpec{} @@ -540,8 +546,7 @@ func TestSetDefaultRequestsPod(t *testing.T) { output = roundTrip(t, runtime.Object(pod)) pod2 = output.(*versioned.Pod) defaultRequest = pod2.Spec.Containers[0].Resources.Requests - requestValue = defaultRequest[versioned.ResourceCPU] - if requestValue.String() != "0" { + if requestValue := defaultRequest[versioned.ResourceCPU]; requestValue.String() != "0" { t.Errorf("Expected 0 request value, got: %s", requestValue.String()) } } diff --git a/pkg/kubelet/qos/qos_test.go b/pkg/kubelet/qos/qos_test.go index 8beaa87855..4275dc639d 100644 --- a/pkg/kubelet/qos/qos_test.go +++ b/pkg/kubelet/qos/qos_test.go @@ -123,6 +123,12 @@ func TestGetPodQos(t *testing.T) { }), expected: Burstable, }, + { + pod: newPod("burstable", []api.Container{ + newContainer("burstable", getResourceList("0", "0"), getResourceList("100m", "200Mi")), + }), + expected: Burstable, + }, } for _, testCase := range testCases { if actual := GetPodQos(testCase.pod); testCase.expected != actual { From 49436012ba87b400b8e4aa56f5af5cdec33eec0e Mon Sep 17 00:00:00 2001 From: dkalleg <daniel.allegood@hpe.com> Date: Wed, 15 Jun 2016 14:29:33 -0700 Subject: [PATCH 221/339] vSphere provider - Adding config for working dir This allows the user the set "working-dir" in their vsphere.cfg file. The value should be a path in the vSphere datastore in which the provider will look for vms. --- pkg/cloudprovider/providers/vsphere/vsphere.go | 17 ++++++++++++++--- .../providers/vsphere/vsphere_test.go | 1 + 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pkg/cloudprovider/providers/vsphere/vsphere.go b/pkg/cloudprovider/providers/vsphere/vsphere.go index 654dd48093..8561ed3693 100644 --- a/pkg/cloudprovider/providers/vsphere/vsphere.go +++ b/pkg/cloudprovider/providers/vsphere/vsphere.go @@ -22,6 +22,7 @@ import ( "io" "net" "net/url" + "path" "strings" "github.com/vmware/govmomi" @@ -71,6 +72,7 @@ type VSphereConfig struct { InsecureFlag bool `gcfg:"insecure-flag"` Datacenter string `gcfg:"datacenter"` Datastore string `gcfg:"datastore"` + WorkingDir string `gcfg:"working-dir"` } Network struct { @@ -171,6 +173,9 @@ func newVSphere(cfg VSphereConfig) (*VSphere, error) { glog.Errorf("%v is not a supported SCSI Controller type. Please configure 'lsilogic-sas' OR 'pvscsi'", cfg.Disk.SCSIControllerType) return nil, errors.New("Controller type not supported. Please configure 'lsilogic-sas' OR 'pvscsi'") } + if cfg.Global.WorkingDir != "" { + cfg.Global.WorkingDir = path.Clean(cfg.Global.WorkingDir) + "/" + } vs := VSphere{ cfg: &cfg, localInstanceID: id, @@ -217,9 +222,11 @@ func getVirtualMachineByName(cfg *VSphereConfig, ctx context.Context, c *govmomi } f.SetDatacenter(dc) + vmRegex := cfg.Global.WorkingDir + name + // Retrieve vm by name //TODO: also look for vm inside subfolders - vm, err := f.VirtualMachine(ctx, name) + vm, err := f.VirtualMachine(ctx, vmRegex) if err != nil { return nil, err } @@ -247,8 +254,10 @@ func getInstances(cfg *VSphereConfig, ctx context.Context, c *govmomi.Client, fi f.SetDatacenter(dc) + vmRegex := cfg.Global.WorkingDir + filter + //TODO: get all vms inside subfolders - vms, err := f.VirtualMachineList(ctx, filter) + vms, err := f.VirtualMachineList(ctx, vmRegex) if err != nil { return nil, err } @@ -492,7 +501,9 @@ func getVirtualMachineDevices(cfg *VSphereConfig, ctx context.Context, c *govmom return nil, nil, nil, err } - vm, err := f.VirtualMachine(ctx, name) + vmRegex := cfg.Global.WorkingDir + name + + vm, err := f.VirtualMachine(ctx, vmRegex) if err != nil { return nil, nil, nil, err } diff --git a/pkg/cloudprovider/providers/vsphere/vsphere_test.go b/pkg/cloudprovider/providers/vsphere/vsphere_test.go index 29fccd0a35..26edbd3ce5 100644 --- a/pkg/cloudprovider/providers/vsphere/vsphere_test.go +++ b/pkg/cloudprovider/providers/vsphere/vsphere_test.go @@ -38,6 +38,7 @@ func configFromEnv() (cfg VSphereConfig, ok bool) { cfg.Network.PublicNetwork = os.Getenv("VSPHERE_PUBLIC_NETWORK") cfg.Global.Datastore = os.Getenv("VSPHERE_DATASTORE") cfg.Disk.SCSIControllerType = os.Getenv("VSPHERE_SCSICONTROLLER_TYPE") + cfg.Global.WorkingDir = os.Getenv("VSPHERE_WORKING_DIR") if os.Getenv("VSPHERE_INSECURE") != "" { InsecureFlag, err = strconv.ParseBool(os.Getenv("VSPHERE_INSECURE")) } else { From 3118c937be5cfd290f243dd7217b4d236cd56b2d Mon Sep 17 00:00:00 2001 From: Matthew Wong <mawong@redhat.com> Date: Mon, 27 Jun 2016 16:00:03 -0400 Subject: [PATCH 222/339] Fix pvc label selector validation error --- pkg/api/validation/schema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/validation/schema.go b/pkg/api/validation/schema.go index ea5a86a234..fb1873c789 100644 --- a/pkg/api/validation/schema.go +++ b/pkg/api/validation/schema.go @@ -294,7 +294,7 @@ func (s *SwaggerSchema) isGenericArray(p swagger.ModelProperty) bool { } // This matches type name in the swagger spec, such as "v1.Binding". -var versionRegexp = regexp.MustCompile(`^v.+\..*`) +var versionRegexp = regexp.MustCompile(`^(v.+|unversioned)\..*`) func (s *SwaggerSchema) validateField(value interface{}, fieldName, fieldType string, fieldDetails *swagger.ModelProperty) []error { allErrs := []error{} From 71b79aff73b4566ecb5d851010ecae3d67755509 Mon Sep 17 00:00:00 2001 From: Michael Taufen <mtaufen@google.com> Date: Thu, 16 Jun 2016 18:03:35 -0700 Subject: [PATCH 223/339] Check killCmd is nil in Kill function --- test/e2e_node/e2e_service.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/e2e_node/e2e_service.go b/test/e2e_node/e2e_service.go index 630cbef643..ed698d771a 100644 --- a/test/e2e_node/e2e_service.go +++ b/test/e2e_node/e2e_service.go @@ -314,9 +314,15 @@ type killCmd struct { } func (k *killCmd) Kill() error { + if k == nil { + glog.V(2).Infof("The killCmd is nil, nothing will be killed") + return nil + } + if k.override != nil { return k.override.Run() } + name := k.name cmd := k.cmd From 1040fac4b3c354cdf0e18dffcc7df0d361f5b541 Mon Sep 17 00:00:00 2001 From: Jeff Grafton <jgrafton@google.com> Date: Mon, 20 Jun 2016 17:51:50 -0700 Subject: [PATCH 224/339] Download static docker binary into kubekins test image Also rework apt-get lines to conform to Docker best practices and add dnsutils. Lastly, use kubekins-test:go1.6.2-docker1.9.1-rev1 on Jenkins --- hack/jenkins/dockerized-e2e-runner.sh | 3 +-- hack/jenkins/gotest-dockerized.sh | 3 +-- hack/jenkins/test-image/Dockerfile | 22 +++++++++++++++------- hack/jenkins/test-image/Makefile | 4 +++- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/hack/jenkins/dockerized-e2e-runner.sh b/hack/jenkins/dockerized-e2e-runner.sh index d3e0bb2708..6772a141dd 100755 --- a/hack/jenkins/dockerized-e2e-runner.sh +++ b/hack/jenkins/dockerized-e2e-runner.sh @@ -42,7 +42,6 @@ docker_extra_args=() if [[ "${JENKINS_ENABLE_DOCKER_IN_DOCKER:-}" =~ ^[yY]$ ]]; then docker_extra_args+=(\ -v /var/run/docker.sock:/var/run/docker.sock \ - -v "$(which docker)":/bin/docker:ro \ -v "${REPO_DIR}":/go/src/k8s.io/kubernetes \ -e "REPO_DIR=${REPO_DIR}" \ -e "HOST_ARTIFACTS_DIR=${HOST_ARTIFACTS_DIR}" \ @@ -62,5 +61,5 @@ docker run --rm=true -i \ -e "WORKSPACE=/workspace" \ "${docker_extra_args[@]:+${docker_extra_args[@]}}" \ "${METADATA_SERVER_ADD_HOST_ARGS[@]:+${METADATA_SERVER_ADD_HOST_ARGS[@]}}" \ - gcr.io/google_containers/kubekins-test:0.11 \ + gcr.io/google_containers/kubekins-test:go1.6.2-docker1.9.1-rev1 \ bash -c "bash <(curl -fsS --retry 3 --keepalive-time 2 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/e2e-runner.sh')" diff --git a/hack/jenkins/gotest-dockerized.sh b/hack/jenkins/gotest-dockerized.sh index c49c37cb9b..91b0aed495 100755 --- a/hack/jenkins/gotest-dockerized.sh +++ b/hack/jenkins/gotest-dockerized.sh @@ -37,7 +37,6 @@ mkdir -p "${HOST_ARTIFACTS_DIR}" docker run --rm=true \ -v /var/run/docker.sock:/var/run/docker.sock \ - -v "$(which docker)":/bin/docker \ -v "${REPO_DIR}":/go/src/k8s.io/kubernetes \ -v "${WORKSPACE}/_artifacts":/workspace/artifacts \ -v /etc/localtime:/etc/localtime:ro \ @@ -45,5 +44,5 @@ docker run --rm=true \ -e "KUBE_VERIFY_GIT_BRANCH=${KUBE_VERIFY_GIT_BRANCH:-}" \ -e "REPO_DIR=${REPO_DIR}" \ -e "HOST_ARTIFACTS_DIR=${HOST_ARTIFACTS_DIR}" \ - -i gcr.io/google_containers/kubekins-test:0.11 \ + -i gcr.io/google_containers/kubekins-test:go1.6.2-docker1.9.1-rev1 \ bash -c "cd kubernetes && ${KUBE_TEST_SCRIPT:-./hack/jenkins/test-dockerized.sh}" diff --git a/hack/jenkins/test-image/Dockerfile b/hack/jenkins/test-image/Dockerfile index 48d5d745f6..816f9a998d 100644 --- a/hack/jenkins/test-image/Dockerfile +++ b/hack/jenkins/test-image/Dockerfile @@ -20,18 +20,26 @@ MAINTAINER Jeff Lowdermilk <jeffml@google.com> ENV WORKSPACE /workspace ENV TERM xterm +# Note: 1.11+ changes the format of the tarball, so that line likely will need to be +# changed. +ENV DOCKER_VERSION 1.9.1 WORKDIR /workspace -RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y rsync +# dnsutils is needed by federation cluster scripts. # file is used when uploading test artifacts to GCS. -RUN apt-get install -y file -# libapparmor1 is needed for docker-in-docker. -RUN apt-get install -y libapparmor1 +# jq is used by hack/verify-godep-licenses.sh. # netcat is used by integration test scripts. -RUN apt-get install -y netcat-openbsd -# jq is used by hack/verify-godep-licenses.sh -RUN apt-get install -y jq +RUN apt-get update && apt-get install -y \ + dnsutils \ + file \ + jq \ + netcat-openbsd \ + rsync \ + && rm -rf /var/lib/apt/lists/* + +RUN curl -L "https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz" |\ + tar -C /usr/bin -xvzf- --strip-components=3 usr/local/bin/docker RUN mkdir -p /go/src/k8s.io/kubernetes RUN ln -s /go/src/k8s.io/kubernetes /workspace/kubernetes diff --git a/hack/jenkins/test-image/Makefile b/hack/jenkins/test-image/Makefile index 21a4cac85b..8c7c6c76d3 100644 --- a/hack/jenkins/test-image/Makefile +++ b/hack/jenkins/test-image/Makefile @@ -14,7 +14,9 @@ all: push -TAG = 0.11 +# Tag format: $GO_VERSION-$EMBEDDED_DOCKER_VERSION-$REVISION +# These versions are specified in the Dockerfile +TAG = go1.6.2-docker1.9.1-rev1 container: docker build -t gcr.io/google_containers/kubekins-test . From 361b8c36bb6d7bc28987a92ad4a5fed3fff8c137 Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong <yjhong@google.com> Date: Mon, 27 Jun 2016 14:28:04 -0700 Subject: [PATCH 225/339] Enable the docker debug mode in a e2e test cluster --- cluster/gce/config-test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 5141f56081..3dabbee160 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -65,6 +65,9 @@ TERMINATED_POD_GC_THRESHOLD=${TERMINATED_POD_GC_THRESHOLD:-100} # Extra docker options for nodes. EXTRA_DOCKER_OPTS="${EXTRA_DOCKER_OPTS:-}" +# Enable the docker debug mode. +EXTRA_DOCKER_OPTS="${EXTRA_DOCKER_OPTS} --debug" + SERVICE_CLUSTER_IP_RANGE="10.0.0.0/16" # formerly PORTAL_NET # When set to true, Docker Cache is enabled by default as part of the cluster bring up. From f7f3e0f9e9e22f4e613ed4143f39c90844560b1b Mon Sep 17 00:00:00 2001 From: George Tankersley <george.tankersley@coreos.com> Date: Wed, 13 Apr 2016 13:16:15 -0700 Subject: [PATCH 226/339] apis/certificates: initialize the certificates API group --- pkg/apis/certificates/install/install.go | 131 ++++++++++++++++++ pkg/apis/certificates/install/install_test.go | 114 +++++++++++++++ pkg/apis/certificates/register.go | 57 ++++++++ pkg/apis/certificates/types.go | 84 +++++++++++ pkg/apis/certificates/v1alpha1/conversion.go | 23 +++ .../v1alpha1/conversion_generated.go | 31 +++++ pkg/apis/certificates/v1alpha1/doc.go | 18 +++ pkg/apis/certificates/v1alpha1/register.go | 62 +++++++++ .../certificates/v1alpha1/types.generated.go | 0 pkg/apis/certificates/v1alpha1/types.go | 84 +++++++++++ .../certificates/validation/validation.go | 63 +++++++++ pkg/util/certificates/csr.go | 40 ++++++ 12 files changed, 707 insertions(+) create mode 100644 pkg/apis/certificates/install/install.go create mode 100644 pkg/apis/certificates/install/install_test.go create mode 100644 pkg/apis/certificates/register.go create mode 100644 pkg/apis/certificates/types.go create mode 100644 pkg/apis/certificates/v1alpha1/conversion.go create mode 100644 pkg/apis/certificates/v1alpha1/conversion_generated.go create mode 100644 pkg/apis/certificates/v1alpha1/doc.go create mode 100644 pkg/apis/certificates/v1alpha1/register.go create mode 100644 pkg/apis/certificates/v1alpha1/types.generated.go create mode 100644 pkg/apis/certificates/v1alpha1/types.go create mode 100644 pkg/apis/certificates/validation/validation.go create mode 100644 pkg/util/certificates/csr.go diff --git a/pkg/apis/certificates/install/install.go b/pkg/apis/certificates/install/install.go new file mode 100644 index 0000000000..f77e94902b --- /dev/null +++ b/pkg/apis/certificates/install/install.go @@ -0,0 +1,131 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package install installs the certificates API group, making it available as +// an option to all of the API encoding/decoding machinery. +package install + +import ( + "fmt" + + "github.com/golang/glog" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/meta" + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/apimachinery" + "k8s.io/kubernetes/pkg/apimachinery/registered" + "k8s.io/kubernetes/pkg/apis/certificates" + "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + "k8s.io/kubernetes/pkg/runtime" + "k8s.io/kubernetes/pkg/util/sets" +) + +const importPrefix = "k8s.io/kubernetes/pkg/apis/certificates" + +var accessor = meta.NewAccessor() + +// availableVersions lists all known external versions for this group from most preferred to least preferred +var availableVersions = []unversioned.GroupVersion{v1alpha1.SchemeGroupVersion} + +func init() { + registered.RegisterVersions(availableVersions) + externalVersions := []unversioned.GroupVersion{} + for _, v := range availableVersions { + if registered.IsAllowedVersion(v) { + externalVersions = append(externalVersions, v) + } + } + if len(externalVersions) == 0 { + glog.V(4).Infof("No version is registered for group %v", certificates.GroupName) + return + } + + if err := registered.EnableVersions(externalVersions...); err != nil { + glog.V(4).Infof("%v", err) + return + } + if err := enableVersions(externalVersions); err != nil { + glog.V(4).Infof("%v", err) + return + } +} + +// TODO: enableVersions should be centralized rather than spread in each API +// group. +// We can combine registered.RegisterVersions, registered.EnableVersions and +// registered.RegisterGroup once we have moved enableVersions therecertificates +func enableVersions(externalVersions []unversioned.GroupVersion) error { + addVersionsToScheme(externalVersions...) + preferredExternalVersion := externalVersions[0] + + groupMeta := apimachinery.GroupMeta{ + GroupVersion: preferredExternalVersion, + GroupVersions: externalVersions, + RESTMapper: newRESTMapper(externalVersions), + SelfLinker: runtime.SelfLinker(accessor), + InterfacesFor: interfacesFor, + } + + if err := registered.RegisterGroup(groupMeta); err != nil { + return err + } + api.RegisterRESTMapper(groupMeta.RESTMapper) + return nil +} + +func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper { + // the list of kinds that are scoped at the root of the api hierarchy + // if a kind is not enumerated here, it is assumed to have a namespace scope + rootScoped := sets.NewString( + "CertificateSigningRequest", + ) + + ignoredKinds := sets.NewString() + + return api.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped) +} + +// interfacesFor returns the default Codec and ResourceVersioner for a given version +// string, or an error if the version is not known. +func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) { + switch version { + case v1alpha1.SchemeGroupVersion: + return &meta.VersionInterfaces{ + ObjectConvertor: api.Scheme, + MetadataAccessor: accessor, + }, nil + default: + g, _ := registered.Group(certificates.GroupName) + return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions) + } +} + +func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { + // add the internal version to Scheme + certificates.AddToScheme(api.Scheme) + // add the enabled external versions to Scheme + for _, v := range externalVersions { + if !registered.IsEnabledVersion(v) { + glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v) + continue + } + switch v { + case v1alpha1.SchemeGroupVersion: + v1alpha1.AddToScheme(api.Scheme) + } + } +} diff --git a/pkg/apis/certificates/install/install_test.go b/pkg/apis/certificates/install/install_test.go new file mode 100644 index 0000000000..894d7e196d --- /dev/null +++ b/pkg/apis/certificates/install/install_test.go @@ -0,0 +1,114 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package install + +import ( + "encoding/json" + "testing" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/apimachinery/registered" + "k8s.io/kubernetes/pkg/apis/certificates" + "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" + "k8s.io/kubernetes/pkg/runtime" +) + +func TestResourceVersioner(t *testing.T) { + csr := certificates.CertificateSigningRequest{ObjectMeta: api.ObjectMeta{ResourceVersion: "10"}} + version, err := accessor.ResourceVersion(&csr) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if version != "10" { + t.Errorf("unexpected version %v", version) + } + + csrList := certificates.CertificateSigningRequestList{ListMeta: unversioned.ListMeta{ResourceVersion: "10"}} + version, err = accessor.ResourceVersion(&csrList) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if version != "10" { + t.Errorf("unexpected version %v", version) + } +} + +func TestCodec(t *testing.T) { + csr := certificates.CertificateSigningRequest{} + // We do want to use package registered rather than testapi here, because we + // want to test if the package install and package registered work as expected. + data, err := runtime.Encode(api.Codecs.LegacyCodec(registered.GroupOrDie(certificates.GroupName).GroupVersion), &csr) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + other := certificates.CertificateSigningRequest{} + if err := json.Unmarshal(data, &other); err != nil { + t.Fatalf("unexpected error: %v", err) + } + if other.APIVersion != registered.GroupOrDie(certificates.GroupName).GroupVersion.String() || other.Kind != "CertificateSigningRequest" { + t.Errorf("unexpected unmarshalled object %#v", other) + } +} + +func TestInterfacesFor(t *testing.T) { + if _, err := registered.GroupOrDie(certificates.GroupName).InterfacesFor(certificates.SchemeGroupVersion); err == nil { + t.Fatalf("unexpected non-error: %v", err) + } + for i, version := range registered.GroupOrDie(certificates.GroupName).GroupVersions { + if vi, err := registered.GroupOrDie(certificates.GroupName).InterfacesFor(version); err != nil || vi == nil { + t.Fatalf("%d: unexpected result: %v", i, err) + } + } +} + +func TestRESTMapper(t *testing.T) { + gv := v1alpha1.SchemeGroupVersion + csrGVK := gv.WithKind("CertificateSigningRequest") + + if gvk, err := registered.GroupOrDie(certificates.GroupName).RESTMapper.KindFor(gv.WithResource("certificatesigningrequests")); err != nil || gvk != csrGVK { + t.Errorf("unexpected version mapping: %v %v", gvk, err) + } + + for _, version := range registered.GroupOrDie(certificates.GroupName).GroupVersions { + mapping, err := registered.GroupOrDie(certificates.GroupName).RESTMapper.RESTMapping(csrGVK.GroupKind(), version.Version) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + if mapping.Resource != "certificatesigningrequests" { + t.Errorf("incorrect resource name: %#v", mapping) + } + if mapping.GroupVersionKind.GroupVersion() != version { + t.Errorf("incorrect groupVersion: %v", mapping) + } + + interfaces, _ := registered.GroupOrDie(certificates.GroupName).InterfacesFor(version) + if mapping.ObjectConvertor != interfaces.ObjectConvertor { + t.Errorf("unexpected: %#v, expected: %#v", mapping, interfaces) + } + + csr := &certificates.CertificateSigningRequest{ObjectMeta: api.ObjectMeta{Name: "foo"}} + name, err := mapping.MetadataAccessor.Name(csr) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if name != "foo" { + t.Errorf("unable to retrieve object meta with: %v", mapping.MetadataAccessor) + } + } +} diff --git a/pkg/apis/certificates/register.go b/pkg/apis/certificates/register.go new file mode 100644 index 0000000000..02b095d098 --- /dev/null +++ b/pkg/apis/certificates/register.go @@ -0,0 +1,57 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package certificates + +import ( + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/runtime" +) + +// GroupName is the group name use in this package +const GroupName = "certificates" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind +func Kind(kind string) unversioned.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource +func Resource(resource string) unversioned.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +func AddToScheme(scheme *runtime.Scheme) { + // Add the API to Scheme. + addKnownTypes(scheme) +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) { + scheme.AddKnownTypes(SchemeGroupVersion, + &CertificateSigningRequest{}, + &CertificateSigningRequestList{}, + &api.ListOptions{}, + &api.DeleteOptions{}, + ) +} + +func (obj *CertificateSigningRequest) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *CertificateSigningRequestList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/apis/certificates/types.go b/pkg/apis/certificates/types.go new file mode 100644 index 0000000000..0848d95e8e --- /dev/null +++ b/pkg/apis/certificates/types.go @@ -0,0 +1,84 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package certificates + +import ( + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/unversioned" +) + +// +genclient=true,nonNamespaced=true + +// Describes a certificate signing request +type CertificateSigningRequest struct { + unversioned.TypeMeta `json:",inline"` + api.ObjectMeta `json:"metadata,omitempty"` + + // The certificate request itself and any additonal information. + Spec CertificateSigningRequestSpec `json:"spec,omitempty"` + + // Derived information about the request. + Status CertificateSigningRequestStatus `json:"status,omitempty"` +} + +// This information is immutable after the request is created. Only the Request +// and ExtraInfo fields can be set on creation, other fields are derived by +// Kubernetes and cannot be modified by users. +type CertificateSigningRequestSpec struct { + // Base64-encoded PKCS#10 CSR data + Request []byte `json:"request"` + + // Information about the requesting user (if relevant) + // See user.Info interface for details + Username string `json:"username,omitempty"` + UID string `json:"uid,omitempty"` + Groups []string `json:"groups,omitempty"` +} + +type CertificateSigningRequestStatus struct { + // Conditions applied to the request, such as approval or denial. + Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty"` + + // If request was approved, the controller will place the issued certificate here. + Certificate []byte `json:"certificate,omitempty"` +} + +type RequestConditionType string + +// These are the possible conditions for a certificate request. +const ( + CertificateApproved RequestConditionType = "Approved" + CertificateDenied RequestConditionType = "Denied" +) + +type CertificateSigningRequestCondition struct { + // request approval state, currently Approved or Denied. + Type RequestConditionType `json:"type"` + // brief reason for the request state + Reason string `json:"reason,omitempty"` + // human readable message with details about the request state + Message string `json:"message,omitempty"` + // timestamp for the last update to this condition + LastUpdateTime unversioned.Time `json:"lastUpdateTime,omitempty"` +} + +type CertificateSigningRequestList struct { + unversioned.TypeMeta `json:",inline"` + unversioned.ListMeta `json:"metadata,omitempty"` + + Items []CertificateSigningRequest `json:"items,omitempty"` +} diff --git a/pkg/apis/certificates/v1alpha1/conversion.go b/pkg/apis/certificates/v1alpha1/conversion.go new file mode 100644 index 0000000000..7570a9fbd1 --- /dev/null +++ b/pkg/apis/certificates/v1alpha1/conversion.go @@ -0,0 +1,23 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import "k8s.io/kubernetes/pkg/runtime" + +func addConversionFuncs(scheme *runtime.Scheme) { + // Add non-generated conversion functions here. Currently there are none. +} diff --git a/pkg/apis/certificates/v1alpha1/conversion_generated.go b/pkg/apis/certificates/v1alpha1/conversion_generated.go new file mode 100644 index 0000000000..0ec255e2a3 --- /dev/null +++ b/pkg/apis/certificates/v1alpha1/conversion_generated.go @@ -0,0 +1,31 @@ +// +build !ignore_autogenerated + +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// DO NOT EDIT. THIS FILE IS AUTO-GENERATED BY $KUBEROOT/hack/update-generated-conversions.sh + +package v1alpha1 + +import api "k8s.io/kubernetes/pkg/api" + +func init() { + err := api.Scheme.AddGeneratedConversionFuncs() + if err != nil { + // If one of the conversion functions is malformed, detect it immediately. + panic(err) + } +} diff --git a/pkg/apis/certificates/v1alpha1/doc.go b/pkg/apis/certificates/v1alpha1/doc.go new file mode 100644 index 0000000000..65a03a2093 --- /dev/null +++ b/pkg/apis/certificates/v1alpha1/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +genconversion=true +package v1alpha1 diff --git a/pkg/apis/certificates/v1alpha1/register.go b/pkg/apis/certificates/v1alpha1/register.go new file mode 100644 index 0000000000..2373745296 --- /dev/null +++ b/pkg/apis/certificates/v1alpha1/register.go @@ -0,0 +1,62 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/api/v1" + "k8s.io/kubernetes/pkg/runtime" + versionedwatch "k8s.io/kubernetes/pkg/watch/versioned" +) + +// GroupName is the group name use in this package +const GroupName = "certificates" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind +func Kind(kind string) unversioned.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns back a Group qualified GroupResource +func Resource(resource string) unversioned.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +func AddToScheme(scheme *runtime.Scheme) { + addKnownTypes(scheme) + // addDefaultingFuncs(scheme) + addConversionFuncs(scheme) +} + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) { + scheme.AddKnownTypes(SchemeGroupVersion, + &CertificateSigningRequest{}, + &CertificateSigningRequestList{}, + &v1.ListOptions{}, + &v1.DeleteOptions{}, + ) + + // Add the watch version that applies + versionedwatch.AddToGroupVersion(scheme, SchemeGroupVersion) +} + +func (obj *CertificateSigningRequest) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } +func (obj *CertificateSigningRequestList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta } diff --git a/pkg/apis/certificates/v1alpha1/types.generated.go b/pkg/apis/certificates/v1alpha1/types.generated.go new file mode 100644 index 0000000000..e69de29bb2 diff --git a/pkg/apis/certificates/v1alpha1/types.go b/pkg/apis/certificates/v1alpha1/types.go new file mode 100644 index 0000000000..04eee25168 --- /dev/null +++ b/pkg/apis/certificates/v1alpha1/types.go @@ -0,0 +1,84 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/api/v1" +) + +// +genclient=true,nonNamespaced=true + +// Describes a certificate signing request +type CertificateSigningRequest struct { + unversioned.TypeMeta `json:",inline"` + v1.ObjectMeta `json:"metadata,omitempty"` + + // The certificate request itself and any additonal information. + Spec CertificateSigningRequestSpec `json:"spec,omitempty"` + + // Derived information about the request. + Status CertificateSigningRequestStatus `json:"status,omitempty"` +} + +// This information is immutable after the request is created. Only the Request +// and ExtraInfo fields can be set on creation, other fields are derived by +// Kubernetes and cannot be modified by users. +type CertificateSigningRequestSpec struct { + // Base64-encoded PKCS#10 CSR data + Request []byte `json:"request"` + + // Information about the requesting user (if relevant) + // See user.Info interface for details + Username string `json:"username,omitempty"` + UID string `json:"uid,omitempty"` + Groups []string `json:"groups,omitempty"` +} + +type CertificateSigningRequestStatus struct { + // Conditions applied to the request, such as approval or denial. + Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty"` + + // If request was approved, the controller will place the issued certificate here. + Certificate []byte `json:"certificate,omitempty"` +} + +type RequestConditionType string + +// These are the possible conditions for a certificate request. +const ( + CertificateApproved RequestConditionType = "Approved" + CertificateDenied RequestConditionType = "Denied" +) + +type CertificateSigningRequestCondition struct { + // request approval state, currently Approved or Denied. + Type RequestConditionType `json:"type"` + // brief reason for the request state + Reason string `json:"reason,omitempty"` + // human readable message with details about the request state + Message string `json:"message,omitempty"` + // timestamp for the last update to this condition + LastUpdateTime unversioned.Time `json:"lastUpdateTime,omitempty"` +} + +type CertificateSigningRequestList struct { + unversioned.TypeMeta `json:",inline"` + unversioned.ListMeta `json:"metadata,omitempty"` + + Items []CertificateSigningRequest `json:"items,omitempty"` +} diff --git a/pkg/apis/certificates/validation/validation.go b/pkg/apis/certificates/validation/validation.go new file mode 100644 index 0000000000..5779349b57 --- /dev/null +++ b/pkg/apis/certificates/validation/validation.go @@ -0,0 +1,63 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "fmt" + + apivalidation "k8s.io/kubernetes/pkg/api/validation" + "k8s.io/kubernetes/pkg/apis/certificates" + certutil "k8s.io/kubernetes/pkg/util/certificates" + "k8s.io/kubernetes/pkg/util/validation/field" +) + +// validateCSR validates the signature and formatting of a base64-wrapped, +// PEM-encoded PKCS#10 certificate signing request. If this is invalid, we must +// not accept the CSR for further processing. +func validateCSR(obj *certificates.CertificateSigningRequest) error { + csr, err := certutil.ParseCertificateRequestObject(obj) + if err != nil { + return err + } + // check that the signature is valid + err = csr.CheckSignature() + if err != nil { + return err + } + return nil +} + +// We don't care what you call your certificate requests. +func ValidateCertificateRequestName(name string, prefix bool) []string { + return nil +} + +func ValidateCertificateSigningRequest(csr *certificates.CertificateSigningRequest) field.ErrorList { + isNamespaced := false + allErrs := apivalidation.ValidateObjectMeta(&csr.ObjectMeta, isNamespaced, ValidateCertificateRequestName, field.NewPath("metadata")) + err := validateCSR(csr) + if err != nil { + allErrs = append(allErrs, field.Invalid(field.NewPath("request"), csr.Spec.Request, fmt.Sprintf("%v", err))) + } + return allErrs +} + +func ValidateCertificateSigningRequestUpdate(newCSR, oldCSR *certificates.CertificateSigningRequest) field.ErrorList { + validationErrorList := ValidateCertificateSigningRequest(newCSR) + metaUpdateErrorList := apivalidation.ValidateObjectMetaUpdate(&newCSR.ObjectMeta, &oldCSR.ObjectMeta, field.NewPath("metadata")) + return append(validationErrorList, metaUpdateErrorList...) +} diff --git a/pkg/util/certificates/csr.go b/pkg/util/certificates/csr.go new file mode 100644 index 0000000000..be1f7651c3 --- /dev/null +++ b/pkg/util/certificates/csr.go @@ -0,0 +1,40 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package certificates + +import ( + "crypto/x509" + "encoding/pem" + "errors" + + "k8s.io/kubernetes/pkg/apis/certificates" +) + +// ParseCertificateRequestObject extracts the CSR from the API object and decodes it. +func ParseCertificateRequestObject(obj *certificates.CertificateSigningRequest) (*x509.CertificateRequest, error) { + // extract PEM from request object + pemBytes := obj.Spec.Request + block, _ := pem.Decode(pemBytes) + if block == nil || block.Type != "CERTIFICATE REQUEST" { + return nil, errors.New("PEM block type must be CERTIFICATE REQUEST") + } + csr, err := x509.ParseCertificateRequest(block.Bytes) + if err != nil { + return nil, err + } + return csr, nil +} From 2802f55c1899b9682ab34f051e99b227a75c6faf Mon Sep 17 00:00:00 2001 From: George Tankersley <george.tankersley@coreos.com> Date: Wed, 13 Apr 2016 18:25:33 -0700 Subject: [PATCH 227/339] pkg/registry: add certificate storage --- pkg/registry/cachesize/cachesize.go | 56 ++++---- pkg/registry/certificates/doc.go | 19 +++ pkg/registry/certificates/etcd/etcd.go | 106 +++++++++++++++ pkg/registry/certificates/registry.go | 92 +++++++++++++ pkg/registry/certificates/strategy.go | 177 +++++++++++++++++++++++++ 5 files changed, 423 insertions(+), 27 deletions(-) create mode 100644 pkg/registry/certificates/doc.go create mode 100644 pkg/registry/certificates/etcd/etcd.go create mode 100644 pkg/registry/certificates/registry.go create mode 100644 pkg/registry/certificates/strategy.go diff --git a/pkg/registry/cachesize/cachesize.go b/pkg/registry/cachesize/cachesize.go index 9bc360ff84..eccb73e2fb 100644 --- a/pkg/registry/cachesize/cachesize.go +++ b/pkg/registry/cachesize/cachesize.go @@ -28,39 +28,41 @@ import ( type Resource string const ( - ClusterRoles Resource = "clusterroles" - ClusterRoleBindings Resource = "clusterrolebindings" - Controllers Resource = "controllers" - Daemonsets Resource = "daemonsets" - Deployments Resource = "deployments" - Endpoints Resource = "endpoints" - HorizontalPodAutoscalers Resource = "horizontalpodautoscalers" - Ingress Resource = "ingress" - PodDisruptionBudget Resource = "poddisruptionbudgets" - PetSet Resource = "petset" - Jobs Resource = "jobs" - LimitRanges Resource = "limitranges" - Namespaces Resource = "namespaces" - NetworkPolicys Resource = "networkpolicies" - Nodes Resource = "nodes" - PersistentVolumes Resource = "persistentvolumes" - PersistentVolumeClaims Resource = "persistentvolumeclaims" - Pods Resource = "pods" - PodTemplates Resource = "podtemplates" - Replicasets Resource = "replicasets" - ResourceQuotas Resource = "resourcequotas" - ScheduledJobs Resource = "scheduledjobs" - Roles Resource = "roles" - RoleBindings Resource = "rolebindings" - Secrets Resource = "secrets" - ServiceAccounts Resource = "serviceaccounts" - Services Resource = "services" + CertificateSigningRequests Resource = "certificatesigningrequests" + ClusterRoles Resource = "clusterroles" + ClusterRoleBindings Resource = "clusterrolebindings" + Controllers Resource = "controllers" + Daemonsets Resource = "daemonsets" + Deployments Resource = "deployments" + Endpoints Resource = "endpoints" + HorizontalPodAutoscalers Resource = "horizontalpodautoscalers" + Ingress Resource = "ingress" + PodDisruptionBudget Resource = "poddisruptionbudgets" + PetSet Resource = "petset" + Jobs Resource = "jobs" + LimitRanges Resource = "limitranges" + Namespaces Resource = "namespaces" + NetworkPolicys Resource = "networkpolicies" + Nodes Resource = "nodes" + PersistentVolumes Resource = "persistentvolumes" + PersistentVolumeClaims Resource = "persistentvolumeclaims" + Pods Resource = "pods" + PodTemplates Resource = "podtemplates" + Replicasets Resource = "replicasets" + ResourceQuotas Resource = "resourcequotas" + ScheduledJobs Resource = "scheduledjobs" + Roles Resource = "roles" + RoleBindings Resource = "rolebindings" + Secrets Resource = "secrets" + ServiceAccounts Resource = "serviceaccounts" + Services Resource = "services" ) var watchCacheSizes map[Resource]int func init() { watchCacheSizes = make(map[Resource]int) + watchCacheSizes[CertificateSigningRequests] = 1000 watchCacheSizes[ClusterRoles] = 100 watchCacheSizes[ClusterRoleBindings] = 100 watchCacheSizes[Controllers] = 100 diff --git a/pkg/registry/certificates/doc.go b/pkg/registry/certificates/doc.go new file mode 100644 index 0000000000..03db7ed3df --- /dev/null +++ b/pkg/registry/certificates/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package certificates provides Registry interface and its RESTStorage +// implementation for storing CertificateSigningRequest objects. +package certificates diff --git a/pkg/registry/certificates/etcd/etcd.go b/pkg/registry/certificates/etcd/etcd.go new file mode 100644 index 0000000000..5e6ad01023 --- /dev/null +++ b/pkg/registry/certificates/etcd/etcd.go @@ -0,0 +1,106 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package etcd + +import ( + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/rest" + "k8s.io/kubernetes/pkg/apis/certificates" + "k8s.io/kubernetes/pkg/fields" + "k8s.io/kubernetes/pkg/labels" + "k8s.io/kubernetes/pkg/registry/cachesize" + csrregistry "k8s.io/kubernetes/pkg/registry/certificates" + "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/registry/generic/registry" + "k8s.io/kubernetes/pkg/runtime" +) + +// REST implements a RESTStorage for CertificateSigningRequest against etcd +type REST struct { + *registry.Store +} + +// NewREST returns a registry which will store CertificateSigningRequest in the given helper +func NewREST(opts generic.RESTOptions) (*REST, *StatusREST, *ApprovalREST) { + prefix := "/certificatesigningrequests" + + newListFunc := func() runtime.Object { return &certificates.CertificateSigningRequestList{} } + storageInterface := opts.Decorator(opts.Storage, cachesize.GetWatchCacheSizeByResource(cachesize.CertificateSigningRequests), &certificates.CertificateSigningRequest{}, prefix, csrregistry.Strategy, newListFunc) + + store := ®istry.Store{ + NewFunc: func() runtime.Object { return &certificates.CertificateSigningRequest{} }, + NewListFunc: newListFunc, + KeyRootFunc: func(ctx api.Context) string { + return prefix + }, + KeyFunc: func(ctx api.Context, id string) (string, error) { + return registry.NoNamespaceKeyFunc(ctx, prefix, id) + }, + ObjectNameFunc: func(obj runtime.Object) (string, error) { + return obj.(*certificates.CertificateSigningRequest).Name, nil + }, + PredicateFunc: func(label labels.Selector, field fields.Selector) generic.Matcher { + return csrregistry.Matcher(label, field) + }, + QualifiedResource: certificates.Resource("certificatesigningrequests"), + DeleteCollectionWorkers: opts.DeleteCollectionWorkers, + + CreateStrategy: csrregistry.Strategy, + UpdateStrategy: csrregistry.Strategy, + + Storage: storageInterface, + } + + // Subresources use the same store and creation strategy, which only + // allows empty subs. Updates to an existing subresource are handled by + // dedicated strategies. + statusStore := *store + statusStore.UpdateStrategy = csrregistry.StatusStrategy + + approvalStore := *store + approvalStore.UpdateStrategy = csrregistry.ApprovalStrategy + + return &REST{store}, &StatusREST{store: &statusStore}, &ApprovalREST{store: &approvalStore} +} + +// StatusREST implements the REST endpoint for changing the status of a CSR. +type StatusREST struct { + store *registry.Store +} + +func (r *StatusREST) New() runtime.Object { + return &certificates.CertificateSigningRequest{} +} + +// Update alters the status subset of an object. +func (r *StatusREST) Update(ctx api.Context, name string, objInfo rest.UpdatedObjectInfo) (runtime.Object, bool, error) { + return r.store.Update(ctx, name, objInfo) +} + +// ApprovalREST implements the REST endpoint for changing the approval state of a CSR. +type ApprovalREST struct { + store *registry.Store +} + +func (r *ApprovalREST) New() runtime.Object { + return &certificates.CertificateSigningRequest{} +} + +// Update alters the approval subset of an object. +func (r *ApprovalREST) Update(ctx api.Context, name string, objInfo rest.UpdatedObjectInfo) (runtime.Object, bool, error) { + return r.store.Update(ctx, name, objInfo) +} diff --git a/pkg/registry/certificates/registry.go b/pkg/registry/certificates/registry.go new file mode 100644 index 0000000000..2e11d2a186 --- /dev/null +++ b/pkg/registry/certificates/registry.go @@ -0,0 +1,92 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package certificates + +import ( + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/rest" + "k8s.io/kubernetes/pkg/apis/certificates" + "k8s.io/kubernetes/pkg/watch" +) + +// Registry is an interface for things that know how to store CSRs. +type Registry interface { + ListCSRs(ctx api.Context, options *api.ListOptions) (*certificates.CertificateSigningRequestList, error) + CreateCSR(ctx api.Context, csr *certificates.CertificateSigningRequest) error + UpdateCSR(ctx api.Context, csr *certificates.CertificateSigningRequest) error + GetCSR(ctx api.Context, csrID string) (*certificates.CertificateSigningRequest, error) + DeleteCSR(ctx api.Context, csrID string) error + WatchCSRs(ctx api.Context, options *api.ListOptions) (watch.Interface, error) +} + +// storage puts strong typing around storage calls +type storage struct { + rest.StandardStorage +} + +// NewRegistry returns a new Registry interface for the given Storage. Any mismatched +// types will panic. +func NewRegistry(s rest.StandardStorage) Registry { + return &storage{s} +} + +func (s *storage) ListCSRs(ctx api.Context, options *api.ListOptions) (*certificates.CertificateSigningRequestList, error) { + obj, err := s.List(ctx, options) + if err != nil { + return nil, err + } + + return obj.(*certificates.CertificateSigningRequestList), nil +} + +func (s *storage) CreateCSR(ctx api.Context, csr *certificates.CertificateSigningRequest) error { + // Inject user.Info from request context if available and no + // information was supplied. Don't smash existing user information + // since it should be possible for a broadly-scoped user to request a + // certificate on behalf of a more limited user. + if user, ok := api.UserFrom(ctx); ok { + if csr.Spec.Username == "" { + csr.Spec.Username = user.GetName() + csr.Spec.UID = user.GetUID() + csr.Spec.Groups = user.GetGroups() + } + } + _, err := s.Create(ctx, csr) + return err +} + +func (s *storage) UpdateCSR(ctx api.Context, csr *certificates.CertificateSigningRequest) error { + _, _, err := s.Update(ctx, csr.Name, rest.DefaultUpdatedObjectInfo(csr, api.Scheme)) + return err +} + +func (s *storage) WatchCSRs(ctx api.Context, options *api.ListOptions) (watch.Interface, error) { + return s.Watch(ctx, options) +} + +func (s *storage) GetCSR(ctx api.Context, name string) (*certificates.CertificateSigningRequest, error) { + obj, err := s.Get(ctx, name) + if err != nil { + return nil, err + } + return obj.(*certificates.CertificateSigningRequest), nil +} + +func (s *storage) DeleteCSR(ctx api.Context, name string) error { + _, err := s.Delete(ctx, name, nil) + return err +} diff --git a/pkg/registry/certificates/strategy.go b/pkg/registry/certificates/strategy.go new file mode 100644 index 0000000000..cab3a92b88 --- /dev/null +++ b/pkg/registry/certificates/strategy.go @@ -0,0 +1,177 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package certificates + +import ( + "fmt" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/certificates" + "k8s.io/kubernetes/pkg/apis/certificates/validation" + "k8s.io/kubernetes/pkg/fields" + "k8s.io/kubernetes/pkg/labels" + "k8s.io/kubernetes/pkg/registry/generic" + "k8s.io/kubernetes/pkg/runtime" + "k8s.io/kubernetes/pkg/util/validation/field" +) + +// csrStrategy implements behavior for CSRs +type csrStrategy struct { + runtime.ObjectTyper + api.NameGenerator +} + +// csrStrategy is the default logic that applies when creating and updating +// CSR objects. +var Strategy = csrStrategy{api.Scheme, api.SimpleNameGenerator} + +// NamespaceScoped is true for CSRs. +func (csrStrategy) NamespaceScoped() bool { + return false +} + +// AllowCreateOnUpdate is false for CSRs. +func (csrStrategy) AllowCreateOnUpdate() bool { + return false +} + +// PrepareForCreate clears fields that are not allowed to be set by end users +// on creation. Users cannot create any derived information, but we expect +// information about the requesting user to be injected by the registry +// interface. Clear everything else. +// TODO: check these ordering assumptions. better way to inject user info? +func (csrStrategy) PrepareForCreate(obj runtime.Object) { + csr := obj.(*certificates.CertificateSigningRequest) + + // Be explicit that users cannot create pre-approved certificate requests. + csr.Status = certificates.CertificateSigningRequestStatus{} + csr.Status.Conditions = []certificates.CertificateSigningRequestCondition{} +} + +// PrepareForUpdate clears fields that are not allowed to be set by end users +// on update. Certificate requests are immutable after creation except via subresources. +func (csrStrategy) PrepareForUpdate(obj, old runtime.Object) { + newCSR := obj.(*certificates.CertificateSigningRequest) + oldCSR := old.(*certificates.CertificateSigningRequest) + + newCSR.Spec = oldCSR.Spec + newCSR.Status = oldCSR.Status +} + +// Validate validates a new CSR. Validation must check for a correct signature. +func (csrStrategy) Validate(ctx api.Context, obj runtime.Object) field.ErrorList { + csr := obj.(*certificates.CertificateSigningRequest) + return validation.ValidateCertificateSigningRequest(csr) +} + +// Canonicalize normalizes the object after validation (which includes a signature check). +func (csrStrategy) Canonicalize(obj runtime.Object) {} + +// ValidateUpdate is the default update validation for an end user. +func (csrStrategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList { + oldCSR := old.(*certificates.CertificateSigningRequest) + newCSR := obj.(*certificates.CertificateSigningRequest) + return validation.ValidateCertificateSigningRequestUpdate(newCSR, oldCSR) +} + +// If AllowUnconditionalUpdate() is true and the object specified by +// the user does not have a resource version, then generic Update() +// populates it with the latest version. Else, it checks that the +// version specified by the user matches the version of latest etcd +// object. +func (csrStrategy) AllowUnconditionalUpdate() bool { + return true +} + +func (s csrStrategy) Export(obj runtime.Object, exact bool) error { + csr, ok := obj.(*certificates.CertificateSigningRequest) + if !ok { + // unexpected programmer error + return fmt.Errorf("unexpected object: %v", obj) + } + s.PrepareForCreate(obj) + if exact { + return nil + } + // CSRs allow direct subresource edits, we clear them without exact so the CSR value can be reused. + csr.Status = certificates.CertificateSigningRequestStatus{} + return nil +} + +// Storage strategy for the Status subresource +type csrStatusStrategy struct { + csrStrategy +} + +var StatusStrategy = csrStatusStrategy{Strategy} + +func (csrStatusStrategy) PrepareForUpdate(obj, old runtime.Object) { + newCSR := obj.(*certificates.CertificateSigningRequest) + oldCSR := old.(*certificates.CertificateSigningRequest) + + // Updating the Status should only update the Status and not the spec + // or approval conditions. The intent is to separate the concerns of + // approval and certificate issuance. + newCSR.Spec = oldCSR.Spec + newCSR.Status.Conditions = oldCSR.Status.Conditions +} + +func (csrStatusStrategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList { + return validation.ValidateCertificateSigningRequestUpdate(obj.(*certificates.CertificateSigningRequest), old.(*certificates.CertificateSigningRequest)) +} + +// Canonicalize normalizes the object after validation. +func (csrStatusStrategy) Canonicalize(obj runtime.Object) { +} + +// Storage strategy for the Approval subresource +type csrApprovalStrategy struct { + csrStrategy +} + +var ApprovalStrategy = csrApprovalStrategy{Strategy} + +func (csrApprovalStrategy) PrepareForUpdate(obj, old runtime.Object) { + newCSR := obj.(*certificates.CertificateSigningRequest) + oldCSR := old.(*certificates.CertificateSigningRequest) + + // Updating the approval should only update the conditions. + newCSR.Spec = oldCSR.Spec + oldCSR.Status.Conditions = newCSR.Status.Conditions + newCSR.Status = oldCSR.Status +} + +func (csrApprovalStrategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList { + return validation.ValidateCertificateSigningRequestUpdate(obj.(*certificates.CertificateSigningRequest), old.(*certificates.CertificateSigningRequest)) +} + +// Matcher returns a generic matcher for a given label and field selector. +func Matcher(label labels.Selector, field fields.Selector) generic.Matcher { + return generic.MatcherFunc(func(obj runtime.Object) (bool, error) { + sa, ok := obj.(*certificates.CertificateSigningRequest) + if !ok { + return false, fmt.Errorf("not a CertificateSigningRequest") + } + fields := SelectableFields(sa) + return label.Matches(labels.Set(sa.Labels)) && field.Matches(fields), nil + }) +} + +// SelectableFields returns a label set that can be used for filter selection +func SelectableFields(obj *certificates.CertificateSigningRequest) labels.Set { + return labels.Set{} +} From 0439b694caf668a49ef30e222968ec491ad0c2b8 Mon Sep 17 00:00:00 2001 From: George Tankersley <george.tankersley@coreos.com> Date: Wed, 13 Apr 2016 18:45:43 -0700 Subject: [PATCH 228/339] apiserver: enable certificates api --- pkg/master/import_known_versions.go | 1 + pkg/master/master.go | 47 ++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/pkg/master/import_known_versions.go b/pkg/master/import_known_versions.go index f7ad207fae..f63139b8b9 100644 --- a/pkg/master/import_known_versions.go +++ b/pkg/master/import_known_versions.go @@ -26,6 +26,7 @@ import ( _ "k8s.io/kubernetes/pkg/apis/authorization/install" _ "k8s.io/kubernetes/pkg/apis/autoscaling/install" _ "k8s.io/kubernetes/pkg/apis/batch/install" + _ "k8s.io/kubernetes/pkg/apis/certificates/install" _ "k8s.io/kubernetes/pkg/apis/componentconfig/install" _ "k8s.io/kubernetes/pkg/apis/extensions/install" _ "k8s.io/kubernetes/pkg/apis/policy/install" diff --git a/pkg/master/master.go b/pkg/master/master.go index 5e53a1b4ea..a6efeb292f 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -40,6 +40,8 @@ import ( "k8s.io/kubernetes/pkg/apis/batch" batchapiv1 "k8s.io/kubernetes/pkg/apis/batch/v1" batchapiv2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" + "k8s.io/kubernetes/pkg/apis/certificates" + certificatesapiv1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" "k8s.io/kubernetes/pkg/apis/extensions" extensionsapiv1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/apis/policy" @@ -53,6 +55,7 @@ import ( "k8s.io/kubernetes/pkg/healthz" kubeletclient "k8s.io/kubernetes/pkg/kubelet/client" "k8s.io/kubernetes/pkg/master/ports" + certificateetcd "k8s.io/kubernetes/pkg/registry/certificates/etcd" "k8s.io/kubernetes/pkg/registry/clusterrole" clusterroleetcd "k8s.io/kubernetes/pkg/registry/clusterrole/etcd" clusterrolepolicybased "k8s.io/kubernetes/pkg/registry/clusterrole/policybased" @@ -367,6 +370,26 @@ func (m *Master) InstallAPIs(c *Config) { apiGroupsInfo = append(apiGroupsInfo, apiGroupInfo) } + if c.APIResourceConfigSource.AnyResourcesForVersionEnabled(certificatesapiv1alpha1.SchemeGroupVersion) { + certificateResources := m.getCertificateResources(c) + certificatesGroupMeta := registered.GroupOrDie(certificates.GroupName) + + // Hard code preferred group version to certificates/v1alpha1 + certificatesGroupMeta.GroupVersion = certificatesapiv1alpha1.SchemeGroupVersion + + apiGroupInfo := genericapiserver.APIGroupInfo{ + GroupMeta: *certificatesGroupMeta, + VersionedResourcesStorageMap: map[string]map[string]rest.Storage{ + "v1alpha1": certificateResources, + }, + OptionsExternalVersion: ®istered.GroupOrDie(api.GroupName).GroupVersion, + Scheme: api.Scheme, + ParameterCodec: api.ParameterCodec, + NegotiatedSerializer: api.Codecs, + } + apiGroupsInfo = append(apiGroupsInfo, apiGroupInfo) + } + if c.APIResourceConfigSource.AnyResourcesForVersionEnabled(rbacapi.SchemeGroupVersion) { rbacResources := m.getRBACResources(c) rbacGroupMeta := registered.GroupOrDie(rbac.GroupName) @@ -851,6 +874,28 @@ func (m *Master) getAutoscalingResources(c *Config) map[string]rest.Storage { return storage } +// getCertificateResources returns the resources for certificates API +func (m *Master) getCertificateResources(c *Config) map[string]rest.Storage { + restOptions := func(resource string) generic.RESTOptions { + return m.GetRESTOptionsOrDie(c, certificates.Resource(resource)) + } + + // TODO update when we support more than one version of this group + version := certificatesapiv1alpha1.SchemeGroupVersion + + storage := map[string]rest.Storage{} + + csrStorage, csrStatusStorage, csrApprovalStorage := certificateetcd.NewREST(restOptions("certificatesigningrequests")) + + if c.APIResourceConfigSource.ResourceEnabled(version.WithResource("certificatesigningrequests")) { + storage["certificatesigningrequests"] = csrStorage + storage["certificatesigningrequests/status"] = csrStatusStorage + storage["certificatesigningrequests/approval"] = csrApprovalStorage + } + + return storage +} + // getBatchResources returns the resources for batch api func (m *Master) getBatchResources(c *Config, version unversioned.GroupVersion) map[string]rest.Storage { storage := map[string]rest.Storage{} @@ -979,7 +1024,7 @@ func (m *Master) IsTunnelSyncHealthy(req *http.Request) error { func DefaultAPIResourceConfigSource() *genericapiserver.ResourceConfig { ret := genericapiserver.NewResourceConfig() - ret.EnableVersions(apiv1.SchemeGroupVersion, extensionsapiv1beta1.SchemeGroupVersion, batchapiv1.SchemeGroupVersion, autoscalingapiv1.SchemeGroupVersion, appsapi.SchemeGroupVersion, policyapiv1alpha1.SchemeGroupVersion, rbacapi.SchemeGroupVersion) + ret.EnableVersions(apiv1.SchemeGroupVersion, extensionsapiv1beta1.SchemeGroupVersion, batchapiv1.SchemeGroupVersion, autoscalingapiv1.SchemeGroupVersion, appsapi.SchemeGroupVersion, policyapiv1alpha1.SchemeGroupVersion, rbacapi.SchemeGroupVersion, certificatesapiv1alpha1.SchemeGroupVersion) // all extensions resources except these are disabled by default ret.EnableResources( From b084d202bbd7575cd2b4f6cb74a96c1f6adc14a4 Mon Sep 17 00:00:00 2001 From: George Tankersley <george.tankersley@coreos.com> Date: Wed, 13 Apr 2016 23:58:44 -0700 Subject: [PATCH 229/339] client/unversioned: add certificates client --- .../import_known_versions.go | 1 + pkg/client/unversioned/certificates.go | 87 ++++++++++++++ .../unversioned/certificatesigningrequests.go | 104 +++++++++++++++++ pkg/client/unversioned/client.go | 6 + pkg/client/unversioned/helper.go | 11 +- .../unversioned/import_known_versions.go | 1 + .../testclient/fake_certificates.go | 107 ++++++++++++++++++ .../unversioned/testclient/testclient.go | 4 + 8 files changed, 320 insertions(+), 1 deletion(-) create mode 100644 pkg/client/unversioned/certificates.go create mode 100644 pkg/client/unversioned/certificatesigningrequests.go create mode 100644 pkg/client/unversioned/testclient/fake_certificates.go diff --git a/pkg/client/clientset_generated/internalclientset/import_known_versions.go b/pkg/client/clientset_generated/internalclientset/import_known_versions.go index 8bdbe2e6c9..35f10bcf97 100644 --- a/pkg/client/clientset_generated/internalclientset/import_known_versions.go +++ b/pkg/client/clientset_generated/internalclientset/import_known_versions.go @@ -26,6 +26,7 @@ import ( _ "k8s.io/kubernetes/pkg/apis/authorization/install" _ "k8s.io/kubernetes/pkg/apis/autoscaling/install" _ "k8s.io/kubernetes/pkg/apis/batch/install" + _ "k8s.io/kubernetes/pkg/apis/certificates/install" _ "k8s.io/kubernetes/pkg/apis/componentconfig/install" _ "k8s.io/kubernetes/pkg/apis/extensions/install" _ "k8s.io/kubernetes/pkg/apis/policy/install" diff --git a/pkg/client/unversioned/certificates.go b/pkg/client/unversioned/certificates.go new file mode 100644 index 0000000000..677e46e2fa --- /dev/null +++ b/pkg/client/unversioned/certificates.go @@ -0,0 +1,87 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package unversioned + +import ( + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apimachinery/registered" + "k8s.io/kubernetes/pkg/apis/certificates" + "k8s.io/kubernetes/pkg/client/restclient" +) + +// Interface holds the methods for clients of Kubernetes to allow mock testing. +type CertificatesInterface interface { + CertificateSigningRequests() CertificateSigningRequestInterface +} + +type CertificatesClient struct { + *restclient.RESTClient +} + +func (c *CertificatesClient) CertificateSigningRequests() CertificateSigningRequestInterface { + return newCertificateSigningRequests(c) +} + +// NewCertificates creates a new CertificatesClient for the given config. +func NewCertificates(c *restclient.Config) (*CertificatesClient, error) { + config := *c + if err := setCertificatesDefaults(&config); err != nil { + return nil, err + } + client, err := restclient.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &CertificatesClient{client}, nil +} + +// NewCertificatesOrDie creates a new CertificatesClient for the given config and +// panics if there is an error in the config. +func NewCertificatesOrDie(c *restclient.Config) *CertificatesClient { + client, err := NewCertificates(c) + if err != nil { + panic(err) + } + return client +} + +func setCertificatesDefaults(config *restclient.Config) error { + // if certificates group is not registered, return an error + g, err := registered.Group(certificates.GroupName) + if err != nil { + return err + } + config.APIPath = defaultAPIPath + 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 = ©GroupVersion + //} + + config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion) + config.NegotiatedSerializer = api.Codecs + if config.QPS == 0 { + config.QPS = 5 + } + if config.Burst == 0 { + config.Burst = 10 + } + return nil +} diff --git a/pkg/client/unversioned/certificatesigningrequests.go b/pkg/client/unversioned/certificatesigningrequests.go new file mode 100644 index 0000000000..c2c391c6bd --- /dev/null +++ b/pkg/client/unversioned/certificatesigningrequests.go @@ -0,0 +1,104 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package unversioned + +import ( + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/certificates" + "k8s.io/kubernetes/pkg/watch" +) + +// CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources. +type CertificateSigningRequestInterface interface { + List(opts api.ListOptions) (*certificates.CertificateSigningRequestList, error) + Get(name string) (*certificates.CertificateSigningRequest, error) + Delete(name string, options *api.DeleteOptions) error + Create(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) + Update(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) + UpdateStatus(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) + UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) + Watch(opts api.ListOptions) (watch.Interface, error) +} + +// certificateSigningRequests implements CertificateSigningRequestsNamespacer interface +type certificateSigningRequests struct { + client *CertificatesClient +} + +// newCertificateSigningRequests returns a certificateSigningRequests +func newCertificateSigningRequests(c *CertificatesClient) *certificateSigningRequests { + return &certificateSigningRequests{ + client: c, + } +} + +// List takes label and field selectors, and returns the list of certificateSigningRequests that match those selectors. +func (c *certificateSigningRequests) List(opts api.ListOptions) (result *certificates.CertificateSigningRequestList, err error) { + result = &certificates.CertificateSigningRequestList{} + err = c.client.Get().Resource("certificatesigningrequests").VersionedParams(&opts, api.ParameterCodec).Do().Into(result) + return +} + +// Get takes the name of the certificateSigningRequest, and returns the corresponding CertificateSigningRequest object, and an error if it occurs +func (c *certificateSigningRequests) Get(name string) (result *certificates.CertificateSigningRequest, err error) { + result = &certificates.CertificateSigningRequest{} + err = c.client.Get().Resource("certificatesigningrequests").Name(name).Do().Into(result) + return +} + +// Delete takes the name of the certificateSigningRequest and deletes it. Returns an error if one occurs. +func (c *certificateSigningRequests) Delete(name string, options *api.DeleteOptions) error { + return c.client.Delete().Resource("certificatesigningrequests").Name(name).Body(options).Do().Error() +} + +// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if it occurs. +func (c *certificateSigningRequests) Create(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { + result = &certificates.CertificateSigningRequest{} + err = c.client.Post().Resource("certificatesigningrequests").Body(certificateSigningRequest).Do().Into(result) + return +} + +// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if it occurs. +func (c *certificateSigningRequests) Update(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { + result = &certificates.CertificateSigningRequest{} + err = c.client.Put().Resource("certificatesigningrequests").Name(certificateSigningRequest.Name).Body(certificateSigningRequest).Do().Into(result) + return +} + +// UpdateStatus takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if it occurs. +func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { + result = &certificates.CertificateSigningRequest{} + err = c.client.Put().Resource("certificatesigningrequests").Name(certificateSigningRequest.Name).SubResource("status").Body(certificateSigningRequest).Do().Into(result) + return +} + +// UpdateApproval takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if it occurs. +func (c *certificateSigningRequests) UpdateApproval(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { + result = &certificates.CertificateSigningRequest{} + err = c.client.Put().Resource("certificatesigningrequests").Name(certificateSigningRequest.Name).SubResource("approval").Body(certificateSigningRequest).Do().Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested certificateSigningRequests. +func (c *certificateSigningRequests) Watch(opts api.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Namespace(api.NamespaceAll). + Resource("certificatesigningrequests"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} diff --git a/pkg/client/unversioned/client.go b/pkg/client/unversioned/client.go index df68040042..f06c69825f 100644 --- a/pkg/client/unversioned/client.go +++ b/pkg/client/unversioned/client.go @@ -49,6 +49,7 @@ type Interface interface { Extensions() ExtensionsInterface Rbac() RbacInterface Discovery() discovery.DiscoveryInterface + Certificates() CertificatesInterface } func (c *Client) ReplicationControllers(namespace string) ReplicationControllerInterface { @@ -124,6 +125,7 @@ type Client struct { *PolicyClient *RbacClient *discovery.DiscoveryClient + *CertificatesClient } // IsTimeout tests if this is a timeout error in the underlying transport. @@ -171,3 +173,7 @@ func (c *Client) Rbac() RbacInterface { func (c *Client) Discovery() discovery.DiscoveryInterface { return c.DiscoveryClient } + +func (c *Client) Certificates() CertificatesInterface { + return c.CertificatesClient +} diff --git a/pkg/client/unversioned/helper.go b/pkg/client/unversioned/helper.go index e664125ff8..40b42695ff 100644 --- a/pkg/client/unversioned/helper.go +++ b/pkg/client/unversioned/helper.go @@ -25,6 +25,7 @@ import ( "k8s.io/kubernetes/pkg/apis/apps" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/batch" + "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/apis/rbac" @@ -95,6 +96,14 @@ func New(c *restclient.Config) (*Client, error) { return nil, err } } + var certsClient *CertificatesClient + if registered.IsRegistered(certificates.GroupName) { + certsConfig := *c + certsClient, err = NewCertificates(&certsConfig) + if err != nil { + return nil, err + } + } var appsClient *AppsClient if registered.IsRegistered(apps.GroupName) { @@ -114,7 +123,7 @@ func New(c *restclient.Config) (*Client, error) { } } - return &Client{RESTClient: client, AutoscalingClient: autoscalingClient, BatchClient: batchClient, ExtensionsClient: extensionsClient, DiscoveryClient: discoveryClient, AppsClient: appsClient, PolicyClient: policyClient, RbacClient: rbacClient}, nil + return &Client{RESTClient: client, AutoscalingClient: autoscalingClient, BatchClient: batchClient, CertificatesClient: certsClient, ExtensionsClient: extensionsClient, DiscoveryClient: discoveryClient, AppsClient: appsClient, PolicyClient: policyClient, RbacClient: rbacClient}, nil } // MatchesServerVersion queries the server to compares the build version diff --git a/pkg/client/unversioned/import_known_versions.go b/pkg/client/unversioned/import_known_versions.go index bbe61472dc..6d803af055 100644 --- a/pkg/client/unversioned/import_known_versions.go +++ b/pkg/client/unversioned/import_known_versions.go @@ -27,6 +27,7 @@ import ( _ "k8s.io/kubernetes/pkg/apis/authorization/install" _ "k8s.io/kubernetes/pkg/apis/autoscaling/install" _ "k8s.io/kubernetes/pkg/apis/batch/install" + _ "k8s.io/kubernetes/pkg/apis/certificates/install" _ "k8s.io/kubernetes/pkg/apis/componentconfig/install" _ "k8s.io/kubernetes/pkg/apis/extensions/install" _ "k8s.io/kubernetes/pkg/apis/policy/install" diff --git a/pkg/client/unversioned/testclient/fake_certificates.go b/pkg/client/unversioned/testclient/fake_certificates.go new file mode 100644 index 0000000000..facb687781 --- /dev/null +++ b/pkg/client/unversioned/testclient/fake_certificates.go @@ -0,0 +1,107 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testclient + +import ( + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/certificates" + "k8s.io/kubernetes/pkg/client/unversioned" + "k8s.io/kubernetes/pkg/runtime" + "k8s.io/kubernetes/pkg/watch" +) + +// NewSimpleFakeCertificate returns a client that will respond with the provided objects +func NewSimpleFakeCertificates(objects ...runtime.Object) *FakeCertificates { + return &FakeCertificates{Fake: NewSimpleFake(objects...)} +} + +// FakeCertificates implements CertificatesInterface. 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 FakeCertificates struct { + *Fake +} + +func (c *FakeCertificates) CertificateSigningRequests() unversioned.CertificateSigningRequestInterface { + return &FakeCertificateSigningRequest{Fake: c} +} + +// FakeCertificateSigningRequest implements CertificateSigningRequestInterface +type FakeCertificateSigningRequest struct { + Fake *FakeCertificates +} + +func (c *FakeCertificateSigningRequest) Get(name string) (*certificates.CertificateSigningRequest, error) { + obj, err := c.Fake.Invokes(NewRootGetAction("certificatesigningrequests", name), &certificates.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + + return obj.(*certificates.CertificateSigningRequest), err +} + +func (c *FakeCertificateSigningRequest) List(opts api.ListOptions) (*certificates.CertificateSigningRequestList, error) { + obj, err := c.Fake.Invokes(NewRootListAction("certificatesigningrequests", opts), &certificates.CertificateSigningRequestList{}) + if obj == nil { + return nil, err + } + + return obj.(*certificates.CertificateSigningRequestList), err +} + +func (c *FakeCertificateSigningRequest) Create(csr *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) { + obj, err := c.Fake.Invokes(NewRootCreateAction("certificatesigningrequests", csr), csr) + if obj == nil { + return nil, err + } + + return obj.(*certificates.CertificateSigningRequest), err +} + +func (c *FakeCertificateSigningRequest) Update(csr *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) { + obj, err := c.Fake.Invokes(NewRootUpdateAction("certificatesigningrequests", csr), csr) + if obj == nil { + return nil, err + } + + return obj.(*certificates.CertificateSigningRequest), err +} + +func (c *FakeCertificateSigningRequest) UpdateStatus(csr *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) { + obj, err := c.Fake.Invokes(NewUpdateSubresourceAction("certificatesigningrequests", "status", api.NamespaceAll, csr), csr) + if obj == nil { + return nil, err + } + return obj.(*certificates.CertificateSigningRequest), err +} + +func (c *FakeCertificateSigningRequest) UpdateApproval(csr *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) { + obj, err := c.Fake.Invokes(NewUpdateSubresourceAction("certificatesigningrequests", "approval", api.NamespaceAll, csr), csr) + if obj == nil { + return nil, err + } + return obj.(*certificates.CertificateSigningRequest), err +} + +func (c *FakeCertificateSigningRequest) Delete(name string, opts *api.DeleteOptions) error { + _, err := c.Fake.Invokes(NewRootDeleteAction("certificatesigningrequests", name), &certificates.CertificateSigningRequest{}) + return err +} + +func (c *FakeCertificateSigningRequest) Watch(opts api.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(NewRootWatchAction("certificatesigningrequests", opts)) +} diff --git a/pkg/client/unversioned/testclient/testclient.go b/pkg/client/unversioned/testclient/testclient.go index 96ff7d56be..191fd21b12 100644 --- a/pkg/client/unversioned/testclient/testclient.go +++ b/pkg/client/unversioned/testclient/testclient.go @@ -285,6 +285,10 @@ func (c *Fake) Batch() client.BatchInterface { return &FakeBatch{c} } +func (c *Fake) Certificates() client.CertificatesInterface { + return &FakeCertificates{c} +} + func (c *Fake) Extensions() client.ExtensionsInterface { return &FakeExperimental{c} } From 816c4d9e2beaf48c586bd998a55e8cb33e7504a1 Mon Sep 17 00:00:00 2001 From: "Madhusudan.C.S" <madhusudancs@google.com> Date: Mon, 27 Jun 2016 14:44:32 -0700 Subject: [PATCH 230/339] Substitute federation_domain_map parameter with its value in node bootstrap scripts. This also removes the substitution code we added to the build scripts in one of the previous commits. --- build/common.sh | 18 --------------- cluster/common.sh | 22 +++++++++++++++++++ cluster/gce/configure-vm.sh | 20 ++++++++++++++++- cluster/gce/gci/configure-helper.sh | 14 ++++++++++++ cluster/gce/trusty/configure-helper.sh | 14 ++++++++++++ cluster/mesos/docker/deploy-dns.sh | 15 +++++++++++++ .../fragments/configure-salt.yaml | 1 + .../templates/create-dynamic-salt-files.sh | 1 + cluster/vagrant/provision-utils.sh | 1 + .../templates/create-dynamic-salt-files.sh | 1 + hack/local-up-cluster.sh | 13 +++++++++++ 11 files changed, 101 insertions(+), 19 deletions(-) diff --git a/build/common.sh b/build/common.sh index 61c0245cd3..67de4aa7ea 100755 --- a/build/common.sh +++ b/build/common.sh @@ -950,24 +950,6 @@ function kube::release::package_kube_manifests_tarball() { mkdir -p "${dst_dir}/dns" tar c -C "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns" ${objects} | tar x -C "${dst_dir}/dns" - # We leave the `{{ pillar['federations_domain_map'] }}` parameter as is, if - # the right federation environment variables isn't set. This is to allow - # users to provide these pillar values using the regular salt's mechanisms - # during cluster bootstrap. - if [[ "${FEDERATION:-}" == "true" ]]; then - FEDERATIONS_DOMAIN_MAP="${FEDERATIONS_DOMAIN_MAP:-}" - if [[ -z "${FEDERATIONS_DOMAIN_MAP}" && -n "${FEDERATION_NAME:-}" && -n "${DNS_ZONE_NAME:-}" ]]; then - FEDERATIONS_DOMAIN_MAP="${FEDERATION_NAME}=${DNS_ZONE_NAME}" - fi - if [[ -n "${FEDERATIONS_DOMAIN_MAP}" ]]; then - sed -i 's/{{ pillar\['"'"'federations_domain_map'"'"'\] }}/- --federations='"${FEDERATIONS_DOMAIN_MAP}"'/g' "${dst_dir}/dns/skydns-rc.yaml.in" - else - sed -i '/{{ pillar\['"'"'federations_domain_map'"'"'\] }}/d' "${dst_dir}/dns/skydns-rc.yaml.in" - fi - else - sed -i '/{{ pillar\['"'"'federations_domain_map'"'"'\] }}/d' "${dst_dir}/dns/skydns-rc.yaml.in" - fi - # This is for coreos only. ContainerVM, GCI, or Trusty does not use it. cp -r "${KUBE_ROOT}/cluster/gce/coreos/kube-manifests"/* "${release_stage}/" diff --git a/cluster/common.sh b/cluster/common.sh index 5765228d0b..f064da159c 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -710,6 +710,28 @@ EOF cat >>$file <<EOF ENABLE_CLUSTER_AUTOSCALER: $(yaml-quote ${ENABLE_CLUSTER_AUTOSCALER}) AUTOSCALER_MIG_CONFIG: $(yaml-quote ${AUTOSCALER_MIG_CONFIG}) +EOF + fi + + # Federation specific environment variables. + if [[ -n "${FEDERATION:-}" ]]; then + cat >>$file <<EOF +FEDERATION: $(yaml-quote ${FEDERATION}) +EOF + fi + if [ -n "${FEDERATIONS_DOMAIN_MAP:-}" ]; then + cat >>$file <<EOF +FEDERATIONS_DOMAIN_MAP: $(yaml-quote ${FEDERATIONS_DOMAIN_MAP}) +EOF + fi + if [ -n "${FEDERATION_NAME:-}" ]; then + cat >>$file <<EOF +FEDERATION_NAME: $(yaml-quote ${FEDERATION_NAME}) +EOF + fi + if [ -n "${DNS_ZONE_NAME:-}" ]; then + cat >>$file <<EOF +DNS_ZONE_NAME: $(yaml-quote ${DNS_ZONE_NAME}) EOF fi } diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index 61a0d261fb..32c6b6e405 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -550,7 +550,25 @@ enable_cluster_autoscaler: '$(echo "${ENABLE_CLUSTER_AUTOSCALER}" | sed -e "s/'/ autoscaler_mig_config: '$(echo "${AUTOSCALER_MIG_CONFIG}" | sed -e "s/'/''/g")' EOF fi - + if [[ "${FEDERATION:-}" == "true" ]]; then + FEDERATIONS_DOMAIN_MAP="${FEDERATIONS_DOMAIN_MAP:-}" + if [[ -z "${FEDERATIONS_DOMAIN_MAP}" && -n "${FEDERATION_NAME:-}" && -n "${DNS_ZONE_NAME:-}" ]]; then + FEDERATIONS_DOMAIN_MAP="${FEDERATION_NAME}=${DNS_ZONE_NAME}" + fi + if [[ -n "${FEDERATIONS_DOMAIN_MAP}" ]]; then + cat <<EOF >>/srv/salt-overlay/pillar/cluster-params.sls +federations_domain_map: '$(echo "- --federations=${FEDERATIONS_DOMAIN_MAP}" | sed -e "s/'/''/g")' +EOF + else + cat <<EOF >>/srv/salt-overlay/pillar/cluster-params.sls +federations_domain_map: '' +EOF + fi + else + cat <<EOF >>/srv/salt-overlay/pillar/cluster-params.sls +federations_domain_map: '' +EOF + fi } # The job of this function is simple, but the basic regular expression syntax makes diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 83b6957574..6c7ca0642b 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -831,6 +831,20 @@ function start-kube-addons { sed -i -e "s@{{ *pillar\['dns_replicas'\] *}}@${DNS_REPLICAS}@g" "${dns_rc_file}" sed -i -e "s@{{ *pillar\['dns_domain'\] *}}@${DNS_DOMAIN}@g" "${dns_rc_file}" sed -i -e "s@{{ *pillar\['dns_server'\] *}}@${DNS_SERVER_IP}@g" "${dns_svc_file}" + + if [[ "${FEDERATION:-}" == "true" ]]; then + FEDERATIONS_DOMAIN_MAP="${FEDERATIONS_DOMAIN_MAP:-}" + if [[ -z "${FEDERATIONS_DOMAIN_MAP}" && -n "${FEDERATION_NAME:-}" && -n "${DNS_ZONE_NAME:-}" ]]; then + FEDERATIONS_DOMAIN_MAP="${FEDERATION_NAME}=${DNS_ZONE_NAME}" + fi + if [[ -n "${FEDERATIONS_DOMAIN_MAP}" ]]; then + sed -i -e "s@{{ *pillar\['federations_domain_map'\] *}}@- --federations=${FEDERATIONS_DOMAIN_MAP}@g" "${dns_rc_file}" + else + sed -i -e "/{{ *pillar\['federations_domain_map'\] *}}/d" "${dns_rc_file}" + fi + else + sed -i -e "/{{ *pillar\['federations_domain_map'\] *}}/d" "${dns_rc_file}" + fi fi if [[ "${ENABLE_CLUSTER_REGISTRY:-}" == "true" ]]; then setup-addon-manifests "addons" "registry" diff --git a/cluster/gce/trusty/configure-helper.sh b/cluster/gce/trusty/configure-helper.sh index e43de66e75..e2fb5d3e2a 100644 --- a/cluster/gce/trusty/configure-helper.sh +++ b/cluster/gce/trusty/configure-helper.sh @@ -767,6 +767,20 @@ start_kube_addons() { sed -i -e "s@{{ *pillar\['dns_replicas'\] *}}@${DNS_REPLICAS}@g" "${dns_rc_file}" sed -i -e "s@{{ *pillar\['dns_domain'\] *}}@${DNS_DOMAIN}@g" "${dns_rc_file}" sed -i -e "s@{{ *pillar\['dns_server'\] *}}@${DNS_SERVER_IP}@g" "${dns_svc_file}" + + if [[ "${FEDERATION:-}" == "true" ]]; then + FEDERATIONS_DOMAIN_MAP="${FEDERATIONS_DOMAIN_MAP:-}" + if [[ -z "${FEDERATIONS_DOMAIN_MAP}" && -n "${FEDERATION_NAME:-}" && -n "${DNS_ZONE_NAME:-}" ]]; then + FEDERATIONS_DOMAIN_MAP="${FEDERATION_NAME}=${DNS_ZONE_NAME}" + fi + if [[ -n "${FEDERATIONS_DOMAIN_MAP}" ]]; then + sed -i -e "s@{{ *pillar\['federations_domain_map'\] *}}@- --federations=${FEDERATIONS_DOMAIN_MAP}@g" "${dns_rc_file}" + else + sed -i -e "/{{ *pillar\['federations_domain_map'\] *}}/d" "${dns_rc_file}" + fi + else + sed -i -e "/{{ *pillar\['federations_domain_map'\] *}}/d" "${dns_rc_file}" + fi fi if [ "${ENABLE_CLUSTER_REGISTRY:-}" = "true" ]; then setup_addon_manifests "addons" "registry" diff --git a/cluster/mesos/docker/deploy-dns.sh b/cluster/mesos/docker/deploy-dns.sh index f8f1734abd..f9aff16538 100755 --- a/cluster/mesos/docker/deploy-dns.sh +++ b/cluster/mesos/docker/deploy-dns.sh @@ -31,6 +31,21 @@ workspace=$(pwd) sed -e "s/{{ pillar\['dns_replicas'\] }}/${DNS_REPLICAS}/g;s/{{ pillar\['dns_domain'\] }}/${DNS_DOMAIN}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in" > "${workspace}/skydns-rc.yaml" sed -e "s/{{ pillar\['dns_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in" > "${workspace}/skydns-svc.yaml" +# Federation specific values. +if [[ "${FEDERATION:-}" == "true" ]]; then + FEDERATIONS_DOMAIN_MAP="${FEDERATIONS_DOMAIN_MAP:-}" + if [[ -z "${FEDERATIONS_DOMAIN_MAP}" && -n "${FEDERATION_NAME:-}" && -n "${DNS_ZONE_NAME:-}" ]]; then + FEDERATIONS_DOMAIN_MAP="${FEDERATION_NAME}=${DNS_ZONE_NAME}" + fi + if [[ -n "${FEDERATIONS_DOMAIN_MAP}" ]]; then + sed -i -e "s/{{ pillar\['federations_domain_map'\] }}/- --federations=${FEDERATIONS_DOMAIN_MAP}/g" "${workspace}/skydns-rc.yaml" + else + sed -i -e "/{{ pillar\['federations_domain_map'\] }}/d" "${workspace}/skydns-rc.yaml" + fi +else + sed -i -e "/{{ pillar\['federations_domain_map'\] }}/d" "${workspace}/skydns-rc.yaml" +fi + # Use kubectl to create skydns rc and service "${kubectl}" create -f "${workspace}/skydns-rc.yaml" "${kubectl}" create -f "${workspace}/skydns-svc.yaml" diff --git a/cluster/openstack-heat/kubernetes-heat/fragments/configure-salt.yaml b/cluster/openstack-heat/kubernetes-heat/fragments/configure-salt.yaml index c996d39482..bed41547c4 100644 --- a/cluster/openstack-heat/kubernetes-heat/fragments/configure-salt.yaml +++ b/cluster/openstack-heat/kubernetes-heat/fragments/configure-salt.yaml @@ -46,6 +46,7 @@ write_files: dns_replicas: "1" dns_server: 10.246.0.10 dns_domain: cluster.local + federations_domain_map: '' instance_prefix: kubernetes admission_control: NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota enable_cpu_cfs_quota: "true" diff --git a/cluster/photon-controller/templates/create-dynamic-salt-files.sh b/cluster/photon-controller/templates/create-dynamic-salt-files.sh index 424c75bd4f..4a7c3be701 100755 --- a/cluster/photon-controller/templates/create-dynamic-salt-files.sh +++ b/cluster/photon-controller/templates/create-dynamic-salt-files.sh @@ -120,6 +120,7 @@ enable_cluster_dns: "${ENABLE_CLUSTER_DNS:-false}" dns_replicas: ${DNS_REPLICAS:-1} dns_server: $DNS_SERVER_IP dns_domain: $DNS_DOMAIN +federations_domain_map: '' e2e_storage_test_environment: "${E2E_STORAGE_TEST_ENVIRONMENT:-false}" cluster_cidr: "$NODE_IP_RANGES" allocate_node_cidrs: "${ALLOCATE_NODE_CIDRS:-true}" diff --git a/cluster/vagrant/provision-utils.sh b/cluster/vagrant/provision-utils.sh index 846d9c505c..e486af9326 100755 --- a/cluster/vagrant/provision-utils.sh +++ b/cluster/vagrant/provision-utils.sh @@ -59,6 +59,7 @@ enable_cluster_dns: '$(echo "$ENABLE_CLUSTER_DNS" | sed -e "s/'/''/g")' dns_replicas: '$(echo "$DNS_REPLICAS" | sed -e "s/'/''/g")' dns_server: '$(echo "$DNS_SERVER_IP" | sed -e "s/'/''/g")' dns_domain: '$(echo "$DNS_DOMAIN" | sed -e "s/'/''/g")' +federations_domain_map: '' instance_prefix: '$(echo "$INSTANCE_PREFIX" | sed -e "s/'/''/g")' admission_control: '$(echo "$ADMISSION_CONTROL" | sed -e "s/'/''/g")' enable_cpu_cfs_quota: '$(echo "$ENABLE_CPU_CFS_QUOTA" | sed -e "s/'/''/g")' diff --git a/cluster/vsphere/templates/create-dynamic-salt-files.sh b/cluster/vsphere/templates/create-dynamic-salt-files.sh index e85aaacf7d..0d2e9252a6 100755 --- a/cluster/vsphere/templates/create-dynamic-salt-files.sh +++ b/cluster/vsphere/templates/create-dynamic-salt-files.sh @@ -120,6 +120,7 @@ enable_cluster_dns: "${ENABLE_CLUSTER_DNS:-false}" dns_replicas: ${DNS_REPLICAS:-1} dns_server: $DNS_SERVER_IP dns_domain: $DNS_DOMAIN +federations_domain_map: '' e2e_storage_test_environment: "${E2E_STORAGE_TEST_ENVIRONMENT:-false}" cluster_cidr: "$NODE_IP_RANGES" allocate_node_cidrs: "${ALLOCATE_NODE_CIDRS:-true}" diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 9713243b85..6a7e1e6458 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -412,6 +412,19 @@ function start_kubedns { if [[ "${ENABLE_CLUSTER_DNS}" = true ]]; then echo "Creating kube-system namespace" sed -e "s/{{ pillar\['dns_replicas'\] }}/${DNS_REPLICAS}/g;s/{{ pillar\['dns_domain'\] }}/${DNS_DOMAIN}/g;" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in" >| skydns-rc.yaml + if [[ "${FEDERATION:-}" == "true" ]]; then + FEDERATIONS_DOMAIN_MAP="${FEDERATIONS_DOMAIN_MAP:-}" + if [[ -z "${FEDERATIONS_DOMAIN_MAP}" && -n "${FEDERATION_NAME:-}" && -n "${DNS_ZONE_NAME:-}" ]]; then + FEDERATIONS_DOMAIN_MAP="${FEDERATION_NAME}=${DNS_ZONE_NAME}" + fi + if [[ -n "${FEDERATIONS_DOMAIN_MAP}" ]]; then + sed -i -e "s/{{ pillar\['federations_domain_map'\] }}/- --federations=${FEDERATIONS_DOMAIN_MAP}/g" skydns-rc.yaml + else + sed -i -e "/{{ pillar\['federations_domain_map'\] }}/d" skydns-rc.yaml + fi + else + sed -i -e "/{{ pillar\['federations_domain_map'\] }}/d" skydns-rc.yaml + fi sed -e "s/{{ pillar\['dns_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in" >| skydns-svc.yaml cat <<EOF >namespace.yaml apiVersion: v1 From 1cf202a1ffdc68a8692786e11bd10b564228742f Mon Sep 17 00:00:00 2001 From: Marie Shaw <mnshaw@google.com> Date: Mon, 13 Jun 2016 11:21:19 -0700 Subject: [PATCH 231/339] Port configmap test to node e2e suite --- hack/verify-flags/exceptions.txt | 1 + test/e2e_node/configmap.go | 346 +++++++++++++++++++++++++++++++ 2 files changed, 347 insertions(+) create mode 100644 test/e2e_node/configmap.go diff --git a/hack/verify-flags/exceptions.txt b/hack/verify-flags/exceptions.txt index 91435dfaf7..7a1118492b 100644 --- a/hack/verify-flags/exceptions.txt +++ b/hack/verify-flags/exceptions.txt @@ -93,6 +93,7 @@ test/e2e/host_path.go: fmt.Sprintf("--file_content_in_loop=%v", filePath), test/e2e/host_path.go: fmt.Sprintf("--file_content_in_loop=%v", filePathInReader), test/e2e/host_path.go: fmt.Sprintf("--retry_time=%d", retryDuration), test/e2e/host_path.go: fmt.Sprintf("--retry_time=%d", retryDuration), +test/e2e_node/configmap.go: Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volume/data-1"}, test/images/mount-tester/mt.go: flag.BoolVar(&breakOnExpectedContent, "break_on_expected_content", true, "Break out of loop on expected content, (use with --file_content_in_loop flag only)") test/images/mount-tester/mt.go: flag.IntVar(&retryDuration, "retry_time", 180, "Retry time during the loop") test/images/mount-tester/mt.go: flag.StringVar(&readFileContentInLoopPath, "file_content_in_loop", "", "Path to read the file content in loop from") diff --git a/test/e2e_node/configmap.go b/test/e2e_node/configmap.go new file mode 100644 index 0000000000..4e6c40ec7f --- /dev/null +++ b/test/e2e_node/configmap.go @@ -0,0 +1,346 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package e2e_node + +import ( + "fmt" + "time" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/util" + "k8s.io/kubernetes/test/e2e/framework" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = framework.KubeDescribe("ConfigMap", func() { + + f := NewDefaultFramework("configmap") + + It("should be consumable from pods in volumpe [Conformance]", func() { + doConfigMapE2EWithoutMappings(f, 0, 0) + }) + + It("should be consumable from pods in volume as non-root [Conformance]", func() { + doConfigMapE2EWithoutMappings(f, 1000, 0) + }) + + It("should be consumable from pods in volume as non-root with FSGroup [Feature:FSGroup]", func() { + doConfigMapE2EWithoutMappings(f, 1000, 1001) + }) + + It("should be consumable from pods in volume with mappings [Conformance]", func() { + doConfigMapE2EWithMappings(f, 0, 0) + }) + + It("should be consumable from pods in volume with mappings as non-root [Conformance]", func() { + doConfigMapE2EWithMappings(f, 1000, 0) + }) + + It("should be consumable from pods in volume with mappings as non-root with FSGroup [Feature:FSGroup]", func() { + doConfigMapE2EWithMappings(f, 1000, 1001) + }) + + It("updates should be reflected in volume [Conformance]", func() { + + // We may have to wait or a full sync period to elapse before the + // Kubelet projects the update into the volume and the container picks + // it up. This timeout is based on the default Kubelet sync period (1 + // minute) plus additional time for fudge factor. + const podLogTimeout = 300 * time.Second + + name := "configmap-test-upd-" + string(util.NewUUID()) + volumeName := "configmap-volume" + volumeMountPath := "/etc/configmap-volume" + containerName := "configmap-volume-test" + + configMap := &api.ConfigMap{ + ObjectMeta: api.ObjectMeta{ + Namespace: f.Namespace.Name, + Name: name, + }, + Data: map[string]string{ + "data-1": "value-1", + }, + } + + By(fmt.Sprintf("Creating configMap with name %s", configMap.Name)) + + var err error + if configMap, err = f.Client.ConfigMaps(f.Namespace.Name).Create(configMap); err != nil { + framework.Failf("unable to create test configMap %s: %v", configMap.Name, err) + } + + pod := &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: "pod-configmaps-" + string(util.NewUUID()), + }, + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + Name: volumeName, + VolumeSource: api.VolumeSource{ + ConfigMap: &api.ConfigMapVolumeSource{ + LocalObjectReference: api.LocalObjectReference{ + Name: name, + }, + }, + }, + }, + }, + Containers: []api.Container{ + { + Name: containerName, + Image: "gcr.io/google_containers/mounttest:0.6", + Command: []string{"/mt", "--break_on_expected_content=false", "--retry_time=120", "--file_content_in_loop=/etc/configmap-volume/data-1"}, + VolumeMounts: []api.VolumeMount{ + { + Name: volumeName, + MountPath: volumeMountPath, + ReadOnly: true, + }, + }, + }, + }, + RestartPolicy: api.RestartPolicyNever, + }, + } + + assignPodToNode(pod) + + By("Creating the pod") + _, err = f.Client.Pods(f.Namespace.Name).Create(pod) + Expect(err).NotTo(HaveOccurred()) + + framework.ExpectNoError(framework.WaitForPodRunningInNamespace(f.Client, pod.Name, f.Namespace.Name)) + + pollLogs := func() (string, error) { + return framework.GetPodLogs(f.Client, f.Namespace.Name, pod.Name, containerName) + } + + Eventually(pollLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("value-1")) + + By(fmt.Sprintf("Updating configmap %v", configMap.Name)) + configMap.ResourceVersion = "" // to force update + configMap.Data["data-1"] = "value-2" + _, err = f.Client.ConfigMaps(f.Namespace.Name).Update(configMap) + Expect(err).NotTo(HaveOccurred()) + + By("waiting to observe update in volume") + Eventually(pollLogs, podLogTimeout, framework.Poll).Should(ContainSubstring("value-2")) + }) + + It("should be consumable via environment variable [Conformance]", func() { + name := "configmap-test-" + string(util.NewUUID()) + configMap := newConfigMap(f, name) + By(fmt.Sprintf("Creating configMap %v/%v", f.Namespace.Name, configMap.Name)) + + var err error + if configMap, err = f.Client.ConfigMaps(f.Namespace.Name).Create(configMap); err != nil { + framework.Failf("unable to create test configMap %s: %v", configMap.Name, err) + } + + pod := &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: "pod-configmaps-" + string(util.NewUUID()), + }, + Spec: api.PodSpec{ + Containers: []api.Container{ + { + Name: "env-test", + Image: "gcr.io/google_containers/busybox:1.24", + Command: []string{"sh", "-c", "env"}, + Env: []api.EnvVar{ + { + Name: "CONFIG_DATA_1", + ValueFrom: &api.EnvVarSource{ + ConfigMapKeyRef: &api.ConfigMapKeySelector{ + LocalObjectReference: api.LocalObjectReference{ + Name: name, + }, + Key: "data-1", + }, + }, + }, + }, + }, + }, + RestartPolicy: api.RestartPolicyNever, + }, + } + + assignPodToNode(pod) + + framework.TestContainerOutput("consume configMaps", f.Client, pod, 0, []string{ + "CONFIG_DATA_1=value-1", + }, f.Namespace.Name) + }) +}) + +func newConfigMap(f *framework.Framework, name string) *api.ConfigMap { + return &api.ConfigMap{ + ObjectMeta: api.ObjectMeta{ + Namespace: f.Namespace.Name, + Name: name, + }, + Data: map[string]string{ + "data-1": "value-1", + "data-2": "value-2", + "data-3": "value-3", + }, + } +} + +func doConfigMapE2EWithoutMappings(f *framework.Framework, uid, fsGroup int64) { + var ( + name = "configmap-test-volume-" + string(util.NewUUID()) + volumeName = "configmap-volume" + volumeMountPath = "/etc/configmap-volume" + configMap = newConfigMap(f, name) + ) + + By(fmt.Sprintf("Creating configMap with name %s", configMap.Name)) + + var err error + if configMap, err = f.Client.ConfigMaps(f.Namespace.Name).Create(configMap); err != nil { + framework.Failf("unable to create test configMap %s: %v", configMap.Name, err) + } + + pod := &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: "pod-configmaps-" + string(util.NewUUID()), + }, + Spec: api.PodSpec{ + SecurityContext: &api.PodSecurityContext{}, + Volumes: []api.Volume{ + { + Name: volumeName, + VolumeSource: api.VolumeSource{ + ConfigMap: &api.ConfigMapVolumeSource{ + LocalObjectReference: api.LocalObjectReference{ + Name: name, + }, + }, + }, + }, + }, + Containers: []api.Container{ + { + Name: "configmap-volume-test", + Image: "gcr.io/google_containers/mounttest:0.6", + Args: []string{"--file_content=/etc/configmap-volume/data-1"}, + VolumeMounts: []api.VolumeMount{ + { + Name: volumeName, + MountPath: volumeMountPath, + ReadOnly: true, + }, + }, + }, + }, + RestartPolicy: api.RestartPolicyNever, + }, + } + + if uid != 0 { + pod.Spec.SecurityContext.RunAsUser = &uid + } + + if fsGroup != 0 { + pod.Spec.SecurityContext.FSGroup = &fsGroup + } + + assignPodToNode(pod) + + framework.TestContainerOutput("consume configMaps", f.Client, pod, 0, []string{ + "content of file \"/etc/configmap-volume/data-1\": value-1", + }, f.Namespace.Name) + +} + +func doConfigMapE2EWithMappings(f *framework.Framework, uid, fsGroup int64) { + var ( + name = "configmap-test-volume-map-" + string(util.NewUUID()) + volumeName = "configmap-volume" + volumeMountPath = "/etc/configmap-volume" + configMap = newConfigMap(f, name) + ) + + By(fmt.Sprintf("Creating configMap with name %s", configMap.Name)) + + var err error + if configMap, err = f.Client.ConfigMaps(f.Namespace.Name).Create(configMap); err != nil { + framework.Failf("unable to create test configMap %s: %v", configMap.Name, err) + } + + pod := &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: "pod-configmaps-" + string(util.NewUUID()), + }, + Spec: api.PodSpec{ + SecurityContext: &api.PodSecurityContext{}, + Volumes: []api.Volume{ + { + Name: volumeName, + VolumeSource: api.VolumeSource{ + ConfigMap: &api.ConfigMapVolumeSource{ + LocalObjectReference: api.LocalObjectReference{ + Name: name, + }, + Items: []api.KeyToPath{ + { + Key: "data-2", + Path: "path/to/data-2", + }, + }, + }, + }, + }, + }, + Containers: []api.Container{ + { + Name: "configmap-volume-test", + Image: "gcr.io/google_containers/mounttest:0.6", + Args: []string{"--file_content=/etc/configmap-volume/path/to/data-2"}, + VolumeMounts: []api.VolumeMount{ + { + Name: volumeName, + MountPath: volumeMountPath, + ReadOnly: true, + }, + }, + }, + }, + RestartPolicy: api.RestartPolicyNever, + }, + } + + if uid != 0 { + pod.Spec.SecurityContext.RunAsUser = &uid + } + + if fsGroup != 0 { + pod.Spec.SecurityContext.FSGroup = &fsGroup + } + + assignPodToNode(pod) + + framework.TestContainerOutput("consume configMaps", f.Client, pod, 0, []string{ + "content of file \"/etc/configmap-volume/path/to/data-2\": value-2", + }, f.Namespace.Name) +} From 716fb5ed7dcbf094ac312c7327ecd32196c51593 Mon Sep 17 00:00:00 2001 From: xiangpengzhao <zhao.xiangpeng@zte.com.cn> Date: Sat, 25 Jun 2016 04:20:45 -0400 Subject: [PATCH 232/339] Should set default value for --service-node-port-range flag before vefirying --- pkg/genericapiserver/options/server_run_options.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/genericapiserver/options/server_run_options.go b/pkg/genericapiserver/options/server_run_options.go index a1c6b26111..653deae41c 100644 --- a/pkg/genericapiserver/options/server_run_options.go +++ b/pkg/genericapiserver/options/server_run_options.go @@ -133,6 +133,7 @@ func NewServerRunOptions() *ServerRunOptions { MinRequestTimeout: 1800, RuntimeConfig: make(config.ConfigurationMap), SecurePort: 6443, + ServiceNodePortRange: utilnet.PortRange{Base: 30000, Size: 2768}, StorageVersions: registered.AllPreferredGroupVersions(), } } From 5b69688b4bd3e0563ee3a99254111112ebd95c95 Mon Sep 17 00:00:00 2001 From: xiangpengzhao <zhao.xiangpeng@zte.com.cn> Date: Fri, 3 Jun 2016 01:02:26 -0400 Subject: [PATCH 233/339] Check nil for pointer --- plugin/pkg/scheduler/algorithm/predicates/predicates.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates.go b/plugin/pkg/scheduler/algorithm/predicates/predicates.go index 3be33839a3..18381d6eb7 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates.go @@ -169,6 +169,10 @@ func (c *MaxPDVolumeCountChecker) filterVolumes(volumes []api.Volume, namespace return nil } + if pvc == nil { + return fmt.Errorf("PersistentVolumeClaim not found: %q", pvcName) + } + pvName := pvc.Spec.VolumeName if pvName == "" { return fmt.Errorf("PersistentVolumeClaim is not bound: %q", pvcName) @@ -186,6 +190,10 @@ func (c *MaxPDVolumeCountChecker) filterVolumes(volumes []api.Volume, namespace return nil } + if pv == nil { + return fmt.Errorf("PersistentVolume not found: %q", pvName) + } + if id, ok := c.filter.FilterPersistentVolume(pv); ok { filteredVolumes[id] = true } From 82a9bed565d0a877eeb8d7f68e87cd478b82f46b Mon Sep 17 00:00:00 2001 From: Clayton Coleman <ccoleman@redhat.com> Date: Sun, 12 Jun 2016 15:47:36 -0400 Subject: [PATCH 234/339] Copy reflect diff --- pkg/api/copy_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/copy_test.go b/pkg/api/copy_test.go index af81d02732..a0f7628bf7 100644 --- a/pkg/api/copy_test.go +++ b/pkg/api/copy_test.go @@ -54,7 +54,7 @@ func doDeepCopyTest(t *testing.T, kind unversioned.GroupVersionKind, f *fuzz.Fuz } if !reflect.DeepEqual(item, itemCopy) { - t.Errorf("\nexpected: %#v\n\ngot: %#v\n\ndiff: %v", item, itemCopy, diff.ObjectGoPrintSideBySide(item, itemCopy)) + t.Errorf("\nexpected: %#v\n\ngot: %#v\n\ndiff: %v", item, itemCopy, diff.ObjectReflectDiff(item, itemCopy)) } } From 9f7e16c2563cc11ebef91678aa2e0f42354cdb9e Mon Sep 17 00:00:00 2001 From: Clayton Coleman <ccoleman@redhat.com> Date: Sun, 12 Jun 2016 18:05:17 -0400 Subject: [PATCH 235/339] Take optional arguments in generated-protobuf-dockerized.sh --- hack/update-generated-protobuf-dockerized.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hack/update-generated-protobuf-dockerized.sh b/hack/update-generated-protobuf-dockerized.sh index 3e281348f4..c7cb6c4350 100755 --- a/hack/update-generated-protobuf-dockerized.sh +++ b/hack/update-generated-protobuf-dockerized.sh @@ -43,4 +43,5 @@ gotoprotobuf=$(kube::util::find-binary "go-to-protobuf") PATH="${KUBE_ROOT}/_output/local/go/bin:${PATH}" \ "${gotoprotobuf}" \ --proto-import="${KUBE_ROOT}/vendor" \ - --proto-import="${KUBE_ROOT}/third_party/protobuf" + --proto-import="${KUBE_ROOT}/third_party/protobuf" \ + $@ From 5f9e7a00b84c464b200d3fe589a0fb68d92a2142 Mon Sep 17 00:00:00 2001 From: Clayton Coleman <ccoleman@redhat.com> Date: Sun, 12 Jun 2016 18:08:34 -0400 Subject: [PATCH 236/339] Add optional slice and map support to protobuf Specifying // +protobuf.nullable=true on a Go type that is an alias of a map or slice will generate a synthetic protobuf message with the type name that will serialize to the wire in a way that allows the difference between empty and nil to be recorded. For instance: // +protobuf.nullable=true types OptionalMap map[string]string will create the following message: message OptionalMap { map<string, string> Items = 1 } and generate marshallers that use the presence of OptionalMap to determine whether the map is nil (rather than Items, which protobuf provides no way to delineate between empty and nil). --- .../go2idl/go-to-protobuf/protobuf/cmd.go | 5 +- .../go-to-protobuf/protobuf/generator.go | 71 ++++++- .../go2idl/go-to-protobuf/protobuf/namer.go | 22 ++- .../go2idl/go-to-protobuf/protobuf/package.go | 13 +- .../go2idl/go-to-protobuf/protobuf/parser.go | 173 +++++++++++++++++- cmd/libs/go2idl/parser/parse.go | 5 +- cmd/libs/go2idl/parser/parse_test.go | 12 +- 7 files changed, 278 insertions(+), 23 deletions(-) diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go index 5f21816a4a..7f8d04e1c4 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go @@ -124,6 +124,9 @@ func Run(g *Generator) { protobufNames := NewProtobufNamer() outputPackages := generator.Packages{} for _, d := range strings.Split(g.Packages, ",") { + if strings.Contains(d, "-") { + log.Fatalf("Package names must be valid protobuf package identifiers, which allow only [a-z0-9_]: %s", d) + } generateAllTypes, outputPackage := true, true switch { case strings.HasPrefix(d, "+"): @@ -235,7 +238,7 @@ func Run(g *Generator) { // alter the generated protobuf file to remove the generated types (but leave the serializers) and rewrite the // package statement to match the desired package name - if err := RewriteGeneratedGogoProtobufFile(outputPath, p.ExtractGeneratedType, buf.Bytes()); err != nil { + if err := RewriteGeneratedGogoProtobufFile(outputPath, p.ExtractGeneratedType, p.OptionalTypeName, buf.Bytes()); err != nil { log.Fatalf("Unable to rewrite generated %s: %v", outputPath, err) } diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go index 92e9dc85e8..739a6ef70f 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go @@ -118,6 +118,19 @@ func isProtoable(seen map[*types.Type]bool, t *types.Type) bool { } } +// isOptionalAlias should return true if the specified type has an underlying type +// (is an alias) of a map or slice and has the comment tag protobuf.nullable=true, +// indicating that the type should be nullable in protobuf. +func isOptionalAlias(t *types.Type) bool { + if t.Underlying == nil || (t.Underlying.Kind != types.Map && t.Underlying.Kind != types.Slice) { + return false + } + if types.ExtractCommentTags("+", t.CommentLines)["protobuf.nullable"] != "true" { + return false + } + return true +} + func (g *genProtoIDL) Imports(c *generator.Context) (imports []string) { lines := []string{} // TODO: this could be expressed more cleanly @@ -149,6 +162,8 @@ func (g *genProtoIDL) GenerateType(c *generator.Context, t *types.Type, w io.Wri t: t, } switch t.Kind { + case types.Alias: + return b.doAlias(sw) case types.Struct: return b.doStruct(sw) default: @@ -206,7 +221,7 @@ func (p protobufLocator) ProtoTypeFor(t *types.Type) (*types.Type, error) { return t, nil } // it's a message - if t.Kind == types.Struct { + if t.Kind == types.Struct || isOptionalAlias(t) { t := &types.Type{ Name: p.namer.GoNameToProtoName(t.Name), Kind: types.Protobuf, @@ -232,6 +247,37 @@ func (b bodyGen) unknown(sw *generator.SnippetWriter) error { return fmt.Errorf("not sure how to generate: %#v", b.t) } +func (b bodyGen) doAlias(sw *generator.SnippetWriter) error { + if !isOptionalAlias(b.t) { + return nil + } + + var kind string + switch b.t.Underlying.Kind { + case types.Map: + kind = "map" + default: + kind = "slice" + } + optional := &types.Type{ + Name: b.t.Name, + Kind: types.Struct, + + CommentLines: b.t.CommentLines, + SecondClosestCommentLines: b.t.SecondClosestCommentLines, + Members: []types.Member{ + { + Name: "Items", + CommentLines: fmt.Sprintf("items, if empty, will result in an empty %s\n", kind), + Type: b.t.Underlying, + }, + }, + } + nested := b + nested.t = optional + return nested.doStruct(sw) +} + func (b bodyGen) doStruct(sw *generator.SnippetWriter) error { if len(b.t.Name.Name) == 0 { return nil @@ -421,7 +467,7 @@ func memberTypeToProtobufField(locator ProtobufLocator, field *protoField, t *ty if err := memberTypeToProtobufField(locator, keyField, t.Key); err != nil { return err } - // All other protobuf types has kind types.Protobuf, so setting types.Map + // All other protobuf types have kind types.Protobuf, so setting types.Map // here would be very misleading. field.Type = &types.Type{ Kind: types.Protobuf, @@ -444,14 +490,19 @@ func memberTypeToProtobufField(locator ProtobufLocator, field *protoField, t *ty } field.Nullable = true case types.Alias: - if err := memberTypeToProtobufField(locator, field, t.Underlying); err != nil { - log.Printf("failed to alias: %s %s: err %v", t.Name, t.Underlying.Name, err) - return err + if isOptionalAlias(t) { + field.Type, err = locator.ProtoTypeFor(t) + field.Nullable = true + } else { + if err := memberTypeToProtobufField(locator, field, t.Underlying); err != nil { + log.Printf("failed to alias: %s %s: err %v", t.Name, t.Underlying.Name, err) + return err + } + if field.Extras == nil { + field.Extras = make(map[string]string) + } + field.Extras["(gogoproto.casttype)"] = strconv.Quote(locator.CastTypeName(t.Name)) } - if field.Extras == nil { - field.Extras = make(map[string]string) - } - field.Extras["(gogoproto.casttype)"] = strconv.Quote(locator.CastTypeName(t.Name)) case types.Slice: if t.Elem.Name.Name == "byte" && len(t.Elem.Name.Package) == 0 { field.Type = &types.Type{Name: types.Name{Name: "bytes"}, Kind: types.Protobuf} @@ -661,7 +712,7 @@ func assembleProtoFile(w io.Writer, f *generator.File) { fmt.Fprint(w, "syntax = 'proto2';\n\n") if len(f.PackageName) > 0 { - fmt.Fprintf(w, "package %v;\n\n", f.PackageName) + fmt.Fprintf(w, "package %s;\n\n", f.PackageName) } if len(f.Imports) > 0 { diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/namer.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/namer.go index 9e2b985346..8da08af4cd 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/namer.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/namer.go @@ -101,7 +101,7 @@ type typeNameSet map[types.Name]*protobufPackage // assignGoTypeToProtoPackage looks for Go and Protobuf types that are referenced by a type in // a package. It will not recurse into protobuf types. -func assignGoTypeToProtoPackage(p *protobufPackage, t *types.Type, local, global typeNameSet) { +func assignGoTypeToProtoPackage(p *protobufPackage, t *types.Type, local, global typeNameSet, optional map[types.Name]struct{}) { newT, isProto := isFundamentalProtoType(t) if isProto { t = newT @@ -136,20 +136,23 @@ func assignGoTypeToProtoPackage(p *protobufPackage, t *types.Type, local, global continue } if err := protobufTagToField(tag, field, m, t, p.ProtoTypeName()); err == nil && field.Type != nil { - assignGoTypeToProtoPackage(p, field.Type, local, global) + assignGoTypeToProtoPackage(p, field.Type, local, global, optional) continue } - assignGoTypeToProtoPackage(p, m.Type, local, global) + assignGoTypeToProtoPackage(p, m.Type, local, global, optional) } // TODO: should methods be walked? if t.Elem != nil { - assignGoTypeToProtoPackage(p, t.Elem, local, global) + assignGoTypeToProtoPackage(p, t.Elem, local, global, optional) } if t.Key != nil { - assignGoTypeToProtoPackage(p, t.Key, local, global) + assignGoTypeToProtoPackage(p, t.Key, local, global, optional) } if t.Underlying != nil { - assignGoTypeToProtoPackage(p, t.Underlying, local, global) + if t.Kind == types.Alias && isOptionalAlias(t) { + optional[t.Name] = struct{}{} + } + assignGoTypeToProtoPackage(p, t.Underlying, local, global, optional) } } @@ -157,19 +160,24 @@ func (n *protobufNamer) AssignTypesToPackages(c *generator.Context) error { global := make(typeNameSet) for _, p := range n.packages { local := make(typeNameSet) + optional := make(map[types.Name]struct{}) p.Imports = NewImportTracker(p.ProtoTypeName()) for _, t := range c.Order { if t.Name.Package != p.PackagePath { continue } - assignGoTypeToProtoPackage(p, t, local, global) + assignGoTypeToProtoPackage(p, t, local, global, optional) } p.FilterTypes = make(map[types.Name]struct{}) p.LocalNames = make(map[string]struct{}) + p.OptionalTypeNames = make(map[string]struct{}) for k, v := range local { if v == p { p.FilterTypes[k] = struct{}{} p.LocalNames[k.Name] = struct{}{} + if _, ok := optional[k]; ok { + p.OptionalTypeNames[k.Name] = struct{}{} + } } } } diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/package.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/package.go index cab2235221..742487e191 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/package.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/package.go @@ -75,6 +75,10 @@ type protobufPackage struct { // A list of names that this package exports LocalNames map[string]struct{} + // A list of type names in this package that will need marshaller rewriting + // to remove synthetic protobuf fields. + OptionalTypeNames map[string]struct{} + // A list of struct tags to generate onto named struct fields StructTags map[string]map[string]string @@ -110,7 +114,9 @@ func (p *protobufPackage) filterFunc(c *generator.Context, t *types.Type) bool { case types.Builtin: return false case types.Alias: - return false + if !isOptionalAlias(t) { + return false + } case types.Slice, types.Array, types.Map: return false case types.Pointer: @@ -128,6 +134,11 @@ func (p *protobufPackage) HasGoType(name string) bool { return ok } +func (p *protobufPackage) OptionalTypeName(name string) bool { + _, ok := p.OptionalTypeNames[name] + return ok +} + func (p *protobufPackage) ExtractGeneratedType(t *ast.TypeSpec) bool { if !p.HasGoType(t.Name.Name) { return false diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/parser.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/parser.go index 4ac4b86a37..4fef53ff93 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/parser.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/parser.go @@ -74,10 +74,19 @@ func rewriteFile(name string, header []byte, rewriteFn func(*token.FileSet, *ast // removed from the destination file. type ExtractFunc func(*ast.TypeSpec) bool -func RewriteGeneratedGogoProtobufFile(name string, extractFn ExtractFunc, header []byte) error { +// OptionalFunc returns true if the provided local name is a type that has protobuf.nullable=true +// and should have its marshal functions adjusted to remove the 'Items' accessor. +type OptionalFunc func(name string) bool + +func RewriteGeneratedGogoProtobufFile(name string, extractFn ExtractFunc, optionalFn OptionalFunc, header []byte) error { return rewriteFile(name, header, func(fset *token.FileSet, file *ast.File) error { cmap := ast.NewCommentMap(fset, file, file.Comments) + // transform methods that point to optional maps or slices + for _, d := range file.Decls { + rewriteOptionalMethods(d, optionalFn) + } + // remove types that are already declared decls := []ast.Decl{} for _, d := range file.Decls { @@ -97,6 +106,168 @@ func RewriteGeneratedGogoProtobufFile(name string, extractFn ExtractFunc, header }) } +// rewriteOptionalMethods makes specific mutations to marshaller methods that belong to types identified +// as being "optional" (they may be nil on the wire). This allows protobuf to serialize a map or slice and +// properly discriminate between empty and nil (which is not possible in protobuf). +// TODO: move into upstream gogo-protobuf once https://github.com/gogo/protobuf/issues/181 +// has agreement +func rewriteOptionalMethods(decl ast.Decl, isOptional OptionalFunc) { + switch t := decl.(type) { + case *ast.FuncDecl: + ident, ptr, ok := receiver(t) + if !ok { + return + } + + // correct initialization of the form `m.Field = &OptionalType{}` to + // `m.Field = OptionalType{}` + if t.Name.Name == "Unmarshal" { + ast.Walk(optionalAssignmentVisitor{fn: isOptional}, t.Body) + } + + if !isOptional(ident.Name) { + return + } + + switch t.Name.Name { + case "Unmarshal": + ast.Walk(&optionalItemsVisitor{}, t.Body) + case "MarshalTo", "Size": + ast.Walk(&optionalItemsVisitor{}, t.Body) + fallthrough + case "Marshal": + // if the method has a pointer receiver, set it back to a normal receiver + if ptr { + t.Recv.List[0].Type = ident + } + } + } +} + +type optionalAssignmentVisitor struct { + fn OptionalFunc +} + +// Visit walks the provided node, transforming field initializations of the form +// m.Field = &OptionalType{} -> m.Field = OptionalType{} +func (v optionalAssignmentVisitor) Visit(n ast.Node) ast.Visitor { + switch t := n.(type) { + case *ast.AssignStmt: + if len(t.Lhs) == 1 && len(t.Rhs) == 1 { + if !isFieldSelector(t.Lhs[0], "m", "") { + return nil + } + unary, ok := t.Rhs[0].(*ast.UnaryExpr) + if !ok || unary.Op != token.AND { + return nil + } + composite, ok := unary.X.(*ast.CompositeLit) + if !ok || composite.Type == nil || len(composite.Elts) != 0 { + return nil + } + if ident, ok := composite.Type.(*ast.Ident); ok && v.fn(ident.Name) { + t.Rhs[0] = composite + } + } + return nil + } + return v +} + +type optionalItemsVisitor struct{} + +// Visit walks the provided node, looking for specific patterns to transform that match +// the effective outcome of turning struct{ map[x]y || []x } into map[x]y or []x. +func (v *optionalItemsVisitor) Visit(n ast.Node) ast.Visitor { + switch t := n.(type) { + case *ast.RangeStmt: + if isFieldSelector(t.X, "m", "Items") { + t.X = &ast.Ident{Name: "m"} + } + case *ast.AssignStmt: + if len(t.Lhs) == 1 && len(t.Rhs) == 1 { + switch lhs := t.Lhs[0].(type) { + case *ast.IndexExpr: + if isFieldSelector(lhs.X, "m", "Items") { + lhs.X = &ast.StarExpr{X: &ast.Ident{Name: "m"}} + } + default: + if isFieldSelector(t.Lhs[0], "m", "Items") { + t.Lhs[0] = &ast.StarExpr{X: &ast.Ident{Name: "m"}} + } + } + switch rhs := t.Rhs[0].(type) { + case *ast.CallExpr: + if ident, ok := rhs.Fun.(*ast.Ident); ok && ident.Name == "append" { + ast.Walk(v, rhs) + if len(rhs.Args) > 0 { + switch arg := rhs.Args[0].(type) { + case *ast.Ident: + if arg.Name == "m" { + rhs.Args[0] = &ast.StarExpr{X: &ast.Ident{Name: "m"}} + } + } + } + return nil + } + } + } + case *ast.IfStmt: + if b, ok := t.Cond.(*ast.BinaryExpr); ok && b.Op == token.EQL { + if isFieldSelector(b.X, "m", "Items") && isIdent(b.Y, "nil") { + b.X = &ast.StarExpr{X: &ast.Ident{Name: "m"}} + } + } + case *ast.IndexExpr: + if isFieldSelector(t.X, "m", "Items") { + t.X = &ast.Ident{Name: "m"} + return nil + } + case *ast.CallExpr: + changed := false + for i := range t.Args { + if isFieldSelector(t.Args[i], "m", "Items") { + t.Args[i] = &ast.Ident{Name: "m"} + changed = true + } + } + if changed { + return nil + } + } + return v +} + +func isFieldSelector(n ast.Expr, name, field string) bool { + s, ok := n.(*ast.SelectorExpr) + if !ok || s.Sel == nil || (field != "" && s.Sel.Name != field) { + return false + } + return isIdent(s.X, name) +} + +func isIdent(n ast.Expr, value string) bool { + ident, ok := n.(*ast.Ident) + return ok && ident.Name == value +} + +func receiver(f *ast.FuncDecl) (ident *ast.Ident, pointer bool, ok bool) { + if f.Recv == nil || len(f.Recv.List) != 1 { + return nil, false, false + } + switch t := f.Recv.List[0].Type.(type) { + case *ast.StarExpr: + identity, ok := t.X.(*ast.Ident) + if !ok { + return nil, false, false + } + return identity, true, true + case *ast.Ident: + return t, false, true + } + return nil, false, false +} + // dropExistingTypeDeclarations removes any type declaration for which extractFn returns true. The function // returns true if the entire declaration should be dropped. func dropExistingTypeDeclarations(decl ast.Decl, extractFn ExtractFunc) bool { diff --git a/cmd/libs/go2idl/parser/parse.go b/cmd/libs/go2idl/parser/parse.go index b82b862d92..8957d92d93 100644 --- a/cmd/libs/go2idl/parser/parse.go +++ b/cmd/libs/go2idl/parser/parse.go @@ -576,7 +576,7 @@ func (b *Builder) walkType(u types.Universe, useName *types.Name, in tc.Type) *t return out case *tc.Named: switch t.Underlying().(type) { - case *tc.Named, *tc.Basic: + case *tc.Named, *tc.Basic, *tc.Map, *tc.Slice: name := tcNameToName(t.String()) out := u.Type(name) if out.Kind != types.Unknown { @@ -591,6 +591,9 @@ func (b *Builder) walkType(u types.Universe, useName *types.Name, in tc.Type) *t // "feature" for users. This flattens those types // together. name := tcNameToName(t.String()) + if name.Name == "OptionalMap" { + fmt.Printf("DEBUG: flattening %T -> %T\n", t, t.Underlying()) + } if out := u.Type(name); out.Kind != types.Unknown { return out // short circuit if we've already made this. } diff --git a/cmd/libs/go2idl/parser/parse_test.go b/cmd/libs/go2idl/parser/parse_test.go index 8d232c604f..83194b9cc1 100644 --- a/cmd/libs/go2idl/parser/parse_test.go +++ b/cmd/libs/go2idl/parser/parse_test.go @@ -391,8 +391,16 @@ type Interface interface{Method(a, b string) (c, d string)} t.Errorf("type %s not found", n) continue } - if e, a := item.k, thisType.Kind; e != a { - t.Errorf("%v-%s: type kind wrong, wanted %v, got %v (%#v)", nameIndex, n, e, a, thisType) + underlyingType := thisType + if item.k != types.Alias && thisType.Kind == types.Alias { + underlyingType = thisType.Underlying + if underlyingType == nil { + t.Errorf("underlying type %s not found", n) + continue + } + } + if e, a := item.k, underlyingType.Kind; e != a { + t.Errorf("%v-%s: type kind wrong, wanted %v, got %v (%#v)", nameIndex, n, e, a, underlyingType) } if e, a := item.names[nameIndex], namer.Name(thisType); e != a { t.Errorf("%v-%s: Expected %q, got %q", nameIndex, n, e, a) From 1c8b9289081d08436b7775a44e88064a51e8bea8 Mon Sep 17 00:00:00 2001 From: Clayton Coleman <ccoleman@redhat.com> Date: Sun, 12 Jun 2016 22:58:06 -0400 Subject: [PATCH 237/339] Handle aliases correctly in deepcopy/conversion --- .../conversion-gen/generators/conversion.go | 52 +++++++++++++------ .../deepcopy-gen/generators/deepcopy.go | 34 ++++++------ cmd/libs/go2idl/deepcopy-gen/main.go | 26 +++++----- cmd/libs/go2idl/parser/parse.go | 3 -- pkg/api/v1/conversion_generated.go | 13 ++--- 5 files changed, 75 insertions(+), 53 deletions(-) diff --git a/cmd/libs/go2idl/conversion-gen/generators/conversion.go b/cmd/libs/go2idl/conversion-gen/generators/conversion.go index 4a54c90b60..f295afe687 100644 --- a/cmd/libs/go2idl/conversion-gen/generators/conversion.go +++ b/cmd/libs/go2idl/conversion-gen/generators/conversion.go @@ -367,6 +367,14 @@ func isDirectlyConvertible(in, out *types.Type, preexisting conversions) bool { return false } +// unwrapAlias recurses down aliased types to find the bedrock type. +func unwrapAlias(in *types.Type) *types.Type { + if in.Kind == types.Alias { + return unwrapAlias(in.Underlying) + } + return in +} + func areTypesAliased(in, out *types.Type) bool { // If one of the types is Alias, resolve it. if in.Kind == types.Alias { @@ -685,11 +693,25 @@ func (g *genConversion) doStruct(inType, outType *types.Type, sw *generator.Snip // this field has "genconversion=false" comment to ignore it. continue } + t, outT := m.Type, outMember.Type + // create a copy of both underlying types but give them the top level alias name (since aliases + // are assignable) + if underlying := unwrapAlias(t); underlying != t { + copied := *underlying + copied.Name = t.Name + t = &copied + } + if underlying := unwrapAlias(outT); underlying != outT { + copied := *underlying + copied.Name = outT.Name + outT = &copied + } args := map[string]interface{}{ - "inType": m.Type, - "outType": outMember.Type, + "inType": t, + "outType": outT, "name": m.Name, } + // check based on the top level name, not the underlying names if function, ok := g.preexists(m.Type, outMember.Type); ok { args["function"] = function sw.Do("if err := $.function|raw$(&in.$.name$, &out.$.name$, s); err != nil {\n", args) @@ -697,32 +719,32 @@ func (g *genConversion) doStruct(inType, outType *types.Type, sw *generator.Snip sw.Do("}\n", nil) continue } - switch m.Type.Kind { + switch t.Kind { case types.Builtin: - if m.Type == outMember.Type { + if t == outT { sw.Do("out.$.name$ = in.$.name$\n", args) } else { sw.Do("out.$.name$ = $.outType|raw$(in.$.name$)\n", args) } case types.Map, types.Slice, types.Pointer: - if g.isDirectlyAssignable(m.Type, outMember.Type) { + if g.isDirectlyAssignable(t, outT) { sw.Do("out.$.name$ = in.$.name$\n", args) continue } sw.Do("if in.$.name$ != nil {\n", args) sw.Do("in, out := &in.$.name$, &out.$.name$\n", args) - g.generateFor(m.Type, outMember.Type, sw) + g.generateFor(t, outT, sw) sw.Do("} else {\n", nil) sw.Do("out.$.name$ = nil\n", args) sw.Do("}\n", nil) case types.Struct: - if g.isDirectlyAssignable(m.Type, outMember.Type) { + if g.isDirectlyAssignable(t, outT) { sw.Do("out.$.name$ = in.$.name$\n", args) continue } - if g.convertibleOnlyWithinPackage(m.Type, outMember.Type) { - funcName := g.funcNameTmpl(m.Type, outMember.Type) + if g.convertibleOnlyWithinPackage(t, outT) { + funcName := g.funcNameTmpl(t, outT) sw.Do(fmt.Sprintf("if err := %s(&in.$.name$, &out.$.name$, s); err != nil {\n", funcName), args) } else { sw.Do("// TODO: Inefficient conversion - can we improve it?\n", nil) @@ -731,15 +753,15 @@ func (g *genConversion) doStruct(inType, outType *types.Type, sw *generator.Snip sw.Do("return err\n", nil) sw.Do("}\n", nil) case types.Alias: - if outMember.Type.IsAssignable() { - if m.Type == outMember.Type { + if outT.IsAssignable() { + if t == outT { sw.Do("out.$.name$ = in.$.name$\n", args) } else { sw.Do("out.$.name$ = $.outType|raw$(in.$.name$)\n", args) } } else { - if g.convertibleOnlyWithinPackage(m.Type, outMember.Type) { - funcName := g.funcNameTmpl(m.Type, outMember.Type) + if g.convertibleOnlyWithinPackage(t, outT) { + funcName := g.funcNameTmpl(t, outT) sw.Do(fmt.Sprintf("if err := %s(&in.$.name$, &out.$.name$, s); err != nil {\n", funcName), args) } else { sw.Do("// TODO: Inefficient conversion - can we improve it?\n", nil) @@ -749,8 +771,8 @@ func (g *genConversion) doStruct(inType, outType *types.Type, sw *generator.Snip sw.Do("}\n", nil) } default: - if g.convertibleOnlyWithinPackage(m.Type, outMember.Type) { - funcName := g.funcNameTmpl(m.Type, outMember.Type) + if g.convertibleOnlyWithinPackage(t, outT) { + funcName := g.funcNameTmpl(t, outT) sw.Do(fmt.Sprintf("if err := %s(&in.$.name$, &out.$.name$, s); err != nil {\n", funcName), args) } else { sw.Do("// TODO: Inefficient conversion - can we improve it?\n", nil) diff --git a/cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go b/cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go index 0c88a1c877..fc233376c4 100644 --- a/cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go +++ b/cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go @@ -409,23 +409,29 @@ func (g *genDeepCopy) doSlice(t *types.Type, sw *generator.SnippetWriter) { func (g *genDeepCopy) doStruct(t *types.Type, sw *generator.SnippetWriter) { for _, m := range t.Members { + t := m.Type + if t.Kind == types.Alias { + copied := *t.Underlying + copied.Name = t.Name + t = &copied + } args := map[string]interface{}{ - "type": m.Type, + "type": t, "name": m.Name, } - switch m.Type.Kind { + switch t.Kind { case types.Builtin: sw.Do("out.$.name$ = in.$.name$\n", args) case types.Map, types.Slice, types.Pointer: sw.Do("if in.$.name$ != nil {\n", args) sw.Do("in, out := in.$.name$, &out.$.name$\n", args) - g.generateFor(m.Type, sw) + g.generateFor(t, sw) sw.Do("} else {\n", nil) sw.Do("out.$.name$ = nil\n", args) sw.Do("}\n", nil) case types.Struct: - if g.canInlineTypeFn(g.context, m.Type) { - funcName := g.funcNameTmpl(m.Type) + if g.canInlineTypeFn(g.context, t) { + funcName := g.funcNameTmpl(t) sw.Do(fmt.Sprintf("if err := %s(in.$.name$, &out.$.name$, c); err != nil {\n", funcName), args) sw.Do("return err\n", nil) sw.Do("}\n", nil) @@ -437,17 +443,13 @@ func (g *genDeepCopy) doStruct(t *types.Type, sw *generator.SnippetWriter) { sw.Do("}\n", nil) } default: - if m.Type.Kind == types.Alias && m.Type.Underlying.Kind == types.Builtin { - sw.Do("out.$.name$ = in.$.name$\n", args) - } else { - sw.Do("if in.$.name$ == nil {\n", args) - sw.Do("out.$.name$ = nil\n", args) - sw.Do("} else if newVal, err := c.DeepCopy(in.$.name$); err != nil {\n", args) - sw.Do("return err\n", nil) - sw.Do("} else {\n", nil) - sw.Do("out.$.name$ = newVal.($.type|raw$)\n", args) - sw.Do("}\n", nil) - } + sw.Do("if in.$.name$ == nil {\n", args) + sw.Do("out.$.name$ = nil\n", args) + sw.Do("} else if newVal, err := c.DeepCopy(in.$.name$); err != nil {\n", args) + sw.Do("return err\n", nil) + sw.Do("} else {\n", nil) + sw.Do("out.$.name$ = newVal.($.type|raw$)\n", args) + sw.Do("}\n", nil) } } } diff --git a/cmd/libs/go2idl/deepcopy-gen/main.go b/cmd/libs/go2idl/deepcopy-gen/main.go index b0cc9725db..159b04a003 100644 --- a/cmd/libs/go2idl/deepcopy-gen/main.go +++ b/cmd/libs/go2idl/deepcopy-gen/main.go @@ -38,6 +38,19 @@ func main() { // Override defaults. These are Kubernetes specific input locations. arguments.InputDirs = []string{ + // generate all types, but do not register them + "+k8s.io/kubernetes/pkg/api/unversioned", + + "-k8s.io/kubernetes/pkg/api/meta", + "-k8s.io/kubernetes/pkg/api/meta/metatypes", + "-k8s.io/kubernetes/pkg/api/resource", + "-k8s.io/kubernetes/pkg/conversion", + "-k8s.io/kubernetes/pkg/labels", + "-k8s.io/kubernetes/pkg/runtime", + "-k8s.io/kubernetes/pkg/runtime/serializer", + "-k8s.io/kubernetes/pkg/util/intstr", + "-k8s.io/kubernetes/pkg/util/sets", + "k8s.io/kubernetes/pkg/api", "k8s.io/kubernetes/pkg/api/v1", "k8s.io/kubernetes/pkg/apis/authentication.k8s.io", @@ -61,19 +74,6 @@ func main() { "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1", "k8s.io/kubernetes/federation/apis/federation", "k8s.io/kubernetes/federation/apis/federation/v1alpha1", - - // generate all types, but do not register them - "+k8s.io/kubernetes/pkg/api/unversioned", - - "-k8s.io/kubernetes/pkg/api/meta", - "-k8s.io/kubernetes/pkg/api/meta/metatypes", - "-k8s.io/kubernetes/pkg/api/resource", - "-k8s.io/kubernetes/pkg/conversion", - "-k8s.io/kubernetes/pkg/labels", - "-k8s.io/kubernetes/pkg/runtime", - "-k8s.io/kubernetes/pkg/runtime/serializer", - "-k8s.io/kubernetes/pkg/util/intstr", - "-k8s.io/kubernetes/pkg/util/sets", } if err := arguments.Execute( diff --git a/cmd/libs/go2idl/parser/parse.go b/cmd/libs/go2idl/parser/parse.go index 8957d92d93..4aeedb7e6d 100644 --- a/cmd/libs/go2idl/parser/parse.go +++ b/cmd/libs/go2idl/parser/parse.go @@ -591,9 +591,6 @@ func (b *Builder) walkType(u types.Universe, useName *types.Name, in tc.Type) *t // "feature" for users. This flattens those types // together. name := tcNameToName(t.String()) - if name.Name == "OptionalMap" { - fmt.Printf("DEBUG: flattening %T -> %T\n", t, t.Underlying()) - } if out := u.Type(name); out.Kind != types.Unknown { return out // short circuit if we've already made this. } diff --git a/pkg/api/v1/conversion_generated.go b/pkg/api/v1/conversion_generated.go index d3aad15522..67b2ec1ab6 100644 --- a/pkg/api/v1/conversion_generated.go +++ b/pkg/api/v1/conversion_generated.go @@ -25,6 +25,7 @@ import ( resource "k8s.io/kubernetes/pkg/api/resource" conversion "k8s.io/kubernetes/pkg/conversion" runtime "k8s.io/kubernetes/pkg/runtime" + types "k8s.io/kubernetes/pkg/types" ) func init() { @@ -3593,7 +3594,7 @@ func autoConvert_v1_ObjectMeta_To_api_ObjectMeta(in *ObjectMeta, out *api.Object out.GenerateName = in.GenerateName out.Namespace = in.Namespace out.SelfLink = in.SelfLink - out.UID = in.UID + out.UID = types.UID(in.UID) out.ResourceVersion = in.ResourceVersion out.Generation = in.Generation if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.CreationTimestamp, &out.CreationTimestamp, s); err != nil { @@ -3627,7 +3628,7 @@ func autoConvert_api_ObjectMeta_To_v1_ObjectMeta(in *api.ObjectMeta, out *Object out.GenerateName = in.GenerateName out.Namespace = in.Namespace out.SelfLink = in.SelfLink - out.UID = in.UID + out.UID = types.UID(in.UID) out.ResourceVersion = in.ResourceVersion out.Generation = in.Generation if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.CreationTimestamp, &out.CreationTimestamp, s); err != nil { @@ -3660,7 +3661,7 @@ func autoConvert_v1_ObjectReference_To_api_ObjectReference(in *ObjectReference, out.Kind = in.Kind out.Namespace = in.Namespace out.Name = in.Name - out.UID = in.UID + out.UID = types.UID(in.UID) out.APIVersion = in.APIVersion out.ResourceVersion = in.ResourceVersion out.FieldPath = in.FieldPath @@ -3675,7 +3676,7 @@ func autoConvert_api_ObjectReference_To_v1_ObjectReference(in *api.ObjectReferen out.Kind = in.Kind out.Namespace = in.Namespace out.Name = in.Name - out.UID = in.UID + out.UID = types.UID(in.UID) out.APIVersion = in.APIVersion out.ResourceVersion = in.ResourceVersion out.FieldPath = in.FieldPath @@ -3690,7 +3691,7 @@ func autoConvert_v1_OwnerReference_To_api_OwnerReference(in *OwnerReference, out out.APIVersion = in.APIVersion out.Kind = in.Kind out.Name = in.Name - out.UID = in.UID + out.UID = types.UID(in.UID) out.Controller = in.Controller return nil } @@ -3703,7 +3704,7 @@ func autoConvert_api_OwnerReference_To_v1_OwnerReference(in *api.OwnerReference, out.APIVersion = in.APIVersion out.Kind = in.Kind out.Name = in.Name - out.UID = in.UID + out.UID = types.UID(in.UID) out.Controller = in.Controller return nil } From d78946240ef97ea26e10a68dd2b1188920a926c2 Mon Sep 17 00:00:00 2001 From: Jan Safranek <jsafrane@redhat.com> Date: Tue, 28 Jun 2016 10:01:52 +0200 Subject: [PATCH 238/339] Fix error checks after cloning. We should not use clone result When cloning fails. Fixes issues found in #28108. --- pkg/controller/persistentvolume/controller_base.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/controller/persistentvolume/controller_base.go b/pkg/controller/persistentvolume/controller_base.go index 73915973e2..67a70b2f39 100644 --- a/pkg/controller/persistentvolume/controller_base.go +++ b/pkg/controller/persistentvolume/controller_base.go @@ -152,6 +152,7 @@ func (ctrl *PersistentVolumeController) initializeCaches(volumeSource, claimSour clone, err := conversion.NewCloner().DeepCopy(&volume) if err != nil { glog.Errorf("error cloning volume %q: %v", volume.Name, err) + continue } volumeClone := clone.(*api.PersistentVolume) ctrl.storeVolumeUpdate(volumeClone) @@ -172,6 +173,7 @@ func (ctrl *PersistentVolumeController) initializeCaches(volumeSource, claimSour clone, err := conversion.NewCloner().DeepCopy(&claim) if err != nil { glog.Errorf("error cloning claim %q: %v", claimToClaimKey(&claim), err) + continue } claimClone := clone.(*api.PersistentVolumeClaim) ctrl.storeClaimUpdate(claimClone) From 06082b1bdf4c9ff93e5acf33da49f0b091a47d3e Mon Sep 17 00:00:00 2001 From: Jan Safranek <jsafrane@redhat.com> Date: Tue, 28 Jun 2016 12:04:45 +0200 Subject: [PATCH 239/339] Fixed goroutinemap race on Wait() sync.WaitGroup produces data races when a GoroutineMap is empty and Wait() and Run() are called at the same time. From sync.WaitGroup: Note that calls with a positive delta that occur when the counter is zero must happen before a Wait. Fixes #28128 --- pkg/util/goroutinemap/goroutinemap.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkg/util/goroutinemap/goroutinemap.go b/pkg/util/goroutinemap/goroutinemap.go index af9c1eeb84..7e0709b3d7 100644 --- a/pkg/util/goroutinemap/goroutinemap.go +++ b/pkg/util/goroutinemap/goroutinemap.go @@ -61,16 +61,18 @@ type GoRoutineMap interface { // NewGoRoutineMap returns a new instance of GoRoutineMap. func NewGoRoutineMap(exponentialBackOffOnError bool) GoRoutineMap { - return &goRoutineMap{ + g := &goRoutineMap{ operations: make(map[string]operation), exponentialBackOffOnError: exponentialBackOffOnError, } + g.cond = sync.NewCond(g) + return g } type goRoutineMap struct { operations map[string]operation exponentialBackOffOnError bool - wg sync.WaitGroup + cond *sync.Cond sync.Mutex } @@ -102,7 +104,6 @@ func (grm *goRoutineMap) Run(operationName string, operationFunc func() error) e lastErrorTime: existingOp.lastErrorTime, durationBeforeRetry: existingOp.durationBeforeRetry, } - grm.wg.Add(1) go func() (err error) { // Handle unhandled panics (very unlikely) defer k8sRuntime.HandleCrash() @@ -117,7 +118,7 @@ func (grm *goRoutineMap) Run(operationName string, operationFunc func() error) e } func (grm *goRoutineMap) operationComplete(operationName string, err *error) { - defer grm.wg.Done() + defer grm.cond.Signal() grm.Lock() defer grm.Unlock() @@ -157,7 +158,12 @@ func (grm *goRoutineMap) operationComplete(operationName string, err *error) { } func (grm *goRoutineMap) Wait() { - grm.wg.Wait() + grm.Lock() + defer grm.Unlock() + + for len(grm.operations) > 0 { + grm.cond.Wait() + } } func recoverFromPanic(operationName string, err *error) { From 3ad54d1812a7e20f89aef54bf04265cda57a71e9 Mon Sep 17 00:00:00 2001 From: deads2k <deads@redhat.com> Date: Tue, 21 Jun 2016 13:13:20 -0400 Subject: [PATCH 240/339] add lastsyncresourceversion to sharedinformer --- pkg/controller/framework/shared_informer.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/controller/framework/shared_informer.go b/pkg/controller/framework/shared_informer.go index c557bf9754..8762228ba4 100644 --- a/pkg/controller/framework/shared_informer.go +++ b/pkg/controller/framework/shared_informer.go @@ -44,6 +44,7 @@ type SharedInformer interface { GetController() ControllerInterface Run(stopCh <-chan struct{}) HasSynced() bool + LastSyncResourceVersion() string } type SharedIndexInformer interface { @@ -161,6 +162,16 @@ func (s *sharedIndexInformer) HasSynced() bool { return s.controller.HasSynced() } +func (s *sharedIndexInformer) LastSyncResourceVersion() string { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.controller == nil { + return "" + } + return s.controller.reflector.LastSyncResourceVersion() +} + func (s *sharedIndexInformer) GetStore() cache.Store { return s.indexer } From 186c6b29c1060b54631954defad8fdce4427d8c8 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" <sttts@redhat.com> Date: Tue, 28 Jun 2016 14:53:40 +0200 Subject: [PATCH 241/339] Use : as seccomp security option operator for Docker 1.10 --- pkg/kubelet/dockertools/docker_manager.go | 27 ++++++++------ .../dockertools/docker_manager_test.go | 35 ++++++++++++++++++- 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/pkg/kubelet/dockertools/docker_manager.go b/pkg/kubelet/dockertools/docker_manager.go index eaa332796c..28ba651e65 100644 --- a/pkg/kubelet/dockertools/docker_manager.go +++ b/pkg/kubelet/dockertools/docker_manager.go @@ -104,8 +104,8 @@ var ( // TODO: make this a TTL based pull (if image older than X policy, pull) podInfraContainerImagePullPolicy = api.PullIfNotPresent - // Default set of security options. - defaultSecurityOpt = []string{"seccomp:unconfined"} + // Default security option, only seccomp for now + defaultSeccompProfile = "unconfined" ) type DockerManager struct { @@ -558,7 +558,7 @@ func (dm *DockerManager) runContainer( ContainerName: container.Name, } - securityOpts, err := dm.getSecurityOpt(pod, container.Name) + securityOpts, err := dm.getSecurityOpts(pod, container.Name) if err != nil { return kubecontainer.ContainerID{}, err } @@ -977,7 +977,7 @@ func (dm *DockerManager) checkVersionCompatibility() error { return nil } -func (dm *DockerManager) getSecurityOpt(pod *api.Pod, ctrName string) ([]string, error) { +func (dm *DockerManager) getSecurityOpts(pod *api.Pod, ctrName string) ([]string, error) { version, err := dm.APIVersion() if err != nil { return nil, err @@ -988,24 +988,31 @@ func (dm *DockerManager) getSecurityOpt(pod *api.Pod, ctrName string) ([]string, if err != nil { return nil, err } - if result < 0 { - // return early for old versions - return nil, nil + var optFmt string + switch { + case result < 0: + return nil, nil // return early for Docker < 1.10 + case result == 0: + optFmt = "%s:%s" // use colon notation for Docker 1.10 + case result > 0: + optFmt = "%s=%s" // use = notation for Docker >= 1.11 } + defaultSecurityOpts := []string{fmt.Sprintf(optFmt, "seccomp", defaultSeccompProfile)} + profile, profileOK := pod.ObjectMeta.Annotations[api.SeccompContainerAnnotationKeyPrefix+ctrName] if !profileOK { // try the pod profile profile, profileOK = pod.ObjectMeta.Annotations[api.SeccompPodAnnotationKey] if !profileOK { // return early the default - return defaultSecurityOpt, nil + return defaultSecurityOpts, nil } } if profile == "unconfined" { // return early the default - return defaultSecurityOpt, nil + return defaultSecurityOpts, nil } if profile == "docker/default" { @@ -1029,7 +1036,7 @@ func (dm *DockerManager) getSecurityOpt(pod *api.Pod, ctrName string) ([]string, return nil, err } - return []string{fmt.Sprintf("seccomp=%s", b.Bytes())}, nil + return []string{fmt.Sprintf(optFmt, "seccomp", b.Bytes())}, nil } type dockerExitError struct { diff --git a/pkg/kubelet/dockertools/docker_manager_test.go b/pkg/kubelet/dockertools/docker_manager_test.go index 6924728780..97cad5e566 100644 --- a/pkg/kubelet/dockertools/docker_manager_test.go +++ b/pkg/kubelet/dockertools/docker_manager_test.go @@ -1717,6 +1717,39 @@ func verifySyncResults(t *testing.T, expectedResults []*kubecontainer.SyncResult } } +func TestSecurityOptsOperator(t *testing.T) { + dm110, _ := newTestDockerManagerWithVersion("1.10.1", "1.22") + dm111, _ := newTestDockerManagerWithVersion("1.11.0", "1.23") + + pod := &api.Pod{ + ObjectMeta: api.ObjectMeta{ + UID: "12345678", + Name: "foo", + Namespace: "new", + }, + Spec: api.PodSpec{ + Containers: []api.Container{ + {Name: "bar"}, + }, + }, + } + opts, err := dm110.getSecurityOpts(pod, "bar") + if err != nil { + t.Fatalf("error getting security opts for Docker 1.10: %v", err) + } + if expected := []string{"seccomp:unconfined"}; len(opts) != 1 || opts[0] != expected[0] { + t.Fatalf("security opts for Docker 1.10: expected %v, got: %v", expected, opts) + } + + opts, err = dm111.getSecurityOpts(pod, "bar") + if err != nil { + t.Fatalf("error getting security opts for Docker 1.11: %v", err) + } + if expected := []string{"seccomp=unconfined"}; len(opts) != 1 || opts[0] != expected[0] { + t.Fatalf("security opts for Docker 1.11: expected %v, got: %v", expected, opts) + } +} + func TestSeccompIsUnconfinedByDefaultWithDockerV110(t *testing.T) { dm, fakeDocker := newTestDockerManagerWithVersion("1.10.1", "1.22") pod := &api.Pod{ @@ -1910,7 +1943,7 @@ func TestSeccompLocalhostProfileIsLoaded(t *testing.T) { } for _, test := range tests { - dm, fakeDocker := newTestDockerManagerWithVersion("1.10.1", "1.22") + dm, fakeDocker := newTestDockerManagerWithVersion("1.11.0", "1.23") _, filename, _, _ := goruntime.Caller(0) dm.seccompProfileRoot = path.Join(path.Dir(filename), "fixtures", "seccomp") From a28cf3963bd1b985f82ee9651b5fb8291afb40d5 Mon Sep 17 00:00:00 2001 From: deads2k <deads@redhat.com> Date: Thu, 26 May 2016 09:59:48 -0400 Subject: [PATCH 242/339] refactor quota evaluation to cleanly abstract the quota access --- .../pkg/admission/resourcequota/admission.go | 55 +---- .../admission/resourcequota/admission_test.go | 95 ++++++--- .../pkg/admission/resourcequota/controller.go | 198 +++++++----------- .../resourcequota/resource_access.go | 179 ++++++++++++++++ 4 files changed, 318 insertions(+), 209 deletions(-) create mode 100644 plugin/pkg/admission/resourcequota/resource_access.go diff --git a/plugin/pkg/admission/resourcequota/admission.go b/plugin/pkg/admission/resourcequota/admission.go index 5ddd6db3dc..ddc90994bc 100644 --- a/plugin/pkg/admission/resourcequota/admission.go +++ b/plugin/pkg/admission/resourcequota/admission.go @@ -18,8 +18,6 @@ package resourcequota import ( "io" - "sort" - "strings" "time" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" @@ -28,7 +26,6 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/quota" "k8s.io/kubernetes/pkg/quota/install" - utilruntime "k8s.io/kubernetes/pkg/util/runtime" ) func init() { @@ -44,7 +41,7 @@ func init() { type quotaAdmission struct { *admission.Handler - evaluator *quotaEvaluator + evaluator Evaluator } type liveLookupEntry struct { @@ -56,13 +53,13 @@ type liveLookupEntry struct { // using the provided registry. The registry must have the capability to handle group/kinds that // are persisted by the server this admission controller is intercepting func NewResourceQuota(client clientset.Interface, registry quota.Registry, numEvaluators int, stopCh <-chan struct{}) (admission.Interface, error) { - evaluator, err := newQuotaEvaluator(client, registry) + quotaAccessor, err := newQuotaAccessor(client) if err != nil { return nil, err } + go quotaAccessor.Run(stopCh) - defer utilruntime.HandleCrash() - go evaluator.Run(numEvaluators, stopCh) + evaluator := NewQuotaEvaluator(quotaAccessor, registry, numEvaluators, stopCh) return "aAdmission{ Handler: admission.NewHandler(admission.Create, admission.Update), @@ -77,47 +74,5 @@ func (q *quotaAdmission) Admit(a admission.Attributes) (err error) { return nil } - // if we do not know how to evaluate use for this kind, just ignore - evaluators := q.evaluator.registry.Evaluators() - evaluator, found := evaluators[a.GetKind().GroupKind()] - if !found { - return nil - } - - // for this kind, check if the operation could mutate any quota resources - // if no resources tracked by quota are impacted, then just return - op := a.GetOperation() - operationResources := evaluator.OperationResources(op) - if len(operationResources) == 0 { - return nil - } - - return q.evaluator.evaluate(a) -} - -// prettyPrint formats a resource list for usage in errors -// it outputs resources sorted in increasing order -func prettyPrint(item api.ResourceList) string { - parts := []string{} - keys := []string{} - for key := range item { - keys = append(keys, string(key)) - } - sort.Strings(keys) - for _, key := range keys { - value := item[api.ResourceName(key)] - constraint := key + "=" + value.String() - parts = append(parts, constraint) - } - return strings.Join(parts, ",") -} - -// hasUsageStats returns true if for each hard constraint there is a value for its current usage -func hasUsageStats(resourceQuota *api.ResourceQuota) bool { - for resourceName := range resourceQuota.Status.Hard { - if _, found := resourceQuota.Status.Used[resourceName]; !found { - return false - } - } - return true + return q.evaluator.Evaluate(a) } diff --git a/plugin/pkg/admission/resourcequota/admission_test.go b/plugin/pkg/admission/resourcequota/admission_test.go index 7d65080013..7d337047b5 100644 --- a/plugin/pkg/admission/resourcequota/admission_test.go +++ b/plugin/pkg/admission/resourcequota/admission_test.go @@ -144,12 +144,15 @@ func TestAdmissionIgnoresSubresources(t *testing.T) { resourceQuota.Status.Used[api.ResourceMemory] = resource.MustParse("1Gi") kubeClient := fake.NewSimpleClientset(resourceQuota) indexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) - evaluator, _ := newQuotaEvaluator(kubeClient, install.NewRegistry(kubeClient)) - evaluator.indexer = indexer stopCh := make(chan struct{}) defer close(stopCh) + + quotaAccessor, _ := newQuotaAccessor(kubeClient) + quotaAccessor.indexer = indexer + go quotaAccessor.Run(stopCh) + evaluator := NewQuotaEvaluator(quotaAccessor, install.NewRegistry(kubeClient), 5, stopCh) + defer utilruntime.HandleCrash() - go evaluator.Run(5, stopCh) handler := "aAdmission{ Handler: admission.NewHandler(admission.Create, admission.Update), evaluator: evaluator, @@ -185,12 +188,15 @@ func TestAdmitBelowQuotaLimit(t *testing.T) { } kubeClient := fake.NewSimpleClientset(resourceQuota) indexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) - evaluator, _ := newQuotaEvaluator(kubeClient, install.NewRegistry(kubeClient)) - evaluator.indexer = indexer stopCh := make(chan struct{}) defer close(stopCh) + + quotaAccessor, _ := newQuotaAccessor(kubeClient) + quotaAccessor.indexer = indexer + go quotaAccessor.Run(stopCh) + evaluator := NewQuotaEvaluator(quotaAccessor, install.NewRegistry(kubeClient), 5, stopCh) + defer utilruntime.HandleCrash() - go evaluator.Run(5, stopCh) handler := "aAdmission{ Handler: admission.NewHandler(admission.Create, admission.Update), evaluator: evaluator, @@ -265,12 +271,14 @@ func TestAdmitHandlesOldObjects(t *testing.T) { // start up quota system kubeClient := fake.NewSimpleClientset(resourceQuota) indexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) - evaluator, _ := newQuotaEvaluator(kubeClient, install.NewRegistry(kubeClient)) - evaluator.indexer = indexer stopCh := make(chan struct{}) defer close(stopCh) - defer utilruntime.HandleCrash() - go evaluator.Run(5, stopCh) + + quotaAccessor, _ := newQuotaAccessor(kubeClient) + quotaAccessor.indexer = indexer + go quotaAccessor.Run(stopCh) + evaluator := NewQuotaEvaluator(quotaAccessor, install.NewRegistry(kubeClient), 5, stopCh) + handler := "aAdmission{ Handler: admission.NewHandler(admission.Create, admission.Update), evaluator: evaluator, @@ -353,12 +361,15 @@ func TestAdmitExceedQuotaLimit(t *testing.T) { } kubeClient := fake.NewSimpleClientset(resourceQuota) indexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) - evaluator, _ := newQuotaEvaluator(kubeClient, install.NewRegistry(kubeClient)) - evaluator.indexer = indexer stopCh := make(chan struct{}) defer close(stopCh) + + quotaAccessor, _ := newQuotaAccessor(kubeClient) + quotaAccessor.indexer = indexer + go quotaAccessor.Run(stopCh) + evaluator := NewQuotaEvaluator(quotaAccessor, install.NewRegistry(kubeClient), 5, stopCh) + defer utilruntime.HandleCrash() - go evaluator.Run(5, stopCh) handler := "aAdmission{ Handler: admission.NewHandler(admission.Create, admission.Update), evaluator: evaluator, @@ -394,12 +405,15 @@ func TestAdmitEnforceQuotaConstraints(t *testing.T) { } kubeClient := fake.NewSimpleClientset(resourceQuota) indexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) - evaluator, _ := newQuotaEvaluator(kubeClient, install.NewRegistry(kubeClient)) - evaluator.indexer = indexer stopCh := make(chan struct{}) defer close(stopCh) + + quotaAccessor, _ := newQuotaAccessor(kubeClient) + quotaAccessor.indexer = indexer + go quotaAccessor.Run(stopCh) + evaluator := NewQuotaEvaluator(quotaAccessor, install.NewRegistry(kubeClient), 5, stopCh) + defer utilruntime.HandleCrash() - go evaluator.Run(5, stopCh) handler := "aAdmission{ Handler: admission.NewHandler(admission.Create, admission.Update), evaluator: evaluator, @@ -444,13 +458,16 @@ func TestAdmitPodInNamespaceWithoutQuota(t *testing.T) { if err != nil { t.Fatal(err) } - evaluator, _ := newQuotaEvaluator(kubeClient, install.NewRegistry(kubeClient)) - evaluator.indexer = indexer - evaluator.liveLookupCache = liveLookupCache stopCh := make(chan struct{}) defer close(stopCh) + + quotaAccessor, _ := newQuotaAccessor(kubeClient) + quotaAccessor.indexer = indexer + quotaAccessor.liveLookupCache = liveLookupCache + go quotaAccessor.Run(stopCh) + evaluator := NewQuotaEvaluator(quotaAccessor, install.NewRegistry(kubeClient), 5, stopCh) + defer utilruntime.HandleCrash() - go evaluator.Run(5, stopCh) handler := "aAdmission{ Handler: admission.NewHandler(admission.Create, admission.Update), evaluator: evaluator, @@ -508,12 +525,15 @@ func TestAdmitBelowTerminatingQuotaLimit(t *testing.T) { } kubeClient := fake.NewSimpleClientset(resourceQuotaTerminating, resourceQuotaNonTerminating) indexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) - evaluator, _ := newQuotaEvaluator(kubeClient, install.NewRegistry(kubeClient)) - evaluator.indexer = indexer stopCh := make(chan struct{}) defer close(stopCh) + + quotaAccessor, _ := newQuotaAccessor(kubeClient) + quotaAccessor.indexer = indexer + go quotaAccessor.Run(stopCh) + evaluator := NewQuotaEvaluator(quotaAccessor, install.NewRegistry(kubeClient), 5, stopCh) + defer utilruntime.HandleCrash() - go evaluator.Run(5, stopCh) handler := "aAdmission{ Handler: admission.NewHandler(admission.Create, admission.Update), evaluator: evaluator, @@ -610,12 +630,15 @@ func TestAdmitBelowBestEffortQuotaLimit(t *testing.T) { } kubeClient := fake.NewSimpleClientset(resourceQuotaBestEffort, resourceQuotaNotBestEffort) indexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) - evaluator, _ := newQuotaEvaluator(kubeClient, install.NewRegistry(kubeClient)) - evaluator.indexer = indexer stopCh := make(chan struct{}) defer close(stopCh) + + quotaAccessor, _ := newQuotaAccessor(kubeClient) + quotaAccessor.indexer = indexer + go quotaAccessor.Run(stopCh) + evaluator := NewQuotaEvaluator(quotaAccessor, install.NewRegistry(kubeClient), 5, stopCh) + defer utilruntime.HandleCrash() - go evaluator.Run(5, stopCh) handler := "aAdmission{ Handler: admission.NewHandler(admission.Create, admission.Update), evaluator: evaluator, @@ -699,12 +722,15 @@ func TestAdmitBestEffortQuotaLimitIgnoresBurstable(t *testing.T) { } kubeClient := fake.NewSimpleClientset(resourceQuota) indexer := cache.NewIndexer(cache.MetaNamespaceKeyFunc, cache.Indexers{"namespace": cache.MetaNamespaceIndexFunc}) - evaluator, _ := newQuotaEvaluator(kubeClient, install.NewRegistry(kubeClient)) - evaluator.indexer = indexer stopCh := make(chan struct{}) defer close(stopCh) + + quotaAccessor, _ := newQuotaAccessor(kubeClient) + quotaAccessor.indexer = indexer + go quotaAccessor.Run(stopCh) + evaluator := NewQuotaEvaluator(quotaAccessor, install.NewRegistry(kubeClient), 5, stopCh) + defer utilruntime.HandleCrash() - go evaluator.Run(5, stopCh) handler := "aAdmission{ Handler: admission.NewHandler(admission.Create, admission.Update), evaluator: evaluator, @@ -814,13 +840,16 @@ func TestAdmissionSetsMissingNamespace(t *testing.T) { podEvaluator.GroupKind(): podEvaluator, }, } - evaluator, _ := newQuotaEvaluator(kubeClient, install.NewRegistry(kubeClient)) - evaluator.indexer = indexer - evaluator.registry = registry stopCh := make(chan struct{}) defer close(stopCh) + + quotaAccessor, _ := newQuotaAccessor(kubeClient) + quotaAccessor.indexer = indexer + go quotaAccessor.Run(stopCh) + evaluator := NewQuotaEvaluator(quotaAccessor, install.NewRegistry(kubeClient), 5, stopCh) + evaluator.(*quotaEvaluator).registry = registry + defer utilruntime.HandleCrash() - go evaluator.Run(5, stopCh) handler := "aAdmission{ Handler: admission.NewHandler(admission.Create, admission.Update), evaluator: evaluator, diff --git a/plugin/pkg/admission/resourcequota/controller.go b/plugin/pkg/admission/resourcequota/controller.go index 5431c9e163..31fe1a1990 100644 --- a/plugin/pkg/admission/resourcequota/controller.go +++ b/plugin/pkg/admission/resourcequota/controller.go @@ -18,46 +18,36 @@ package resourcequota import ( "fmt" + "sort" + "strings" "sync" "time" "github.com/golang/glog" - lru "github.com/hashicorp/golang-lru" - - clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/admission" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" - "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/quota" - "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/storage/etcd" utilruntime "k8s.io/kubernetes/pkg/util/runtime" "k8s.io/kubernetes/pkg/util/sets" "k8s.io/kubernetes/pkg/util/wait" "k8s.io/kubernetes/pkg/util/workqueue" - "k8s.io/kubernetes/pkg/watch" ) -type quotaEvaluator struct { - client clientset.Interface +// Evaluator is used to see if quota constraints are satisfied. +type Evaluator interface { + // Evaluate takes an operation and checks to see if quota constraints are satisfied. It returns an error if they are not. + // The default implementation process related operations in chunks when possible. + Evaluate(a admission.Attributes) error +} + +type quotaEvaluator struct { + quotaAccessor QuotaAccessor - // indexer that holds quota objects by namespace - indexer cache.Indexer // registry that knows how to measure usage for objects registry quota.Registry - // liveLookups holds the last few live lookups we've done to help ammortize cost on repeated lookup failures. - // This let's us handle the case of latent caches, by looking up actual results for a namespace on cache miss/no results. - // We track the lookup result here so that for repeated requests, we don't look it up very often. - liveLookupCache *lru.Cache - liveTTL time.Duration - // updatedQuotas holds a cache of quotas that we've updated. This is used to pull the "really latest" during back to - // back quota evaluations that touch the same quota doc. This only works because we can compare etcd resourceVersions - // for the same resource as integers. Before this change: 22 updates with 12 conflicts. after this change: 15 updates with 0 conflicts - updatedQuotas *lru.Cache - // TODO these are used together to bucket items by namespace and then batch them up for processing. // The technique is valuable for rollup activities to avoid fanout and reduce resource contention. // We could move this into a library if another component needed it. @@ -67,6 +57,11 @@ type quotaEvaluator struct { work map[string][]*admissionWaiter dirtyWork map[string][]*admissionWaiter inProgress sets.String + + // controls the run method so that we can cleanly conform to the Evaluator interface + workers int + stopCh <-chan struct{} + init sync.Once } type admissionWaiter struct { @@ -98,52 +93,33 @@ func newAdmissionWaiter(a admission.Attributes) *admissionWaiter { } } -// newQuotaEvaluator configures an admission controller that can enforce quota constraints +// NewQuotaEvaluator configures an admission controller that can enforce quota constraints // using the provided registry. The registry must have the capability to handle group/kinds that // are persisted by the server this admission controller is intercepting -func newQuotaEvaluator(client clientset.Interface, registry quota.Registry) (*quotaEvaluator, error) { - liveLookupCache, err := lru.New(100) - if err != nil { - return nil, err - } - updatedCache, err := lru.New(100) - if err != nil { - return nil, err - } - lw := &cache.ListWatch{ - ListFunc: func(options api.ListOptions) (runtime.Object, error) { - return client.Core().ResourceQuotas(api.NamespaceAll).List(options) - }, - WatchFunc: func(options api.ListOptions) (watch.Interface, error) { - return client.Core().ResourceQuotas(api.NamespaceAll).Watch(options) - }, - } - indexer, reflector := cache.NewNamespaceKeyedIndexerAndReflector(lw, &api.ResourceQuota{}, 0) - - reflector.Run() +func NewQuotaEvaluator(quotaAccessor QuotaAccessor, registry quota.Registry, workers int, stopCh <-chan struct{}) Evaluator { return "aEvaluator{ - client: client, - indexer: indexer, - registry: registry, - liveLookupCache: liveLookupCache, - liveTTL: time.Duration(30 * time.Second), - updatedQuotas: updatedCache, + quotaAccessor: quotaAccessor, + + registry: registry, queue: workqueue.New(), work: map[string][]*admissionWaiter{}, dirtyWork: map[string][]*admissionWaiter{}, inProgress: sets.String{}, - }, nil + + workers: workers, + stopCh: stopCh, + } } // Run begins watching and syncing. -func (e *quotaEvaluator) Run(workers int, stopCh <-chan struct{}) { +func (e *quotaEvaluator) run() { defer utilruntime.HandleCrash() - for i := 0; i < workers; i++ { - go wait.Until(e.doWork, time.Second, stopCh) + for i := 0; i < e.workers; i++ { + go wait.Until(e.doWork, time.Second, e.stopCh) } - <-stopCh + <-e.stopCh glog.Infof("Shutting down quota evaluator") e.queue.ShutDown() } @@ -179,7 +155,7 @@ func (e *quotaEvaluator) checkAttributes(ns string, admissionAttributes []*admis } }() - quotas, err := e.getQuotas(ns) + quotas, err := e.quotaAccessor.GetQuotas(ns) if err != nil { for _, admissionAttribute := range admissionAttributes { admissionAttribute.result = err @@ -257,14 +233,9 @@ func (e *quotaEvaluator) checkQuotas(quotas []api.ResourceQuota, admissionAttrib continue } - if updatedQuota, err := e.client.Core().ResourceQuotas(newQuota.Namespace).UpdateStatus(&newQuota); err != nil { + if err := e.quotaAccessor.UpdateQuotaStatus(&newQuota); err != nil { updatedFailedQuotas = append(updatedFailedQuotas, newQuota) lastErr = err - - } else { - // update our cache - e.updateCache(updatedQuota) - } } @@ -293,7 +264,7 @@ func (e *quotaEvaluator) checkQuotas(quotas []api.ResourceQuota, admissionAttrib // you've added a new documented, then updated an old one, your resource matches both and you're only checking one // updates for these quota names failed. Get the current quotas in the namespace, compare by name, check to see if the // resource versions have changed. If not, we're going to fall through an fail everything. If they all have, then we can try again - newQuotas, err := e.getQuotas(quotas[0].Namespace) + newQuotas, err := e.quotaAccessor.GetQuotas(quotas[0].Namespace) if err != nil { // this means that updates failed. Anything with a default deny error has failed and we need to let them know for _, admissionAttribute := range admissionAttributes { @@ -416,7 +387,25 @@ func (e *quotaEvaluator) checkRequest(quotas []api.ResourceQuota, a admission.At return quotas, nil } -func (e *quotaEvaluator) evaluate(a admission.Attributes) error { +func (e *quotaEvaluator) Evaluate(a admission.Attributes) error { + e.init.Do(func() { + go e.run() + }) + + // if we do not know how to evaluate use for this kind, just ignore + evaluators := e.registry.Evaluators() + evaluator, found := evaluators[a.GetKind().GroupKind()] + if !found { + return nil + } + // for this kind, check if the operation could mutate any quota resources + // if no resources tracked by quota are impacted, then just return + op := a.GetOperation() + operationResources := evaluator.OperationResources(op) + if len(operationResources) == 0 { + return nil + } + waiter := newAdmissionWaiter(a) e.addWork(waiter) @@ -485,72 +474,29 @@ func (e *quotaEvaluator) getWork() (string, []*admissionWaiter, bool) { return ns, []*admissionWaiter{}, false } -func (e *quotaEvaluator) updateCache(quota *api.ResourceQuota) { - key := quota.Namespace + "/" + quota.Name - e.updatedQuotas.Add(key, quota) +// prettyPrint formats a resource list for usage in errors +// it outputs resources sorted in increasing order +func prettyPrint(item api.ResourceList) string { + parts := []string{} + keys := []string{} + for key := range item { + keys = append(keys, string(key)) + } + sort.Strings(keys) + for _, key := range keys { + value := item[api.ResourceName(key)] + constraint := key + "=" + value.String() + parts = append(parts, constraint) + } + return strings.Join(parts, ",") } -var etcdVersioner = etcd.APIObjectVersioner{} - -// checkCache compares the passed quota against the value in the look-aside cache and returns the newer -// if the cache is out of date, it deletes the stale entry. This only works because of etcd resourceVersions -// being monotonically increasing integers -func (e *quotaEvaluator) checkCache(quota *api.ResourceQuota) *api.ResourceQuota { - key := quota.Namespace + "/" + quota.Name - uncastCachedQuota, ok := e.updatedQuotas.Get(key) - if !ok { - return quota - } - cachedQuota := uncastCachedQuota.(*api.ResourceQuota) - - if etcdVersioner.CompareResourceVersion(quota, cachedQuota) >= 0 { - e.updatedQuotas.Remove(key) - return quota - } - return cachedQuota -} - -func (e *quotaEvaluator) getQuotas(namespace string) ([]api.ResourceQuota, error) { - // determine if there are any quotas in this namespace - // if there are no quotas, we don't need to do anything - items, err := e.indexer.Index("namespace", &api.ResourceQuota{ObjectMeta: api.ObjectMeta{Namespace: namespace, Name: ""}}) - if err != nil { - return nil, fmt.Errorf("Error resolving quota.") - } - - // if there are no items held in our indexer, check our live-lookup LRU, if that misses, do the live lookup to prime it. - if len(items) == 0 { - lruItemObj, ok := e.liveLookupCache.Get(namespace) - if !ok || lruItemObj.(liveLookupEntry).expiry.Before(time.Now()) { - // TODO: If there are multiple operations at the same time and cache has just expired, - // this may cause multiple List operations being issued at the same time. - // If there is already in-flight List() for a given namespace, we should wait until - // it is finished and cache is updated instead of doing the same, also to avoid - // throttling - see #22422 for details. - liveList, err := e.client.Core().ResourceQuotas(namespace).List(api.ListOptions{}) - if err != nil { - return nil, err - } - newEntry := liveLookupEntry{expiry: time.Now().Add(e.liveTTL)} - for i := range liveList.Items { - newEntry.items = append(newEntry.items, &liveList.Items[i]) - } - e.liveLookupCache.Add(namespace, newEntry) - lruItemObj = newEntry - } - lruEntry := lruItemObj.(liveLookupEntry) - for i := range lruEntry.items { - items = append(items, lruEntry.items[i]) +// hasUsageStats returns true if for each hard constraint there is a value for its current usage +func hasUsageStats(resourceQuota *api.ResourceQuota) bool { + for resourceName := range resourceQuota.Status.Hard { + if _, found := resourceQuota.Status.Used[resourceName]; !found { + return false } } - - resourceQuotas := []api.ResourceQuota{} - for i := range items { - quota := items[i].(*api.ResourceQuota) - quota = e.checkCache(quota) - // always make a copy. We're going to muck around with this and we should never mutate the originals - resourceQuotas = append(resourceQuotas, *quota) - } - - return resourceQuotas, nil + return true } diff --git a/plugin/pkg/admission/resourcequota/resource_access.go b/plugin/pkg/admission/resourcequota/resource_access.go new file mode 100644 index 0000000000..48882281c1 --- /dev/null +++ b/plugin/pkg/admission/resourcequota/resource_access.go @@ -0,0 +1,179 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resourcequota + +import ( + "fmt" + "time" + + "github.com/golang/glog" + lru "github.com/hashicorp/golang-lru" + + clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/client/cache" + "k8s.io/kubernetes/pkg/runtime" + "k8s.io/kubernetes/pkg/storage/etcd" + utilruntime "k8s.io/kubernetes/pkg/util/runtime" + "k8s.io/kubernetes/pkg/watch" +) + +// QuotaAccessor abstracts the get/set logic from the rest of the Evaluator. This could be a test stub, a straight passthrough, +// or most commonly a series of deconflicting caches. +type QuotaAccessor interface { + // UpdateQuotaStatus is called to persist final status. This method should write to persistent storage. + // An error indicates that write didn't complete successfully. + UpdateQuotaStatus(newQuota *api.ResourceQuota) error + + // GetQuotas gets all possible quotas for a given namespace + GetQuotas(namespace string) ([]api.ResourceQuota, error) +} + +type quotaAccessor struct { + client clientset.Interface + + // indexer that holds quota objects by namespace + indexer cache.Indexer + reflector *cache.Reflector + + // liveLookups holds the last few live lookups we've done to help ammortize cost on repeated lookup failures. + // This let's us handle the case of latent caches, by looking up actual results for a namespace on cache miss/no results. + // We track the lookup result here so that for repeated requests, we don't look it up very often. + liveLookupCache *lru.Cache + liveTTL time.Duration + // updatedQuotas holds a cache of quotas that we've updated. This is used to pull the "really latest" during back to + // back quota evaluations that touch the same quota doc. This only works because we can compare etcd resourceVersions + // for the same resource as integers. Before this change: 22 updates with 12 conflicts. after this change: 15 updates with 0 conflicts + updatedQuotas *lru.Cache +} + +// newQuotaAccessor creates an object that conforms to the QuotaAccessor interface to be used to retrieve quota objects. +func newQuotaAccessor(client clientset.Interface) (*quotaAccessor, error) { + liveLookupCache, err := lru.New(100) + if err != nil { + return nil, err + } + updatedCache, err := lru.New(100) + if err != nil { + return nil, err + } + lw := &cache.ListWatch{ + ListFunc: func(options api.ListOptions) (runtime.Object, error) { + return client.Core().ResourceQuotas(api.NamespaceAll).List(options) + }, + WatchFunc: func(options api.ListOptions) (watch.Interface, error) { + return client.Core().ResourceQuotas(api.NamespaceAll).Watch(options) + }, + } + indexer, reflector := cache.NewNamespaceKeyedIndexerAndReflector(lw, &api.ResourceQuota{}, 0) + + return "aAccessor{ + client: client, + indexer: indexer, + reflector: reflector, + liveLookupCache: liveLookupCache, + liveTTL: time.Duration(30 * time.Second), + updatedQuotas: updatedCache, + }, nil +} + +// Run begins watching and syncing. +func (e *quotaAccessor) Run(stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + + e.reflector.RunUntil(stopCh) + + <-stopCh + glog.Infof("Shutting down quota accessor") +} + +func (e *quotaAccessor) UpdateQuotaStatus(newQuota *api.ResourceQuota) error { + updatedQuota, err := e.client.Core().ResourceQuotas(newQuota.Namespace).UpdateStatus(newQuota) + if err != nil { + return err + } + + key := newQuota.Namespace + "/" + newQuota.Name + e.updatedQuotas.Add(key, updatedQuota) + return nil +} + +var etcdVersioner = etcd.APIObjectVersioner{} + +// checkCache compares the passed quota against the value in the look-aside cache and returns the newer +// if the cache is out of date, it deletes the stale entry. This only works because of etcd resourceVersions +// being monotonically increasing integers +func (e *quotaAccessor) checkCache(quota *api.ResourceQuota) *api.ResourceQuota { + key := quota.Namespace + "/" + quota.Name + uncastCachedQuota, ok := e.updatedQuotas.Get(key) + if !ok { + return quota + } + cachedQuota := uncastCachedQuota.(*api.ResourceQuota) + + if etcdVersioner.CompareResourceVersion(quota, cachedQuota) >= 0 { + e.updatedQuotas.Remove(key) + return quota + } + return cachedQuota +} + +func (e *quotaAccessor) GetQuotas(namespace string) ([]api.ResourceQuota, error) { + // determine if there are any quotas in this namespace + // if there are no quotas, we don't need to do anything + items, err := e.indexer.Index("namespace", &api.ResourceQuota{ObjectMeta: api.ObjectMeta{Namespace: namespace, Name: ""}}) + if err != nil { + return nil, fmt.Errorf("Error resolving quota.") + } + + // if there are no items held in our indexer, check our live-lookup LRU, if that misses, do the live lookup to prime it. + if len(items) == 0 { + lruItemObj, ok := e.liveLookupCache.Get(namespace) + if !ok || lruItemObj.(liveLookupEntry).expiry.Before(time.Now()) { + // TODO: If there are multiple operations at the same time and cache has just expired, + // this may cause multiple List operations being issued at the same time. + // If there is already in-flight List() for a given namespace, we should wait until + // it is finished and cache is updated instead of doing the same, also to avoid + // throttling - see #22422 for details. + liveList, err := e.client.Core().ResourceQuotas(namespace).List(api.ListOptions{}) + if err != nil { + return nil, err + } + newEntry := liveLookupEntry{expiry: time.Now().Add(e.liveTTL)} + for i := range liveList.Items { + newEntry.items = append(newEntry.items, &liveList.Items[i]) + } + e.liveLookupCache.Add(namespace, newEntry) + lruItemObj = newEntry + } + lruEntry := lruItemObj.(liveLookupEntry) + for i := range lruEntry.items { + items = append(items, lruEntry.items[i]) + } + } + + resourceQuotas := []api.ResourceQuota{} + for i := range items { + quota := items[i].(*api.ResourceQuota) + quota = e.checkCache(quota) + // always make a copy. We're going to muck around with this and we should never mutate the originals + resourceQuotas = append(resourceQuotas, *quota) + } + + return resourceQuotas, nil +} From 079090e6e520d6b6acac78f13bd74ef580f3ebdd Mon Sep 17 00:00:00 2001 From: Angus Salkeld <asalkeld@mirantis.com> Date: Tue, 28 Jun 2016 18:22:17 +0200 Subject: [PATCH 243/339] Ignore cmd/libs/go2idl/generator when running coverage --- hack/test-go.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hack/test-go.sh b/hack/test-go.sh index 1586d3f3f8..1bbdfd51ef 100755 --- a/hack/test-go.sh +++ b/hack/test-go.sh @@ -255,7 +255,9 @@ runTests() { # must make sure the output from parallel runs is not mixed. To achieve this, # we spawn a subshell for each parallel process, redirecting the output to # separate files. - printf "%s\n" "${@}" | xargs -I{} -n1 -P${KUBE_COVERPROCS} \ + # cmd/libs/go2idl/generator is fragile when run under coverage, so ignore it for now. + # see: https://github.com/kubernetes/kubernetes/issues/24967 + printf "%s\n" "${@}" | grep -v "cmd/libs/go2idl/generator"| xargs -I{} -n1 -P${KUBE_COVERPROCS} \ bash -c "set -o pipefail; _pkg=\"{}\"; _pkg_out=\${_pkg//\//_}; \ go test ${goflags[@]:+${goflags[@]}} \ ${KUBE_RACE} \ From e4cdc8cfe5d397a5ae8923a129062bd0bf69bafa Mon Sep 17 00:00:00 2001 From: Michael Taufen <mtaufen@google.com> Date: Tue, 28 Jun 2016 10:08:06 -0700 Subject: [PATCH 244/339] Fix typo --- test/e2e/container_probe.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/container_probe.go b/test/e2e/container_probe.go index d51970913f..33408a7dd4 100644 --- a/test/e2e/container_probe.go +++ b/test/e2e/container_probe.go @@ -32,7 +32,7 @@ import ( ) const ( - probTestContainerName = "test-webserber" + probTestContainerName = "test-webserver" probTestInitialDelaySeconds = 30 ) From 10e75946a2a24dc32ad23e75daa7d2a4c1729e40 Mon Sep 17 00:00:00 2001 From: Oleg Shaldybin <oleg@apcera.com> Date: Wed, 1 Jun 2016 18:42:36 -0700 Subject: [PATCH 245/339] Track object modifications in fake clientset Fake clientset is used by unit tests extensively but it has some shortcomings: - no filtering on namespace and name: tests that want to test objects in multiple namespaces end up getting all objects from this clientset, as it doesn't perform any filtering based on name and namespace; - updates and deletes don't modify the clientset state, so some tests can get unexpected results if they modify/delete objects using the clientset; - it's possible to insert multiple objects with the same kind/name/namespace, this leads to confusing behavior, as retrieval is based on the insertion order, but anchors on the last added object as long as no more objects are added. This change changes core.ObjectRetriever implementation to track object adds, updates and deletes. Some unit tests were depending on the previous (and somewhat incorrect) behavior. These are fixed in the following few commits. --- .../fake/generator_fake_for_clientset.go | 7 +- pkg/client/testing/core/fake_test.go | 112 ++++ pkg/client/testing/core/fixture.go | 488 ++++++++++++------ 3 files changed, 446 insertions(+), 161 deletions(-) create mode 100644 pkg/client/testing/core/fake_test.go diff --git a/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_clientset.go b/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_clientset.go index f06f871291..e7606a7244 100644 --- a/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_clientset.go +++ b/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_clientset.go @@ -111,9 +111,12 @@ func (g *genClientset) GenerateType(c *generator.Context, t *types.Type, w io.Wr // This part of code is version-independent, unchanging. var common = ` -// Clientset returns a clientset that will respond with the provided objects +// 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.NewObjects(api.Scheme, api.Codecs.UniversalDecoder()) + o := core.NewObjectTracker(api.Scheme, api.Codecs.UniversalDecoder()) for _, obj := range objects { if err := o.Add(obj); err != nil { panic(err) diff --git a/pkg/client/testing/core/fake_test.go b/pkg/client/testing/core/fake_test.go new file mode 100644 index 0000000000..c872d5d238 --- /dev/null +++ b/pkg/client/testing/core/fake_test.go @@ -0,0 +1,112 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package core_test + +import ( + "testing" + + "k8s.io/kubernetes/pkg/api" + clientsetfake "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" +) + +func TestFakeClientSetFiltering(t *testing.T) { + tc := clientsetfake.NewSimpleClientset( + testPod("nsA", "pod-1"), + testPod("nsB", "pod-2"), + testSA("nsA", "sa-1"), + testSA("nsA", "sa-2"), + testSA("nsB", "sa-1"), + testSA("nsB", "sa-2"), + testSA("nsB", "sa-3"), + ) + + saList1, err := tc.Core().ServiceAccounts("nsA").List(api.ListOptions{}) + if err != nil { + t.Fatalf("ServiceAccounts.List: %s", err) + } + if actual, expected := len(saList1.Items), 2; expected != actual { + t.Fatalf("Expected %d records to match, got %d", expected, actual) + } + for _, sa := range saList1.Items { + if sa.Namespace != "nsA" { + t.Fatalf("Expected namespace %q; got %q", "nsA", sa.Namespace) + } + } + + saList2, err := tc.Core().ServiceAccounts("nsB").List(api.ListOptions{}) + if err != nil { + t.Fatalf("ServiceAccounts.List: %s", err) + } + if actual, expected := len(saList2.Items), 3; expected != actual { + t.Fatalf("Expected %d records to match, got %d", expected, actual) + } + for _, sa := range saList2.Items { + if sa.Namespace != "nsB" { + t.Fatalf("Expected namespace %q; got %q", "nsA", sa.Namespace) + } + } + + pod1, err := tc.Core().Pods("nsA").Get("pod-1") + if err != nil { + t.Fatalf("Pods.Get: %s", err) + } + if pod1 == nil { + t.Fatalf("Expected to find pod nsA/pod-1 but it wasn't found") + } + if pod1.Namespace != "nsA" || pod1.Name != "pod-1" { + t.Fatalf("Expected to find pod nsA/pod-1t, got %s/%s", pod1.Namespace, pod1.Name) + } + + wrongPod, err := tc.Core().Pods("nsB").Get("pod-1") + if err == nil { + t.Fatalf("Pods.Get: expected nsB/pod-1 not to match, but it matched %s/%s", wrongPod.Namespace, wrongPod.Name) + } + + allPods, err := tc.Core().Pods(api.NamespaceAll).List(api.ListOptions{}) + if err != nil { + t.Fatalf("Pods.List: %s", err) + } + if actual, expected := len(allPods.Items), 2; expected != actual { + t.Fatalf("Expected %d pods to match, got %d", expected, actual) + } + + allSAs, err := tc.Core().ServiceAccounts(api.NamespaceAll).List(api.ListOptions{}) + if err != nil { + t.Fatalf("ServiceAccounts.List: %s", err) + } + if actual, expected := len(allSAs.Items), 5; expected != actual { + t.Fatalf("Expected %d service accounts to match, got %d", expected, actual) + } +} + +func testSA(ns, name string) *api.ServiceAccount { + return &api.ServiceAccount{ + ObjectMeta: api.ObjectMeta{ + Namespace: ns, + Name: name, + }, + } +} + +func testPod(ns, name string) *api.Pod { + return &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Namespace: ns, + Name: name, + }, + } +} diff --git a/pkg/client/testing/core/fixture.go b/pkg/client/testing/core/fixture.go index bd4e560064..609def7970 100644 --- a/pkg/client/testing/core/fixture.go +++ b/pkg/client/testing/core/fixture.go @@ -18,28 +18,39 @@ package core import ( "fmt" - "io/ioutil" - "reflect" - "strings" + "sync" "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/apimachinery/registered" "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/pkg/runtime" - "k8s.io/kubernetes/pkg/util/yaml" "k8s.io/kubernetes/pkg/watch" ) -// ObjectRetriever abstracts the implementation for retrieving or setting generic -// objects. It is intended to be used to fake calls to a server by returning -// objects based on their kind and name. -type ObjectRetriever interface { - // Kind should return a resource or a list of resources (depending on the provided kind and - // name). It should return an error if the caller should communicate an error to the server. - Kind(gvk unversioned.GroupVersionKind, name string) (runtime.Object, error) - // Add adds a runtime object for test purposes into this object. - Add(runtime.Object) error +// ObjectTracker keeps track of objects. It is intended to be used to +// fake calls to a server by returning objects based on their kind, +// namespace and name. +type ObjectTracker interface { + // Add adds an object to the tracker. If object being added + // is a list, its items are added separately. + Add(obj runtime.Object) error + + // Get retrieves the object by its kind, namespace and name. + Get(gvk unversioned.GroupVersionKind, ns, name string) (runtime.Object, error) + + // Update updates an existing object in the tracker. + Update(obj runtime.Object) error + + // List retrieves all objects of a given kind in the given + // namespace. Only non-List kinds are accepted. + List(gvk unversioned.GroupVersionKind, ns string) (runtime.Object, error) + + // Delete deletes an existing object from the tracker. If object + // didn't exist in the tracker prior to deletion, Delete returns + // no error. + Delete(gvk unversioned.GroupVersionKind, ns, name string) error } // ObjectScheme abstracts the implementation of common operations on objects. @@ -49,55 +60,78 @@ type ObjectScheme interface { runtime.ObjectTyper } -// ObjectReaction returns a ReactionFunc that takes a generic action string of the form -// <verb>-<resource> or <verb>-<subresource>-<resource> and attempts to return a runtime -// Object or error that matches the requested action. For instance, list-replicationControllers -// should attempt to return a list of replication controllers. This method delegates to the -// ObjectRetriever interface to satisfy retrieval of lists or retrieval of single items. -// TODO: add support for sub resources -func ObjectReaction(o ObjectRetriever, mapper meta.RESTMapper) ReactionFunc { +// ObjectReaction returns a ReactionFunc that applies core.Action to +// the given tracker. +func ObjectReaction(tracker ObjectTracker, mapper meta.RESTMapper) ReactionFunc { return func(action Action) (bool, runtime.Object, error) { - resource := action.GetResource() - kind, err := mapper.KindFor(resource) + ns := action.GetNamespace() + gvr := action.GetResource() + + gvk, err := mapper.KindFor(gvr) + if err != nil { + return false, nil, fmt.Errorf("error getting kind for resource %q: %s", gvr, err) + } + // This is a temporary fix. Because there is no internal resource, so // the caller has no way to express that it expects to get an internal // kind back. A more proper fix will be directly specify the Kind when // build the action. - kind.Version = resource.Version - if err != nil { - return false, nil, fmt.Errorf("unrecognized action %s: %v", action.GetResource(), err) + gvk.Version = gvr.Version + if len(gvk.Version) == 0 { + gvk.Version = runtime.APIVersionInternal } - // TODO: have mapper return a Kind for a subresource? - switch castAction := action.(type) { - case ListAction: - kind.Kind += "List" - resource, err := o.Kind(kind, "") - return true, resource, err + // Here and below we need to switch on implementation types, + // no on interfaces, as some interfaces are identical + // (e.g. UpdateAction and CreateAction), so if we use them, + // updates and creates end up matching the same case branch. + switch action := action.(type) { - case GetAction: - resource, err := o.Kind(kind, castAction.GetName()) - return true, resource, err + case ListActionImpl: + obj, err := tracker.List(gvk, ns) + return true, obj, err - case DeleteAction: - resource, err := o.Kind(kind, castAction.GetName()) - return true, resource, err + case GetActionImpl: + obj, err := tracker.Get(gvk, ns, action.GetName()) + return true, obj, err - case CreateAction: - accessor, err := meta.Accessor(castAction.GetObject()) + case CreateActionImpl: + objMeta, err := meta.Accessor(action.GetObject()) if err != nil { return true, nil, err } - resource, err := o.Kind(kind, accessor.GetName()) - return true, resource, err - - case UpdateAction: - accessor, err := meta.Accessor(castAction.GetObject()) + if action.GetSubresource() == "" { + err = tracker.Add(action.GetObject()) + } else { + // TODO: Currently we're handling subresource creation as an update + // on the enclosing resource. This works for some subresources but + // might not be generic enough. + err = tracker.Update(action.GetObject()) + } if err != nil { return true, nil, err } - resource, err := o.Kind(kind, accessor.GetName()) - return true, resource, err + obj, err := tracker.Get(gvk, ns, objMeta.GetName()) + return true, obj, err + + case UpdateActionImpl: + objMeta, err := meta.Accessor(action.GetObject()) + if err != nil { + return true, nil, err + } + err = tracker.Update(action.GetObject()) + if err != nil { + return true, nil, err + } + obj, err := tracker.Get(gvk, ns, objMeta.GetName()) + return true, obj, err + + case DeleteActionImpl: + err := tracker.Delete(gvk, ns, action.GetName()) + if err != nil { + return true, nil, err + } + return true, nil, nil default: return false, nil, fmt.Errorf("no reaction implemented for %s", action) @@ -105,140 +139,276 @@ func ObjectReaction(o ObjectRetriever, mapper meta.RESTMapper) ReactionFunc { } } -// AddObjectsFromPath loads the JSON or YAML file containing Kubernetes API resources -// and adds them to the provided ObjectRetriever. -func AddObjectsFromPath(path string, o ObjectRetriever, decoder runtime.Decoder) error { - data, err := ioutil.ReadFile(path) +type tracker struct { + scheme ObjectScheme + decoder runtime.Decoder + lock sync.RWMutex + objects map[unversioned.GroupVersionKind][]runtime.Object +} + +var _ ObjectTracker = &tracker{} + +// NewObjectTracker returns an ObjectTracker that can be used to keep track +// of objects for the fake clientset. Mostly useful for unit tests. +func NewObjectTracker(scheme ObjectScheme, decoder runtime.Decoder) ObjectTracker { + return &tracker{ + scheme: scheme, + decoder: decoder, + objects: make(map[unversioned.GroupVersionKind][]runtime.Object), + } +} + +func (t *tracker) List(gvk unversioned.GroupVersionKind, ns string) (runtime.Object, error) { + // Heuristic for list kind: original kind + List suffix. Might + // not always be true but this tracker has a pretty limited + // understanding of the actual API model. + listGVK := gvk + listGVK.Kind = listGVK.Kind + "List" + + list, err := t.scheme.New(listGVK) + if err != nil { + return nil, err + } + + if !meta.IsListType(list) { + return nil, fmt.Errorf("%q is not a list type", listGVK.Kind) + } + + t.lock.RLock() + defer t.lock.RUnlock() + + objs, ok := t.objects[gvk] + if !ok { + return list, nil + } + + matchingObjs, err := filterByNamespaceAndName(objs, ns, "") + if err != nil { + return nil, err + } + if err := meta.SetList(list, matchingObjs); err != nil { + return nil, err + } + if list, err = t.scheme.Copy(list); err != nil { + return nil, err + } + return list, nil +} + +func (t *tracker) Get(gvk unversioned.GroupVersionKind, ns, name string) (runtime.Object, error) { + if err := checkNamespace(gvk, ns); err != nil { + return nil, err + } + + errNotFound := errors.NewNotFound(unversioned.GroupResource{Group: gvk.Group, Resource: gvk.Kind}, name) + + t.lock.RLock() + defer t.lock.RUnlock() + + objs, ok := t.objects[gvk] + if !ok { + return nil, errNotFound + } + + matchingObjs, err := filterByNamespaceAndName(objs, ns, name) + if err != nil { + return nil, err + } + if len(matchingObjs) == 0 { + return nil, errNotFound + } + if len(matchingObjs) > 1 { + return nil, fmt.Errorf("more than one object matched gvk %s, ns: %q name: %q", gvk, ns, name) + } + + // Only one object should match in the tracker if it works + // correctly, as Add/Update methods enforce kind/namespace/name + // uniqueness. + obj, err := t.scheme.Copy(matchingObjs[0]) + if err != nil { + return nil, err + } + + if status, ok := obj.(*unversioned.Status); ok { + if status.Details != nil { + status.Details.Kind = gvk.Kind + } + if status.Status != unversioned.StatusSuccess { + return nil, &errors.StatusError{ErrStatus: *status} + } + } + + return obj, nil +} + +func (t *tracker) Add(obj runtime.Object) error { + return t.add(obj, false) +} + +func (t *tracker) Update(obj runtime.Object) error { + return t.add(obj, true) +} + +func (t *tracker) add(obj runtime.Object, replaceExisting bool) error { + if meta.IsListType(obj) { + return t.addList(obj, replaceExisting) + } + + gvks, _, err := t.scheme.ObjectKinds(obj) if err != nil { return err } - data, err = yaml.ToJSON(data) + if len(gvks) == 0 { + return fmt.Errorf("no registered kinds for %v", obj) + } + + t.lock.Lock() + defer t.lock.Unlock() + + for _, gvk := range gvks { + gr := unversioned.GroupResource{Group: gvk.Group, Resource: gvk.Kind} + + // To avoid the object from being accidentally modified by caller + // after it's been added to the tracker, we always store the deep + // copy. + obj, err = t.scheme.Copy(obj) + if err != nil { + return err + } + + if status, ok := obj.(*unversioned.Status); ok && status.Details != nil { + gvk.Kind = status.Details.Kind + } + + newMeta, err := meta.Accessor(obj) + if err != nil { + return err + } + + if err := checkNamespace(gvk, newMeta.GetNamespace()); err != nil { + return err + } + + for i, existingObj := range t.objects[gvk] { + oldMeta, err := meta.Accessor(existingObj) + if err != nil { + return err + } + if oldMeta.GetNamespace() == newMeta.GetNamespace() && oldMeta.GetName() == newMeta.GetName() { + if replaceExisting { + t.objects[gvk][i] = obj + return nil + } + return errors.NewAlreadyExists(gr, newMeta.GetName()) + } + } + + if replaceExisting { + // Tried to update but no matching object was found. + return errors.NewNotFound(gr, newMeta.GetName()) + } + + t.objects[gvk] = append(t.objects[gvk], obj) + } + + return nil +} + +func (t *tracker) addList(obj runtime.Object, replaceExisting bool) error { + list, err := meta.ExtractList(obj) if err != nil { return err } - obj, err := runtime.Decode(decoder, data) - if err != nil { - return err + errs := runtime.DecodeList(list, t.decoder) + if len(errs) > 0 { + return errs[0] } - if err := o.Add(obj); err != nil { - return err + for _, obj := range list { + err := t.add(obj, replaceExisting) + if err != nil { + return err + } } return nil } -type objects struct { - types map[string][]runtime.Object - last map[string]int - scheme ObjectScheme - decoder runtime.Decoder -} - -var _ ObjectRetriever = &objects{} - -// NewObjects implements the ObjectRetriever interface by introspecting the -// objects provided to Add() and returning them when the Kind method is invoked. -// If an api.List object is provided to Add(), each child item is added. If an -// object is added that is itself a list (PodList, ServiceList) then that is added -// to the "PodList" kind. If no PodList is added, the retriever will take any loaded -// Pods and return them in a list. If an api.Status is added, and the Details.Kind field -// is set, that status will be returned instead (as an error if Status != Success, or -// as a runtime.Object if Status == Success). If multiple PodLists are provided, they -// will be returned in order by the Kind call, and the last PodList will be reused for -// subsequent calls. -func NewObjects(scheme ObjectScheme, decoder runtime.Decoder) ObjectRetriever { - return objects{ - types: make(map[string][]runtime.Object), - last: make(map[string]int), - scheme: scheme, - decoder: decoder, - } -} - -func (o objects) Kind(kind unversioned.GroupVersionKind, name string) (runtime.Object, error) { - if len(kind.Version) == 0 { - kind.Version = runtime.APIVersionInternal - } - empty, err := o.scheme.New(kind) - nilValue := reflect.Zero(reflect.TypeOf(empty)).Interface().(runtime.Object) - - arr, ok := o.types[kind.Kind] - if !ok { - if strings.HasSuffix(kind.Kind, "List") { - itemKind := kind.Kind[:len(kind.Kind)-4] - arr, ok := o.types[itemKind] - if !ok { - return empty, nil - } - out, err := o.scheme.New(kind) - if err != nil { - return nilValue, err - } - if err := meta.SetList(out, arr); err != nil { - return nilValue, err - } - if out, err = o.scheme.Copy(out); err != nil { - return nilValue, err - } - return out, nil - } - return nilValue, errors.NewNotFound(unversioned.GroupResource{Group: kind.Group, Resource: kind.Kind}, name) - } - - index := o.last[kind.Kind] - if index >= len(arr) { - index = len(arr) - 1 - } - if index < 0 { - return nilValue, errors.NewNotFound(unversioned.GroupResource{Group: kind.Group, Resource: kind.Kind}, name) - } - out, err := o.scheme.Copy(arr[index]) - if err != nil { - return nilValue, err - } - o.last[kind.Kind] = index + 1 - - if status, ok := out.(*unversioned.Status); ok { - if status.Details != nil { - status.Details.Kind = kind.Kind - } - if status.Status != unversioned.StatusSuccess { - return nilValue, &errors.StatusError{ErrStatus: *status} - } - } - - return out, nil -} - -func (o objects) Add(obj runtime.Object) error { - gvks, _, err := o.scheme.ObjectKinds(obj) - if err != nil { +func (t *tracker) Delete(gvk unversioned.GroupVersionKind, ns, name string) error { + if err := checkNamespace(gvk, ns); err != nil { return err } - kind := gvks[0].Kind - switch { - case meta.IsListType(obj): - if kind != "List" { - o.types[kind] = append(o.types[kind], obj) - } + t.lock.Lock() + defer t.lock.Unlock() - list, err := meta.ExtractList(obj) + found := false + + for i, existingObj := range t.objects[gvk] { + objMeta, err := meta.Accessor(existingObj) if err != nil { return err } - if errs := runtime.DecodeList(list, o.decoder); len(errs) > 0 { - return errs[0] + if objMeta.GetNamespace() == ns && objMeta.GetName() == name { + t.objects[gvk] = append(t.objects[gvk][:i], t.objects[gvk][i+1:]...) + found = true } - for _, obj := range list { - if err := o.Add(obj); err != nil { - return err + } + + if found { + return nil + } + + return errors.NewNotFound(unversioned.GroupResource{Group: gvk.Group, Resource: gvk.Kind}, name) +} + +// filterByNamespaceAndName returns all objects in the collection that +// match provided namespace and name. Empty namespace matches +// non-namespaced objects. +func filterByNamespaceAndName(objs []runtime.Object, ns, name string) ([]runtime.Object, error) { + var res []runtime.Object + + for _, obj := range objs { + acc, err := meta.Accessor(obj) + if err != nil { + return nil, err + } + if ns != "" && acc.GetNamespace() != ns { + continue + } + if name != "" && acc.GetName() != name { + continue + } + res = append(res, obj) + } + + return res, nil +} + +// checkNamespace makes sure that the scope of gvk matches ns. It +// returns an error if namespace is empty but gvk is a namespaced +// kind, or if ns is non-empty and gvk is a namespaced kind. +func checkNamespace(gvk unversioned.GroupVersionKind, ns string) error { + group, err := registered.Group(gvk.Group) + if err != nil { + return err + } + mapping, err := group.RESTMapper.RESTMapping(gvk.GroupKind(), gvk.Version) + if err != nil { + return err + } + switch mapping.Scope.Name() { + case meta.RESTScopeNameRoot: + if ns != "" { + return fmt.Errorf("namespace specified for a non-namespaced kind %s", gvk) + } + case meta.RESTScopeNameNamespace: + if ns == "" { + // Skipping this check for Events, since + // controllers emit events that have no namespace, + // even though Event is a namespaced resource. + if gvk.Kind != "Event" { + return fmt.Errorf("no namespace specified for a namespaced kind %s", gvk) } } - default: - if status, ok := obj.(*unversioned.Status); ok && status.Details != nil { - kind = status.Details.Kind - } - o.types[kind] = append(o.types[kind], obj) } return nil From d445d4082d281c14f27302af19b92dec7b374492 Mon Sep 17 00:00:00 2001 From: Oleg Shaldybin <oleg@apcera.com> Date: Thu, 9 Jun 2016 17:33:21 -0700 Subject: [PATCH 246/339] Regenerate clientsets --- .../test_internalclientset/fake/clientset_generated.go | 7 +++++-- .../fake/clientset_generated.go | 7 +++++-- .../federation_release_1_3/fake/clientset_generated.go | 7 +++++-- .../internalclientset/fake/clientset_generated.go | 7 +++++-- .../release_1_3/fake/clientset_generated.go | 7 +++++-- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/fake/clientset_generated.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/fake/clientset_generated.go index 52d83bb5c1..5468dc563b 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/fake/clientset_generated.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/fake/clientset_generated.go @@ -29,9 +29,12 @@ import ( "k8s.io/kubernetes/pkg/watch" ) -// Clientset returns a clientset that will respond with the provided objects +// 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.NewObjects(api.Scheme, api.Codecs.UniversalDecoder()) + o := core.NewObjectTracker(api.Scheme, api.Codecs.UniversalDecoder()) for _, obj := range objects { if err := o.Add(obj); err != nil { panic(err) diff --git a/federation/client/clientset_generated/federation_internalclientset/fake/clientset_generated.go b/federation/client/clientset_generated/federation_internalclientset/fake/clientset_generated.go index 21b95c03fb..57f5719242 100644 --- a/federation/client/clientset_generated/federation_internalclientset/fake/clientset_generated.go +++ b/federation/client/clientset_generated/federation_internalclientset/fake/clientset_generated.go @@ -31,9 +31,12 @@ import ( "k8s.io/kubernetes/pkg/watch" ) -// Clientset returns a clientset that will respond with the provided objects +// 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.NewObjects(api.Scheme, api.Codecs.UniversalDecoder()) + o := core.NewObjectTracker(api.Scheme, api.Codecs.UniversalDecoder()) for _, obj := range objects { if err := o.Add(obj); err != nil { panic(err) diff --git a/federation/client/clientset_generated/federation_release_1_3/fake/clientset_generated.go b/federation/client/clientset_generated/federation_release_1_3/fake/clientset_generated.go index 8af3fd9ef4..7c3ad63e91 100644 --- a/federation/client/clientset_generated/federation_release_1_3/fake/clientset_generated.go +++ b/federation/client/clientset_generated/federation_release_1_3/fake/clientset_generated.go @@ -31,9 +31,12 @@ import ( "k8s.io/kubernetes/pkg/watch" ) -// Clientset returns a clientset that will respond with the provided objects +// 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.NewObjects(api.Scheme, api.Codecs.UniversalDecoder()) + o := core.NewObjectTracker(api.Scheme, api.Codecs.UniversalDecoder()) for _, obj := range objects { if err := o.Add(obj); err != nil { panic(err) diff --git a/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go b/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go index 699b2f4e15..548960c0b7 100644 --- a/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go +++ b/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go @@ -37,9 +37,12 @@ import ( "k8s.io/kubernetes/pkg/watch" ) -// Clientset returns a clientset that will respond with the provided objects +// 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.NewObjects(api.Scheme, api.Codecs.UniversalDecoder()) + o := core.NewObjectTracker(api.Scheme, api.Codecs.UniversalDecoder()) for _, obj := range objects { if err := o.Add(obj); err != nil { panic(err) diff --git a/pkg/client/clientset_generated/release_1_3/fake/clientset_generated.go b/pkg/client/clientset_generated/release_1_3/fake/clientset_generated.go index 4c8913116f..b109de502d 100644 --- a/pkg/client/clientset_generated/release_1_3/fake/clientset_generated.go +++ b/pkg/client/clientset_generated/release_1_3/fake/clientset_generated.go @@ -35,9 +35,12 @@ import ( "k8s.io/kubernetes/pkg/watch" ) -// Clientset returns a clientset that will respond with the provided objects +// 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.NewObjects(api.Scheme, api.Codecs.UniversalDecoder()) + o := core.NewObjectTracker(api.Scheme, api.Codecs.UniversalDecoder()) for _, obj := range objects { if err := o.Add(obj); err != nil { panic(err) From 3b15d5be19383b1f804fc367e29b180dfb01328e Mon Sep 17 00:00:00 2001 From: Oleg Shaldybin <oleg@apcera.com> Date: Wed, 1 Jun 2016 18:47:36 -0700 Subject: [PATCH 247/339] Use correct namespace in unit tests that use fake clientset Fake clientset no longer needs to be prepopulated with records: keeping them in leads to the name conflict on creates. Also, since fake clientset now respects namespaces, we need to correctly populate them. --- pkg/controller/node/nodecontroller_test.go | 21 +++++++++++++++++-- .../resource_quota_controller_test.go | 8 +++++++ .../serviceaccount/tokens_controller_test.go | 18 +++++++--------- pkg/kubectl/describe_test.go | 3 +++ pkg/volume/configmap/configmap_test.go | 4 ++-- pkg/volume/glusterfs/glusterfs_test.go | 5 +++-- pkg/volume/secret/secret_test.go | 4 ++-- .../podsecuritypolicy/admission_test.go | 3 ++- 8 files changed, 47 insertions(+), 19 deletions(-) diff --git a/pkg/controller/node/nodecontroller_test.go b/pkg/controller/node/nodecontroller_test.go index 967a7e946d..818be93f22 100644 --- a/pkg/controller/node/nodecontroller_test.go +++ b/pkg/controller/node/nodecontroller_test.go @@ -1426,8 +1426,25 @@ func newNode(name string) *api.Node { } func newPod(name, host string) *api.Pod { - return &api.Pod{ObjectMeta: api.ObjectMeta{Name: name}, Spec: api.PodSpec{NodeName: host}, - Status: api.PodStatus{Conditions: []api.PodCondition{{Type: api.PodReady, Status: api.ConditionTrue}}}} + pod := &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Namespace: "default", + Name: name, + }, + Spec: api.PodSpec{ + NodeName: host, + }, + Status: api.PodStatus{ + Conditions: []api.PodCondition{ + { + Type: api.PodReady, + Status: api.ConditionTrue, + }, + }, + }, + } + + return pod } func contains(node *api.Node, nodes []*api.Node) bool { diff --git a/pkg/controller/resourcequota/resource_quota_controller_test.go b/pkg/controller/resourcequota/resource_quota_controller_test.go index 71ef5df79b..6fb82b9a5e 100644 --- a/pkg/controller/resourcequota/resource_quota_controller_test.go +++ b/pkg/controller/resourcequota/resource_quota_controller_test.go @@ -162,6 +162,10 @@ func TestSyncResourceQuota(t *testing.T) { func TestSyncResourceQuotaSpecChange(t *testing.T) { resourceQuota := api.ResourceQuota{ + ObjectMeta: api.ObjectMeta{ + Namespace: "default", + Name: "rq", + }, Spec: api.ResourceQuotaSpec{ Hard: api.ResourceList{ api.ResourceCPU: resource.MustParse("4"), @@ -250,6 +254,10 @@ func TestSyncResourceQuotaSpecChange(t *testing.T) { func TestSyncResourceQuotaNoChange(t *testing.T) { resourceQuota := api.ResourceQuota{ + ObjectMeta: api.ObjectMeta{ + Namespace: "default", + Name: "rq", + }, Spec: api.ResourceQuotaSpec{ Hard: api.ResourceList{ api.ResourceCPU: resource.MustParse("4"), diff --git a/pkg/controller/serviceaccount/tokens_controller_test.go b/pkg/controller/serviceaccount/tokens_controller_test.go index 4fad277527..3442b896dc 100644 --- a/pkg/controller/serviceaccount/tokens_controller_test.go +++ b/pkg/controller/serviceaccount/tokens_controller_test.go @@ -223,7 +223,7 @@ func TestTokenCreation(t *testing.T) { ExpectedActions []core.Action }{ "new serviceaccount with no secrets": { - ClientObjects: []runtime.Object{serviceAccount(emptySecretReferences()), createdTokenSecret()}, + ClientObjects: []runtime.Object{serviceAccount(emptySecretReferences())}, AddedServiceAccount: serviceAccount(emptySecretReferences()), ExpectedActions: []core.Action{ @@ -233,7 +233,7 @@ func TestTokenCreation(t *testing.T) { }, }, "new serviceaccount with no secrets encountering create error": { - ClientObjects: []runtime.Object{serviceAccount(emptySecretReferences()), createdTokenSecret()}, + ClientObjects: []runtime.Object{serviceAccount(emptySecretReferences())}, MaxRetries: 10, IsAsync: true, Reactors: []reaction{{ @@ -250,7 +250,6 @@ func TestTokenCreation(t *testing.T) { } }, }}, - AddedServiceAccount: serviceAccount(emptySecretReferences()), ExpectedActions: []core.Action{ // Attempt 1 @@ -295,7 +294,7 @@ func TestTokenCreation(t *testing.T) { }, }, "new serviceaccount with missing secrets": { - ClientObjects: []runtime.Object{serviceAccount(missingSecretReferences()), createdTokenSecret()}, + ClientObjects: []runtime.Object{serviceAccount(missingSecretReferences())}, AddedServiceAccount: serviceAccount(missingSecretReferences()), ExpectedActions: []core.Action{ @@ -305,7 +304,7 @@ func TestTokenCreation(t *testing.T) { }, }, "new serviceaccount with non-token secrets": { - ClientObjects: []runtime.Object{serviceAccount(regularSecretReferences()), createdTokenSecret(), opaqueSecret()}, + ClientObjects: []runtime.Object{serviceAccount(regularSecretReferences()), opaqueSecret()}, AddedServiceAccount: serviceAccount(regularSecretReferences()), ExpectedActions: []core.Action{ @@ -329,9 +328,8 @@ func TestTokenCreation(t *testing.T) { core.NewGetAction(unversioned.GroupVersionResource{Resource: "serviceaccounts"}, api.NamespaceDefault, "default"), }, }, - "updated serviceaccount with no secrets": { - ClientObjects: []runtime.Object{serviceAccount(emptySecretReferences()), createdTokenSecret()}, + ClientObjects: []runtime.Object{serviceAccount(emptySecretReferences())}, UpdatedServiceAccount: serviceAccount(emptySecretReferences()), ExpectedActions: []core.Action{ @@ -341,7 +339,7 @@ func TestTokenCreation(t *testing.T) { }, }, "updated serviceaccount with missing secrets": { - ClientObjects: []runtime.Object{serviceAccount(missingSecretReferences()), createdTokenSecret()}, + ClientObjects: []runtime.Object{serviceAccount(missingSecretReferences())}, UpdatedServiceAccount: serviceAccount(missingSecretReferences()), ExpectedActions: []core.Action{ @@ -351,7 +349,7 @@ func TestTokenCreation(t *testing.T) { }, }, "updated serviceaccount with non-token secrets": { - ClientObjects: []runtime.Object{serviceAccount(regularSecretReferences()), createdTokenSecret(), opaqueSecret()}, + ClientObjects: []runtime.Object{serviceAccount(regularSecretReferences()), opaqueSecret()}, UpdatedServiceAccount: serviceAccount(regularSecretReferences()), ExpectedActions: []core.Action{ @@ -367,7 +365,7 @@ func TestTokenCreation(t *testing.T) { ExpectedActions: []core.Action{}, }, "updated serviceaccount with no secrets with resource conflict": { - ClientObjects: []runtime.Object{updatedServiceAccount(emptySecretReferences()), createdTokenSecret()}, + ClientObjects: []runtime.Object{updatedServiceAccount(emptySecretReferences())}, UpdatedServiceAccount: serviceAccount(emptySecretReferences()), ExpectedActions: []core.Action{ diff --git a/pkg/kubectl/describe_test.go b/pkg/kubectl/describe_test.go index 3ce344fe91..e767c125bb 100644 --- a/pkg/kubectl/describe_test.go +++ b/pkg/kubectl/describe_test.go @@ -578,6 +578,9 @@ func TestDescribeEvents(t *testing.T) { events := &api.EventList{ Items: []api.Event{ { + ObjectMeta: api.ObjectMeta{ + Namespace: "foo", + }, Source: api.EventSource{Component: "kubelet"}, Message: "Item 1", FirstTimestamp: unversioned.NewTime(time.Date(2014, time.January, 15, 0, 0, 0, 0, time.UTC)), diff --git a/pkg/volume/configmap/configmap_test.go b/pkg/volume/configmap/configmap_test.go index cf0a54f402..5078fc3eb9 100644 --- a/pkg/volume/configmap/configmap_test.go +++ b/pkg/volume/configmap/configmap_test.go @@ -228,7 +228,7 @@ func TestPlugin(t *testing.T) { t.Errorf("Can't find the plugin by name") } - pod := &api.Pod{ObjectMeta: api.ObjectMeta{UID: testPodUID}} + pod := &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -283,7 +283,7 @@ func TestPluginReboot(t *testing.T) { t.Errorf("Can't find the plugin by name") } - pod := &api.Pod{ObjectMeta: api.ObjectMeta{UID: testPodUID}} + pod := &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) diff --git a/pkg/volume/glusterfs/glusterfs_test.go b/pkg/volume/glusterfs/glusterfs_test.go index 524ec59da9..76939ba365 100644 --- a/pkg/volume/glusterfs/glusterfs_test.go +++ b/pkg/volume/glusterfs/glusterfs_test.go @@ -212,7 +212,8 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { ep := &api.Endpoints{ ObjectMeta: api.ObjectMeta{ - Name: "ep", + Namespace: "nsA", + Name: "ep", }, Subsets: []api.EndpointSubset{{ Addresses: []api.EndpointAddress{{IP: "127.0.0.1"}}, @@ -228,7 +229,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) { // readOnly bool is supplied by persistent-claim volume source when its mounter creates other volumes spec := volume.NewSpecFromPersistentVolume(pv, true) - pod := &api.Pod{ObjectMeta: api.ObjectMeta{UID: types.UID("poduid")}} + pod := &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: "nsA", UID: types.UID("poduid")}} mounter, _ := plug.NewMounter(spec, pod, volume.VolumeOptions{}) if !mounter.GetAttributes().ReadOnly { diff --git a/pkg/volume/secret/secret_test.go b/pkg/volume/secret/secret_test.go index fff7e0bef2..645d1e08e5 100644 --- a/pkg/volume/secret/secret_test.go +++ b/pkg/volume/secret/secret_test.go @@ -231,7 +231,7 @@ func TestPlugin(t *testing.T) { t.Errorf("Can't find the plugin by name") } - pod := &api.Pod{ObjectMeta: api.ObjectMeta{UID: testPodUID}} + pod := &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) @@ -304,7 +304,7 @@ func TestPluginReboot(t *testing.T) { t.Errorf("Can't find the plugin by name") } - pod := &api.Pod{ObjectMeta: api.ObjectMeta{UID: testPodUID}} + pod := &api.Pod{ObjectMeta: api.ObjectMeta{Namespace: testNamespace, UID: testPodUID}} mounter, err := plugin.NewMounter(volume.NewSpecFromVolume(volumeSpec), pod, volume.VolumeOptions{}) if err != nil { t.Errorf("Failed to make a new Mounter: %v", err) diff --git a/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go b/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go index 186bc9f6eb..b875997efb 100644 --- a/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go +++ b/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go @@ -1193,7 +1193,8 @@ func createNamespaceForTest() *kapi.Namespace { func createSAForTest() *kapi.ServiceAccount { return &kapi.ServiceAccount{ ObjectMeta: kapi.ObjectMeta{ - Name: "default", + Namespace: "default", + Name: "default", }, } } From aff173f7d1995afe057ce16b6a582a2055fea643 Mon Sep 17 00:00:00 2001 From: Oleg Shaldybin <oleg@apcera.com> Date: Wed, 1 Jun 2016 18:44:52 -0700 Subject: [PATCH 248/339] Fix expectations in deployment controller test Since fake clientset now correctly tracks objects created by deployment controller, it triggers different controller behavior: controller only creates replica set once and updates deployment once. --- .../deployment/deployment_controller_test.go | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/pkg/controller/deployment/deployment_controller_test.go b/pkg/controller/deployment/deployment_controller_test.go index b2fcd521bf..a192dcc22b 100644 --- a/pkg/controller/deployment/deployment_controller_test.go +++ b/pkg/controller/deployment/deployment_controller_test.go @@ -44,6 +44,7 @@ func rs(name string, replicas int, selector map[string]string, timestamp unversi ObjectMeta: api.ObjectMeta{ Name: name, CreationTimestamp: timestamp, + Namespace: api.NamespaceDefault, }, Spec: exp.ReplicaSetSpec{ Replicas: int32(replicas), @@ -64,7 +65,8 @@ func newRSWithStatus(name string, specReplicas, statusReplicas int, selector map func deployment(name string, replicas int, maxSurge, maxUnavailable intstr.IntOrString, selector map[string]string) exp.Deployment { return exp.Deployment{ ObjectMeta: api.ObjectMeta{ - Name: name, + Name: name, + Namespace: api.NamespaceDefault, }, Spec: exp.DeploymentSpec{ Replicas: int32(replicas), @@ -142,10 +144,6 @@ func newReplicaSet(d *exp.Deployment, name string, replicas int) *exp.ReplicaSet } } -func newListOptions() api.ListOptions { - return api.ListOptions{} -} - // TestScale tests proportional scaling of deployments. Note that fenceposts for // rolling out (maxUnavailable, maxSurge) have no meaning for simple scaling other // than recording maxSurge as part of the max-replicas annotation that is taken @@ -966,22 +964,25 @@ type fixture struct { // Actions expected to happen on the client. Objects from here are also // preloaded into NewSimpleFake. actions []core.Action - objects *api.List + objects []runtime.Object } func (f *fixture) expectUpdateDeploymentAction(d *exp.Deployment) { f.actions = append(f.actions, core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "deployments"}, d.Namespace, d)) - f.objects.Items = append(f.objects.Items, d) +} + +func (f *fixture) expectUpdateDeploymentStatusAction(d *exp.Deployment) { + action := core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "deployments"}, d.Namespace, d) + action.Subresource = "status" + f.actions = append(f.actions, action) } func (f *fixture) expectCreateRSAction(rs *exp.ReplicaSet) { f.actions = append(f.actions, core.NewCreateAction(unversioned.GroupVersionResource{Resource: "replicasets"}, rs.Namespace, rs)) - f.objects.Items = append(f.objects.Items, rs) } func (f *fixture) expectUpdateRSAction(rs *exp.ReplicaSet) { f.actions = append(f.actions, core.NewUpdateAction(unversioned.GroupVersionResource{Resource: "replicasets"}, rs.Namespace, rs)) - f.objects.Items = append(f.objects.Items, rs) } func (f *fixture) expectListPodAction(namespace string, opt api.ListOptions) { @@ -991,12 +992,12 @@ func (f *fixture) expectListPodAction(namespace string, opt api.ListOptions) { func newFixture(t *testing.T) *fixture { f := &fixture{} f.t = t - f.objects = &api.List{} + f.objects = []runtime.Object{} return f } func (f *fixture) run(deploymentName string) { - f.client = fake.NewSimpleClientset(f.objects) + f.client = fake.NewSimpleClientset(f.objects...) c := NewDeploymentController(f.client, controller.NoResyncPeriodFunc) c.eventRecorder = &record.FakeRecorder{} c.rsStoreSynced = alwaysReady @@ -1040,16 +1041,13 @@ func TestSyncDeploymentCreatesReplicaSet(t *testing.T) { d := newDeployment(1, nil) f.dStore = append(f.dStore, d) + f.objects = append(f.objects, d) - // expect that one ReplicaSet with zero replicas is created - // then is updated to 1 replica - rs := newReplicaSet(d, "deploymentrs-4186632231", 0) - updatedRS := newReplicaSet(d, "deploymentrs-4186632231", 1) + rs := newReplicaSet(d, "deploymentrs-4186632231", 1) f.expectCreateRSAction(rs) f.expectUpdateDeploymentAction(d) - f.expectUpdateRSAction(updatedRS) - f.expectUpdateDeploymentAction(d) + f.expectUpdateDeploymentStatusAction(d) f.run(getKey(d, t)) } From 1f48cd27e7b3e2fdc63f90789e0700227ae3a832 Mon Sep 17 00:00:00 2001 From: Oleg Shaldybin <oleg@apcera.com> Date: Wed, 1 Jun 2016 18:49:39 -0700 Subject: [PATCH 249/339] Expect namespace deletion in NamespaceController Using new fake clientset registry exposes the actual flow on pending namespace finalization: get namespace, create finalizer, list pods and delete namespace if there are no pods. --- pkg/client/testing/core/fixture.go | 2 +- pkg/controller/namespace/namespace_controller_test.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/client/testing/core/fixture.go b/pkg/client/testing/core/fixture.go index 609def7970..96472bcbbe 100644 --- a/pkg/client/testing/core/fixture.go +++ b/pkg/client/testing/core/fixture.go @@ -82,7 +82,7 @@ func ObjectReaction(tracker ObjectTracker, mapper meta.RESTMapper) ReactionFunc } // Here and below we need to switch on implementation types, - // no on interfaces, as some interfaces are identical + // not on interfaces, as some interfaces are identical // (e.g. UpdateAction and CreateAction), so if we use them, // updates and creates end up matching the same case branch. switch action := action.(type) { diff --git a/pkg/controller/namespace/namespace_controller_test.go b/pkg/controller/namespace/namespace_controller_test.go index f03a59d713..9c5b77d8ef 100644 --- a/pkg/controller/namespace/namespace_controller_test.go +++ b/pkg/controller/namespace/namespace_controller_test.go @@ -133,8 +133,9 @@ func testSyncNamespaceThatIsTerminating(t *testing.T, versions *unversioned.APIV testNamespace: testNamespacePendingFinalize, kubeClientActionSet: sets.NewString( strings.Join([]string{"get", "namespaces", ""}, "-"), - strings.Join([]string{"list", "pods", ""}, "-"), strings.Join([]string{"create", "namespaces", "finalize"}, "-"), + strings.Join([]string{"list", "pods", ""}, "-"), + strings.Join([]string{"delete", "namespaces", ""}, "-"), ), dynamicClientActionSet: dynamicClientActionSet, }, From ab6ac7c94e71ee06999921ddc905683fd36338bc Mon Sep 17 00:00:00 2001 From: Oleg Shaldybin <oleg@apcera.com> Date: Wed, 1 Jun 2016 18:47:08 -0700 Subject: [PATCH 250/339] Fix mirror pod identity change test If mirror pod identity changes it actually doesn't get updated; previously test was relying on an incorrect record pulled from a fake clientset. --- pkg/kubelet/status/status_manager_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/kubelet/status/status_manager_test.go b/pkg/kubelet/status/status_manager_test.go index e88de8bcfe..e6130540c7 100644 --- a/pkg/kubelet/status/status_manager_test.go +++ b/pkg/kubelet/status/status_manager_test.go @@ -526,16 +526,12 @@ func TestStaticPodStatus(t *testing.T) { mirrorPod.UID = "new-mirror-pod" mirrorPod.Status = api.PodStatus{} m.podManager.AddPod(mirrorPod) - // Expect update to new mirrorPod. + + // Expect no update to mirror pod, since UID has changed. m.testSyncBatch() verifyActions(t, m.kubeClient, []core.Action{ core.GetActionImpl{ActionImpl: core.ActionImpl{Verb: "get", Resource: unversioned.GroupVersionResource{Resource: "pods"}}}, - core.UpdateActionImpl{ActionImpl: core.ActionImpl{Verb: "update", Resource: unversioned.GroupVersionResource{Resource: "pods"}, Subresource: "status"}}, }) - updateAction = client.Actions()[1].(core.UpdateActionImpl) - updatedPod = updateAction.Object.(*api.Pod) - assert.Equal(t, mirrorPod.UID, updatedPod.UID, "Expected mirrorPod (%q), but got %q", mirrorPod.UID, updatedPod.UID) - assert.True(t, isStatusEqual(&status, &updatedPod.Status), "Expected: %+v, Got: %+v", status, updatedPod.Status) } func TestSetContainerReadiness(t *testing.T) { From a58b4cf59df732d432ae10a39647f843e26b6d9b Mon Sep 17 00:00:00 2001 From: Oleg Shaldybin <oleg@apcera.com> Date: Wed, 1 Jun 2016 18:46:31 -0700 Subject: [PATCH 251/339] Don't panic in NodeController if pod update fails Previously it was trying to use a nil pod variable if error was returned from the pod update call. --- pkg/controller/node/nodecontroller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/node/nodecontroller.go b/pkg/controller/node/nodecontroller.go index ff7ebb4b7f..578181d26c 100644 --- a/pkg/controller/node/nodecontroller.go +++ b/pkg/controller/node/nodecontroller.go @@ -1005,9 +1005,9 @@ func (nc *NodeController) markAllPodsNotReady(nodeName string) error { if cond.Type == api.PodReady { pod.Status.Conditions[i].Status = api.ConditionFalse glog.V(2).Infof("Updating ready status of pod %v to false", pod.Name) - pod, err := nc.kubeClient.Core().Pods(pod.Namespace).UpdateStatus(&pod) + _, err := nc.kubeClient.Core().Pods(pod.Namespace).UpdateStatus(&pod) if err != nil { - glog.Warningf("Failed to update status for pod %q: %v", format.Pod(pod), err) + glog.Warningf("Failed to update status for pod %q: %v", format.Pod(&pod), err) errMsg = append(errMsg, fmt.Sprintf("%v", err)) } break From e78d7749a580087b66a39ff447ac165995e302a5 Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" <stefan.schimanski@gmail.com> Date: Mon, 4 Apr 2016 21:04:00 +0200 Subject: [PATCH 252/339] Add awareness of more override flags in bash-completion --- pkg/kubectl/cmd/cmd.go | 45 +++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/pkg/kubectl/cmd/cmd.go b/pkg/kubectl/cmd/cmd.go index 75b935b881..c8c58f06b9 100644 --- a/pkg/kubectl/cmd/cmd.go +++ b/pkg/kubectl/cmd/cmd.go @@ -32,30 +32,35 @@ import ( const ( bash_completion_func = `# call kubectl get $1, -__kubectl_namespace_flag() +__kubectl_override_flag_list=(kubeconfig cluster user context namespace server) +__kubectl_override_flags() { - local ret two_word_ns - ret="" - two_word_ns=false + local ${__kubectl_override_flag_list[*]} two_word_of of for w in "${words[@]}"; do - if [ "$two_word_ns" = true ]; then - ret="--namespace=${w}" - two_word_ns=false + if [ -n "${two_word_of}" ]; then + eval "${two_word_of}=\"--${two_word_of}=\${w}\"" + two_word_of= continue fi - case "${w}" in - --namespace=*) - ret=${w} - ;; - --namespace) - two_word_ns=true - ;; - --all-namespaces) - ret=${w} - ;; - esac + for of in "${__kubectl_override_flag_list[@]}"; do + case "${w}" in + --${of}=*) + eval "${of}=\"--${of}=\${w}\"" + ;; + --${of}) + two_word_of="${of}" + ;; + esac + done + if [ "${w}" == "--all-namespaces" ]; then + namespace="--all-namespaces" + fi + done + for of in "${__kubectl_override_flag_list[@]}"; do + if eval "test -n \"\$${of}\""; then + eval "echo \${${of}}" + fi done - echo $ret } __kubectl_get_namespaces() @@ -72,7 +77,7 @@ __kubectl_parse_get() local template template="{{ range .items }}{{ .metadata.name }} {{ end }}" local kubectl_out - if kubectl_out=$(kubectl get $(__kubectl_namespace_flag) -o template --template="${template}" "$1" 2>/dev/null); then + if kubectl_out=$(kubectl get $(__kubectl_override_flags) -o template --template="${template}" "$1" 2>/dev/null); then COMPREPLY=( $( compgen -W "${kubectl_out[*]}" -- "$cur" ) ) fi } From 56a2cf40e660d84b6380687ce4194534baa1cee4 Mon Sep 17 00:00:00 2001 From: George Tankersley <george.tankersley@coreos.com> Date: Thu, 14 Apr 2016 18:09:24 -0700 Subject: [PATCH 253/339] tests: add certificates to existing test infrastructure --- hack/test-go.sh | 2 +- hack/test-integration.sh | 2 +- pkg/api/testapi/testapi.go | 29 +++++++++++++++------- pkg/master/master_test.go | 2 ++ test/integration/framework/master_utils.go | 5 ++++ 5 files changed, 29 insertions(+), 11 deletions(-) diff --git a/hack/test-go.sh b/hack/test-go.sh index 1586d3f3f8..fdecf45a43 100755 --- a/hack/test-go.sh +++ b/hack/test-go.sh @@ -60,7 +60,7 @@ KUBE_GOVERALLS_BIN=${KUBE_GOVERALLS_BIN:-} # "v1,compute/v1alpha1,experimental/v1alpha2;v1,compute/v2,experimental/v1alpha3" # FIXME: due to current implementation of a test client (see: pkg/api/testapi/testapi.go) # ONLY the last version is tested in each group. -KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,autoscaling/v1,batch/v1,batch/v2alpha1,extensions/v1beta1,apps/v1alpha1,federation/v1alpha1,policy/v1alpha1,rbac.authorization.k8s.io/v1alpha1"} +KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,autoscaling/v1,batch/v1,batch/v2alpha1,extensions/v1beta1,apps/v1alpha1,federation/v1alpha1,policy/v1alpha1,rbac.authorization.k8s.io/v1alpha1,certificates/v1alpha1"} # once we have multiple group supports # Create a junit-style XML test report in this directory if set. KUBE_JUNIT_REPORT_DIR=${KUBE_JUNIT_REPORT_DIR:-} diff --git a/hack/test-integration.sh b/hack/test-integration.sh index 615fad3a7b..5eb7cdacd3 100755 --- a/hack/test-integration.sh +++ b/hack/test-integration.sh @@ -31,7 +31,7 @@ source "${KUBE_ROOT}/hack/lib/init.sh" # KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,extensions/v1beta1"} # FIXME: due to current implementation of a test client (see: pkg/api/testapi/testapi.go) # ONLY the last version is tested in each group. -KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,autoscaling/v1,batch/v1,apps/v1alpha1,policy/v1alpha1,extensions/v1beta1,rbac.authorization.k8s.io/v1alpha1"} +KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,autoscaling/v1,batch/v1,apps/v1alpha1,policy/v1alpha1,extensions/v1beta1,rbac.authorization.k8s.io/v1alpha1,certificates/v1alpha1"} # Give integration tests longer to run # TODO: allow a larger value to be passed in diff --git a/pkg/api/testapi/testapi.go b/pkg/api/testapi/testapi.go index 518dddbfff..12a9d7c46b 100644 --- a/pkg/api/testapi/testapi.go +++ b/pkg/api/testapi/testapi.go @@ -32,6 +32,7 @@ import ( "k8s.io/kubernetes/pkg/apis/apps" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/batch" + "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/apis/rbac" @@ -43,6 +44,7 @@ import ( _ "k8s.io/kubernetes/pkg/apis/apps/install" _ "k8s.io/kubernetes/pkg/apis/autoscaling/install" _ "k8s.io/kubernetes/pkg/apis/batch/install" + _ "k8s.io/kubernetes/pkg/apis/certificates/install" _ "k8s.io/kubernetes/pkg/apis/componentconfig/install" _ "k8s.io/kubernetes/pkg/apis/extensions/install" _ "k8s.io/kubernetes/pkg/apis/policy/install" @@ -50,15 +52,16 @@ import ( ) var ( - Groups = make(map[string]TestGroup) - Default TestGroup - Autoscaling TestGroup - Batch TestGroup - Extensions TestGroup - Apps TestGroup - Policy TestGroup - Federation TestGroup - Rbac TestGroup + Groups = make(map[string]TestGroup) + Default TestGroup + Autoscaling TestGroup + Batch TestGroup + Extensions TestGroup + Apps TestGroup + Policy TestGroup + Federation TestGroup + Rbac TestGroup + Certificates TestGroup serializer runtime.SerializerInfo storageSerializer runtime.SerializerInfo @@ -190,12 +193,20 @@ func init() { internalTypes: api.Scheme.KnownTypes(rbac.SchemeGroupVersion), } } + if _, ok := Groups[certificates.GroupName]; !ok { + Groups[certificates.GroupName] = TestGroup{ + externalGroupVersion: unversioned.GroupVersion{Group: certificates.GroupName, Version: registered.GroupOrDie(certificates.GroupName).GroupVersion.Version}, + internalGroupVersion: certificates.SchemeGroupVersion, + internalTypes: api.Scheme.KnownTypes(certificates.SchemeGroupVersion), + } + } Default = Groups[api.GroupName] Autoscaling = Groups[autoscaling.GroupName] Batch = Groups[batch.GroupName] Apps = Groups[apps.GroupName] Policy = Groups[policy.GroupName] + Certificates = Groups[certificates.GroupName] Extensions = Groups[extensions.GroupName] Federation = Groups[federation.GroupName] Rbac = Groups[rbac.GroupName] diff --git a/pkg/master/master_test.go b/pkg/master/master_test.go index 317f0f32e6..48e2714ad0 100644 --- a/pkg/master/master_test.go +++ b/pkg/master/master_test.go @@ -42,6 +42,7 @@ import ( "k8s.io/kubernetes/pkg/apis/batch" batchapiv1 "k8s.io/kubernetes/pkg/apis/batch/v1" batchapiv2alpha1 "k8s.io/kubernetes/pkg/apis/batch/v2alpha1" + "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/apis/extensions" extensionsapiv1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" "k8s.io/kubernetes/pkg/apis/rbac" @@ -93,6 +94,7 @@ func setUp(t *testing.T) (*Master, *etcdtesting.EtcdTestServer, Config, *assert. resourceEncoding.SetVersionEncoding(apps.GroupName, *testapi.Apps.GroupVersion(), unversioned.GroupVersion{Group: apps.GroupName, Version: runtime.APIVersionInternal}) resourceEncoding.SetVersionEncoding(extensions.GroupName, *testapi.Extensions.GroupVersion(), unversioned.GroupVersion{Group: extensions.GroupName, Version: runtime.APIVersionInternal}) resourceEncoding.SetVersionEncoding(rbac.GroupName, *testapi.Rbac.GroupVersion(), unversioned.GroupVersion{Group: rbac.GroupName, Version: runtime.APIVersionInternal}) + resourceEncoding.SetVersionEncoding(certificates.GroupName, *testapi.Certificates.GroupVersion(), unversioned.GroupVersion{Group: certificates.GroupName, Version: runtime.APIVersionInternal}) storageFactory := genericapiserver.NewDefaultStorageFactory(storageConfig, testapi.StorageMediaType(), api.Codecs, resourceEncoding, DefaultAPIResourceConfigSource()) config.StorageFactory = storageFactory diff --git a/test/integration/framework/master_utils.go b/test/integration/framework/master_utils.go index d2cab29f64..56b8f96b4d 100644 --- a/test/integration/framework/master_utils.go +++ b/test/integration/framework/master_utils.go @@ -33,6 +33,7 @@ import ( "k8s.io/kubernetes/pkg/apis/apps" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/batch" + "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/apis/rbac" @@ -192,6 +193,10 @@ func NewMasterConfig() *master.Config { unversioned.GroupResource{Group: rbac.GroupName, Resource: genericapiserver.AllResources}, "", NewSingleContentTypeSerializer(api.Scheme, testapi.Rbac.Codec(), runtime.ContentTypeJSON)) + storageFactory.SetSerializer( + unversioned.GroupResource{Group: certificates.GroupName, Resource: genericapiserver.AllResources}, + "", + NewSingleContentTypeSerializer(api.Scheme, testapi.Certificates.Codec(), runtime.ContentTypeJSON)) return &master.Config{ Config: &genericapiserver.Config{ From 34506faf979fff5aef6743a5732295e19758f373 Mon Sep 17 00:00:00 2001 From: George Tankersley <george.tankersley@coreos.com> Date: Wed, 25 May 2016 14:47:14 -0700 Subject: [PATCH 254/339] kubectl: add certificates group --- pkg/kubectl/cmd/util/factory.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/kubectl/cmd/util/factory.go b/pkg/kubectl/cmd/util/factory.go index 8a57c6ae6d..b404b56ac5 100644 --- a/pkg/kubectl/cmd/util/factory.go +++ b/pkg/kubectl/cmd/util/factory.go @@ -48,6 +48,7 @@ import ( "k8s.io/kubernetes/pkg/apis/apps" "k8s.io/kubernetes/pkg/apis/autoscaling" "k8s.io/kubernetes/pkg/apis/batch" + "k8s.io/kubernetes/pkg/apis/certificates" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/apis/policy" "k8s.io/kubernetes/pkg/apis/rbac" @@ -366,6 +367,8 @@ func NewFactory(optionalClientConfig clientcmd.ClientConfig) *Factory { return clients.FederationClientForVersion(&mappingVersion) case rbac.GroupName: return c.RbacClient.RESTClient, nil + case certificates.GroupName: + return c.CertificatesClient.RESTClient, nil default: if !registered.IsThirdPartyAPIGroupVersion(gvk.GroupVersion()) { return nil, fmt.Errorf("unknown api group/version: %s", gvk.String()) @@ -1104,6 +1107,12 @@ func (c *clientSwaggerSchema) ValidateBytes(data []byte) error { } return getSchemaAndValidate(c.fedc, data, "apis/", gvk.GroupVersion().String(), c.cacheDir, c) } + if gvk.Group == certificates.GroupName { + if c.c.CertificatesClient == nil { + return errors.New("unable to validate: no certificates client") + } + return getSchemaAndValidate(c.c.CertificatesClient.RESTClient, data, "apis/", gvk.GroupVersion().String(), c.cacheDir, c) + } return getSchemaAndValidate(c.c.RESTClient, data, "api", gvk.GroupVersion().String(), c.cacheDir, c) } From f8f7e7e3c7f33fa926e1ed52051f275689026692 Mon Sep 17 00:00:00 2001 From: George Tankersley <george.tankersley@coreos.com> Date: Tue, 19 Apr 2016 13:22:08 -0700 Subject: [PATCH 255/339] codegen: add certificates group to generators --- cmd/libs/go2idl/client-gen/main.go | 2 +- cmd/libs/go2idl/conversion-gen/main.go | 2 ++ cmd/libs/go2idl/deepcopy-gen/main.go | 2 ++ cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go | 1 + hack/update-api-reference-docs.sh | 2 +- hack/update-generated-swagger-docs.sh | 2 +- hack/update-swagger-spec.sh | 2 +- pkg/apis/certificates/types.generated.go | 0 8 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 pkg/apis/certificates/types.generated.go diff --git a/cmd/libs/go2idl/client-gen/main.go b/cmd/libs/go2idl/client-gen/main.go index 0b28a715bf..2634d14142 100644 --- a/cmd/libs/go2idl/client-gen/main.go +++ b/cmd/libs/go2idl/client-gen/main.go @@ -34,7 +34,7 @@ import ( var ( test = flag.BoolP("test", "t", false, "set this flag to generate the client code for the testdata") - inputVersions = flag.StringSlice("input", []string{"api/", "extensions/", "autoscaling/", "batch/", "rbac/"}, "group/versions that client-gen will generate clients for. At most one version per group is allowed. Specified in the format \"group1/version1,group2/version2...\". Default to \"api/,extensions/,autoscaling/,batch/,rbac/\"") + inputVersions = flag.StringSlice("input", []string{"api/", "extensions/", "autoscaling/", "batch/", "rbac/", "certificates/"}, "group/versions that client-gen will generate clients for. At most one version per group is allowed. Specified in the format \"group1/version1,group2/version2...\". Default to \"api/,extensions/,autoscaling/,batch/,rbac/\"") includedTypesOverrides = flag.StringSlice("included-types-overrides", []string{}, "list of group/version/type for which client should be generated. By default, client is generated for all types which have genclient=true in types.go. This overrides that. For each groupVersion in this list, only the types mentioned here will be included. The default check of genclient=true will be used for other group versions.") basePath = flag.String("input-base", "k8s.io/kubernetes/pkg/apis", "base path to look for the api group. Default to \"k8s.io/kubernetes/pkg/apis\"") clientsetName = flag.StringP("clientset-name", "n", "internalclientset", "the name of the generated clientset package.") diff --git a/cmd/libs/go2idl/conversion-gen/main.go b/cmd/libs/go2idl/conversion-gen/main.go index 27cc069077..527763ee0c 100644 --- a/cmd/libs/go2idl/conversion-gen/main.go +++ b/cmd/libs/go2idl/conversion-gen/main.go @@ -46,6 +46,8 @@ func main() { "k8s.io/kubernetes/pkg/apis/batch/v2alpha1", "k8s.io/kubernetes/pkg/apis/apps", "k8s.io/kubernetes/pkg/apis/apps/v1alpha1", + "k8s.io/kubernetes/pkg/apis/certificates", + "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1", "k8s.io/kubernetes/pkg/apis/componentconfig", "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1", "k8s.io/kubernetes/pkg/apis/policy", diff --git a/cmd/libs/go2idl/deepcopy-gen/main.go b/cmd/libs/go2idl/deepcopy-gen/main.go index b0cc9725db..ab1941bf64 100644 --- a/cmd/libs/go2idl/deepcopy-gen/main.go +++ b/cmd/libs/go2idl/deepcopy-gen/main.go @@ -51,6 +51,8 @@ func main() { "k8s.io/kubernetes/pkg/apis/batch/v2alpha1", "k8s.io/kubernetes/pkg/apis/apps", "k8s.io/kubernetes/pkg/apis/apps/v1alpha1", + "k8s.io/kubernetes/pkg/apis/certificates", + "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1", "k8s.io/kubernetes/pkg/apis/componentconfig", "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1", "k8s.io/kubernetes/pkg/apis/policy", diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go index 5f21816a4a..8f5fdb635e 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go @@ -74,6 +74,7 @@ func New() *Generator { `k8s.io/kubernetes/pkg/apis/apps/v1alpha1`, `k8s.io/kubernetes/pkg/apis/rbac/v1alpha1`, `k8s.io/kubernetes/federation/apis/federation/v1alpha1`, + `k8s.io/kubernetes/pkg/apis/certificates/v1alpha1`, }, ","), DropEmbeddedFields: "k8s.io/kubernetes/pkg/api/unversioned.TypeMeta", } diff --git a/hack/update-api-reference-docs.sh b/hack/update-api-reference-docs.sh index 72cac90791..464bc24026 100755 --- a/hack/update-api-reference-docs.sh +++ b/hack/update-api-reference-docs.sh @@ -42,7 +42,7 @@ OUTPUT_TMP="${KUBE_ROOT}/${TMP_SUBPATH}" echo "Generating api reference docs at ${OUTPUT_TMP}" -DEFAULT_GROUP_VERSIONS="v1 extensions/v1beta1 batch/v1 autoscaling/v1" +DEFAULT_GROUP_VERSIONS="v1 extensions/v1beta1 batch/v1 autoscaling/v1 certificates/v1alpha1" VERSIONS=${VERSIONS:-$DEFAULT_GROUP_VERSIONS} for ver in $VERSIONS; do mkdir -p "${OUTPUT_TMP}/${ver}" diff --git a/hack/update-generated-swagger-docs.sh b/hack/update-generated-swagger-docs.sh index 4dc13fe6b9..f10ec45153 100755 --- a/hack/update-generated-swagger-docs.sh +++ b/hack/update-generated-swagger-docs.sh @@ -57,7 +57,7 @@ EOF mv "$TMPFILE" "pkg/$(kube::util::group-version-to-pkg-path "${group_version}")/types_swagger_doc_generated.go" } -GROUP_VERSIONS=(unversioned v1 authorization/v1beta1 autoscaling/v1 batch/v1 batch/v2alpha1 extensions/v1beta1 apps/v1alpha1 policy/v1alpha1 rbac/v1alpha1) +GROUP_VERSIONS=(unversioned v1 authorization/v1beta1 autoscaling/v1 batch/v1 batch/v2alpha1 extensions/v1beta1 apps/v1alpha1 policy/v1alpha1 rbac/v1alpha1 certificates/v1alpha1) # To avoid compile errors, remove the currently existing files. for group_version in "${GROUP_VERSIONS[@]}"; do rm -f "pkg/$(kube::util::group-version-to-pkg-path "${group_version}")/types_swagger_doc_generated.go" diff --git a/hack/update-swagger-spec.sh b/hack/update-swagger-spec.sh index b3aec51745..8528a99dba 100755 --- a/hack/update-swagger-spec.sh +++ b/hack/update-swagger-spec.sh @@ -74,7 +74,7 @@ APISERVER_PID=$! kube::util::wait_for_url "http://127.0.0.1:${API_PORT}/healthz" "apiserver: " SWAGGER_API_PATH="http://127.0.0.1:${API_PORT}/swaggerapi/" -DEFAULT_GROUP_VERSIONS="v1 autoscaling/v1 batch/v1 batch/v2alpha1 extensions/v1beta1 apps/v1alpha1 policy/v1alpha1 rbac.authorization.k8s.io/v1alpha1" +DEFAULT_GROUP_VERSIONS="v1 autoscaling/v1 batch/v1 batch/v2alpha1 extensions/v1beta1 apps/v1alpha1 policy/v1alpha1 rbac.authorization.k8s.io/v1alpha1 certificates/v1alpha1" VERSIONS=${VERSIONS:-$DEFAULT_GROUP_VERSIONS} kube::log::status "Updating " ${SWAGGER_ROOT_DIR} diff --git a/pkg/apis/certificates/types.generated.go b/pkg/apis/certificates/types.generated.go new file mode 100644 index 0000000000..e69de29bb2 From c9c6fff269685a23710bf6ff22cf641df06367de Mon Sep 17 00:00:00 2001 From: George Tankersley <george.tankersley@coreos.com> Date: Mon, 27 Jun 2016 15:38:02 -0700 Subject: [PATCH 256/339] codegen: GENERATE ALL THE THINGS --- api/swagger-spec/certificates.json | 110 + api/swagger-spec/certificates_v1alpha1.json | 1118 ++++++++++ api/swagger-spec/resourceListing.json | 8 + .../certificates/v1alpha1/definitions.html | 1311 +++++++++++ .../certificates/v1alpha1/operations.html | 1879 ++++++++++++++++ pkg/apis/certificates/deep_copy_generated.go | 129 ++ pkg/apis/certificates/types.generated.go | 1963 +++++++++++++++++ .../v1alpha1/conversion_generated.go | 216 +- .../v1alpha1/deep_copy_generated.go | 130 ++ .../certificates/v1alpha1/generated.pb.go | 1192 ++++++++++ .../certificates/v1alpha1/generated.proto | 86 + .../certificates/v1alpha1/types.generated.go | 1963 +++++++++++++++++ pkg/apis/certificates/v1alpha1/types.go | 30 +- .../v1alpha1/types_swagger_doc_generated.go | 70 + .../internalclientset/clientset.go | 17 + .../fake/clientset_generated.go | 7 + .../unversioned/certificates_client.go | 101 + .../unversioned/certificatesigningrequest.go | 153 ++ .../typed/certificates/unversioned/doc.go | 20 + .../certificates/unversioned/fake/doc.go | 20 + .../fake/fake_certificates_client.go | 37 + .../fake/fake_certificatesigningrequest.go | 118 + .../unversioned/generated_expansion.go | 19 + 23 files changed, 10677 insertions(+), 20 deletions(-) create mode 100644 api/swagger-spec/certificates.json create mode 100644 api/swagger-spec/certificates_v1alpha1.json create mode 100755 docs/api-reference/certificates/v1alpha1/definitions.html create mode 100755 docs/api-reference/certificates/v1alpha1/operations.html create mode 100644 pkg/apis/certificates/deep_copy_generated.go create mode 100644 pkg/apis/certificates/v1alpha1/deep_copy_generated.go create mode 100644 pkg/apis/certificates/v1alpha1/generated.pb.go create mode 100644 pkg/apis/certificates/v1alpha1/generated.proto create mode 100644 pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go create mode 100644 pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificates_client.go create mode 100644 pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificatesigningrequest.go create mode 100644 pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/doc.go create mode 100644 pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/doc.go create mode 100644 pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificates_client.go create mode 100644 pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificatesigningrequest.go create mode 100644 pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/generated_expansion.go diff --git a/api/swagger-spec/certificates.json b/api/swagger-spec/certificates.json new file mode 100644 index 0000000000..56ba0dd90e --- /dev/null +++ b/api/swagger-spec/certificates.json @@ -0,0 +1,110 @@ +{ + "swaggerVersion": "1.2", + "apiVersion": "", + "basePath": "https://10.10.10.10:6443", + "resourcePath": "/apis/certificates", + "apis": [ + { + "path": "/apis/certificates", + "description": "get information of a group", + "operations": [ + { + "type": "unversioned.APIGroup", + "method": "GET", + "summary": "get information of a group", + "nickname": "getAPIGroup", + "parameters": [], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ] + } + ] + } + ], + "models": { + "unversioned.APIGroup": { + "id": "unversioned.APIGroup", + "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", + "required": [ + "name", + "versions", + "serverAddressByClientCIDRs" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "name": { + "type": "string", + "description": "name is the name of the group." + }, + "versions": { + "type": "array", + "items": { + "$ref": "unversioned.GroupVersionForDiscovery" + }, + "description": "versions are the versions supported in this group." + }, + "preferredVersion": { + "$ref": "unversioned.GroupVersionForDiscovery", + "description": "preferredVersion is the version preferred by the API server, which probably is the storage version." + }, + "serverAddressByClientCIDRs": { + "type": "array", + "items": { + "$ref": "unversioned.ServerAddressByClientCIDR" + }, + "description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP." + } + } + }, + "unversioned.GroupVersionForDiscovery": { + "id": "unversioned.GroupVersionForDiscovery", + "description": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensiblity.", + "required": [ + "groupVersion", + "version" + ], + "properties": { + "groupVersion": { + "type": "string", + "description": "groupVersion specifies the API group and version in the form \"group/version\"" + }, + "version": { + "type": "string", + "description": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion." + } + } + }, + "unversioned.ServerAddressByClientCIDR": { + "id": "unversioned.ServerAddressByClientCIDR", + "description": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", + "required": [ + "clientCIDR", + "serverAddress" + ], + "properties": { + "clientCIDR": { + "type": "string", + "description": "The CIDR with which clients can match their IP to figure out the server address that they should use." + }, + "serverAddress": { + "type": "string", + "description": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port." + } + } + } + } + } diff --git a/api/swagger-spec/certificates_v1alpha1.json b/api/swagger-spec/certificates_v1alpha1.json new file mode 100644 index 0000000000..609936a630 --- /dev/null +++ b/api/swagger-spec/certificates_v1alpha1.json @@ -0,0 +1,1118 @@ +{ + "swaggerVersion": "1.2", + "apiVersion": "certificates/v1alpha1", + "basePath": "https://10.10.10.10:6443", + "resourcePath": "/apis/certificates/v1alpha1", + "apis": [ + { + "path": "/apis/certificates/v1alpha1/certificatesigningrequests", + "description": "API at /apis/certificates/v1alpha1", + "operations": [ + { + "type": "v1alpha1.CertificateSigningRequestList", + "method": "GET", + "summary": "list or watch objects of kind CertificateSigningRequest", + "nickname": "listCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1alpha1.CertificateSigningRequestList" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1alpha1.CertificateSigningRequest", + "method": "POST", + "summary": "create a CertificateSigningRequest", + "nickname": "createCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1alpha1.CertificateSigningRequest", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1alpha1.CertificateSigningRequest" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "unversioned.Status", + "method": "DELETE", + "summary": "delete collection of CertificateSigningRequest", + "nickname": "deletecollectionCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "unversioned.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/certificates/v1alpha1/watch/certificatesigningrequests", + "description": "API at /apis/certificates/v1alpha1", + "operations": [ + { + "type": "*versioned.Event", + "method": "GET", + "summary": "watch individual changes to a list of CertificateSigningRequest", + "nickname": "watchCertificateSigningRequestList", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "*versioned.Event" + } + ], + "produces": [ + "application/json", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/certificates/v1alpha1/certificatesigningrequests/{name}", + "description": "API at /apis/certificates/v1alpha1", + "operations": [ + { + "type": "v1alpha1.CertificateSigningRequest", + "method": "GET", + "summary": "read the specified CertificateSigningRequest", + "nickname": "readCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "export", + "description": "Should this value be exported. Export strips fields that a user can not specify.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "exact", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1alpha1.CertificateSigningRequest" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1alpha1.CertificateSigningRequest", + "method": "PUT", + "summary": "replace the specified CertificateSigningRequest", + "nickname": "replaceCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1alpha1.CertificateSigningRequest", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1alpha1.CertificateSigningRequest" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + }, + { + "type": "v1alpha1.CertificateSigningRequest", + "method": "PATCH", + "summary": "partially update the specified CertificateSigningRequest", + "nickname": "patchCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "unversioned.Patch", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1alpha1.CertificateSigningRequest" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" + ] + }, + { + "type": "unversioned.Status", + "method": "DELETE", + "summary": "delete a CertificateSigningRequest", + "nickname": "deleteCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1.DeleteOptions", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "unversioned.Status" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/certificates/v1alpha1/watch/certificatesigningrequests/{name}", + "description": "API at /apis/certificates/v1alpha1", + "operations": [ + { + "type": "*versioned.Event", + "method": "GET", + "summary": "watch changes to an object of kind CertificateSigningRequest", + "nickname": "watchCertificateSigningRequest", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "*versioned.Event" + } + ], + "produces": [ + "application/json", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/certificates/v1alpha1/certificatesigningrequests/{name}/approval", + "description": "API at /apis/certificates/v1alpha1", + "operations": [ + { + "type": "v1alpha1.CertificateSigningRequest", + "method": "PUT", + "summary": "replace approval of the specified CertificateSigningRequest", + "nickname": "replaceCertificateSigningRequestApproval", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1alpha1.CertificateSigningRequest", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1alpha1.CertificateSigningRequest" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/certificates/v1alpha1/certificatesigningrequests/{name}/status", + "description": "API at /apis/certificates/v1alpha1", + "operations": [ + { + "type": "v1alpha1.CertificateSigningRequest", + "method": "PUT", + "summary": "replace status of the specified CertificateSigningRequest", + "nickname": "replaceCertificateSigningRequestStatus", + "parameters": [ + { + "type": "string", + "paramType": "query", + "name": "pretty", + "description": "If 'true', then the output is pretty printed.", + "required": false, + "allowMultiple": false + }, + { + "type": "v1alpha1.CertificateSigningRequest", + "paramType": "body", + "name": "body", + "description": "", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the CertificateSigningRequest", + "required": true, + "allowMultiple": false + } + ], + "responseMessages": [ + { + "code": 200, + "message": "OK", + "responseModel": "v1alpha1.CertificateSigningRequest" + } + ], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "*/*" + ] + } + ] + }, + { + "path": "/apis/certificates/v1alpha1", + "description": "API at /apis/certificates/v1alpha1", + "operations": [ + { + "type": "unversioned.APIResourceList", + "method": "GET", + "summary": "get available resources", + "nickname": "getAPIResources", + "parameters": [], + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ], + "consumes": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf" + ] + } + ] + } + ], + "models": { + "v1alpha1.CertificateSigningRequestList": { + "id": "v1alpha1.CertificateSigningRequestList", + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "unversioned.ListMeta" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1alpha1.CertificateSigningRequest" + } + } + } + }, + "unversioned.ListMeta": { + "id": "unversioned.ListMeta", + "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "properties": { + "selfLink": { + "type": "string", + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only." + }, + "resourceVersion": { + "type": "string", + "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency" + } + } + }, + "v1alpha1.CertificateSigningRequest": { + "id": "v1alpha1.CertificateSigningRequest", + "description": "Describes a certificate signing request", + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "v1.ObjectMeta" + }, + "spec": { + "$ref": "v1alpha1.CertificateSigningRequestSpec", + "description": "The certificate request itself and any additonal information." + }, + "status": { + "$ref": "v1alpha1.CertificateSigningRequestStatus", + "description": "Derived information about the request." + } + } + }, + "v1.ObjectMeta": { + "id": "v1.ObjectMeta", + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "properties": { + "name": { + "type": "string", + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names" + }, + "generateName": { + "type": "string", + "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency" + }, + "namespace": { + "type": "string", + "description": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md" + }, + "selfLink": { + "type": "string", + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only." + }, + "uid": { + "type": "string", + "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids" + }, + "resourceVersion": { + "type": "string", + "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency" + }, + "generation": { + "type": "integer", + "format": "int64", + "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only." + }, + "creationTimestamp": { + "type": "string", + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" + }, + "deletionTimestamp": { + "type": "string", + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource will be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet will send a hard termination signal to the container. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" + }, + "deletionGracePeriodSeconds": { + "type": "integer", + "format": "int64", + "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only." + }, + "labels": { + "type": "object", + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md" + }, + "annotations": { + "type": "object", + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://releases.k8s.io/HEAD/docs/user-guide/annotations.md" + }, + "ownerReferences": { + "type": "array", + "items": { + "$ref": "v1.OwnerReference" + }, + "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller." + }, + "finalizers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed." + } + } + }, + "v1.OwnerReference": { + "id": "v1.OwnerReference", + "description": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", + "required": [ + "apiVersion", + "kind", + "name", + "uid" + ], + "properties": { + "apiVersion": { + "type": "string", + "description": "API version of the referent." + }, + "kind": { + "type": "string", + "description": "Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "name": { + "type": "string", + "description": "Name of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names" + }, + "uid": { + "type": "string", + "description": "UID of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids" + }, + "controller": { + "type": "boolean", + "description": "If true, this reference points to the managing controller." + } + } + }, + "v1alpha1.CertificateSigningRequestSpec": { + "id": "v1alpha1.CertificateSigningRequestSpec", + "description": "This information is immutable after the request is created. Only the Request and ExtraInfo fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", + "required": [ + "request" + ], + "properties": { + "request": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Base64-encoded PKCS#10 CSR data" + }, + "username": { + "type": "string", + "description": "Information about the requesting user (if relevant) See user.Info interface for details" + }, + "uid": { + "type": "string" + }, + "groups": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1alpha1.CertificateSigningRequestStatus": { + "id": "v1alpha1.CertificateSigningRequestStatus", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "v1alpha1.CertificateSigningRequestCondition" + }, + "description": "Conditions applied to the request, such as approval or denial." + }, + "certificate": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "If request was approved, the controller will place the issued certificate here." + } + } + }, + "v1alpha1.CertificateSigningRequestCondition": { + "id": "v1alpha1.CertificateSigningRequestCondition", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "description": "request approval state, currently Approved or Denied." + }, + "reason": { + "type": "string", + "description": "brief reason for the request state" + }, + "message": { + "type": "string", + "description": "human readable message with details about the request state" + }, + "lastUpdateTime": { + "type": "string", + "description": "timestamp for the last update to this condition" + } + } + }, + "unversioned.Status": { + "id": "unversioned.Status", + "description": "Status is a return value for calls that don't return other objects.", + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "metadata": { + "$ref": "unversioned.ListMeta", + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "status": { + "type": "string", + "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + }, + "message": { + "type": "string", + "description": "A human-readable description of the status of this operation." + }, + "reason": { + "type": "string", + "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it." + }, + "details": { + "$ref": "unversioned.StatusDetails", + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." + }, + "code": { + "type": "integer", + "format": "int32", + "description": "Suggested HTTP return code for this status, 0 if not set." + } + } + }, + "unversioned.StatusDetails": { + "id": "unversioned.StatusDetails", + "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + "properties": { + "name": { + "type": "string", + "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described)." + }, + "group": { + "type": "string", + "description": "The group attribute of the resource associated with the status StatusReason." + }, + "kind": { + "type": "string", + "description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "causes": { + "type": "array", + "items": { + "$ref": "unversioned.StatusCause" + }, + "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes." + }, + "retryAfterSeconds": { + "type": "integer", + "format": "int32", + "description": "If specified, the time in seconds before the operation should be retried." + } + } + }, + "unversioned.StatusCause": { + "id": "unversioned.StatusCause", + "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + "properties": { + "reason": { + "type": "string", + "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available." + }, + "message": { + "type": "string", + "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader." + }, + "field": { + "type": "string", + "description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"" + } + } + }, + "*versioned.Event": { + "id": "*versioned.Event", + "properties": {} + }, + "unversioned.Patch": { + "id": "unversioned.Patch", + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "properties": {} + }, + "v1.DeleteOptions": { + "id": "v1.DeleteOptions", + "description": "DeleteOptions may be provided when deleting an API object", + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "gracePeriodSeconds": { + "type": "integer", + "format": "int64", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately." + }, + "preconditions": { + "$ref": "v1.Preconditions", + "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned." + }, + "orphanDependents": { + "type": "boolean", + "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list." + } + } + }, + "v1.Preconditions": { + "id": "v1.Preconditions", + "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "properties": { + "uid": { + "$ref": "types.UID", + "description": "Specifies the target UID." + } + } + }, + "types.UID": { + "id": "types.UID", + "properties": {} + }, + "unversioned.APIResourceList": { + "id": "unversioned.APIResourceList", + "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + "required": [ + "groupVersion", + "resources" + ], + "properties": { + "kind": { + "type": "string", + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" + }, + "groupVersion": { + "type": "string", + "description": "groupVersion is the group and version this APIResourceList is for." + }, + "resources": { + "type": "array", + "items": { + "$ref": "unversioned.APIResource" + }, + "description": "resources contains the name of the resources and if they are namespaced." + } + } + }, + "unversioned.APIResource": { + "id": "unversioned.APIResource", + "description": "APIResource specifies the name of a resource and whether it is namespaced.", + "required": [ + "name", + "namespaced", + "kind" + ], + "properties": { + "name": { + "type": "string", + "description": "name is the name of the resource." + }, + "namespaced": { + "type": "boolean", + "description": "namespaced indicates if a resource is namespaced or not." + }, + "kind": { + "type": "string", + "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')" + } + } + } + } + } diff --git a/api/swagger-spec/resourceListing.json b/api/swagger-spec/resourceListing.json index 77630e3d12..037c94acbc 100644 --- a/api/swagger-spec/resourceListing.json +++ b/api/swagger-spec/resourceListing.json @@ -61,6 +61,14 @@ "path": "/apis/apps", "description": "get information of a group" }, + { + "path": "/apis/certificates/v1alpha1", + "description": "API at /apis/certificates/v1alpha1" + }, + { + "path": "/apis/certificates", + "description": "get information of a group" + }, { "path": "/apis/rbac.authorization.k8s.io/v1alpha1", "description": "API at /apis/rbac.authorization.k8s.io/v1alpha1" diff --git a/docs/api-reference/certificates/v1alpha1/definitions.html b/docs/api-reference/certificates/v1alpha1/definitions.html new file mode 100755 index 0000000000..da2f346cd4 --- /dev/null +++ b/docs/api-reference/certificates/v1alpha1/definitions.html @@ -0,0 +1,1311 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<meta name="generator" content="Asciidoctor 0.1.4"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<title>Top Level API Objects + + + + +
+
+

Top Level API Objects

+ +
+
+

Definitions

+
+
+

unversioned.Patch

+
+

Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.

+
+
+
+

v1alpha1.CertificateSigningRequestList

+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

false

unversioned.ListMeta

items

false

v1alpha1.CertificateSigningRequest array

+ +
+
+

v1.DeleteOptions

+
+

DeleteOptions may be provided when deleting an API object

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

false

integer (int64)

preconditions

Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.

false

v1.Preconditions

orphanDependents

Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object’s finalizers list.

false

boolean

false

+ +
+
+

v1alpha1.CertificateSigningRequestSpec

+
+

This information is immutable after the request is created. Only the Request and ExtraInfo fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

request

Base64-encoded PKCS#10 CSR data

true

integer (int32) array

username

Information about the requesting user (if relevant) See user.Info interface for details

false

string

uid

false

string

groups

false

string array

+ +
+
+

unversioned.StatusDetails

+
+

StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

name

The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).

false

string

group

The group attribute of the resource associated with the status StatusReason.

false

string

kind

The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

causes

The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.

false

unversioned.StatusCause array

retryAfterSeconds

If specified, the time in seconds before the operation should be retried.

false

integer (int32)

+ +
+
+

*versioned.Event

+ +
+
+

unversioned.ListMeta

+
+

ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

selfLink

SelfLink is a URL representing this object. Populated by the system. Read-only.

false

string

resourceVersion

String that identifies the server’s internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency

false

string

+ +
+
+

v1alpha1.CertificateSigningRequestStatus

+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

conditions

Conditions applied to the request, such as approval or denial.

false

v1alpha1.CertificateSigningRequestCondition array

certificate

If request was approved, the controller will place the issued certificate here.

false

integer (int32) array

+ +
+
+

v1alpha1.CertificateSigningRequestCondition

+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

type

request approval state, currently Approved or Denied.

true

string

reason

brief reason for the request state

false

string

message

human readable message with details about the request state

false

string

lastUpdateTime

timestamp for the last update to this condition

false

string

+ +
+
+

v1.Preconditions

+
+

Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.

+
+ +++++++ + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

uid

Specifies the target UID.

false

types.UID

+ +
+
+

v1alpha1.CertificateSigningRequest

+
+

Describes a certificate signing request

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

false

v1.ObjectMeta

spec

The certificate request itself and any additonal information.

false

v1alpha1.CertificateSigningRequestSpec

status

Derived information about the request.

false

v1alpha1.CertificateSigningRequestStatus

+ +
+
+

unversioned.APIResourceList

+
+

APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

groupVersion

groupVersion is the group and version this APIResourceList is for.

true

string

resources

resources contains the name of the resources and if they are namespaced.

true

unversioned.APIResource array

+ +
+
+

unversioned.Status

+
+

Status is a return value for calls that don’t return other objects.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

kind

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

string

apiVersion

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources

false

string

metadata

Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

false

unversioned.ListMeta

status

Status of the operation. One of: "Success" or "Failure". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status

false

string

message

A human-readable description of the status of this operation.

false

string

reason

A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.

false

string

details

Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.

false

unversioned.StatusDetails

code

Suggested HTTP return code for this status, 0 if not set.

false

integer (int32)

+ +
+
+

unversioned.APIResource

+
+

APIResource specifies the name of a resource and whether it is namespaced.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

name

name is the name of the resource.

true

string

namespaced

namespaced indicates if a resource is namespaced or not.

true

boolean

false

kind

kind is the kind for the resource (e.g. Foo is the kind for a resource foo)

true

string

+ +
+
+

v1.ObjectMeta

+
+

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

name

Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names

false

string

generateName

GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
+
+If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).
+
+Applied only if Name is not specified. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency

false

string

namespace

Namespace defines the space within each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
+
+Must be a DNS_LABEL. Cannot be updated. More info: http://releases.k8s.io/HEAD/docs/user-guide/namespaces.md

false

string

selfLink

SelfLink is a URL representing this object. Populated by the system. Read-only.

false

string

uid

UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
+
+Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids

false

string

resourceVersion

An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
+
+Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency

false

string

generation

A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.

false

integer (int64)

creationTimestamp

CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
+
+Populated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata

false

string

deletionTimestamp

DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource will be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. Once the resource is deleted in the API, the Kubelet will send a hard termination signal to the container. If not set, graceful deletion of the object has not been requested.
+
+Populated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata

false

string

deletionGracePeriodSeconds

Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.

false

integer (int64)

labels

Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://releases.k8s.io/HEAD/docs/user-guide/labels.md

false

object

annotations

Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://releases.k8s.io/HEAD/docs/user-guide/annotations.md

false

object

ownerReferences

List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.

false

v1.OwnerReference array

finalizers

Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.

false

string array

+ +
+
+

v1.OwnerReference

+
+

OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

apiVersion

API version of the referent.

true

string

kind

Kind of the referent. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds

true

string

name

Name of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#names

true

string

uid

UID of the referent. More info: http://releases.k8s.io/HEAD/docs/user-guide/identifiers.md#uids

true

string

controller

If true, this reference points to the managing controller.

false

boolean

false

+ +
+
+

types.UID

+ +
+
+

unversioned.StatusCause

+
+

StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.

+
+ +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionRequiredSchemaDefault

reason

A machine-readable description of the cause of the error. If this value is empty there is no information available.

false

string

message

A human-readable description of the cause of the error. This field may be presented as-is to a reader.

false

string

field

The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
+
+Examples:
+ "name" - the field "name" on the current resource
+ "items[0].name" - the field "name" on the first array entry in "items"

false

string

+ +
+
+

any

+
+

Represents an untyped JSON map - see the description of the field for more info about the structure of this object.

+
+
+
+
+
+ + + \ No newline at end of file diff --git a/docs/api-reference/certificates/v1alpha1/operations.html b/docs/api-reference/certificates/v1alpha1/operations.html new file mode 100755 index 0000000000..72cf1cb571 --- /dev/null +++ b/docs/api-reference/certificates/v1alpha1/operations.html @@ -0,0 +1,1879 @@ + + + + + + +Operations + + + + +
+
+

Operations

+
+
+

get available resources

+
+
+
GET /apis/certificates/v1alpha1
+
+
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

default

success

unversioned.APIResourceList

+ +
+
+

Consumes

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apiscertificatesv1alpha1

    +
  • +
+
+
+
+
+

list or watch objects of kind CertificateSigningRequest

+
+
+
GET /apis/certificates/v1alpha1/certificatesigningrequests
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1alpha1.CertificateSigningRequestList

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apiscertificatesv1alpha1

    +
  • +
+
+
+
+
+

delete collection of CertificateSigningRequest

+
+
+
DELETE /apis/certificates/v1alpha1/certificatesigningrequests
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

unversioned.Status

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apiscertificatesv1alpha1

    +
  • +
+
+
+
+
+

create a CertificateSigningRequest

+
+
+
POST /apis/certificates/v1alpha1/certificatesigningrequests
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1alpha1.CertificateSigningRequest

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1alpha1.CertificateSigningRequest

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apiscertificatesv1alpha1

    +
  • +
+
+
+
+
+

read the specified CertificateSigningRequest

+
+
+
GET /apis/certificates/v1alpha1/certificatesigningrequests/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

export

Should this value be exported. Export strips fields that a user can not specify.

false

boolean

QueryParameter

exact

Should the export be exact. Exact export maintains cluster-specific fields like Namespace

false

boolean

PathParameter

name

name of the CertificateSigningRequest

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1alpha1.CertificateSigningRequest

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apiscertificatesv1alpha1

    +
  • +
+
+
+
+
+

replace the specified CertificateSigningRequest

+
+
+
PUT /apis/certificates/v1alpha1/certificatesigningrequests/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1alpha1.CertificateSigningRequest

PathParameter

name

name of the CertificateSigningRequest

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1alpha1.CertificateSigningRequest

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apiscertificatesv1alpha1

    +
  • +
+
+
+
+
+

delete a CertificateSigningRequest

+
+
+
DELETE /apis/certificates/v1alpha1/certificatesigningrequests/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1.DeleteOptions

PathParameter

name

name of the CertificateSigningRequest

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

unversioned.Status

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apiscertificatesv1alpha1

    +
  • +
+
+
+
+
+

partially update the specified CertificateSigningRequest

+
+
+
PATCH /apis/certificates/v1alpha1/certificatesigningrequests/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

unversioned.Patch

PathParameter

name

name of the CertificateSigningRequest

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1alpha1.CertificateSigningRequest

+ +
+
+

Consumes

+
+
    +
  • +

    application/json-patch+json

    +
  • +
  • +

    application/merge-patch+json

    +
  • +
  • +

    application/strategic-merge-patch+json

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apiscertificatesv1alpha1

    +
  • +
+
+
+
+
+

replace approval of the specified CertificateSigningRequest

+
+
+
PUT /apis/certificates/v1alpha1/certificatesigningrequests/{name}/approval
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1alpha1.CertificateSigningRequest

PathParameter

name

name of the CertificateSigningRequest

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1alpha1.CertificateSigningRequest

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apiscertificatesv1alpha1

    +
  • +
+
+
+
+
+

replace status of the specified CertificateSigningRequest

+
+
+
PUT /apis/certificates/v1alpha1/certificatesigningrequests/{name}/status
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

BodyParameter

body

true

v1alpha1.CertificateSigningRequest

PathParameter

name

name of the CertificateSigningRequest

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

v1alpha1.CertificateSigningRequest

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/yaml

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apiscertificatesv1alpha1

    +
  • +
+
+
+
+
+

watch individual changes to a list of CertificateSigningRequest

+
+
+
GET /apis/certificates/v1alpha1/watch/certificatesigningrequests
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

*versioned.Event

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apiscertificatesv1alpha1

    +
  • +
+
+
+
+
+

watch changes to an object of kind CertificateSigningRequest

+
+
+
GET /apis/certificates/v1alpha1/watch/certificatesigningrequests/{name}
+
+
+
+

Parameters

+ ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TypeNameDescriptionRequiredSchemaDefault

QueryParameter

pretty

If true, then the output is pretty printed.

false

string

QueryParameter

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

false

string

QueryParameter

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

false

string

QueryParameter

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

false

boolean

QueryParameter

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.

false

string

QueryParameter

timeoutSeconds

Timeout for the list/watch call.

false

integer (int32)

PathParameter

name

name of the CertificateSigningRequest

true

string

+ +
+
+

Responses

+ +++++ + + + + + + + + + + + + + + +
HTTP CodeDescriptionSchema

200

success

*versioned.Event

+ +
+
+

Consumes

+
+
    +
  • +

    /

    +
  • +
+
+
+
+

Produces

+
+
    +
  • +

    application/json

    +
  • +
  • +

    application/json;stream=watch

    +
  • +
  • +

    application/vnd.kubernetes.protobuf

    +
  • +
  • +

    application/vnd.kubernetes.protobuf;stream=watch

    +
  • +
+
+
+
+

Tags

+
+
    +
  • +

    apiscertificatesv1alpha1

    +
  • +
+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/pkg/apis/certificates/deep_copy_generated.go b/pkg/apis/certificates/deep_copy_generated.go new file mode 100644 index 0000000000..e60053ad69 --- /dev/null +++ b/pkg/apis/certificates/deep_copy_generated.go @@ -0,0 +1,129 @@ +// +build !ignore_autogenerated + +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package certificates + +import ( + api "k8s.io/kubernetes/pkg/api" + unversioned "k8s.io/kubernetes/pkg/api/unversioned" + conversion "k8s.io/kubernetes/pkg/conversion" +) + +func init() { + if err := api.Scheme.AddGeneratedDeepCopyFuncs( + DeepCopy_certificates_CertificateSigningRequest, + DeepCopy_certificates_CertificateSigningRequestCondition, + DeepCopy_certificates_CertificateSigningRequestList, + DeepCopy_certificates_CertificateSigningRequestSpec, + DeepCopy_certificates_CertificateSigningRequestStatus, + ); err != nil { + // if one of the deep copy functions is malformed, detect it immediately. + panic(err) + } +} + +func DeepCopy_certificates_CertificateSigningRequest(in CertificateSigningRequest, out *CertificateSigningRequest, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := api.DeepCopy_api_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + return err + } + if err := DeepCopy_certificates_CertificateSigningRequestSpec(in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_certificates_CertificateSigningRequestStatus(in.Status, &out.Status, c); err != nil { + return err + } + return nil +} + +func DeepCopy_certificates_CertificateSigningRequestCondition(in CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, c *conversion.Cloner) error { + out.Type = in.Type + out.Reason = in.Reason + out.Message = in.Message + if err := unversioned.DeepCopy_unversioned_Time(in.LastUpdateTime, &out.LastUpdateTime, c); err != nil { + return err + } + return nil +} + +func DeepCopy_certificates_CertificateSigningRequestList(in CertificateSigningRequestList, out *CertificateSigningRequestList, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + return err + } + if in.Items != nil { + in, out := in.Items, &out.Items + *out = make([]CertificateSigningRequest, len(in)) + for i := range in { + if err := DeepCopy_certificates_CertificateSigningRequest(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func DeepCopy_certificates_CertificateSigningRequestSpec(in CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, c *conversion.Cloner) error { + if in.Request != nil { + in, out := in.Request, &out.Request + *out = make([]byte, len(in)) + copy(*out, in) + } else { + out.Request = nil + } + out.Username = in.Username + out.UID = in.UID + if in.Groups != nil { + in, out := in.Groups, &out.Groups + *out = make([]string, len(in)) + copy(*out, in) + } else { + out.Groups = nil + } + return nil +} + +func DeepCopy_certificates_CertificateSigningRequestStatus(in CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, c *conversion.Cloner) error { + if in.Conditions != nil { + in, out := in.Conditions, &out.Conditions + *out = make([]CertificateSigningRequestCondition, len(in)) + for i := range in { + if err := DeepCopy_certificates_CertificateSigningRequestCondition(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + if in.Certificate != nil { + in, out := in.Certificate, &out.Certificate + *out = make([]byte, len(in)) + copy(*out, in) + } else { + out.Certificate = nil + } + return nil +} diff --git a/pkg/apis/certificates/types.generated.go b/pkg/apis/certificates/types.generated.go index e69de29bb2..1dcd4360aa 100644 --- a/pkg/apis/certificates/types.generated.go +++ b/pkg/apis/certificates/types.generated.go @@ -0,0 +1,1963 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package certificates + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg2_api "k8s.io/kubernetes/pkg/api" + pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned" + pkg3_types "k8s.io/kubernetes/pkg/types" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg2_api.ObjectMeta + var v1 pkg1_unversioned.TypeMeta + var v2 pkg3_types.UID + var v3 time.Time + _, _, _, _ = v0, v1, v2, v3 + } +} + +func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = true + yyq2[1] = true + yyq2[2] = true + yyq2[3] = x.Kind != "" + yyq2[4] = x.APIVersion != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yy4 := &x.ObjectMeta + yy4.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy6 := &x.ObjectMeta + yy6.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yy9 := &x.Spec + yy9.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy11 := &x.Spec + yy11.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy14 := &x.Status + yy14.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy16 := &x.Status + yy16.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequest) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_api.ObjectMeta{} + } else { + yyv4 := &x.ObjectMeta + yyv4.CodecDecodeSelf(d) + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = CertificateSigningRequestSpec{} + } else { + yyv5 := &x.Spec + yyv5.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = CertificateSigningRequestStatus{} + } else { + yyv6 := &x.Status + yyv6.CodecDecodeSelf(d) + } + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_api.ObjectMeta{} + } else { + yyv10 := &x.ObjectMeta + yyv10.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = CertificateSigningRequestSpec{} + } else { + yyv11 := &x.Spec + yyv11.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = CertificateSigningRequestStatus{} + } else { + yyv12 := &x.Status + yyv12.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CertificateSigningRequestSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Username != "" + yyq2[2] = x.UID != "" + yyq2[3] = len(x.Groups) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Request == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request)) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("request")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Request == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Username)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("username")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Username)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.UID)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("uid")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.UID)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Groups == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + z.F.EncSliceStringV(x.Groups, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("groups")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Groups == nil { + r.EncodeNil() + } else { + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + z.F.EncSliceStringV(x.Groups, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequestSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequestSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "request": + if r.TryDecodeAsNil() { + x.Request = nil + } else { + yyv4 := &x.Request + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *yyv4 = r.DecodeBytes(*(*[]byte)(yyv4), false, false) + } + } + case "username": + if r.TryDecodeAsNil() { + x.Username = "" + } else { + x.Username = string(r.DecodeString()) + } + case "uid": + if r.TryDecodeAsNil() { + x.UID = "" + } else { + x.UID = string(r.DecodeString()) + } + case "groups": + if r.TryDecodeAsNil() { + x.Groups = nil + } else { + yyv8 := &x.Groups + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + z.F.DecSliceStringX(yyv8, false, d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequestSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Request = nil + } else { + yyv11 := &x.Request + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, false) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Username = "" + } else { + x.Username = string(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.UID = "" + } else { + x.UID = string(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Groups = nil + } else { + yyv15 := &x.Groups + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + z.F.DecSliceStringX(yyv15, false, d) + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CertificateSigningRequestStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.Conditions) != 0 + yyq2[1] = len(x.Certificate) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.Conditions == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("conditions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Conditions == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Certificate == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("certificate")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Certificate == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequestStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequestStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "conditions": + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv4 := &x.Conditions + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv4), d) + } + } + case "certificate": + if r.TryDecodeAsNil() { + x.Certificate = nil + } else { + yyv6 := &x.Certificate + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *yyv6 = r.DecodeBytes(*(*[]byte)(yyv6), false, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequestStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv9 := &x.Conditions + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv9), d) + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Certificate = nil + } else { + yyv11 := &x.Certificate + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, false) + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x RequestConditionType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *RequestConditionType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *CertificateSigningRequestCondition) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Reason != "" + yyq2[2] = x.Message != "" + yyq2[3] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("message")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy13 := &x.LastUpdateTime + yym14 := z.EncBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.EncExt(yy13) { + } else if yym14 { + z.EncBinaryMarshal(yy13) + } else if !yym14 && z.IsJSONHandle() { + z.EncJSONMarshal(yy13) + } else { + z.EncFallback(yy13) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy15 := &x.LastUpdateTime + yym16 := z.EncBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.EncExt(yy15) { + } else if yym16 { + z.EncBinaryMarshal(yy15) + } else if !yym16 && z.IsJSONHandle() { + z.EncJSONMarshal(yy15) + } else { + z.EncFallback(yy15) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequestCondition) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequestCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = RequestConditionType(r.DecodeString()) + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + x.Reason = string(r.DecodeString()) + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + x.Message = string(r.DecodeString()) + } + case "lastUpdateTime": + if r.TryDecodeAsNil() { + x.LastUpdateTime = pkg1_unversioned.Time{} + } else { + yyv7 := &x.LastUpdateTime + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(yyv7) { + } else if yym8 { + z.DecBinaryUnmarshal(yyv7) + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv7) + } else { + z.DecFallback(yyv7, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequestCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = RequestConditionType(r.DecodeString()) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + x.Reason = string(r.DecodeString()) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + x.Message = string(r.DecodeString()) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastUpdateTime = pkg1_unversioned.Time{} + } else { + yyv13 := &x.LastUpdateTime + yym14 := z.DecBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.DecExt(yyv13) { + } else if yym14 { + z.DecBinaryUnmarshal(yyv13) + } else if !yym14 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv13) + } else { + z.DecFallback(yyv13, false) + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CertificateSigningRequestList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = true + yyq2[1] = len(x.Items) != 0 + yyq2[2] = x.Kind != "" + yyq2[3] = x.APIVersion != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yy4 := &x.ListMeta + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(yy4) { + } else { + z.EncFallback(yy4) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy6 := &x.ListMeta + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(yy6) { + } else { + z.EncFallback(yy6) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Items == nil { + r.EncodeNil() + } else { + yym9 := z.EncBinary() + _ = yym9 + if false { + } else { + h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym12 := z.EncBinary() + _ = yym12 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequestList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequestList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv4 := &x.ListMeta + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + z.DecFallback(yyv4, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv6 := &x.Items + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv6), d) + } + } + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequestList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv11 := &x.ListMeta + yym12 := z.DecBinary() + _ = yym12 + if false { + } else if z.HasExtensions() && z.DecExt(yyv11) { + } else { + z.DecFallback(yyv11, false) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv13 := &x.Items + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv13), d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encSliceCertificateSigningRequestCondition(v []CertificateSigningRequestCondition, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceCertificateSigningRequestCondition(v *[]CertificateSigningRequestCondition, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []CertificateSigningRequestCondition{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 72) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]CertificateSigningRequestCondition, yyrl1) + } + } else { + yyv1 = make([]CertificateSigningRequestCondition, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequestCondition{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, CertificateSigningRequestCondition{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequestCondition{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, CertificateSigningRequestCondition{}) // var yyz1 CertificateSigningRequestCondition + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequestCondition{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []CertificateSigningRequestCondition{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceCertificateSigningRequest(v []CertificateSigningRequest, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceCertificateSigningRequest(v *[]CertificateSigningRequest, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []CertificateSigningRequest{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 368) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]CertificateSigningRequest, yyrl1) + } + } else { + yyv1 = make([]CertificateSigningRequest, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequest{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, CertificateSigningRequest{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequest{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, CertificateSigningRequest{}) // var yyz1 CertificateSigningRequest + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequest{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []CertificateSigningRequest{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/pkg/apis/certificates/v1alpha1/conversion_generated.go b/pkg/apis/certificates/v1alpha1/conversion_generated.go index 0ec255e2a3..516d54ea95 100644 --- a/pkg/apis/certificates/v1alpha1/conversion_generated.go +++ b/pkg/apis/certificates/v1alpha1/conversion_generated.go @@ -16,16 +16,222 @@ See the License for the specific language governing permissions and limitations under the License. */ -// DO NOT EDIT. THIS FILE IS AUTO-GENERATED BY $KUBEROOT/hack/update-generated-conversions.sh +// This file was autogenerated by conversion-gen. Do not edit it manually! package v1alpha1 -import api "k8s.io/kubernetes/pkg/api" +import ( + api "k8s.io/kubernetes/pkg/api" + certificates "k8s.io/kubernetes/pkg/apis/certificates" + conversion "k8s.io/kubernetes/pkg/conversion" +) func init() { - err := api.Scheme.AddGeneratedConversionFuncs() - if err != nil { - // If one of the conversion functions is malformed, detect it immediately. + if err := api.Scheme.AddGeneratedConversionFuncs( + Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest, + Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest, + Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition, + Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition, + Convert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList, + Convert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList, + Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec, + Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec, + Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus, + Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus, + ); err != nil { + // if one of the conversion functions is malformed, detect it immediately. panic(err) } } + +func autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + // TODO: Inefficient conversion - can we improve it? + if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { + return err + } + if err := Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in *CertificateSigningRequest, out *certificates.CertificateSigningRequest, s conversion.Scope) error { + return autoConvert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + // TODO: Inefficient conversion - can we improve it? + if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { + return err + } + if err := Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in *certificates.CertificateSigningRequest, out *CertificateSigningRequest, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(in, out, s) +} + +func autoConvert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { + out.Type = certificates.RequestConditionType(in.Type) + out.Reason = in.Reason + out.Message = in.Message + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastUpdateTime, &out.LastUpdateTime, s); err != nil { + return err + } + return nil +} + +func Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in *CertificateSigningRequestCondition, out *certificates.CertificateSigningRequestCondition, s conversion.Scope) error { + return autoConvert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { + out.Type = RequestConditionType(in.Type) + out.Reason = in.Reason + out.Message = in.Message + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastUpdateTime, &out.LastUpdateTime, s); err != nil { + return err + } + return nil +} + +func Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in *certificates.CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(in, out, s) +} + +func autoConvert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]certificates.CertificateSigningRequest, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_CertificateSigningRequest_To_certificates_CertificateSigningRequest(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in *CertificateSigningRequestList, out *certificates.CertificateSigningRequestList, s conversion.Scope) error { + return autoConvert_v1alpha1_CertificateSigningRequestList_To_certificates_CertificateSigningRequestList(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CertificateSigningRequest, len(*in)) + for i := range *in { + if err := Convert_certificates_CertificateSigningRequest_To_v1alpha1_CertificateSigningRequest(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in *certificates.CertificateSigningRequestList, out *CertificateSigningRequestList, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestList_To_v1alpha1_CertificateSigningRequestList(in, out, s) +} + +func autoConvert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { + if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Request, &out.Request, s); err != nil { + return err + } + out.Username = in.Username + out.UID = in.UID + out.Groups = in.Groups + return nil +} + +func Convert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in *CertificateSigningRequestSpec, out *certificates.CertificateSigningRequestSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_CertificateSigningRequestSpec_To_certificates_CertificateSigningRequestSpec(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { + if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Request, &out.Request, s); err != nil { + return err + } + out.Username = in.Username + out.UID = in.UID + out.Groups = in.Groups + return nil +} + +func Convert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in *certificates.CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestSpec_To_v1alpha1_CertificateSigningRequestSpec(in, out, s) +} + +func autoConvert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]certificates.CertificateSigningRequestCondition, len(*in)) + for i := range *in { + if err := Convert_v1alpha1_CertificateSigningRequestCondition_To_certificates_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Certificate, &out.Certificate, s); err != nil { + return err + } + return nil +} + +func Convert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in *CertificateSigningRequestStatus, out *certificates.CertificateSigningRequestStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_CertificateSigningRequestStatus_To_certificates_CertificateSigningRequestStatus(in, out, s) +} + +func autoConvert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]CertificateSigningRequestCondition, len(*in)) + for i := range *in { + if err := Convert_certificates_CertificateSigningRequestCondition_To_v1alpha1_CertificateSigningRequestCondition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + if err := conversion.Convert_Slice_byte_To_Slice_byte(&in.Certificate, &out.Certificate, s); err != nil { + return err + } + return nil +} + +func Convert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in *certificates.CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, s conversion.Scope) error { + return autoConvert_certificates_CertificateSigningRequestStatus_To_v1alpha1_CertificateSigningRequestStatus(in, out, s) +} diff --git a/pkg/apis/certificates/v1alpha1/deep_copy_generated.go b/pkg/apis/certificates/v1alpha1/deep_copy_generated.go new file mode 100644 index 0000000000..decc6dbcce --- /dev/null +++ b/pkg/apis/certificates/v1alpha1/deep_copy_generated.go @@ -0,0 +1,130 @@ +// +build !ignore_autogenerated + +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by deepcopy-gen. Do not edit it manually! + +package v1alpha1 + +import ( + api "k8s.io/kubernetes/pkg/api" + unversioned "k8s.io/kubernetes/pkg/api/unversioned" + v1 "k8s.io/kubernetes/pkg/api/v1" + conversion "k8s.io/kubernetes/pkg/conversion" +) + +func init() { + if err := api.Scheme.AddGeneratedDeepCopyFuncs( + DeepCopy_v1alpha1_CertificateSigningRequest, + DeepCopy_v1alpha1_CertificateSigningRequestCondition, + DeepCopy_v1alpha1_CertificateSigningRequestList, + DeepCopy_v1alpha1_CertificateSigningRequestSpec, + DeepCopy_v1alpha1_CertificateSigningRequestStatus, + ); err != nil { + // if one of the deep copy functions is malformed, detect it immediately. + panic(err) + } +} + +func DeepCopy_v1alpha1_CertificateSigningRequest(in CertificateSigningRequest, out *CertificateSigningRequest, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { + return err + } + if err := DeepCopy_v1alpha1_CertificateSigningRequestSpec(in.Spec, &out.Spec, c); err != nil { + return err + } + if err := DeepCopy_v1alpha1_CertificateSigningRequestStatus(in.Status, &out.Status, c); err != nil { + return err + } + return nil +} + +func DeepCopy_v1alpha1_CertificateSigningRequestCondition(in CertificateSigningRequestCondition, out *CertificateSigningRequestCondition, c *conversion.Cloner) error { + out.Type = in.Type + out.Reason = in.Reason + out.Message = in.Message + if err := unversioned.DeepCopy_unversioned_Time(in.LastUpdateTime, &out.LastUpdateTime, c); err != nil { + return err + } + return nil +} + +func DeepCopy_v1alpha1_CertificateSigningRequestList(in CertificateSigningRequestList, out *CertificateSigningRequestList, c *conversion.Cloner) error { + if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { + return err + } + if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil { + return err + } + if in.Items != nil { + in, out := in.Items, &out.Items + *out = make([]CertificateSigningRequest, len(in)) + for i := range in { + if err := DeepCopy_v1alpha1_CertificateSigningRequest(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func DeepCopy_v1alpha1_CertificateSigningRequestSpec(in CertificateSigningRequestSpec, out *CertificateSigningRequestSpec, c *conversion.Cloner) error { + if in.Request != nil { + in, out := in.Request, &out.Request + *out = make([]byte, len(in)) + copy(*out, in) + } else { + out.Request = nil + } + out.Username = in.Username + out.UID = in.UID + if in.Groups != nil { + in, out := in.Groups, &out.Groups + *out = make([]string, len(in)) + copy(*out, in) + } else { + out.Groups = nil + } + return nil +} + +func DeepCopy_v1alpha1_CertificateSigningRequestStatus(in CertificateSigningRequestStatus, out *CertificateSigningRequestStatus, c *conversion.Cloner) error { + if in.Conditions != nil { + in, out := in.Conditions, &out.Conditions + *out = make([]CertificateSigningRequestCondition, len(in)) + for i := range in { + if err := DeepCopy_v1alpha1_CertificateSigningRequestCondition(in[i], &(*out)[i], c); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + if in.Certificate != nil { + in, out := in.Certificate, &out.Certificate + *out = make([]byte, len(in)) + copy(*out, in) + } else { + out.Certificate = nil + } + return nil +} diff --git a/pkg/apis/certificates/v1alpha1/generated.pb.go b/pkg/apis/certificates/v1alpha1/generated.pb.go new file mode 100644 index 0000000000..7f07661200 --- /dev/null +++ b/pkg/apis/certificates/v1alpha1/generated.pb.go @@ -0,0 +1,1192 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto +// DO NOT EDIT! + +/* + Package v1alpha1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/pkg/apis/certificates/v1alpha1/generated.proto + + It has these top-level messages: + CertificateSigningRequest + CertificateSigningRequestCondition + CertificateSigningRequestList + CertificateSigningRequestSpec + CertificateSigningRequestStatus +*/ +package v1alpha1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func (m *CertificateSigningRequest) Reset() { *m = CertificateSigningRequest{} } +func (m *CertificateSigningRequest) String() string { return proto.CompactTextString(m) } +func (*CertificateSigningRequest) ProtoMessage() {} + +func (m *CertificateSigningRequestCondition) Reset() { *m = CertificateSigningRequestCondition{} } +func (m *CertificateSigningRequestCondition) String() string { return proto.CompactTextString(m) } +func (*CertificateSigningRequestCondition) ProtoMessage() {} + +func (m *CertificateSigningRequestList) Reset() { *m = CertificateSigningRequestList{} } +func (m *CertificateSigningRequestList) String() string { return proto.CompactTextString(m) } +func (*CertificateSigningRequestList) ProtoMessage() {} + +func (m *CertificateSigningRequestSpec) Reset() { *m = CertificateSigningRequestSpec{} } +func (m *CertificateSigningRequestSpec) String() string { return proto.CompactTextString(m) } +func (*CertificateSigningRequestSpec) ProtoMessage() {} + +func (m *CertificateSigningRequestStatus) Reset() { *m = CertificateSigningRequestStatus{} } +func (m *CertificateSigningRequestStatus) String() string { return proto.CompactTextString(m) } +func (*CertificateSigningRequestStatus) ProtoMessage() {} + +func init() { + proto.RegisterType((*CertificateSigningRequest)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequest") + proto.RegisterType((*CertificateSigningRequestCondition)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestCondition") + proto.RegisterType((*CertificateSigningRequestList)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestList") + proto.RegisterType((*CertificateSigningRequestSpec)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestSpec") + proto.RegisterType((*CertificateSigningRequestStatus)(nil), "k8s.io.kubernetes.pkg.apis.certificates.v1alpha1.CertificateSigningRequestStatus") +} +func (m *CertificateSigningRequest) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CertificateSigningRequest) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ObjectMeta.Size())) + n1, err := m.ObjectMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n1 + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(m.Spec.Size())) + n2, err := m.Spec.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n2 + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(m.Status.Size())) + n3, err := m.Status.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n3 + return i, nil +} + +func (m *CertificateSigningRequestCondition) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CertificateSigningRequestCondition) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Type))) + i += copy(data[i:], m.Type) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Reason))) + i += copy(data[i:], m.Reason) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Message))) + i += copy(data[i:], m.Message) + data[i] = 0x22 + i++ + i = encodeVarintGenerated(data, i, uint64(m.LastUpdateTime.Size())) + n4, err := m.LastUpdateTime.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n4 + return i, nil +} + +func (m *CertificateSigningRequestList) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CertificateSigningRequestList) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(m.ListMeta.Size())) + n5, err := m.ListMeta.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n5 + if len(m.Items) > 0 { + for _, msg := range m.Items { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *CertificateSigningRequestSpec) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CertificateSigningRequestSpec) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Request != nil { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Request))) + i += copy(data[i:], m.Request) + } + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Username))) + i += copy(data[i:], m.Username) + data[i] = 0x1a + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.UID))) + i += copy(data[i:], m.UID) + if len(m.Groups) > 0 { + for _, s := range m.Groups { + data[i] = 0x22 + i++ + l = len(s) + for l >= 1<<7 { + data[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + data[i] = uint8(l) + i++ + i += copy(data[i:], s) + } + } + return i, nil +} + +func (m *CertificateSigningRequestStatus) Marshal() (data []byte, err error) { + size := m.Size() + data = make([]byte, size) + n, err := m.MarshalTo(data) + if err != nil { + return nil, err + } + return data[:n], nil +} + +func (m *CertificateSigningRequestStatus) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Conditions) > 0 { + for _, msg := range m.Conditions { + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(msg.Size())) + n, err := msg.MarshalTo(data[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Certificate != nil { + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(m.Certificate))) + i += copy(data[i:], m.Certificate) + } + return i, nil +} + +func encodeFixed64Generated(data []byte, offset int, v uint64) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + data[offset+4] = uint8(v >> 32) + data[offset+5] = uint8(v >> 40) + data[offset+6] = uint8(v >> 48) + data[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Generated(data []byte, offset int, v uint32) int { + data[offset] = uint8(v) + data[offset+1] = uint8(v >> 8) + data[offset+2] = uint8(v >> 16) + data[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintGenerated(data []byte, offset int, v uint64) int { + for v >= 1<<7 { + data[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + data[offset] = uint8(v) + return offset + 1 +} +func (m *CertificateSigningRequest) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *CertificateSigningRequestCondition) Size() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Reason) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Message) + n += 1 + l + sovGenerated(uint64(l)) + l = m.LastUpdateTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *CertificateSigningRequestList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *CertificateSigningRequestSpec) Size() (n int) { + var l int + _ = l + if m.Request != nil { + l = len(m.Request) + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.Username) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Groups) > 0 { + for _, s := range m.Groups { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *CertificateSigningRequestStatus) Size() (n int) { + var l int + _ = l + if len(m.Conditions) > 0 { + for _, e := range m.Conditions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.Certificate != nil { + l = len(m.Certificate) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CertificateSigningRequest) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CertificateSigningRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateSigningRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CertificateSigningRequestCondition) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CertificateSigningRequestCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateSigningRequestCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = RequestConditionType(data[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastUpdateTime.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CertificateSigningRequestList) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CertificateSigningRequestList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateSigningRequestList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, CertificateSigningRequest{}) + if err := m.Items[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CertificateSigningRequestSpec) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CertificateSigningRequestSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateSigningRequestSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Request = append(m.Request[:0], data[iNdEx:postIndex]...) + if m.Request == nil { + m.Request = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Username = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = string(data[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, string(data[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CertificateSigningRequestStatus) Unmarshal(data []byte) error { + l := len(data) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CertificateSigningRequestStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CertificateSigningRequestStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, CertificateSigningRequestCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Certificate", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Certificate = append(m.Certificate[:0], data[iNdEx:postIndex]...) + if m.Certificate == nil { + m.Certificate = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(data[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(data []byte) (n int, err error) { + l := len(data) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if data[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipGenerated(data[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) diff --git a/pkg/apis/certificates/v1alpha1/generated.proto b/pkg/apis/certificates/v1alpha1/generated.proto new file mode 100644 index 0000000000..6637629b30 --- /dev/null +++ b/pkg/apis/certificates/v1alpha1/generated.proto @@ -0,0 +1,86 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.kubernetes.pkg.apis.certificates.v1alpha1; + +import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; +import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; +import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; +import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1alpha1"; + +// Describes a certificate signing request +message CertificateSigningRequest { + optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1; + + // The certificate request itself and any additonal information. + optional CertificateSigningRequestSpec spec = 2; + + // Derived information about the request. + optional CertificateSigningRequestStatus status = 3; +} + +message CertificateSigningRequestCondition { + // request approval state, currently Approved or Denied. + optional string type = 1; + + // brief reason for the request state + optional string reason = 2; + + // human readable message with details about the request state + optional string message = 3; + + // timestamp for the last update to this condition + optional k8s.io.kubernetes.pkg.api.unversioned.Time lastUpdateTime = 4; +} + +message CertificateSigningRequestList { + optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1; + + repeated CertificateSigningRequest items = 2; +} + +// This information is immutable after the request is created. Only the Request +// and ExtraInfo fields can be set on creation, other fields are derived by +// Kubernetes and cannot be modified by users. +message CertificateSigningRequestSpec { + // Base64-encoded PKCS#10 CSR data + optional bytes request = 1; + + // Information about the requesting user (if relevant) + // See user.Info interface for details + optional string username = 2; + + optional string uid = 3; + + repeated string groups = 4; +} + +message CertificateSigningRequestStatus { + // Conditions applied to the request, such as approval or denial. + repeated CertificateSigningRequestCondition conditions = 1; + + // If request was approved, the controller will place the issued certificate here. + optional bytes certificate = 2; +} + diff --git a/pkg/apis/certificates/v1alpha1/types.generated.go b/pkg/apis/certificates/v1alpha1/types.generated.go index e69de29bb2..a4bffad545 100644 --- a/pkg/apis/certificates/v1alpha1/types.generated.go +++ b/pkg/apis/certificates/v1alpha1/types.generated.go @@ -0,0 +1,1963 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package v1alpha1 + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg1_unversioned "k8s.io/kubernetes/pkg/api/unversioned" + pkg2_v1 "k8s.io/kubernetes/pkg/api/v1" + pkg3_types "k8s.io/kubernetes/pkg/types" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81234 = 1 + codecSelferC_RAW1234 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1234 = 10 + codecSelferValueTypeMap1234 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1234 = 2 + codecSelfer_containerMapValue1234 = 3 + codecSelfer_containerMapEnd1234 = 4 + codecSelfer_containerArrayElem1234 = 6 + codecSelfer_containerArrayEnd1234 = 7 +) + +var ( + codecSelferBitsize1234 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1234 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1234 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg1_unversioned.TypeMeta + var v1 pkg2_v1.ObjectMeta + var v2 pkg3_types.UID + var v3 time.Time + _, _, _, _ = v0, v1, v2, v3 + } +} + +func (x *CertificateSigningRequest) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [5]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = true + yyq2[1] = true + yyq2[2] = true + yyq2[3] = x.Kind != "" + yyq2[4] = x.APIVersion != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(5) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yy4 := &x.ObjectMeta + yy4.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy6 := &x.ObjectMeta + yy6.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yy9 := &x.Spec + yy9.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("spec")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy11 := &x.Spec + yy11.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yy14 := &x.Status + yy14.CodecEncodeSelf(e) + } else { + r.EncodeNil() + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("status")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy16 := &x.Status + yy16.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym19 := z.EncBinary() + _ = yym19 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym20 := z.EncBinary() + _ = yym20 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[4] { + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym23 := z.EncBinary() + _ = yym23 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequest) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequest) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "metadata": + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_v1.ObjectMeta{} + } else { + yyv4 := &x.ObjectMeta + yyv4.CodecDecodeSelf(d) + } + case "spec": + if r.TryDecodeAsNil() { + x.Spec = CertificateSigningRequestSpec{} + } else { + yyv5 := &x.Spec + yyv5.CodecDecodeSelf(d) + } + case "status": + if r.TryDecodeAsNil() { + x.Status = CertificateSigningRequestStatus{} + } else { + yyv6 := &x.Status + yyv6.CodecDecodeSelf(d) + } + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequest) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ObjectMeta = pkg2_v1.ObjectMeta{} + } else { + yyv10 := &x.ObjectMeta + yyv10.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Spec = CertificateSigningRequestSpec{} + } else { + yyv11 := &x.Spec + yyv11.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Status = CertificateSigningRequestStatus{} + } else { + yyv12 := &x.Status + yyv12.CodecDecodeSelf(d) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CertificateSigningRequestSpec) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Username != "" + yyq2[2] = x.UID != "" + yyq2[3] = len(x.Groups) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if x.Request == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request)) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("request")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Request == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Request)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Username)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("username")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Username)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.UID)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("uid")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.UID)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + if x.Groups == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + z.F.EncSliceStringV(x.Groups, false, e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("groups")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Groups == nil { + r.EncodeNil() + } else { + yym14 := z.EncBinary() + _ = yym14 + if false { + } else { + z.F.EncSliceStringV(x.Groups, false, e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequestSpec) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequestSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "request": + if r.TryDecodeAsNil() { + x.Request = nil + } else { + yyv4 := &x.Request + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + *yyv4 = r.DecodeBytes(*(*[]byte)(yyv4), false, false) + } + } + case "username": + if r.TryDecodeAsNil() { + x.Username = "" + } else { + x.Username = string(r.DecodeString()) + } + case "uid": + if r.TryDecodeAsNil() { + x.UID = "" + } else { + x.UID = string(r.DecodeString()) + } + case "groups": + if r.TryDecodeAsNil() { + x.Groups = nil + } else { + yyv8 := &x.Groups + yym9 := z.DecBinary() + _ = yym9 + if false { + } else { + z.F.DecSliceStringX(yyv8, false, d) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequestSpec) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Request = nil + } else { + yyv11 := &x.Request + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, false) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Username = "" + } else { + x.Username = string(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.UID = "" + } else { + x.UID = string(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Groups = nil + } else { + yyv15 := &x.Groups + yym16 := z.DecBinary() + _ = yym16 + if false { + } else { + z.F.DecSliceStringX(yyv15, false, d) + } + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CertificateSigningRequestStatus) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [2]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = len(x.Conditions) != 0 + yyq2[1] = len(x.Certificate) != 0 + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(2) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + if x.Conditions == nil { + r.EncodeNil() + } else { + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("conditions")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Conditions == nil { + r.EncodeNil() + } else { + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + h.encSliceCertificateSigningRequestCondition(([]CertificateSigningRequestCondition)(x.Conditions), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Certificate == nil { + r.EncodeNil() + } else { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate)) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("certificate")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Certificate == nil { + r.EncodeNil() + } else { + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1234, []byte(x.Certificate)) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequestStatus) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequestStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "conditions": + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv4 := &x.Conditions + yym5 := z.DecBinary() + _ = yym5 + if false { + } else { + h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv4), d) + } + } + case "certificate": + if r.TryDecodeAsNil() { + x.Certificate = nil + } else { + yyv6 := &x.Certificate + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + *yyv6 = r.DecodeBytes(*(*[]byte)(yyv6), false, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequestStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj8 int + var yyb8 bool + var yyhl8 bool = l >= 0 + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Conditions = nil + } else { + yyv9 := &x.Conditions + yym10 := z.DecBinary() + _ = yym10 + if false { + } else { + h.decSliceCertificateSigningRequestCondition((*[]CertificateSigningRequestCondition)(yyv9), d) + } + } + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Certificate = nil + } else { + yyv11 := &x.Certificate + yym12 := z.DecBinary() + _ = yym12 + if false { + } else { + *yyv11 = r.DecodeBytes(*(*[]byte)(yyv11), false, false) + } + } + for { + yyj8++ + if yyhl8 { + yyb8 = yyj8 > l + } else { + yyb8 = r.CheckBreak() + } + if yyb8 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj8-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x RequestConditionType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x)) + } +} + +func (x *RequestConditionType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*string)(x)) = r.DecodeString() + } +} + +func (x *CertificateSigningRequestCondition) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[1] = x.Reason != "" + yyq2[2] = x.Message != "" + yyq2[3] = true + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 1 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + x.Type.CodecEncodeSelf(e) + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("type")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + x.Type.CodecEncodeSelf(e) + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("reason")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym8 := z.EncBinary() + _ = yym8 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Reason)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("message")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym11 := z.EncBinary() + _ = yym11 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Message)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yy13 := &x.LastUpdateTime + yym14 := z.EncBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.EncExt(yy13) { + } else if yym14 { + z.EncBinaryMarshal(yy13) + } else if !yym14 && z.IsJSONHandle() { + z.EncJSONMarshal(yy13) + } else { + z.EncFallback(yy13) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("lastUpdateTime")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy15 := &x.LastUpdateTime + yym16 := z.EncBinary() + _ = yym16 + if false { + } else if z.HasExtensions() && z.EncExt(yy15) { + } else if yym16 { + z.EncBinaryMarshal(yy15) + } else if !yym16 && z.IsJSONHandle() { + z.EncJSONMarshal(yy15) + } else { + z.EncFallback(yy15) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequestCondition) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequestCondition) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "type": + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = RequestConditionType(r.DecodeString()) + } + case "reason": + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + x.Reason = string(r.DecodeString()) + } + case "message": + if r.TryDecodeAsNil() { + x.Message = "" + } else { + x.Message = string(r.DecodeString()) + } + case "lastUpdateTime": + if r.TryDecodeAsNil() { + x.LastUpdateTime = pkg1_unversioned.Time{} + } else { + yyv7 := &x.LastUpdateTime + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(yyv7) { + } else if yym8 { + z.DecBinaryUnmarshal(yyv7) + } else if !yym8 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv7) + } else { + z.DecFallback(yyv7, false) + } + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequestCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Type = "" + } else { + x.Type = RequestConditionType(r.DecodeString()) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Reason = "" + } else { + x.Reason = string(r.DecodeString()) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Message = "" + } else { + x.Message = string(r.DecodeString()) + } + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.LastUpdateTime = pkg1_unversioned.Time{} + } else { + yyv13 := &x.LastUpdateTime + yym14 := z.DecBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.DecExt(yyv13) { + } else if yym14 { + z.DecBinaryUnmarshal(yyv13) + } else if !yym14 && z.IsJSONHandle() { + z.DecJSONUnmarshal(yyv13) + } else { + z.DecFallback(yyv13, false) + } + } + for { + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l + } else { + yyb9 = r.CheckBreak() + } + if yyb9 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj9-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x *CertificateSigningRequestList) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [4]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + yyq2[0] = true + yyq2[1] = len(x.Items) != 0 + yyq2[2] = x.Kind != "" + yyq2[3] = x.APIVersion != "" + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(4) + } else { + yynn2 = 0 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[0] { + yy4 := &x.ListMeta + yym5 := z.EncBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.EncExt(yy4) { + } else { + z.EncFallback(yy4) + } + } else { + r.EncodeNil() + } + } else { + if yyq2[0] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("metadata")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yy6 := &x.ListMeta + yym7 := z.EncBinary() + _ = yym7 + if false { + } else if z.HasExtensions() && z.EncExt(yy6) { + } else { + z.EncFallback(yy6) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[1] { + if x.Items == nil { + r.EncodeNil() + } else { + yym9 := z.EncBinary() + _ = yym9 + if false { + } else { + h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq2[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("items")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + if x.Items == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + h.encSliceCertificateSigningRequest(([]CertificateSigningRequest)(x.Items), e) + } + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[2] { + yym12 := z.EncBinary() + _ = yym12 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("kind")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[3] { + yym15 := z.EncBinary() + _ = yym15 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym16 := z.EncBinary() + _ = yym16 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1234) + } + } + } +} + +func (x *CertificateSigningRequestList) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym1 := z.DecBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct2 := r.ContainerType() + if yyct2 == codecSelferValueTypeMap1234 { + yyl2 := r.ReadMapStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1234) + } else { + x.codecDecodeSelfFromMap(yyl2, d) + } + } else if yyct2 == codecSelferValueTypeArray1234 { + yyl2 := r.ReadArrayStart() + if yyl2 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + } else { + x.codecDecodeSelfFromArray(yyl2, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) + } + } +} + +func (x *CertificateSigningRequestList) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys3Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys3Slc + var yyhl3 bool = l >= 0 + for yyj3 := 0; ; yyj3++ { + if yyhl3 { + if yyj3 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1234) + yys3Slc = r.DecodeBytes(yys3Slc, true, true) + yys3 := string(yys3Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1234) + switch yys3 { + case "metadata": + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv4 := &x.ListMeta + yym5 := z.DecBinary() + _ = yym5 + if false { + } else if z.HasExtensions() && z.DecExt(yyv4) { + } else { + z.DecFallback(yyv4, false) + } + } + case "items": + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv6 := &x.Items + yym7 := z.DecBinary() + _ = yym7 + if false { + } else { + h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv6), d) + } + } + case "kind": + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + case "apiVersion": + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + default: + z.DecStructFieldNotFound(-1, yys3) + } // end switch yys3 + } // end for yyj3 + z.DecSendContainerState(codecSelfer_containerMapEnd1234) +} + +func (x *CertificateSigningRequestList) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj10 int + var yyb10 bool + var yyhl10 bool = l >= 0 + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.ListMeta = pkg1_unversioned.ListMeta{} + } else { + yyv11 := &x.ListMeta + yym12 := z.DecBinary() + _ = yym12 + if false { + } else if z.HasExtensions() && z.DecExt(yyv11) { + } else { + z.DecFallback(yyv11, false) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Items = nil + } else { + yyv13 := &x.Items + yym14 := z.DecBinary() + _ = yym14 + if false { + } else { + h.decSliceCertificateSigningRequest((*[]CertificateSigningRequest)(yyv13), d) + } + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.Kind = "" + } else { + x.Kind = string(r.DecodeString()) + } + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.APIVersion = "" + } else { + x.APIVersion = string(r.DecodeString()) + } + for { + yyj10++ + if yyhl10 { + yyb10 = yyj10 > l + } else { + yyb10 = r.CheckBreak() + } + if yyb10 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + z.DecStructFieldNotFound(yyj10-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) encSliceCertificateSigningRequestCondition(v []CertificateSigningRequestCondition, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceCertificateSigningRequestCondition(v *[]CertificateSigningRequestCondition, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []CertificateSigningRequestCondition{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 72) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]CertificateSigningRequestCondition, yyrl1) + } + } else { + yyv1 = make([]CertificateSigningRequestCondition, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequestCondition{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, CertificateSigningRequestCondition{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequestCondition{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, CertificateSigningRequestCondition{}) // var yyz1 CertificateSigningRequestCondition + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequestCondition{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []CertificateSigningRequestCondition{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} + +func (x codecSelfer1234) encSliceCertificateSigningRequest(v []CertificateSigningRequest, e *codec1978.Encoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv1 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + yy2 := &yyv1 + yy2.CodecEncodeSelf(e) + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1234) +} + +func (x codecSelfer1234) decSliceCertificateSigningRequest(v *[]CertificateSigningRequest, d *codec1978.Decoder) { + var h codecSelfer1234 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv1 := *v + yyh1, yyl1 := z.DecSliceHelperStart() + var yyc1 bool + _ = yyc1 + if yyl1 == 0 { + if yyv1 == nil { + yyv1 = []CertificateSigningRequest{} + yyc1 = true + } else if len(yyv1) != 0 { + yyv1 = yyv1[:0] + yyc1 = true + } + } else if yyl1 > 0 { + var yyrr1, yyrl1 int + var yyrt1 bool + _, _ = yyrl1, yyrt1 + yyrr1 = yyl1 // len(yyv1) + if yyl1 > cap(yyv1) { + + yyrg1 := len(yyv1) > 0 + yyv21 := yyv1 + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 368) + if yyrt1 { + if yyrl1 <= cap(yyv1) { + yyv1 = yyv1[:yyrl1] + } else { + yyv1 = make([]CertificateSigningRequest, yyrl1) + } + } else { + yyv1 = make([]CertificateSigningRequest, yyrl1) + } + yyc1 = true + yyrr1 = len(yyv1) + if yyrg1 { + copy(yyv1, yyv21) + } + } else if yyl1 != len(yyv1) { + yyv1 = yyv1[:yyl1] + yyc1 = true + } + yyj1 := 0 + for ; yyj1 < yyrr1; yyj1++ { + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequest{} + } else { + yyv2 := &yyv1[yyj1] + yyv2.CodecDecodeSelf(d) + } + + } + if yyrt1 { + for ; yyj1 < yyl1; yyj1++ { + yyv1 = append(yyv1, CertificateSigningRequest{}) + yyh1.ElemContainerState(yyj1) + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequest{} + } else { + yyv3 := &yyv1[yyj1] + yyv3.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj1 := 0 + for ; !r.CheckBreak(); yyj1++ { + + if yyj1 >= len(yyv1) { + yyv1 = append(yyv1, CertificateSigningRequest{}) // var yyz1 CertificateSigningRequest + yyc1 = true + } + yyh1.ElemContainerState(yyj1) + if yyj1 < len(yyv1) { + if r.TryDecodeAsNil() { + yyv1[yyj1] = CertificateSigningRequest{} + } else { + yyv4 := &yyv1[yyj1] + yyv4.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj1 < len(yyv1) { + yyv1 = yyv1[:yyj1] + yyc1 = true + } else if yyj1 == 0 && yyv1 == nil { + yyv1 = []CertificateSigningRequest{} + yyc1 = true + } + } + yyh1.End() + if yyc1 { + *v = yyv1 + } +} diff --git a/pkg/apis/certificates/v1alpha1/types.go b/pkg/apis/certificates/v1alpha1/types.go index 04eee25168..5fc438d27f 100644 --- a/pkg/apis/certificates/v1alpha1/types.go +++ b/pkg/apis/certificates/v1alpha1/types.go @@ -26,13 +26,13 @@ import ( // Describes a certificate signing request type CertificateSigningRequest struct { unversioned.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata,omitempty"` + v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // The certificate request itself and any additonal information. - Spec CertificateSigningRequestSpec `json:"spec,omitempty"` + Spec CertificateSigningRequestSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Derived information about the request. - Status CertificateSigningRequestStatus `json:"status,omitempty"` + Status CertificateSigningRequestStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // This information is immutable after the request is created. Only the Request @@ -40,21 +40,21 @@ type CertificateSigningRequest struct { // Kubernetes and cannot be modified by users. type CertificateSigningRequestSpec struct { // Base64-encoded PKCS#10 CSR data - Request []byte `json:"request"` + Request []byte `json:"request" protobuf:"bytes,1,opt,name=request"` // Information about the requesting user (if relevant) // See user.Info interface for details - Username string `json:"username,omitempty"` - UID string `json:"uid,omitempty"` - Groups []string `json:"groups,omitempty"` + Username string `json:"username,omitempty" protobuf:"bytes,2,opt,name=username"` + UID string `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"` + Groups []string `json:"groups,omitempty" protobuf:"bytes,4,rep,name=groups"` } type CertificateSigningRequestStatus struct { // Conditions applied to the request, such as approval or denial. - Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty"` + Conditions []CertificateSigningRequestCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"` // If request was approved, the controller will place the issued certificate here. - Certificate []byte `json:"certificate,omitempty"` + Certificate []byte `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"` } type RequestConditionType string @@ -67,18 +67,18 @@ const ( type CertificateSigningRequestCondition struct { // request approval state, currently Approved or Denied. - Type RequestConditionType `json:"type"` + Type RequestConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RequestConditionType"` // brief reason for the request state - Reason string `json:"reason,omitempty"` + Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"` // human readable message with details about the request state - Message string `json:"message,omitempty"` + Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` // timestamp for the last update to this condition - LastUpdateTime unversioned.Time `json:"lastUpdateTime,omitempty"` + LastUpdateTime unversioned.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,4,opt,name=lastUpdateTime"` } type CertificateSigningRequestList struct { unversioned.TypeMeta `json:",inline"` - unversioned.ListMeta `json:"metadata,omitempty"` + unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []CertificateSigningRequest `json:"items,omitempty"` + Items []CertificateSigningRequest `json:"items,omitempty" protobuf:"bytes,2,rep,name=items"` } diff --git a/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go b/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go new file mode 100644 index 0000000000..8362d6a80a --- /dev/null +++ b/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go @@ -0,0 +1,70 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_CertificateSigningRequest = map[string]string{ + "": "Describes a certificate signing request", + "spec": "The certificate request itself and any additonal information.", + "status": "Derived information about the request.", +} + +func (CertificateSigningRequest) SwaggerDoc() map[string]string { + return map_CertificateSigningRequest +} + +var map_CertificateSigningRequestCondition = map[string]string{ + "type": "request approval state, currently Approved or Denied.", + "reason": "brief reason for the request state", + "message": "human readable message with details about the request state", + "lastUpdateTime": "timestamp for the last update to this condition", +} + +func (CertificateSigningRequestCondition) SwaggerDoc() map[string]string { + return map_CertificateSigningRequestCondition +} + +var map_CertificateSigningRequestSpec = map[string]string{ + "": "This information is immutable after the request is created. Only the Request and ExtraInfo fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", + "request": "Base64-encoded PKCS#10 CSR data", + "username": "Information about the requesting user (if relevant) See user.Info interface for details", +} + +func (CertificateSigningRequestSpec) SwaggerDoc() map[string]string { + return map_CertificateSigningRequestSpec +} + +var map_CertificateSigningRequestStatus = map[string]string{ + "conditions": "Conditions applied to the request, such as approval or denial.", + "certificate": "If request was approved, the controller will place the issued certificate here.", +} + +func (CertificateSigningRequestStatus) SwaggerDoc() map[string]string { + return map_CertificateSigningRequestStatus +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/pkg/client/clientset_generated/internalclientset/clientset.go b/pkg/client/clientset_generated/internalclientset/clientset.go index 8b958a581c..b9ba3cc2af 100644 --- a/pkg/client/clientset_generated/internalclientset/clientset.go +++ b/pkg/client/clientset_generated/internalclientset/clientset.go @@ -20,6 +20,7 @@ import ( "github.com/golang/glog" unversionedautoscaling "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned" unversionedbatch "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned" + unversionedcertificates "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned" unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned" unversionedextensions "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned" unversionedrbac "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned" @@ -35,6 +36,7 @@ type Interface interface { Autoscaling() unversionedautoscaling.AutoscalingInterface Batch() unversionedbatch.BatchInterface Rbac() unversionedrbac.RbacInterface + Certificates() unversionedcertificates.CertificatesInterface } // Clientset contains the clients for groups. Each group has exactly one @@ -46,6 +48,7 @@ type Clientset struct { *unversionedautoscaling.AutoscalingClient *unversionedbatch.BatchClient *unversionedrbac.RbacClient + *unversionedcertificates.CertificatesClient } // Core retrieves the CoreClient @@ -88,6 +91,14 @@ func (c *Clientset) Rbac() unversionedrbac.RbacInterface { return c.RbacClient } +// Certificates retrieves the CertificatesClient +func (c *Clientset) Certificates() unversionedcertificates.CertificatesInterface { + if c == nil { + return nil + } + return c.CertificatesClient +} + // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { return c.DiscoveryClient @@ -121,6 +132,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { if err != nil { return nil, err } + clientset.CertificatesClient, err = unversionedcertificates.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } clientset.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -139,6 +154,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { clientset.AutoscalingClient = unversionedautoscaling.NewForConfigOrDie(c) clientset.BatchClient = unversionedbatch.NewForConfigOrDie(c) clientset.RbacClient = unversionedrbac.NewForConfigOrDie(c) + clientset.CertificatesClient = unversionedcertificates.NewForConfigOrDie(c) clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &clientset @@ -152,6 +168,7 @@ func New(c *restclient.RESTClient) *Clientset { clientset.AutoscalingClient = unversionedautoscaling.New(c) clientset.BatchClient = unversionedbatch.New(c) clientset.RbacClient = unversionedrbac.New(c) + clientset.CertificatesClient = unversionedcertificates.New(c) clientset.DiscoveryClient = discovery.NewDiscoveryClient(c) return &clientset diff --git a/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go b/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go index 699b2f4e15..36359d9fc1 100644 --- a/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go +++ b/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go @@ -24,6 +24,8 @@ import ( fakeunversionedautoscaling "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake" unversionedbatch "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned" fakeunversionedbatch "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake" + unversionedcertificates "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned" + fakeunversionedcertificates "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake" unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned" fakeunversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake" unversionedextensions "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned" @@ -91,3 +93,8 @@ func (c *Clientset) Batch() unversionedbatch.BatchInterface { func (c *Clientset) Rbac() unversionedrbac.RbacInterface { return &fakeunversionedrbac.FakeRbac{Fake: &c.Fake} } + +// Certificates retrieves the CertificatesClient +func (c *Clientset) Certificates() unversionedcertificates.CertificatesInterface { + return &fakeunversionedcertificates.FakeCertificates{Fake: &c.Fake} +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificates_client.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificates_client.go new file mode 100644 index 0000000000..dd67e78c2c --- /dev/null +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificates_client.go @@ -0,0 +1,101 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package unversioned + +import ( + api "k8s.io/kubernetes/pkg/api" + registered "k8s.io/kubernetes/pkg/apimachinery/registered" + restclient "k8s.io/kubernetes/pkg/client/restclient" +) + +type CertificatesInterface interface { + GetRESTClient() *restclient.RESTClient + CertificateSigningRequestsGetter +} + +// CertificatesClient is used to interact with features provided by the Certificates group. +type CertificatesClient struct { + *restclient.RESTClient +} + +func (c *CertificatesClient) CertificateSigningRequests() CertificateSigningRequestInterface { + return newCertificateSigningRequests(c) +} + +// NewForConfig creates a new CertificatesClient for the given config. +func NewForConfig(c *restclient.Config) (*CertificatesClient, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := restclient.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &CertificatesClient{client}, nil +} + +// NewForConfigOrDie creates a new CertificatesClient for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *restclient.Config) *CertificatesClient { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new CertificatesClient for the given RESTClient. +func New(c *restclient.RESTClient) *CertificatesClient { + return &CertificatesClient{c} +} + +func setConfigDefaults(config *restclient.Config) error { + // if certificates group is not registered, return an error + g, err := registered.Group("certificates") + if err != nil { + return err + } + config.APIPath = "/apis" + 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 = ©GroupVersion + //} + + config.NegotiatedSerializer = api.Codecs + + if config.QPS == 0 { + config.QPS = 5 + } + if config.Burst == 0 { + config.Burst = 10 + } + return nil +} + +// GetRESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *CertificatesClient) GetRESTClient() *restclient.RESTClient { + if c == nil { + return nil + } + return c.RESTClient +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificatesigningrequest.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificatesigningrequest.go new file mode 100644 index 0000000000..a097dc740b --- /dev/null +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificatesigningrequest.go @@ -0,0 +1,153 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package unversioned + +import ( + api "k8s.io/kubernetes/pkg/api" + certificates "k8s.io/kubernetes/pkg/apis/certificates" + watch "k8s.io/kubernetes/pkg/watch" +) + +// CertificateSigningRequestsGetter has a method to return a CertificateSigningRequestInterface. +// A group's client should implement this interface. +type CertificateSigningRequestsGetter interface { + CertificateSigningRequests() CertificateSigningRequestInterface +} + +// CertificateSigningRequestInterface has methods to work with CertificateSigningRequest resources. +type CertificateSigningRequestInterface interface { + Create(*certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) + Update(*certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) + UpdateStatus(*certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) + Delete(name string, options *api.DeleteOptions) error + DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Get(name string) (*certificates.CertificateSigningRequest, error) + List(opts api.ListOptions) (*certificates.CertificateSigningRequestList, error) + Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte) (result *certificates.CertificateSigningRequest, err error) + CertificateSigningRequestExpansion +} + +// certificateSigningRequests implements CertificateSigningRequestInterface +type certificateSigningRequests struct { + client *CertificatesClient +} + +// newCertificateSigningRequests returns a CertificateSigningRequests +func newCertificateSigningRequests(c *CertificatesClient) *certificateSigningRequests { + return &certificateSigningRequests{ + client: c, + } +} + +// Create takes the representation of a certificateSigningRequest and creates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *certificateSigningRequests) Create(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { + result = &certificates.CertificateSigningRequest{} + err = c.client.Post(). + Resource("certificatesigningrequests"). + Body(certificateSigningRequest). + Do(). + Into(result) + return +} + +// Update takes the representation of a certificateSigningRequest and updates it. Returns the server's representation of the certificateSigningRequest, and an error, if there is any. +func (c *certificateSigningRequests) Update(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { + result = &certificates.CertificateSigningRequest{} + err = c.client.Put(). + Resource("certificatesigningrequests"). + Name(certificateSigningRequest.Name). + Body(certificateSigningRequest). + Do(). + Into(result) + return +} + +func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { + result = &certificates.CertificateSigningRequest{} + err = c.client.Put(). + Resource("certificatesigningrequests"). + Name(certificateSigningRequest.Name). + SubResource("status"). + Body(certificateSigningRequest). + Do(). + Into(result) + return +} + +// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. +func (c *certificateSigningRequests) Delete(name string, options *api.DeleteOptions) error { + return c.client.Delete(). + Resource("certificatesigningrequests"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *certificateSigningRequests) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { + return c.client.Delete(). + Resource("certificatesigningrequests"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the certificateSigningRequest, and returns the corresponding certificateSigningRequest object, and an error if there is any. +func (c *certificateSigningRequests) Get(name string) (result *certificates.CertificateSigningRequest, err error) { + result = &certificates.CertificateSigningRequest{} + err = c.client.Get(). + Resource("certificatesigningrequests"). + Name(name). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. +func (c *certificateSigningRequests) List(opts api.ListOptions) (result *certificates.CertificateSigningRequestList, err error) { + result = &certificates.CertificateSigningRequestList{} + err = c.client.Get(). + Resource("certificatesigningrequests"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested certificateSigningRequests. +func (c *certificateSigningRequests) Watch(opts api.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Resource("certificatesigningrequests"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched certificateSigningRequest. +func (c *certificateSigningRequests) Patch(name string, pt api.PatchType, data []byte) (result *certificates.CertificateSigningRequest, err error) { + result = &certificates.CertificateSigningRequest{} + err = c.client.Patch(pt). + Resource("certificatesigningrequests"). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/doc.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/doc.go new file mode 100644 index 0000000000..47517b6422 --- /dev/null +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with the default arguments. + +// This package has the automatically generated typed clients. +package unversioned diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/doc.go new file mode 100644 index 0000000000..eb358c26c8 --- /dev/null +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with the default arguments. + +// Package fake has the automatically generated clients. +package fake diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificates_client.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificates_client.go new file mode 100644 index 0000000000..4a39901ba2 --- /dev/null +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificates_client.go @@ -0,0 +1,37 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + unversioned "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned" + restclient "k8s.io/kubernetes/pkg/client/restclient" + core "k8s.io/kubernetes/pkg/client/testing/core" +) + +type FakeCertificates struct { + *core.Fake +} + +func (c *FakeCertificates) CertificateSigningRequests() unversioned.CertificateSigningRequestInterface { + return &FakeCertificateSigningRequests{c} +} + +// GetRESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeCertificates) GetRESTClient() *restclient.RESTClient { + return nil +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificatesigningrequest.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificatesigningrequest.go new file mode 100644 index 0000000000..b4423a1b34 --- /dev/null +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificatesigningrequest.go @@ -0,0 +1,118 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + api "k8s.io/kubernetes/pkg/api" + unversioned "k8s.io/kubernetes/pkg/api/unversioned" + certificates "k8s.io/kubernetes/pkg/apis/certificates" + core "k8s.io/kubernetes/pkg/client/testing/core" + labels "k8s.io/kubernetes/pkg/labels" + watch "k8s.io/kubernetes/pkg/watch" +) + +// FakeCertificateSigningRequests implements CertificateSigningRequestInterface +type FakeCertificateSigningRequests struct { + Fake *FakeCertificates +} + +var certificatesigningrequestsResource = unversioned.GroupVersionResource{Group: "certificates", Version: "", Resource: "certificatesigningrequests"} + +func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(core.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &certificates.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificates.CertificateSigningRequest), err +} + +func (c *FakeCertificateSigningRequests) Update(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(core.NewRootUpdateAction(certificatesigningrequestsResource, certificateSigningRequest), &certificates.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificates.CertificateSigningRequest), err +} + +func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest *certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) { + obj, err := c.Fake. + Invokes(core.NewRootUpdateSubresourceAction(certificatesigningrequestsResource, "status", certificateSigningRequest), &certificates.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificates.CertificateSigningRequest), err +} + +func (c *FakeCertificateSigningRequests) Delete(name string, options *api.DeleteOptions) error { + _, err := c.Fake. + Invokes(core.NewRootDeleteAction(certificatesigningrequestsResource, name), &certificates.CertificateSigningRequest{}) + return err +} + +func (c *FakeCertificateSigningRequests) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { + action := core.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions) + + _, err := c.Fake.Invokes(action, &certificates.CertificateSigningRequestList{}) + return err +} + +func (c *FakeCertificateSigningRequests) Get(name string) (result *certificates.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(core.NewRootGetAction(certificatesigningrequestsResource, name), &certificates.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificates.CertificateSigningRequest), err +} + +func (c *FakeCertificateSigningRequests) List(opts api.ListOptions) (result *certificates.CertificateSigningRequestList, err error) { + obj, err := c.Fake. + Invokes(core.NewRootListAction(certificatesigningrequestsResource, opts), &certificates.CertificateSigningRequestList{}) + if obj == nil { + return nil, err + } + + label := opts.LabelSelector + if label == nil { + label = labels.Everything() + } + list := &certificates.CertificateSigningRequestList{} + for _, item := range obj.(*certificates.CertificateSigningRequestList).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 certificateSigningRequests. +func (c *FakeCertificateSigningRequests) Watch(opts api.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(core.NewRootWatchAction(certificatesigningrequestsResource, opts)) +} + +// Patch applies the patch and returns the patched certificateSigningRequest. +func (c *FakeCertificateSigningRequests) Patch(name string, pt api.PatchType, data []byte) (result *certificates.CertificateSigningRequest, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchAction(certificatesigningrequestsResource, name, data), &certificates.CertificateSigningRequest{}) + if obj == nil { + return nil, err + } + return obj.(*certificates.CertificateSigningRequest), err +} diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/generated_expansion.go new file mode 100644 index 0000000000..6eb9ec25f2 --- /dev/null +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/generated_expansion.go @@ -0,0 +1,19 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package unversioned + +type CertificateSigningRequestExpansion interface{} From 0acca44dc165395587becce1a656176c896eb2ca Mon Sep 17 00:00:00 2001 From: "Dr. Stefan Schimanski" Date: Fri, 24 Jun 2016 13:05:59 +0200 Subject: [PATCH 257/339] Error out on non-existing container in kubectl attach --- pkg/kubectl/cmd/attach.go | 33 +++++++++++------ pkg/kubectl/cmd/attach_test.go | 67 ++++++++++++++++++++++------------ pkg/kubectl/cmd/run.go | 8 +++- 3 files changed, 70 insertions(+), 38 deletions(-) diff --git a/pkg/kubectl/cmd/attach.go b/pkg/kubectl/cmd/attach.go index ed083ac239..78748c0193 100644 --- a/pkg/kubectl/cmd/attach.go +++ b/pkg/kubectl/cmd/attach.go @@ -184,7 +184,10 @@ func (p *AttachOptions) Run() error { // check for TTY tty := p.TTY - containerToAttach := p.GetContainer(pod) + containerToAttach, err := p.containerToAttachTo(pod) + if err != nil { + return fmt.Errorf("cannot attach to the container: %v", err) + } if tty && !containerToAttach.TTY { tty = false fmt.Fprintf(p.Err, "Unable to use a TTY - container %s did not allocate one\n", containerToAttach.Name) @@ -229,26 +232,32 @@ func (p *AttachOptions) Run() error { return nil } -// GetContainer returns the container to attach to, with a fallback. -func (p *AttachOptions) GetContainer(pod *api.Pod) api.Container { +// containerToAttach returns a reference to the container to attach to, given +// by name or the first container if name is empty. +func (p *AttachOptions) containerToAttachTo(pod *api.Pod) (*api.Container, error) { if len(p.ContainerName) > 0 { - for _, container := range pod.Spec.Containers { - if container.Name == p.ContainerName { - return container + for i := range pod.Spec.Containers { + if pod.Spec.Containers[i].Name == p.ContainerName { + return &pod.Spec.Containers[i], nil } } - for _, container := range pod.Spec.InitContainers { - if container.Name == p.ContainerName { - return container + for i := range pod.Spec.InitContainers { + if pod.Spec.InitContainers[i].Name == p.ContainerName { + return &pod.Spec.InitContainers[i], nil } } + return nil, fmt.Errorf("container not found (%s)", p.ContainerName) } glog.V(4).Infof("defaulting container name to %s", pod.Spec.Containers[0].Name) - return pod.Spec.Containers[0] + return &pod.Spec.Containers[0], nil } // GetContainerName returns the name of the container to attach to, with a fallback. -func (p *AttachOptions) GetContainerName(pod *api.Pod) string { - return p.GetContainer(pod).Name +func (p *AttachOptions) GetContainerName(pod *api.Pod) (string, error) { + c, err := p.containerToAttachTo(pod) + if err != nil { + return "", err + } + return c.Name, nil } diff --git a/pkg/kubectl/cmd/attach_test.go b/pkg/kubectl/cmd/attach_test.go index e4af36582c..eb67aaf9ba 100644 --- a/pkg/kubectl/cmd/attach_test.go +++ b/pkg/kubectl/cmd/attach_test.go @@ -35,15 +35,15 @@ import ( ) type fakeRemoteAttach struct { - method string - url *url.URL - attachErr error + method string + url *url.URL + err error } func (f *fakeRemoteAttach) Attach(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool) error { f.method = method f.url = url - return f.attachErr + return f.err } func TestPodAndContainerAttach(t *testing.T) { @@ -86,6 +86,12 @@ func TestPodAndContainerAttach(t *testing.T) { expectedContainer: "initfoo", name: "init container in flag", }, + { + p: &AttachOptions{ContainerName: "bar"}, + args: []string{"foo", "-c", "wrong"}, + expectError: true, + name: "non-existing container in flag", + }, } for _, test := range tests { @@ -123,7 +129,8 @@ func TestAttach(t *testing.T) { tests := []struct { name, version, podPath, attachPath, container string pod *api.Pod - attachErr bool + remoteAttachErr bool + exepctedErr string }{ { name: "pod attach", @@ -131,14 +138,26 @@ func TestAttach(t *testing.T) { podPath: "/api/" + version + "/namespaces/test/pods/foo", attachPath: "/api/" + version + "/namespaces/test/pods/foo/attach", pod: attachPod(), + container: "bar", }, { - name: "pod attach error", - version: version, - podPath: "/api/" + version + "/namespaces/test/pods/foo", - attachPath: "/api/" + version + "/namespaces/test/pods/foo/attach", - pod: attachPod(), - attachErr: true, + name: "pod attach error", + version: version, + podPath: "/api/" + version + "/namespaces/test/pods/foo", + attachPath: "/api/" + version + "/namespaces/test/pods/foo/attach", + pod: attachPod(), + remoteAttachErr: true, + container: "bar", + exepctedErr: "attach error", + }, + { + name: "container not found error", + version: version, + podPath: "/api/" + version + "/namespaces/test/pods/foo", + attachPath: "/api/" + version + "/namespaces/test/pods/foo/attach", + pod: attachPod(), + container: "foo", + exepctedErr: "cannot attach to the container: container not found (foo)", }, } for _, test := range tests { @@ -162,42 +181,42 @@ func TestAttach(t *testing.T) { bufOut := bytes.NewBuffer([]byte{}) bufErr := bytes.NewBuffer([]byte{}) bufIn := bytes.NewBuffer([]byte{}) - ex := &fakeRemoteAttach{} - if test.attachErr { - ex.attachErr = fmt.Errorf("attach error") + remoteAttach := &fakeRemoteAttach{} + if test.remoteAttachErr { + remoteAttach.err = fmt.Errorf("attach error") } params := &AttachOptions{ - ContainerName: "bar", + ContainerName: test.container, In: bufIn, Out: bufOut, Err: bufErr, - Attach: ex, + Attach: remoteAttach, } cmd := &cobra.Command{} if err := params.Complete(f, cmd, []string{"foo"}); err != nil { t.Fatal(err) } err := params.Run() - if test.attachErr && err != ex.attachErr { + if test.exepctedErr != "" && err.Error() != test.exepctedErr { t.Errorf("%s: Unexpected exec error: %v", test.name, err) continue } - if !test.attachErr && err != nil { + if test.exepctedErr == "" && err != nil { t.Errorf("%s: Unexpected error: %v", test.name, err) continue } - if test.attachErr { + if test.exepctedErr != "" { continue } - if ex.url.Path != test.attachPath { + if remoteAttach.url.Path != test.attachPath { t.Errorf("%s: Did not get expected path for exec request", test.name) continue } - if ex.method != "POST" { - t.Errorf("%s: Did not get method for attach request: %s", test.name, ex.method) + if remoteAttach.method != "POST" { + t.Errorf("%s: Did not get method for attach request: %s", test.name, remoteAttach.method) } - if ex.url.Query().Get("container") != "bar" { - t.Errorf("%s: Did not have query parameters: %s", test.name, ex.url.Query()) + if remoteAttach.url.Query().Get("container") != "bar" { + t.Errorf("%s: Did not have query parameters: %s", test.name, remoteAttach.url.Query()) } } } diff --git a/pkg/kubectl/cmd/run.go b/pkg/kubectl/cmd/run.go index 915c61d83f..7e3c6f6230 100644 --- a/pkg/kubectl/cmd/run.go +++ b/pkg/kubectl/cmd/run.go @@ -332,8 +332,12 @@ func handleAttachPod(f *cmdutil.Factory, c *client.Client, pod *api.Pod, opts *A if err != nil { return err } + ctrName, err := opts.GetContainerName(pod) + if err != nil { + return err + } if status == api.PodSucceeded || status == api.PodFailed { - req, err := f.LogsForObject(pod, &api.PodLogOptions{Container: opts.GetContainerName(pod)}) + req, err := f.LogsForObject(pod, &api.PodLogOptions{Container: ctrName}) if err != nil { return err } @@ -350,7 +354,7 @@ func handleAttachPod(f *cmdutil.Factory, c *client.Client, pod *api.Pod, opts *A opts.Namespace = pod.Namespace if err := opts.Run(); err != nil { fmt.Fprintf(opts.Out, "Error attaching, falling back to logs: %v\n", err) - req, err := f.LogsForObject(pod, &api.PodLogOptions{Container: opts.GetContainerName(pod)}) + req, err := f.LogsForObject(pod, &api.PodLogOptions{Container: ctrName}) if err != nil { return err } From 28fab489ea7cdd2352b1fc8bc4147ef63f2f7bf4 Mon Sep 17 00:00:00 2001 From: Quinton Hoole Date: Thu, 23 Jun 2016 17:02:49 -0700 Subject: [PATCH 258/339] Refactored, expanded and fixed federated-services e2e tests. --- test/e2e/federated-service.go | 494 ++++++++++++++++++++-------------- 1 file changed, 299 insertions(+), 195 deletions(-) diff --git a/test/e2e/federated-service.go b/test/e2e/federated-service.go index 5e90611b08..f65d62d971 100644 --- a/test/e2e/federated-service.go +++ b/test/e2e/federated-service.go @@ -19,6 +19,8 @@ package e2e import ( "fmt" "os" + "reflect" + "strconv" "time" "k8s.io/kubernetes/federation/apis/federation" @@ -47,239 +49,315 @@ const ( FederatedServiceTimeout = 60 * time.Second - FederatedServiceName = "federated-service" - FederatedServicePod = "federated-service-test-pod" + FederatedServiceName = "federated-service" + FederatedServicePodName = "federated-service-test-pod" DefaultFederationName = "federation" // We use this to decide how long to wait for our DNS probes to succeed. - DNSTTL = 180 * time.Second + DNSTTL = 180 * time.Second // TODO: make k8s.io/kubernetes/federation/pkg/federation-controller/service.minDnsTtl exported, and import it here. ) var FederatedServiceLabels = map[string]string{ "foo": "bar", } -var _ = framework.KubeDescribe("[Feature:Federation] Federated Services", func() { - +var _ = framework.KubeDescribe("[Feature:Federation]", func() { + f := framework.NewDefaultFederatedFramework("federated-service") var clusterClientSets []*release_1_3.Clientset + var clusterNamespaceCreated []bool // Did we need to create a new namespace in each of the above clusters? If so, we should delete it. var federationName string - f := framework.NewDefaultFederatedFramework("service") - BeforeEach(func() { - framework.SkipUnlessFederated(f.Client) - - // TODO: Federation API server should be able to answer this. - if federationName = os.Getenv("FEDERATION_NAME"); federationName == "" { - federationName = DefaultFederationName - } - - contexts := f.GetUnderlyingFederatedContexts() - - for _, context := range contexts { - createClusterObjectOrFail(f, &context) - } - - var clusterList *federation.ClusterList - By("Obtaining a list of all the clusters") - if err := wait.PollImmediate(framework.Poll, FederatedServiceTimeout, func() (bool, error) { - var err error - clusterList, err = f.FederationClientset.Federation().Clusters().List(api.ListOptions{}) - if err != nil { - return false, err - } - framework.Logf("%d clusters registered, waiting for %d", len(clusterList.Items), len(contexts)) - if len(clusterList.Items) == len(contexts) { - return true, nil - } - return false, nil - }); err != nil { - framework.Failf("Failed to list registered clusters: %+v", err) - } - - framework.Logf("Checking that %d clusters are Ready", len(contexts)) - for _, context := range contexts { - clusterIsReadyOrFail(f, &context) - } - framework.Logf("%d clusters are Ready", len(contexts)) - - for _, cluster := range clusterList.Items { - framework.Logf("Creating a clientset for the cluster %s", cluster.Name) - - Expect(framework.TestContext.KubeConfig).ToNot(Equal(""), "KubeConfig must be specified to load clusters' client config") - kubecfg, err := clientcmd.LoadFromFile(framework.TestContext.KubeConfig) - framework.ExpectNoError(err, "error loading KubeConfig: %v", err) - - cfgOverride := &clientcmd.ConfigOverrides{ - ClusterInfo: clientcmdapi.Cluster{ - Server: cluster.Spec.ServerAddressByClientCIDRs[0].ServerAddress, - }, - } - ccfg := clientcmd.NewNonInteractiveClientConfig(*kubecfg, cluster.Name, cfgOverride, clientcmd.NewDefaultClientConfigLoadingRules()) - cfg, err := ccfg.ClientConfig() - Expect(err).NotTo(HaveOccurred()) - - cfg.QPS = KubeAPIQPS - cfg.Burst = KubeAPIBurst - clset := release_1_3.NewForConfigOrDie(restclient.AddUserAgent(cfg, UserAgentName)) - clusterClientSets = append(clusterClientSets, clset) - } - - for i, cs := range clusterClientSets { - if _, err := cs.Core().Namespaces().Get(f.Namespace.Name); errors.IsNotFound(err) { - ns := &v1.Namespace{ - ObjectMeta: v1.ObjectMeta{ - Name: f.Namespace.Name, - }, - } - if _, err := cs.Core().Namespaces().Create(ns); err != nil { - framework.Logf("Couldn't create the namespace %s in cluster [%d]: %v", f.Namespace.Name, i, err) - } - framework.Logf("Namespace %s created in cluster [%d]", f.Namespace.Name, i) - } else if err != nil { - framework.Logf("Couldn't create the namespace %s in cluster [%d]: %v", f.Namespace.Name, i, err) - } - } - }) - - Describe("DNS", func() { - AfterEach(func() { + var _ = Describe("Federated Services", func() { + BeforeEach(func() { framework.SkipUnlessFederated(f.Client) - // TODO(mml): replace with calls to framework.DeleteNamespaces and - // framework.WaitForNamespacesDeleted. But first we need to re-write - // them to expect versioned clients. - // ALSO TODO(mml): Utility functions like these should [optionally?] - // accept a list of clients/clusters to act upon, to increase - // re-usablity. - for i, cs := range clusterClientSets { - if err := cs.Core().Namespaces().Delete(f.Namespace.Name, api.NewDeleteOptions(0)); err != nil { - framework.Failf("Couldn't delete the namespace %s in cluster [%d]: %v", f.Namespace.Name, i, err) + // TODO: Federation API server should be able to answer this. + if federationName = os.Getenv("FEDERATION_NAME"); federationName == "" { + federationName = DefaultFederationName + } + + contexts := f.GetUnderlyingFederatedContexts() + + for _, context := range contexts { + createClusterObjectOrFail(f, &context) + } + + var clusterList *federation.ClusterList + By("Obtaining a list of all the clusters") + if err := wait.PollImmediate(framework.Poll, FederatedServiceTimeout, func() (bool, error) { + var err error + clusterList, err = f.FederationClientset.Federation().Clusters().List(api.ListOptions{}) + if err != nil { + return false, err + } + framework.Logf("%d clusters registered, waiting for %d", len(clusterList.Items), len(contexts)) + if len(clusterList.Items) == len(contexts) { + return true, nil + } + return false, nil + }); err != nil { + framework.Failf("Failed to list registered clusters: %+v", err) + } + + framework.Logf("Checking that %d clusters are Ready", len(contexts)) + for _, context := range contexts { + clusterIsReadyOrFail(f, &context) + } + framework.Logf("%d clusters are Ready", len(contexts)) + + for i, cluster := range clusterList.Items { + framework.Logf("Creating a clientset for the cluster %s", cluster.Name) + + Expect(framework.TestContext.KubeConfig).ToNot(Equal(""), "KubeConfig must be specified to load clusters' client config") + kubecfg, err := clientcmd.LoadFromFile(framework.TestContext.KubeConfig) + framework.ExpectNoError(err, "error loading KubeConfig: %v", err) + + cfgOverride := &clientcmd.ConfigOverrides{ + ClusterInfo: clientcmdapi.Cluster{ + Server: cluster.Spec.ServerAddressByClientCIDRs[0].ServerAddress, + }, + } + ccfg := clientcmd.NewNonInteractiveClientConfig(*kubecfg, cluster.Name, cfgOverride, clientcmd.NewDefaultClientConfigLoadingRules()) + cfg, err := ccfg.ClientConfig() + framework.ExpectNoError(err, "Error creating client config in cluster #%d", i) + + cfg.QPS = KubeAPIQPS + cfg.Burst = KubeAPIBurst + clset := release_1_3.NewForConfigOrDie(restclient.AddUserAgent(cfg, UserAgentName)) + clusterClientSets = append(clusterClientSets, clset) + } + + clusterNamespaceCreated = make([]bool, len(clusterClientSets)) + for i, cs := range clusterClientSets { + // The e2e Framework created the required namespace in one of the clusters, but we need to create it in all the others, if it doesn't yet exist. + if _, err := cs.Core().Namespaces().Get(f.Namespace.Name); errors.IsNotFound(err) { + ns := &v1.Namespace{ + ObjectMeta: v1.ObjectMeta{ + Name: f.Namespace.Name, + }, + } + _, err := cs.Core().Namespaces().Create(ns) + if err == nil { + clusterNamespaceCreated[i] = true + } + framework.ExpectNoError(err, "Couldn't create the namespace %s in cluster [%d]", f.Namespace.Name, i) + framework.Logf("Namespace %s created in cluster [%d]", f.Namespace.Name, i) + } else if err != nil { + framework.Logf("Couldn't create the namespace %s in cluster [%d]: %v", f.Namespace.Name, i, err) + } + } + }) + + AfterEach(func() { + for i, cs := range clusterClientSets { + if clusterNamespaceCreated[i] { + if _, err := cs.Core().Namespaces().Get(f.Namespace.Name); !errors.IsNotFound(err) { + err := cs.Core().Namespaces().Delete(f.Namespace.Name, &api.DeleteOptions{}) + framework.ExpectNoError(err, "Couldn't delete the namespace %s in cluster [%d]: %v", f.Namespace.Name, i, err) + } + framework.Logf("Namespace %s deleted in cluster [%d]", f.Namespace.Name, i) } - framework.Logf("Namespace %s deleted in cluster [%d]", f.Namespace.Name, i) } // Delete the registered clusters in the federation API server. clusterList, err := f.FederationClientset.Federation().Clusters().List(api.ListOptions{}) - Expect(err).NotTo(HaveOccurred()) + framework.ExpectNoError(err, "Error listing clusters") for _, cluster := range clusterList.Items { err := f.FederationClientset.Federation().Clusters().Delete(cluster.Name, &api.DeleteOptions{}) - Expect(err).NotTo(HaveOccurred()) + framework.ExpectNoError(err, "Error deleting cluster %q", cluster.Name) } }) - BeforeEach(func() { - framework.SkipUnlessFederated(f.Client) - createBackendPods(clusterClientSets, f.Namespace.Name) - createService(f.FederationClientset_1_3, clusterClientSets, f.Namespace.Name) - }) - - It("should be able to discover a federated service", func() { - framework.SkipUnlessFederated(f.Client) - - svcDNSNames := []string{ - FederatedServiceName, - fmt.Sprintf("%s.%s", FederatedServiceName, f.Namespace.Name), - fmt.Sprintf("%s.%s.svc.cluster.local.", FederatedServiceName, f.Namespace.Name), - fmt.Sprintf("%s.%s.%s", FederatedServiceName, f.Namespace.Name, federationName), - fmt.Sprintf("%s.%s.%s.svc.cluster.local.", FederatedServiceName, f.Namespace.Name, federationName), - } - // TODO(mml): This could be much faster. We can launch all the test - // pods, perhaps in the BeforeEach, and then just poll until we get - // successes/failures from them all. - for _, name := range svcDNSNames { - discoverService(f, name, true) - } - }) - - Context("non-local federated service", func() { + Describe("Service creation", func() { BeforeEach(func() { framework.SkipUnlessFederated(f.Client) - - // Delete a federated service shard in the default e2e Kubernetes cluster. - // TODO(mml): This should not work: #27623. We should use a load - // balancer with actual back-ends, some of which we delete or disable. - err := f.Clientset_1_3.Core().Services(f.Namespace.Name).Delete(FederatedServiceName, &api.DeleteOptions{}) - Expect(err).NotTo(HaveOccurred()) - waitForFederatedServiceShard(f.Clientset_1_3, f.Namespace.Name, nil, 0) + // Placeholder }) - It("should be able to discover a non-local federated service", func() { + AfterEach(func() { + framework.SkipUnlessFederated(f.Client) + // Placeholder + }) + + It("should succeed", func() { + framework.SkipUnlessFederated(f.Client) + service := createServiceOrFail(f.FederationClientset_1_3, f.Namespace.Name) + By(fmt.Sprintf("Creation of service %q in namespace %q succeeded. Deleting service.", service.Name, f.Namespace.Name)) + // Cleanup + err := f.FederationClientset_1_3.Services(f.Namespace.Name).Delete(service.Name, &api.DeleteOptions{}) + framework.ExpectNoError(err, "Error deleting service %q in namespace %q", service.Name, service.Namespace) + By(fmt.Sprintf("Deletion of service %q in namespace %q succeeded.", service.Name, f.Namespace.Name)) + }) + + It("should create matching services in underlying clusters", func() { + framework.SkipUnlessFederated(f.Client) + service := createServiceOrFail(f.FederationClientset_1_3, f.Namespace.Name) + defer func() { // Cleanup + By(fmt.Sprintf("Deleting service %q in namespace %q", service.Name, f.Namespace.Name)) + err := f.FederationClientset_1_3.Services(f.Namespace.Name).Delete(service.Name, &api.DeleteOptions{}) + framework.ExpectNoError(err, "Error deleting service %q in namespace %q", service.Name, f.Namespace.Name) + }() + waitForServiceShardsOrFail(f.Namespace.Name, service, clusterClientSets, nil) + }) + }) + + var _ = Describe("DNS", func() { + + var ( + service *v1.Service + backendPods []*v1.Pod + ) + + BeforeEach(func() { + framework.SkipUnlessFederated(f.Client) + backendPods = createBackendPodsOrFail(clusterClientSets, f.Namespace.Name, FederatedServicePodName) + service = createServiceOrFail(f.FederationClientset_1_3, f.Namespace.Name) + waitForServiceShardsOrFail(f.Namespace.Name, service, clusterClientSets, nil) + }) + + AfterEach(func() { + framework.SkipUnlessFederated(f.Client) + if backendPods != nil { + deleteBackendPodsOrFail(clusterClientSets, f.Namespace.Name, backendPods) + backendPods = nil + } + if service != nil { + deleteServiceOrFail(f.FederationClientset_1_3, f.Namespace.Name, service.Name) + service = nil + } + }) + + It("should be able to discover a federated service", func() { framework.SkipUnlessFederated(f.Client) svcDNSNames := []string{ + FederatedServiceName, + fmt.Sprintf("%s.%s", FederatedServiceName, f.Namespace.Name), + fmt.Sprintf("%s.%s.svc.cluster.local.", FederatedServiceName, f.Namespace.Name), fmt.Sprintf("%s.%s.%s", FederatedServiceName, f.Namespace.Name, federationName), fmt.Sprintf("%s.%s.%s.svc.cluster.local.", FederatedServiceName, f.Namespace.Name, federationName), } - for _, name := range svcDNSNames { - discoverService(f, name, true) + // TODO(mml): This could be much faster. We can launch all the test + // pods, perhaps in the BeforeEach, and then just poll until we get + // successes/failures from them all. + for i, DNSName := range svcDNSNames { + discoverService(f, DNSName, true, "federated-service-e2e-discovery-pod-"+strconv.Itoa(i)) } }) - // TODO(mml): This currently takes 9 minutes. Consider reducing the - // TTL and/or running the pods in parallel. - Context("[Slow] missing local service", func() { - It("should never find DNS entries for a missing local service", func() { + Context("non-local federated service", func() { + BeforeEach(func() { framework.SkipUnlessFederated(f.Client) - localSvcDNSNames := []string{ - FederatedServiceName, - fmt.Sprintf("%s.%s", FederatedServiceName, f.Namespace.Name), - fmt.Sprintf("%s.%s.svc.cluster.local.", FederatedServiceName, f.Namespace.Name), + // Delete all the backend pods from the shard which is local to the discovery pod. + deleteBackendPodsOrFail([]*release_1_3.Clientset{f.Clientset_1_3}, f.Namespace.Name, []*v1.Pod{backendPods[0]}) + backendPods[0] = nil // So we don't try to delete it again in an outer AfterEach + }) + + It("should be able to discover a non-local federated service", func() { + framework.SkipUnlessFederated(f.Client) + + svcDNSNames := []string{ + fmt.Sprintf("%s.%s.%s", FederatedServiceName, f.Namespace.Name, federationName), + fmt.Sprintf("%s.%s.%s.svc.cluster.local.", FederatedServiceName, f.Namespace.Name, federationName), } - for _, name := range localSvcDNSNames { - discoverService(f, name, false) + for i, name := range svcDNSNames { + discoverService(f, name, true, "federated-service-e2e-discovery-pod-"+strconv.Itoa(i)) } }) + + // TODO(mml): This currently takes 9 minutes. Consider reducing the + // TTL and/or running the pods in parallel. + Context("[Slow] missing local service", func() { + It("should never find DNS entries for a missing local service", func() { + framework.SkipUnlessFederated(f.Client) + + localSvcDNSNames := []string{ + FederatedServiceName, + fmt.Sprintf("%s.%s", FederatedServiceName, f.Namespace.Name), + fmt.Sprintf("%s.%s.svc.cluster.local.", FederatedServiceName, f.Namespace.Name), + } + for i, name := range localSvcDNSNames { + discoverService(f, name, false, FederatedServicePodName+strconv.Itoa(i)) + } + }) + }) }) }) }) }) -// waitForFederatedServiceShard waits until the number of shards of a given federated -// service reaches the expected value, i.e. numSvcs in the given individual Kubernetes -// cluster. If the shard count, i.e. numSvcs is expected to be at least one, then -// it also checks if the first shard's name and spec matches that of the given service. -func waitForFederatedServiceShard(cs *release_1_3.Clientset, namespace string, service *v1.Service, numSvcs int) { - By("Fetching a federated service shard") - var clSvcList *v1.ServiceList - if err := wait.PollImmediate(framework.Poll, FederatedServiceTimeout, func() (bool, error) { - var err error - clSvcList, err = cs.Core().Services(namespace).List(api.ListOptions{}) - if err != nil { +/* + equivalent returns true if the two services are equivalent. Fields which are expected to differ between + federated services and the underlying cluster services (e.g. ClusterIP, LoadBalancerIP etc) are ignored. +*/ +func equivalent(federationService, clusterService v1.Service) bool { + // TODO: I think that we need a DeepCopy here to avoid clobbering our parameters. + clusterService.Spec.ClusterIP = federationService.Spec.ClusterIP + clusterService.Spec.ExternalIPs = federationService.Spec.ExternalIPs + clusterService.Spec.DeprecatedPublicIPs = federationService.Spec.DeprecatedPublicIPs + clusterService.Spec.LoadBalancerIP = federationService.Spec.LoadBalancerIP + clusterService.Spec.LoadBalancerSourceRanges = federationService.Spec.LoadBalancerSourceRanges + // N.B. We cannot iterate over the port objects directly, as their values + // only get copied and our updates will get lost. + for i := range clusterService.Spec.Ports { + clusterService.Spec.Ports[i].NodePort = federationService.Spec.Ports[i].NodePort + } + return reflect.DeepEqual(clusterService.Spec, federationService.Spec) +} + +/* + waitForServiceOrFail waits until a service is either present or absent in the cluster specified by clientset. + If the condition is not met within timout, it fails the calling test. +*/ +func waitForServiceOrFail(clientset *release_1_3.Clientset, namespace string, service *v1.Service, present bool, timeout time.Duration) { + By(fmt.Sprintf("Fetching a federated service shard of service %q in namespace %q from cluster", service.Name, namespace)) + var clusterService *v1.Service + err := wait.PollImmediate(framework.Poll, timeout, func() (bool, error) { + clusterService, err := clientset.Services(namespace).Get(service.Name) + if err != nil && !errors.IsNotFound(err) { return false, err } - n := len(clSvcList.Items) - if n == numSvcs { + if (clusterService != nil && err == nil && present) || (clusterService == nil && errors.IsNotFound(err) && !present) { + By(fmt.Sprintf("Success: federated service shard of service %q in namespace %q in cluster: %v", service.Name, namespace, present)) return true, nil } - framework.Logf("%d services found, waiting for %d, trying again in %s", n, numSvcs, framework.Poll) + By(fmt.Sprintf("Service found: %v, waiting for service found: %v, trying again in %s", clusterService != nil, present, framework.Poll)) return false, nil - }); err != nil { - framework.Failf("Failed to list registered clusters: %+v", err) - } + }) + framework.ExpectNoError(err, "Failed to get service %q in namespace %q", service.Name, namespace) - if numSvcs > 0 && service != nil { - // Renaming for clarity/readability - clSvc := clSvcList.Items[0] - - Expect(clSvc.Name).To(Equal(service.Name)) - // Some fields are expected to be different, so make them the same before checking equality. - clSvc.Spec.ClusterIP = service.Spec.ClusterIP - clSvc.Spec.ExternalIPs = service.Spec.ExternalIPs - clSvc.Spec.DeprecatedPublicIPs = service.Spec.DeprecatedPublicIPs - clSvc.Spec.LoadBalancerIP = service.Spec.LoadBalancerIP - clSvc.Spec.LoadBalancerSourceRanges = service.Spec.LoadBalancerSourceRanges - // N.B. We cannot iterate over the port objects directly, as their values - // only get copied and our updates will get lost. - for i := range clSvc.Spec.Ports { - clSvc.Spec.Ports[i].NodePort = service.Spec.Ports[i].NodePort - } - Expect(clSvc.Spec).To(Equal(service.Spec)) + if present && clusterService != nil { + Expect(equivalent(*clusterService, *service)) } } -func createService(fcs *federation_release_1_3.Clientset, clusterClientSets []*release_1_3.Clientset, namespace string) { +/* + waitForServiceShardsOrFail waits for the service to appear (or disappear) in the clientsets specifed in presentInCluster (or all if presentInCluster is nil). + If presentInCluster[n] is true, then wait for service shard to exist in the cluster specifid in clientsets[n] + If presentInCluster[n] is false, then wait for service shard to not exist in the cluster specifid in clientsets[n] +*/ +func waitForServiceShardsOrFail(namespace string, service *v1.Service, clientsets []*release_1_3.Clientset, presentInCluster []bool) { + if presentInCluster != nil { + Expect(len(presentInCluster)).To(Equal(len(clientsets)), "Internal error: Number of presence flags does not equal number of clients/clusters") + } + framework.Logf("Waiting for service %q in %d clusters", service.Name, len(clientsets)) + for i, clientset := range clientsets { + var present bool // Should the service be present or absent in this cluster? + if presentInCluster == nil { + present = true + } else { + present = presentInCluster[i] + } + waitForServiceOrFail(clientset, namespace, service, present, FederatedServiceTimeout) + } +} + +func createServiceOrFail(clientset *federation_release_1_3.Clientset, namespace string) *v1.Service { + if clientset == nil || len(namespace) == 0 { + Fail(fmt.Sprintf("Internal error: invalid parameters passed to deleteServiceOrFail: clientset: %v, namespace: %v", clientset, namespace)) + } By(fmt.Sprintf("Creating federated service %q in namespace %q", FederatedServiceName, namespace)) service := &v1.Service{ @@ -298,12 +376,19 @@ func createService(fcs *federation_release_1_3.Clientset, clusterClientSets []*r }, }, } - nservice, err := fcs.Core().Services(namespace).Create(service) - framework.Logf("Trying to create service %q in namespace %q", service.ObjectMeta.Name, service.ObjectMeta.Namespace) - Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("creating service %s: %+v", service.Name, err)) - for _, cs := range clusterClientSets { - waitForFederatedServiceShard(cs, namespace, nservice, 1) + By(fmt.Sprintf("Trying to create service %q in namespace %q", service.Name, namespace)) + _, err := clientset.Services(namespace).Create(service) + framework.ExpectNoError(err, "Creating service %q in namespace %q", service.Name, namespace) + By(fmt.Sprintf("Successfully created federated service %q in namespace %q", FederatedServiceName, namespace)) + return service +} + +func deleteServiceOrFail(clientset *federation_release_1_3.Clientset, namespace string, serviceName string) { + if clientset == nil || len(namespace) == 0 || len(serviceName) == 0 { + Fail(fmt.Sprintf("Internal error: invalid parameters passed to deleteServiceOrFail: clientset: %v, namespace: %v, service: %v", clientset, namespace, serviceName)) } + err := clientset.Services(namespace).Delete(serviceName, api.NewDeleteOptions(0)) + framework.ExpectNoError(err, "Error deleting service %q from namespace %q", serviceName, namespace) } func podExitCodeDetector(f *framework.Framework, name string, code int32) func() error { @@ -347,14 +432,13 @@ func podExitCodeDetector(f *framework.Framework, name string, code int32) func() } } -func discoverService(f *framework.Framework, name string, exists bool) { +func discoverService(f *framework.Framework, name string, exists bool, podName string) { command := []string{"sh", "-c", fmt.Sprintf("until nslookup '%s'; do sleep 10; done", name)} By(fmt.Sprintf("Looking up %q", name)) pod := &api.Pod{ ObjectMeta: api.ObjectMeta{ - Name: FederatedServicePod, - Labels: map[string]string{"name": FederatedServicePod}, + Name: podName, }, Spec: api.PodSpec{ Containers: []api.Container{ @@ -369,22 +453,24 @@ func discoverService(f *framework.Framework, name string, exists bool) { } _, err := f.Client.Pods(f.Namespace.Name).Create(pod) - Expect(err).NotTo(HaveOccurred(), "Trying to create pod to run %q", command) - defer f.Client.Pods(f.Namespace.Name).Delete(FederatedServicePod, api.NewDeleteOptions(0)) + framework.ExpectNoError(err, "Trying to create pod to run %q", command) + defer func() { f.Client.Pods(f.Namespace.Name).Delete(podName, api.NewDeleteOptions(0)) }() if exists { // TODO(mml): Eventually check the IP address is correct, too. - Eventually(podExitCodeDetector(f, FederatedServicePod, 0), 10*DNSTTL, time.Second*2). + Eventually(podExitCodeDetector(f, podName, 0), 3*DNSTTL, time.Second*2). Should(BeNil(), "%q should exit 0, but it never did", command) } else { - Consistently(podExitCodeDetector(f, FederatedServicePod, 0), 10*DNSTTL, time.Second*2). + Consistently(podExitCodeDetector(f, podName, 0), 3*DNSTTL, time.Second*2). ShouldNot(BeNil(), "%q should never exit 0, but it did", command) } } -func createBackendPods(clusterClientSets []*release_1_3.Clientset, namespace string) { - name := "backend" - +/* +createBackendPodsOrFail creates one pod in each cluster, and returns the created pods (in the same order as clusterClientSets). +If creation of any pod fails, the test fails (possibly with a partially created set of pods). No retries are attempted. +*/ +func createBackendPodsOrFail(clusterClientSets []*release_1_3.Clientset, namespace string, name string) []*v1.Pod { pod := &v1.Pod{ ObjectMeta: v1.ObjectMeta{ Name: name, @@ -394,16 +480,34 @@ func createBackendPods(clusterClientSets []*release_1_3.Clientset, namespace str Spec: v1.PodSpec{ Containers: []v1.Container{ { - Name: "backend", + Name: name, Image: "gcr.io/google_containers/echoserver:1.4", }, }, RestartPolicy: v1.RestartPolicyAlways, }, } + pods := make([]*v1.Pod, len(clusterClientSets)) + for i, client := range clusterClientSets { + createdPod, err := client.Core().Pods(namespace).Create(pod) + framework.ExpectNoError(err, "Creating pod %q in namespace %q in cluster %d", name, namespace, i) + pods[i] = createdPod + } + return pods +} - for _, client := range clusterClientSets { - _, err := client.Core().Pods(namespace).Create(pod) - Expect(err).NotTo(HaveOccurred(), fmt.Sprintf("Creating pod %q/%q", namespace, name)) +/* +deleteBackendPodsOrFail deletes one pod from each cluster (unless pods[n] is nil for that cluster) +If deletion of any pod fails, the test fails (possibly with a partially deleted set of pods). No retries are attempted. +*/ +func deleteBackendPodsOrFail(clusterClientSets []*release_1_3.Clientset, namespace string, pods []*v1.Pod) { + if len(clusterClientSets) != len(pods) { + Fail(fmt.Sprintf("Internal error: number of clients (%d) does not equal number of pods (%d). One pod per client please.", len(clusterClientSets), len(pods))) + } + for i, client := range clusterClientSets { + if pods[i] != nil { + err := client.Core().Pods(namespace).Delete(pods[i].Name, api.NewDeleteOptions(0)) + framework.ExpectNoError(err, "Deleting pod %q in namespace %q from cluster %d", pods[i].Name, namespace, i) + } } } From 4c822c300cc493c3bcdc3137f4bc2af65329eb0e Mon Sep 17 00:00:00 2001 From: Marcin Wielgus Date: Tue, 28 Jun 2016 22:08:44 +0200 Subject: [PATCH 259/339] Bump cluster autoscaler to 0.2.2 --- .../salt/cluster-autoscaler/cluster-autoscaler.manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest b/cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest index b2894c5f5d..545b4ceb61 100644 --- a/cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest +++ b/cluster/saltbase/salt/cluster-autoscaler/cluster-autoscaler.manifest @@ -25,7 +25,7 @@ "containers": [ { "name": "cluster-autoscaler", - "image": "gcr.io/google_containers/cluster-autoscaler:v0.2.1", + "image": "gcr.io/google_containers/cluster-autoscaler:v0.2.2", "command": [ "/bin/sh", "-c", From e06b32b1ef4ac5919ea24c2e158f0ab6b3b5fe87 Mon Sep 17 00:00:00 2001 From: saadali Date: Sun, 26 Jun 2016 17:33:01 -0700 Subject: [PATCH 260/339] Mark VolumeInUse before checking if it is Attached Ensure that kublet marks VolumeInUse before checking if it is Attached. Also ensures that the attach/detach controller always fetches a fresh copy of the node object before detach (instead ofKubelet relying on node informer cache). --- .../volume/attach_detach_controller.go | 2 +- .../volume/reconciler/reconciler.go | 4 +- pkg/kubelet/kubelet.go | 6 +- pkg/kubelet/kubelet_test.go | 46 +++-- .../volume/cache/actual_state_of_world.go | 44 +++-- .../cache/actual_state_of_world_test.go | 134 ++++++++++++-- .../volume/cache/desired_state_of_world.go | 37 +++- .../cache/desired_state_of_world_test.go | 163 +++++++++++++++++- pkg/kubelet/volume/reconciler/reconciler.go | 2 +- .../volume/reconciler/reconciler_test.go | 39 +++-- pkg/kubelet/volume/volume_manager.go | 65 +++++-- .../operationexecutor/operation_executor.go | 66 ++++++- 12 files changed, 525 insertions(+), 83 deletions(-) diff --git a/pkg/controller/volume/attach_detach_controller.go b/pkg/controller/volume/attach_detach_controller.go index 63f615793e..7997f5e8f6 100644 --- a/pkg/controller/volume/attach_detach_controller.go +++ b/pkg/controller/volume/attach_detach_controller.go @@ -50,7 +50,7 @@ const ( // attach detach controller will wait for a volume to be safely unmounted // from its node. Once this time has expired, the controller will assume the // node or kubelet are unresponsive and will detach the volume anyway. - reconcilerMaxWaitForUnmountDuration time.Duration = 3 * time.Minute + reconcilerMaxWaitForUnmountDuration time.Duration = 6 * time.Minute // desiredStateOfWorldPopulatorLoopSleepPeriod is the amount of time the // DesiredStateOfWorldPopulator loop waits between successive executions diff --git a/pkg/controller/volume/reconciler/reconciler.go b/pkg/controller/volume/reconciler/reconciler.go index b948ee259b..914d93250c 100644 --- a/pkg/controller/volume/reconciler/reconciler.go +++ b/pkg/controller/volume/reconciler/reconciler.go @@ -109,7 +109,7 @@ func (rc *reconciler) reconciliationLoopFunc() func() { if !attachedVolume.MountedByNode { glog.V(5).Infof("Attempting to start DetachVolume for volume %q from node %q", attachedVolume.VolumeName, attachedVolume.NodeName) - err := rc.attacherDetacher.DetachVolume(attachedVolume.AttachedVolume, rc.actualStateOfWorld) + err := rc.attacherDetacher.DetachVolume(attachedVolume.AttachedVolume, true /* verifySafeToDetach */, rc.actualStateOfWorld) if err == nil { glog.Infof("Started DetachVolume for volume %q from node %q", attachedVolume.VolumeName, attachedVolume.NodeName) } @@ -129,7 +129,7 @@ func (rc *reconciler) reconciliationLoopFunc() func() { // If volume is not safe to detach (is mounted) wait a max amount of time before detaching any way. if timeElapsed > rc.maxWaitForUnmountDuration { glog.V(5).Infof("Attempting to start DetachVolume for volume %q from node %q. Volume is not safe to detach, but maxWaitForUnmountDuration expired.", attachedVolume.VolumeName, attachedVolume.NodeName) - err := rc.attacherDetacher.DetachVolume(attachedVolume.AttachedVolume, rc.actualStateOfWorld) + err := rc.attacherDetacher.DetachVolume(attachedVolume.AttachedVolume, false /* verifySafeToDetach */, rc.actualStateOfWorld) if err == nil { glog.Infof("Started DetachVolume for volume %q from node %q due to maxWaitForUnmountDuration expiry.", attachedVolume.VolumeName, attachedVolume.NodeName) } diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 4f89718516..c3769d88ae 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -3404,7 +3404,11 @@ func (kl *Kubelet) tryUpdateNodeStatus() error { return err } // Update the current status on the API server - _, err = kl.kubeClient.Core().Nodes().UpdateStatus(node) + updatedNode, err := kl.kubeClient.Core().Nodes().UpdateStatus(node) + if err == nil { + kl.volumeManager.MarkVolumesAsReportedInUse( + updatedNode.Status.VolumesInUse) + } return err } diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index b503382bd7..552df6990b 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -597,7 +597,7 @@ func TestVolumeUnmountAndDetachControllerDisabled(t *testing.T) { } // Verify volumes detached and no longer reported as in use - err = waitForVolumeDetach(kubelet.volumeManager) + err = waitForVolumeDetach(api.UniqueVolumeName("fake/vol1"), kubelet.volumeManager) if err != nil { t.Error(err) } @@ -611,7 +611,6 @@ func TestVolumeUnmountAndDetachControllerDisabled(t *testing.T) { if err != nil { t.Error(err) } - } func TestVolumeAttachAndMountControllerEnabled(t *testing.T) { @@ -657,6 +656,13 @@ func TestVolumeAttachAndMountControllerEnabled(t *testing.T) { }() kubelet.podManager.SetPods([]*api.Pod{pod}) + + // Fake node status update + go simulateVolumeInUseUpdate( + api.UniqueVolumeName("fake/vol1"), + stopCh, + kubelet.volumeManager) + err := kubelet.volumeManager.WaitForAttachAndMount(pod) if err != nil { t.Errorf("Expected success: %v", err) @@ -747,6 +753,12 @@ func TestVolumeUnmountAndDetachControllerEnabled(t *testing.T) { // Add pod kubelet.podManager.SetPods([]*api.Pod{pod}) + // Fake node status update + go simulateVolumeInUseUpdate( + api.UniqueVolumeName("fake/vol1"), + stopCh, + kubelet.volumeManager) + // Verify volumes attached err := kubelet.volumeManager.WaitForAttachAndMount(pod) if err != nil { @@ -815,7 +827,7 @@ func TestVolumeUnmountAndDetachControllerEnabled(t *testing.T) { } // Verify volumes detached and no longer reported as in use - err = waitForVolumeDetach(kubelet.volumeManager) + err = waitForVolumeDetach(api.UniqueVolumeName("fake/vol1"), kubelet.volumeManager) if err != nil { t.Error(err) } @@ -828,7 +840,6 @@ func TestVolumeUnmountAndDetachControllerEnabled(t *testing.T) { if err != nil { t.Error(err) } - } func TestPodVolumesExist(t *testing.T) { @@ -4987,19 +4998,15 @@ func waitForVolumeUnmount( } func waitForVolumeDetach( + volumeName api.UniqueVolumeName, volumeManager kubeletvolume.VolumeManager) error { attachedVolumes := []api.UniqueVolumeName{} err := retryWithExponentialBackOff( time.Duration(50*time.Millisecond), func() (bool, error) { // Verify volumes detached - attachedVolumes = volumeManager.GetVolumesInUse() - - if len(attachedVolumes) != 0 { - return false, nil - } - - return true, nil + volumeAttached := volumeManager.VolumeIsAttached(volumeName) + return !volumeAttached, nil }, ) @@ -5020,3 +5027,20 @@ func retryWithExponentialBackOff(initialDuration time.Duration, fn wait.Conditio } return wait.ExponentialBackoff(backoff, fn) } + +func simulateVolumeInUseUpdate( + volumeName api.UniqueVolumeName, + stopCh <-chan struct{}, + volumeManager kubeletvolume.VolumeManager) { + ticker := time.NewTicker(100 * time.Millisecond) + defer ticker.Stop() + for { + select { + case <-ticker.C: + volumeManager.MarkVolumesAsReportedInUse( + []api.UniqueVolumeName{volumeName}) + case <-stopCh: + return + } + } +} diff --git a/pkg/kubelet/volume/cache/actual_state_of_world.go b/pkg/kubelet/volume/cache/actual_state_of_world.go index e0a9a5d53b..4dd5f5444f 100644 --- a/pkg/kubelet/volume/cache/actual_state_of_world.go +++ b/pkg/kubelet/volume/cache/actual_state_of_world.go @@ -117,6 +117,11 @@ type ActualStateOfWorld interface { // volumes that do not need to update contents should not fail. PodExistsInVolume(podName volumetypes.UniquePodName, volumeName api.UniqueVolumeName) (bool, string, error) + // VolumeExists returns true if the given volume exists in the list of + // attached volumes in the cache, indicating the volume is attached to this + // node. + VolumeExists(volumeName api.UniqueVolumeName) bool + // GetMountedVolumes generates and returns a list of volumes and the pods // they are successfully attached and mounted for based on the current // actual state of the world. @@ -127,12 +132,17 @@ type ActualStateOfWorld interface { // current actual state of the world. GetMountedVolumesForPod(podName volumetypes.UniquePodName) []MountedVolume - // GetAttachedVolumes generates and returns a list of all attached volumes. - GetAttachedVolumes() []AttachedVolume + // GetGloballyMountedVolumes generates and returns a list of all attached + // volumes that are globally mounted. This list can be used to determine + // which volumes should be reported as "in use" in the node's VolumesInUse + // status field. Globally mounted here refers to the shared plugin mount + // point for the attachable volume from which the pod specific mount points + // are created (via bind mount). + GetGloballyMountedVolumes() []AttachedVolume // GetUnmountedVolumes generates and returns a list of attached volumes that // have no mountedPods. This list can be used to determine which volumes are - // no longer referenced and may be detached. + // no longer referenced and may be globally unmounted and detached. GetUnmountedVolumes() []AttachedVolume } @@ -492,6 +502,15 @@ func (asw *actualStateOfWorld) PodExistsInVolume( return podExists, volumeObj.devicePath, nil } +func (asw *actualStateOfWorld) VolumeExists( + volumeName api.UniqueVolumeName) bool { + asw.RLock() + defer asw.RUnlock() + + _, volumeExists := asw.attachedVolumes[volumeName] + return volumeExists +} + func (asw *actualStateOfWorld) GetMountedVolumes() []MountedVolume { asw.RLock() defer asw.RUnlock() @@ -525,17 +544,20 @@ func (asw *actualStateOfWorld) GetMountedVolumesForPod( return mountedVolume } -func (asw *actualStateOfWorld) GetAttachedVolumes() []AttachedVolume { +func (asw *actualStateOfWorld) GetGloballyMountedVolumes() []AttachedVolume { asw.RLock() defer asw.RUnlock() - unmountedVolumes := make([]AttachedVolume, 0 /* len */, len(asw.attachedVolumes) /* cap */) + globallyMountedVolumes := make( + []AttachedVolume, 0 /* len */, len(asw.attachedVolumes) /* cap */) for _, volumeObj := range asw.attachedVolumes { - unmountedVolumes = append( - unmountedVolumes, - asw.getAttachedVolume(&volumeObj)) + if volumeObj.globallyMounted { + globallyMountedVolumes = append( + globallyMountedVolumes, + asw.newAttachedVolume(&volumeObj)) + } } - return unmountedVolumes + return globallyMountedVolumes } func (asw *actualStateOfWorld) GetUnmountedVolumes() []AttachedVolume { @@ -546,14 +568,14 @@ func (asw *actualStateOfWorld) GetUnmountedVolumes() []AttachedVolume { if len(volumeObj.mountedPods) == 0 { unmountedVolumes = append( unmountedVolumes, - asw.getAttachedVolume(&volumeObj)) + asw.newAttachedVolume(&volumeObj)) } } return unmountedVolumes } -func (asw *actualStateOfWorld) getAttachedVolume( +func (asw *actualStateOfWorld) newAttachedVolume( attachedVolume *attachedVolume) AttachedVolume { return AttachedVolume{ AttachedVolume: operationexecutor.AttachedVolume{ diff --git a/pkg/kubelet/volume/cache/actual_state_of_world_test.go b/pkg/kubelet/volume/cache/actual_state_of_world_test.go index d74fca6c13..7a1cf27b84 100644 --- a/pkg/kubelet/volume/cache/actual_state_of_world_test.go +++ b/pkg/kubelet/volume/cache/actual_state_of_world_test.go @@ -27,7 +27,8 @@ import ( ) // Calls AddVolume() once to add volume -// Verifies newly added volume exists in GetAttachedVolumes() +// Verifies newly added volume exists in GetUnmountedVolumes() +// Verifies newly added volume doesn't exist in GetGloballyMountedVolumes() func Test_AddVolume_Positive_NewVolume(t *testing.T) { // Arrange volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t) @@ -61,12 +62,15 @@ func Test_AddVolume_Positive_NewVolume(t *testing.T) { t.Fatalf("AddVolume failed. Expected: Actual: <%v>", err) } - verifyVolumeExistsInAttachedVolumes(t, generatedVolumeName, asw) + verifyVolumeExistsAsw(t, generatedVolumeName, true /* shouldExist */, asw) + verifyVolumeExistsInUnmountedVolumes(t, generatedVolumeName, asw) + verifyVolumeDoesntExistInGloballyMountedVolumes(t, generatedVolumeName, asw) } // Calls AddVolume() twice to add the same volume -// Verifies newly added volume exists in GetAttachedVolumes() and second call -// doesn't fail +// Verifies second call doesn't fail +// Verifies newly added volume exists in GetUnmountedVolumes() +// Verifies newly added volume doesn't exist in GetGloballyMountedVolumes() func Test_AddVolume_Positive_ExistingVolume(t *testing.T) { // Arrange volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t) @@ -105,7 +109,9 @@ func Test_AddVolume_Positive_ExistingVolume(t *testing.T) { t.Fatalf("AddVolume failed. Expected: Actual: <%v>", err) } - verifyVolumeExistsInAttachedVolumes(t, generatedVolumeName, asw) + verifyVolumeExistsAsw(t, generatedVolumeName, true /* shouldExist */, asw) + verifyVolumeExistsInUnmountedVolumes(t, generatedVolumeName, asw) + verifyVolumeDoesntExistInGloballyMountedVolumes(t, generatedVolumeName, asw) } // Populates data struct with a volume @@ -160,7 +166,9 @@ func Test_AddPodToVolume_Positive_ExistingVolumeNewNode(t *testing.T) { t.Fatalf("AddPodToVolume failed. Expected: Actual: <%v>", err) } - verifyVolumeExistsInAttachedVolumes(t, generatedVolumeName, asw) + verifyVolumeExistsAsw(t, generatedVolumeName, true /* shouldExist */, asw) + verifyVolumeDoesntExistInUnmountedVolumes(t, generatedVolumeName, asw) + verifyVolumeDoesntExistInGloballyMountedVolumes(t, generatedVolumeName, asw) verifyPodExistsInVolumeAsw(t, podName, generatedVolumeName, "fake/device/path" /* expectedDevicePath */, asw) } @@ -223,7 +231,9 @@ func Test_AddPodToVolume_Positive_ExistingVolumeExistingNode(t *testing.T) { t.Fatalf("AddPodToVolume failed. Expected: Actual: <%v>", err) } - verifyVolumeExistsInAttachedVolumes(t, generatedVolumeName, asw) + verifyVolumeExistsAsw(t, generatedVolumeName, true /* shouldExist */, asw) + verifyVolumeDoesntExistInUnmountedVolumes(t, generatedVolumeName, asw) + verifyVolumeDoesntExistInGloballyMountedVolumes(t, generatedVolumeName, asw) verifyPodExistsInVolumeAsw(t, podName, generatedVolumeName, "fake/device/path" /* expectedDevicePath */, asw) } @@ -280,7 +290,9 @@ func Test_AddPodToVolume_Negative_VolumeDoesntExist(t *testing.T) { t.Fatalf("AddPodToVolume did not fail. Expected: <\"no volume with the name ... exists in the list of attached volumes\"> Actual: ") } - verifyVolumeDoesntExistInAttachedVolumes(t, volumeName, asw) + verifyVolumeExistsAsw(t, volumeName, false /* shouldExist */, asw) + verifyVolumeDoesntExistInUnmountedVolumes(t, volumeName, asw) + verifyVolumeDoesntExistInGloballyMountedVolumes(t, volumeName, asw) verifyPodDoesntExistInVolumeAsw( t, podName, @@ -289,28 +301,116 @@ func Test_AddPodToVolume_Negative_VolumeDoesntExist(t *testing.T) { asw) } -func verifyVolumeExistsInAttachedVolumes( +// Calls AddVolume() once to add volume +// Calls MarkDeviceAsMounted() to mark volume as globally mounted. +// Verifies newly added volume exists in GetUnmountedVolumes() +// Verifies newly added volume exists in GetGloballyMountedVolumes() +func Test_MarkDeviceAsMounted_Positive_NewVolume(t *testing.T) { + // Arrange + volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t) + asw := NewActualStateOfWorld("mynode" /* nodeName */, volumePluginMgr) + pod := &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: "pod1", + UID: "pod1uid", + }, + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + Name: "volume-name", + VolumeSource: api.VolumeSource{ + GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{ + PDName: "fake-device1", + }, + }, + }, + }, + }, + } + volumeSpec := &volume.Spec{Volume: &pod.Spec.Volumes[0]} + devicePath := "fake/device/path" + generatedVolumeName, err := asw.AddVolume(volumeSpec, devicePath) + if err != nil { + t.Fatalf("AddVolume failed. Expected: Actual: <%v>", err) + } + + // Act + err = asw.MarkDeviceAsMounted(generatedVolumeName) + + // Assert + if err != nil { + t.Fatalf("MarkDeviceAsMounted failed. Expected: Actual: <%v>", err) + } + + verifyVolumeExistsAsw(t, generatedVolumeName, true /* shouldExist */, asw) + verifyVolumeExistsInUnmountedVolumes(t, generatedVolumeName, asw) + verifyVolumeExistsInGloballyMountedVolumes(t, generatedVolumeName, asw) +} + +func verifyVolumeExistsInGloballyMountedVolumes( t *testing.T, expectedVolumeName api.UniqueVolumeName, asw ActualStateOfWorld) { - attachedVolumes := asw.GetAttachedVolumes() - for _, volume := range attachedVolumes { + globallyMountedVolumes := asw.GetGloballyMountedVolumes() + for _, volume := range globallyMountedVolumes { if volume.VolumeName == expectedVolumeName { return } } t.Fatalf( - "Could not find volume %v in the list of attached volumes for actual state of world %+v", + "Could not find volume %v in the list of GloballyMountedVolumes for actual state of world %+v", expectedVolumeName, - attachedVolumes) + globallyMountedVolumes) } -func verifyVolumeDoesntExistInAttachedVolumes( +func verifyVolumeDoesntExistInGloballyMountedVolumes( t *testing.T, volumeToCheck api.UniqueVolumeName, asw ActualStateOfWorld) { - attachedVolumes := asw.GetAttachedVolumes() - for _, volume := range attachedVolumes { + globallyMountedVolumes := asw.GetGloballyMountedVolumes() + for _, volume := range globallyMountedVolumes { if volume.VolumeName == volumeToCheck { t.Fatalf( - "Found volume %v in the list of attached volumes. Expected it not to exist.", + "Found volume %v in the list of GloballyMountedVolumes. Expected it not to exist.", + volumeToCheck) + } + } +} + +func verifyVolumeExistsAsw( + t *testing.T, + expectedVolumeName api.UniqueVolumeName, + shouldExist bool, + asw ActualStateOfWorld) { + volumeExists := asw.VolumeExists(expectedVolumeName) + if shouldExist != volumeExists { + t.Fatalf( + "VolumeExists(%q) response incorrect. Expected: <%v> Actual: <%v>", + expectedVolumeName, + shouldExist, + volumeExists) + } +} + +func verifyVolumeExistsInUnmountedVolumes( + t *testing.T, expectedVolumeName api.UniqueVolumeName, asw ActualStateOfWorld) { + unmountedVolumes := asw.GetUnmountedVolumes() + for _, volume := range unmountedVolumes { + if volume.VolumeName == expectedVolumeName { + return + } + } + + t.Fatalf( + "Could not find volume %v in the list of UnmountedVolumes for actual state of world %+v", + expectedVolumeName, + unmountedVolumes) +} + +func verifyVolumeDoesntExistInUnmountedVolumes( + t *testing.T, volumeToCheck api.UniqueVolumeName, asw ActualStateOfWorld) { + unmountedVolumes := asw.GetUnmountedVolumes() + for _, volume := range unmountedVolumes { + if volume.VolumeName == volumeToCheck { + t.Fatalf( + "Found volume %v in the list of UnmountedVolumes. Expected it not to exist.", volumeToCheck) } } diff --git a/pkg/kubelet/volume/cache/desired_state_of_world.go b/pkg/kubelet/volume/cache/desired_state_of_world.go index 004f029630..673897d8e7 100644 --- a/pkg/kubelet/volume/cache/desired_state_of_world.go +++ b/pkg/kubelet/volume/cache/desired_state_of_world.go @@ -53,6 +53,16 @@ type DesiredStateOfWorld interface { // volume, this is a no-op. AddPodToVolume(podName types.UniquePodName, pod *api.Pod, volumeSpec *volume.Spec, outerVolumeSpecName string, volumeGidValue string) (api.UniqueVolumeName, error) + // MarkVolumesReportedInUse sets the ReportedInUse value to true for the + // reportedVolumes. For volumes not in the reportedVolumes list, the + // ReportedInUse value is reset to false. The default ReportedInUse value + // for a newly created volume is false. + // When set to true this value indicates that the volume was successfully + // added to the VolumesInUse field in the node's status. + // If a volume in the reportedVolumes list does not exist in the list of + // volumes that should be attached to this node, it is skipped without error. + MarkVolumesReportedInUse(reportedVolumes []api.UniqueVolumeName) + // DeletePodFromVolume removes the given pod from the given volume in the // cache indicating the specified pod no longer requires the specified // volume. @@ -128,6 +138,10 @@ type volumeToMount struct { // volumeGidValue contains the value of the GID annotation, if present. volumeGidValue string + + // reportedInUse indicates that the volume was successfully added to the + // VolumesInUse field in the node's status. + reportedInUse bool } // The pod object represents a pod that references the underlying volume and @@ -186,6 +200,7 @@ func (dsw *desiredStateOfWorld) AddPodToVolume( podsToMount: make(map[types.UniquePodName]podToMount), pluginIsAttachable: dsw.isAttachableVolume(volumeSpec), volumeGidValue: volumeGidValue, + reportedInUse: false, } dsw.volumesToMount[volumeName] = volumeObj } @@ -203,6 +218,25 @@ func (dsw *desiredStateOfWorld) AddPodToVolume( return volumeName, nil } +func (dsw *desiredStateOfWorld) MarkVolumesReportedInUse( + reportedVolumes []api.UniqueVolumeName) { + dsw.Lock() + defer dsw.Unlock() + + reportedVolumesMap := make( + map[api.UniqueVolumeName]bool, len(reportedVolumes) /* capacity */) + + for _, reportedVolume := range reportedVolumes { + reportedVolumesMap[reportedVolume] = true + } + + for volumeName, volumeObj := range dsw.volumesToMount { + _, volumeReported := reportedVolumesMap[volumeName] + volumeObj.reportedInUse = volumeReported + dsw.volumesToMount[volumeName] = volumeObj + } +} + func (dsw *desiredStateOfWorld) DeletePodFromVolume( podName types.UniquePodName, volumeName api.UniqueVolumeName) { dsw.Lock() @@ -266,7 +300,8 @@ func (dsw *desiredStateOfWorld) GetVolumesToMount() []VolumeToMount { VolumeSpec: podObj.spec, PluginIsAttachable: volumeObj.pluginIsAttachable, OuterVolumeSpecName: podObj.outerVolumeSpecName, - VolumeGidValue: volumeObj.volumeGidValue}}) + VolumeGidValue: volumeObj.volumeGidValue, + ReportedInUse: volumeObj.reportedInUse}}) } } return volumesToMount diff --git a/pkg/kubelet/volume/cache/desired_state_of_world_test.go b/pkg/kubelet/volume/cache/desired_state_of_world_test.go index 1926270784..41a3c2235c 100644 --- a/pkg/kubelet/volume/cache/desired_state_of_world_test.go +++ b/pkg/kubelet/volume/cache/desired_state_of_world_test.go @@ -64,8 +64,9 @@ func Test_AddPodToVolume_Positive_NewPodNewVolume(t *testing.T) { t.Fatalf("AddPodToVolume failed. Expected: Actual: <%v>", err) } - verifyVolumeExists(t, generatedVolumeName, dsw) - verifyVolumeExistsInVolumesToMount(t, generatedVolumeName, dsw) + verifyVolumeExistsDsw(t, generatedVolumeName, dsw) + verifyVolumeExistsInVolumesToMount( + t, generatedVolumeName, false /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, podName, generatedVolumeName, dsw) } @@ -107,8 +108,9 @@ func Test_AddPodToVolume_Positive_ExistingPodExistingVolume(t *testing.T) { t.Fatalf("AddPodToVolume failed. Expected: Actual: <%v>", err) } - verifyVolumeExists(t, generatedVolumeName, dsw) - verifyVolumeExistsInVolumesToMount(t, generatedVolumeName, dsw) + verifyVolumeExistsDsw(t, generatedVolumeName, dsw) + verifyVolumeExistsInVolumesToMount( + t, generatedVolumeName, false /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, podName, generatedVolumeName, dsw) } @@ -145,8 +147,9 @@ func Test_DeletePodFromVolume_Positive_PodExistsVolumeExists(t *testing.T) { if err != nil { t.Fatalf("AddPodToVolume failed. Expected: Actual: <%v>", err) } - verifyVolumeExists(t, generatedVolumeName, dsw) - verifyVolumeExistsInVolumesToMount(t, generatedVolumeName, dsw) + verifyVolumeExistsDsw(t, generatedVolumeName, dsw) + verifyVolumeExistsInVolumesToMount( + t, generatedVolumeName, false /* expectReportedInUse */, dsw) verifyPodExistsInVolumeDsw(t, podName, generatedVolumeName, dsw) // Act @@ -158,7 +161,140 @@ func Test_DeletePodFromVolume_Positive_PodExistsVolumeExists(t *testing.T) { verifyPodDoesntExistInVolumeDsw(t, podName, generatedVolumeName, dsw) } -func verifyVolumeExists( +// Calls AddPodToVolume() to add three new volumes to data struct +// Verifies newly added pod/volume exists via PodExistsInVolume() +// VolumeExists() and GetVolumesToMount() +// Marks only second volume as reported in use. +// Verifies only that volume is marked reported in use +// Marks only first volume as reported in use. +// Verifies only that volume is marked reported in use +func Test_MarkVolumesReportedInUse_Positive_NewPodNewVolume(t *testing.T) { + // Arrange + volumePluginMgr, _ := volumetesting.GetTestVolumePluginMgr(t) + dsw := NewDesiredStateOfWorld(volumePluginMgr) + + pod1 := &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: "pod1", + UID: "pod1uid", + }, + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + Name: "volume1-name", + VolumeSource: api.VolumeSource{ + GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{ + PDName: "fake-device1", + }, + }, + }, + }, + }, + } + + volume1Spec := &volume.Spec{Volume: &pod1.Spec.Volumes[0]} + pod1Name := volumehelper.GetUniquePodName(pod1) + + pod2 := &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: "pod2", + UID: "pod2uid", + }, + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + Name: "volume2-name", + VolumeSource: api.VolumeSource{ + GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{ + PDName: "fake-device2", + }, + }, + }, + }, + }, + } + + volume2Spec := &volume.Spec{Volume: &pod2.Spec.Volumes[0]} + pod2Name := volumehelper.GetUniquePodName(pod2) + + pod3 := &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: "pod3", + UID: "pod3uid", + }, + Spec: api.PodSpec{ + Volumes: []api.Volume{ + { + Name: "volume3-name", + VolumeSource: api.VolumeSource{ + GCEPersistentDisk: &api.GCEPersistentDiskVolumeSource{ + PDName: "fake-device3", + }, + }, + }, + }, + }, + } + + volume3Spec := &volume.Spec{Volume: &pod3.Spec.Volumes[0]} + pod3Name := volumehelper.GetUniquePodName(pod3) + + generatedVolume1Name, err := dsw.AddPodToVolume( + pod1Name, pod1, volume1Spec, volume1Spec.Name(), "" /* volumeGidValue */) + if err != nil { + t.Fatalf("AddPodToVolume failed. Expected: Actual: <%v>", err) + } + + generatedVolume2Name, err := dsw.AddPodToVolume( + pod2Name, pod2, volume2Spec, volume2Spec.Name(), "" /* volumeGidValue */) + if err != nil { + t.Fatalf("AddPodToVolume failed. Expected: Actual: <%v>", err) + } + + generatedVolume3Name, err := dsw.AddPodToVolume( + pod3Name, pod3, volume3Spec, volume3Spec.Name(), "" /* volumeGidValue */) + if err != nil { + t.Fatalf("AddPodToVolume failed. Expected: Actual: <%v>", err) + } + + // Act + volumesReportedInUse := []api.UniqueVolumeName{generatedVolume2Name} + dsw.MarkVolumesReportedInUse(volumesReportedInUse) + + // Assert + verifyVolumeExistsDsw(t, generatedVolume1Name, dsw) + verifyVolumeExistsInVolumesToMount( + t, generatedVolume1Name, false /* expectReportedInUse */, dsw) + verifyPodExistsInVolumeDsw(t, pod1Name, generatedVolume1Name, dsw) + verifyVolumeExistsDsw(t, generatedVolume2Name, dsw) + verifyVolumeExistsInVolumesToMount( + t, generatedVolume2Name, true /* expectReportedInUse */, dsw) + verifyPodExistsInVolumeDsw(t, pod2Name, generatedVolume2Name, dsw) + verifyVolumeExistsDsw(t, generatedVolume3Name, dsw) + verifyVolumeExistsInVolumesToMount( + t, generatedVolume3Name, false /* expectReportedInUse */, dsw) + verifyPodExistsInVolumeDsw(t, pod3Name, generatedVolume3Name, dsw) + + // Act + volumesReportedInUse = []api.UniqueVolumeName{generatedVolume3Name} + dsw.MarkVolumesReportedInUse(volumesReportedInUse) + + // Assert + verifyVolumeExistsDsw(t, generatedVolume1Name, dsw) + verifyVolumeExistsInVolumesToMount( + t, generatedVolume1Name, false /* expectReportedInUse */, dsw) + verifyPodExistsInVolumeDsw(t, pod1Name, generatedVolume1Name, dsw) + verifyVolumeExistsDsw(t, generatedVolume2Name, dsw) + verifyVolumeExistsInVolumesToMount( + t, generatedVolume2Name, false /* expectReportedInUse */, dsw) + verifyPodExistsInVolumeDsw(t, pod2Name, generatedVolume2Name, dsw) + verifyVolumeExistsDsw(t, generatedVolume3Name, dsw) + verifyVolumeExistsInVolumesToMount( + t, generatedVolume3Name, true /* expectReportedInUse */, dsw) + verifyPodExistsInVolumeDsw(t, pod3Name, generatedVolume3Name, dsw) +} + +func verifyVolumeExistsDsw( t *testing.T, expectedVolumeName api.UniqueVolumeName, dsw DesiredStateOfWorld) { volumeExists := dsw.VolumeExists(expectedVolumeName) if !volumeExists { @@ -181,10 +317,21 @@ func verifyVolumeDoesntExist( } func verifyVolumeExistsInVolumesToMount( - t *testing.T, expectedVolumeName api.UniqueVolumeName, dsw DesiredStateOfWorld) { + t *testing.T, + expectedVolumeName api.UniqueVolumeName, + expectReportedInUse bool, + dsw DesiredStateOfWorld) { volumesToMount := dsw.GetVolumesToMount() for _, volume := range volumesToMount { if volume.VolumeName == expectedVolumeName { + if volume.ReportedInUse != expectReportedInUse { + t.Fatalf( + "Found volume %v in the list of VolumesToMount, but ReportedInUse incorrect. Expected: <%v> Actual: <%v>", + expectedVolumeName, + expectReportedInUse, + volume.ReportedInUse) + } + return } } diff --git a/pkg/kubelet/volume/reconciler/reconciler.go b/pkg/kubelet/volume/reconciler/reconciler.go index de620d8a76..2f27bb9cab 100644 --- a/pkg/kubelet/volume/reconciler/reconciler.go +++ b/pkg/kubelet/volume/reconciler/reconciler.go @@ -295,7 +295,7 @@ func (rc *reconciler) reconciliationLoopFunc() func() { attachedVolume.VolumeName, attachedVolume.VolumeSpec.Name()) err := rc.operationExecutor.DetachVolume( - attachedVolume.AttachedVolume, rc.actualStateOfWorld) + attachedVolume.AttachedVolume, false /* verifySafeToDetach */, rc.actualStateOfWorld) if err != nil && !goroutinemap.IsAlreadyExists(err) && !goroutinemap.IsExponentialBackoff(err) { diff --git a/pkg/kubelet/volume/reconciler/reconciler_test.go b/pkg/kubelet/volume/reconciler/reconciler_test.go index 6337e757c3..3f9c71fd4b 100644 --- a/pkg/kubelet/volume/reconciler/reconciler_test.go +++ b/pkg/kubelet/volume/reconciler/reconciler_test.go @@ -116,7 +116,7 @@ func Test_Run_Positive_VolumeAttachAndMount(t *testing.T) { volumeSpec := &volume.Spec{Volume: &pod.Spec.Volumes[0]} podName := volumehelper.GetUniquePodName(pod) - _, err := dsw.AddPodToVolume( + generatedVolumeName, err := dsw.AddPodToVolume( podName, pod, volumeSpec, volumeSpec.Name(), "" /* volumeGidValue */) // Assert @@ -126,7 +126,7 @@ func Test_Run_Positive_VolumeAttachAndMount(t *testing.T) { // Act go reconciler.Run(wait.NeverStop) - waitForAttach(t, fakePlugin, asw) + waitForMount(t, fakePlugin, generatedVolumeName, asw) // Assert assert.NoError(t, volumetesting.VerifyAttachCallCount( @@ -183,8 +183,9 @@ func Test_Run_Positive_VolumeMountControllerAttachEnabled(t *testing.T) { volumeSpec := &volume.Spec{Volume: &pod.Spec.Volumes[0]} podName := volumehelper.GetUniquePodName(pod) - _, err := dsw.AddPodToVolume( + generatedVolumeName, err := dsw.AddPodToVolume( podName, pod, volumeSpec, volumeSpec.Name(), "" /* volumeGidValue */) + dsw.MarkVolumesReportedInUse([]api.UniqueVolumeName{generatedVolumeName}) // Assert if err != nil { @@ -193,7 +194,7 @@ func Test_Run_Positive_VolumeMountControllerAttachEnabled(t *testing.T) { // Act go reconciler.Run(wait.NeverStop) - waitForAttach(t, fakePlugin, asw) + waitForMount(t, fakePlugin, generatedVolumeName, asw) // Assert assert.NoError(t, volumetesting.VerifyZeroAttachCalls(fakePlugin)) @@ -259,7 +260,7 @@ func Test_Run_Positive_VolumeAttachMountUnmountDetach(t *testing.T) { // Act go reconciler.Run(wait.NeverStop) - waitForAttach(t, fakePlugin, asw) + waitForMount(t, fakePlugin, generatedVolumeName, asw) // Assert assert.NoError(t, volumetesting.VerifyAttachCallCount( @@ -275,7 +276,7 @@ func Test_Run_Positive_VolumeAttachMountUnmountDetach(t *testing.T) { // Act dsw.DeletePodFromVolume(podName, generatedVolumeName) - waitForDetach(t, fakePlugin, asw) + waitForDetach(t, fakePlugin, generatedVolumeName, asw) // Assert assert.NoError(t, volumetesting.VerifyTearDownCallCount( @@ -338,7 +339,8 @@ func Test_Run_Positive_VolumeUnmountControllerAttachEnabled(t *testing.T) { // Act go reconciler.Run(wait.NeverStop) - waitForAttach(t, fakePlugin, asw) + dsw.MarkVolumesReportedInUse([]api.UniqueVolumeName{generatedVolumeName}) + waitForMount(t, fakePlugin, generatedVolumeName, asw) // Assert assert.NoError(t, volumetesting.VerifyZeroAttachCalls(fakePlugin)) @@ -353,7 +355,7 @@ func Test_Run_Positive_VolumeUnmountControllerAttachEnabled(t *testing.T) { // Act dsw.DeletePodFromVolume(podName, generatedVolumeName) - waitForDetach(t, fakePlugin, asw) + waitForDetach(t, fakePlugin, generatedVolumeName, asw) // Assert assert.NoError(t, volumetesting.VerifyTearDownCallCount( @@ -361,16 +363,19 @@ func Test_Run_Positive_VolumeUnmountControllerAttachEnabled(t *testing.T) { assert.NoError(t, volumetesting.VerifyZeroDetachCallCount(fakePlugin)) } -func waitForAttach( +func waitForMount( t *testing.T, fakePlugin *volumetesting.FakeVolumePlugin, + volumeName api.UniqueVolumeName, asw cache.ActualStateOfWorld) { err := retryWithExponentialBackOff( time.Duration(5*time.Millisecond), func() (bool, error) { mountedVolumes := asw.GetMountedVolumes() - if len(mountedVolumes) > 0 { - return true, nil + for _, mountedVolume := range mountedVolumes { + if mountedVolume.VolumeName == volumeName { + return true, nil + } } return false, nil @@ -378,28 +383,28 @@ func waitForAttach( ) if err != nil { - t.Fatalf("Timed out waiting for len of asw.GetMountedVolumes() to become non-zero.") + t.Fatalf("Timed out waiting for volume %q to be attached.", volumeName) } } func waitForDetach( t *testing.T, fakePlugin *volumetesting.FakeVolumePlugin, + volumeName api.UniqueVolumeName, asw cache.ActualStateOfWorld) { err := retryWithExponentialBackOff( time.Duration(5*time.Millisecond), func() (bool, error) { - attachedVolumes := asw.GetAttachedVolumes() - if len(attachedVolumes) == 0 { - return true, nil + if asw.VolumeExists(volumeName) { + return false, nil } - return false, nil + return true, nil }, ) if err != nil { - t.Fatalf("Timed out waiting for len of asw.attachedVolumes() to become zero.") + t.Fatalf("Timed out waiting for volume %q to be detached.", volumeName) } } diff --git a/pkg/kubelet/volume/volume_manager.go b/pkg/kubelet/volume/volume_manager.go index b706f811e4..3cd1d8bd26 100644 --- a/pkg/kubelet/volume/volume_manager.go +++ b/pkg/kubelet/volume/volume_manager.go @@ -102,10 +102,24 @@ type VolumeManager interface { // pod object is bad, and should be avoided. GetVolumesForPodAndAppendSupplementalGroups(pod *api.Pod) container.VolumeMap - // Returns a list of all volumes that are currently attached according to - // the actual state of the world cache and implement the volume.Attacher - // interface. + // Returns a list of all volumes that implement the volume.Attacher + // interface and are currently in use according to the actual and desired + // state of the world caches. A volume is considered "in use" as soon as it + // is added to the desired state of world, indicating it *should* be + // attached to this node and remains "in use" until it is removed from both + // the desired state of the world and the actual state of the world, or it + // has been unmounted (as indicated in actual state of world). + // TODO(#27653): VolumesInUse should be handled gracefully on kubelet' + // restarts. GetVolumesInUse() []api.UniqueVolumeName + + // VolumeIsAttached returns true if the given volume is attached to this + // node. + VolumeIsAttached(volumeName api.UniqueVolumeName) bool + + // Marks the specified volume as having successfully been reported as "in + // use" in the nodes's volume status. + MarkVolumesAsReportedInUse(volumesReportedAsInUse []api.UniqueVolumeName) } // NewVolumeManager returns a new concrete instance implementing the @@ -209,16 +223,47 @@ func (vm *volumeManager) GetVolumesForPodAndAppendSupplementalGroups( } func (vm *volumeManager) GetVolumesInUse() []api.UniqueVolumeName { - attachedVolumes := vm.actualStateOfWorld.GetAttachedVolumes() - volumesInUse := - make([]api.UniqueVolumeName, 0 /* len */, len(attachedVolumes) /* cap */) - for _, attachedVolume := range attachedVolumes { - if attachedVolume.PluginIsAttachable { - volumesInUse = append(volumesInUse, attachedVolume.VolumeName) + // Report volumes in desired state of world and actual state of world so + // that volumes are marked in use as soon as the decision is made that the + // volume *should* be attached to this node until it is safely unmounted. + desiredVolumes := vm.desiredStateOfWorld.GetVolumesToMount() + mountedVolumes := vm.actualStateOfWorld.GetGloballyMountedVolumes() + volumesToReportInUse := + make( + []api.UniqueVolumeName, + 0, /* len */ + len(desiredVolumes)+len(mountedVolumes) /* cap */) + desiredVolumesMap := + make( + map[api.UniqueVolumeName]bool, + len(desiredVolumes)+len(mountedVolumes) /* cap */) + + for _, volume := range desiredVolumes { + if volume.PluginIsAttachable { + desiredVolumesMap[volume.VolumeName] = true + volumesToReportInUse = append(volumesToReportInUse, volume.VolumeName) } } - return volumesInUse + for _, volume := range mountedVolumes { + if volume.PluginIsAttachable { + if _, exists := desiredVolumesMap[volume.VolumeName]; !exists { + volumesToReportInUse = append(volumesToReportInUse, volume.VolumeName) + } + } + } + + return volumesToReportInUse +} + +func (vm *volumeManager) VolumeIsAttached( + volumeName api.UniqueVolumeName) bool { + return vm.actualStateOfWorld.VolumeExists(volumeName) +} + +func (vm *volumeManager) MarkVolumesAsReportedInUse( + volumesReportedAsInUse []api.UniqueVolumeName) { + vm.desiredStateOfWorld.MarkVolumesReportedInUse(volumesReportedAsInUse) } // getVolumesForPodHelper is a helper method implements the common logic for diff --git a/pkg/volume/util/operationexecutor/operation_executor.go b/pkg/volume/util/operationexecutor/operation_executor.go index 25b4fb3b16..30eebab13e 100644 --- a/pkg/volume/util/operationexecutor/operation_executor.go +++ b/pkg/volume/util/operationexecutor/operation_executor.go @@ -60,8 +60,10 @@ type OperationExecutor interface { // DetachVolume detaches the volume from the node specified in // volumeToDetach, and updates the actual state of the world to reflect - // that. - DetachVolume(volumeToDetach AttachedVolume, actualStateOfWorld ActualStateOfWorldAttacherUpdater) error + // that. If verifySafeToDetach is set, a call is made to the fetch the node + // object and it is used to verify that the volume does not exist in Node's + // Status.VolumesInUse list (operation fails with error if it is). + DetachVolume(volumeToDetach AttachedVolume, verifySafeToDetach bool, actualStateOfWorld ActualStateOfWorldAttacherUpdater) error // MountVolume mounts the volume to the pod specified in volumeToMount. // Specifically it will: @@ -183,6 +185,10 @@ type VolumeToMount struct { // DevicePath contains the path on the node where the volume is attached. // For non-attachable volumes this is empty. DevicePath string + + // ReportedInUse indicates that the volume was successfully added to the + // VolumesInUse field in the node's status. + ReportedInUse bool } // AttachedVolume represents a volume that is attached to a node. @@ -335,9 +341,10 @@ func (oe *operationExecutor) AttachVolume( func (oe *operationExecutor) DetachVolume( volumeToDetach AttachedVolume, + verifySafeToDetach bool, actualStateOfWorld ActualStateOfWorldAttacherUpdater) error { detachFunc, err := - oe.generateDetachVolumeFunc(volumeToDetach, actualStateOfWorld) + oe.generateDetachVolumeFunc(volumeToDetach, verifySafeToDetach, actualStateOfWorld) if err != nil { return err } @@ -465,6 +472,7 @@ func (oe *operationExecutor) generateAttachVolumeFunc( func (oe *operationExecutor) generateDetachVolumeFunc( volumeToDetach AttachedVolume, + verifySafeToDetach bool, actualStateOfWorld ActualStateOfWorldAttacherUpdater) (func() error, error) { // Get attacher plugin attachableVolumePlugin, err := @@ -500,6 +508,44 @@ func (oe *operationExecutor) generateDetachVolumeFunc( } return func() error { + if verifySafeToDetach { + // Fetch current node object + node, fetchErr := oe.kubeClient.Core().Nodes().Get(volumeToDetach.NodeName) + if fetchErr != nil { + // On failure, return error. Caller will log and retry. + return fmt.Errorf( + "DetachVolume failed fetching node from API server for volume %q (spec.Name: %q) from node %q with: %v", + volumeToDetach.VolumeName, + volumeToDetach.VolumeSpec.Name(), + volumeToDetach.NodeName, + fetchErr) + } + + if node == nil { + // On failure, return error. Caller will log and retry. + return fmt.Errorf( + "DetachVolume failed fetching node from API server for volume %q (spec.Name: %q) from node %q. Error: node object retrieved from API server is nil.", + volumeToDetach.VolumeName, + volumeToDetach.VolumeSpec.Name(), + volumeToDetach.NodeName) + } + + for _, inUseVolume := range node.Status.VolumesInUse { + if inUseVolume == volumeToDetach.VolumeName { + return fmt.Errorf("DetachVolume failed for volume %q (spec.Name: %q) from node %q. Error: volume is still in use by node, according to Node status.", + volumeToDetach.VolumeName, + volumeToDetach.VolumeSpec.Name(), + volumeToDetach.NodeName) + } + } + + // Volume not attached, return error. Caller will log and retry. + glog.Infof("Verified volume is safe to detach for volume %q (spec.Name: %q) from node %q.", + volumeToDetach.VolumeName, + volumeToDetach.VolumeSpec.Name(), + volumeToDetach.NodeName) + } + // Execute detach detachErr := volumeDetacher.Detach(volumeName, volumeToDetach.NodeName) if detachErr != nil { @@ -864,6 +910,20 @@ func (oe *operationExecutor) generateVerifyControllerAttachedVolumeFunc( return nil } + if !volumeToMount.ReportedInUse { + // If the given volume has not yet been added to the list of + // VolumesInUse in the node's volume status, do not proceed, return + // error. Caller will log and retry. The node status is updated + // periodically by kubelet, so it may take as much as 10 seconds + // before this clears. + // Issue #28141 to enable on demand status updates. + return fmt.Errorf("Volume %q (spec.Name: %q) pod %q (UID: %q) has not yet been added to the list of VolumesInUse in the node's volume status.", + volumeToMount.VolumeName, + volumeToMount.VolumeSpec.Name(), + volumeToMount.PodName, + volumeToMount.Pod.UID) + } + // Fetch current node object node, fetchErr := oe.kubeClient.Core().Nodes().Get(nodeName) if fetchErr != nil { From e94242ed19f39596e908a155d1549912627235ab Mon Sep 17 00:00:00 2001 From: Jing Xu Date: Tue, 28 Jun 2016 13:32:57 -0700 Subject: [PATCH 261/339] Add two pd tests with default grace period Add two tests in pd.go. They are same as the flaky test, but the pod deletion has default grace period --- test/e2e/pd.go | 114 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 112 insertions(+), 2 deletions(-) diff --git a/test/e2e/pd.go b/test/e2e/pd.go index 55a7ef23e5..41de6602d3 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -75,7 +75,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { }) // Flaky-- Issue #27691 - It("[Flaky] should schedule a pod w/ a RW PD, remove it, then schedule it on another host [Slow]", func() { + It("[Flaky] should schedule a pod w/ a RW PD, ungracefully remove it, then schedule it on another host [Slow]", func() { framework.SkipUnlessProviderIs("gce", "gke", "aws") By("creating PD") @@ -111,6 +111,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, true /* shouldExist */)) By("deleting host0Pod") + // Delete pod with 0 grace period framework.ExpectNoError(podClient.Delete(host0Pod.Name, api.NewDeleteOptions(0)), "Failed to delete host0Pod") By("submitting host1Pod to kubernetes") @@ -134,8 +135,68 @@ var _ = framework.KubeDescribe("Pod Disks", func() { return }) + It("Should schedule a pod w/ a RW PD, gracefully remove it, then schedule it on another host [Slow]", func() { + framework.SkipUnlessProviderIs("gce", "gke", "aws") + + By("creating PD") + diskName, err := createPDWithRetry() + framework.ExpectNoError(err, "Error creating PD") + + host0Pod := testPDPod([]string{diskName}, host0Name, false /* readOnly */, 1 /* numContainers */) + host1Pod := testPDPod([]string{diskName}, host1Name, false /* readOnly */, 1 /* numContainers */) + containerName := "mycontainer" + + defer func() { + // Teardown pods, PD. Ignore errors. + // Teardown should do nothing unless test failed. + By("cleaning up PD-RW test environment") + podClient.Delete(host0Pod.Name, &api.DeleteOptions{}) + podClient.Delete(host1Pod.Name, &api.DeleteOptions{}) + detachAndDeletePDs(diskName, []string{host0Name, host1Name}) + }() + + By("submitting host0Pod to kubernetes") + _, err = podClient.Create(host0Pod) + framework.ExpectNoError(err, fmt.Sprintf("Failed to create host0Pod: %v", err)) + + framework.ExpectNoError(f.WaitForPodRunningSlow(host0Pod.Name)) + + testFile := "/testpd1/tracker" + testFileContents := fmt.Sprintf("%v", mathrand.Int()) + + framework.ExpectNoError(f.WriteFileViaContainer(host0Pod.Name, containerName, testFile, testFileContents)) + framework.Logf("Wrote value: %v", testFileContents) + + // Verify that disk shows up for in node 1's VolumeInUse list + framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, true /* shouldExist */)) + + By("deleting host0Pod") + // Delete pod with default grace period 30s + framework.ExpectNoError(podClient.Delete(host0Pod.Name, &api.DeleteOptions{}), "Failed to delete host0Pod") + + By("submitting host1Pod to kubernetes") + _, err = podClient.Create(host1Pod) + framework.ExpectNoError(err, "Failed to create host1Pod") + + framework.ExpectNoError(f.WaitForPodRunningSlow(host1Pod.Name)) + + v, err := f.ReadFileViaContainer(host1Pod.Name, containerName, testFile) + framework.ExpectNoError(err) + framework.Logf("Read value: %v", v) + + Expect(strings.TrimSpace(v)).To(Equal(strings.TrimSpace(testFileContents))) + + // Verify that disk is removed from node 1's VolumeInUse list + framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, false /* shouldExist */)) + + By("deleting host1Pod") + framework.ExpectNoError(podClient.Delete(host1Pod.Name, &api.DeleteOptions{}), "Failed to delete host1Pod") + + return + }) + // Flaky-- Issue #27477 - It("[Flaky] should schedule a pod w/ a readonly PD on two hosts, then remove both. [Slow]", func() { + It("[Flaky] should schedule a pod w/ a readonly PD on two hosts, then remove both ungracefully. [Slow]", func() { framework.SkipUnlessProviderIs("gce", "gke") By("creating PD") @@ -160,6 +221,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { _, err = podClient.Create(rwPod) framework.ExpectNoError(err, "Failed to create rwPod") framework.ExpectNoError(f.WaitForPodRunningSlow(rwPod.Name)) + // Delete pod with 0 grace period framework.ExpectNoError(podClient.Delete(rwPod.Name, api.NewDeleteOptions(0)), "Failed to delete host0Pod") framework.ExpectNoError(waitForPDDetach(diskName, host0Name)) @@ -182,6 +244,54 @@ var _ = framework.KubeDescribe("Pod Disks", func() { framework.ExpectNoError(podClient.Delete(host1ROPod.Name, api.NewDeleteOptions(0)), "Failed to delete host1ROPod") }) + It("Should schedule a pod w/ a readonly PD on two hosts, then remove both gracefully. [Slow]", func() { + framework.SkipUnlessProviderIs("gce", "gke") + + By("creating PD") + diskName, err := createPDWithRetry() + framework.ExpectNoError(err, "Error creating PD") + + rwPod := testPDPod([]string{diskName}, host0Name, false /* readOnly */, 1 /* numContainers */) + host0ROPod := testPDPod([]string{diskName}, host0Name, true /* readOnly */, 1 /* numContainers */) + host1ROPod := testPDPod([]string{diskName}, host1Name, true /* readOnly */, 1 /* numContainers */) + + defer func() { + By("cleaning up PD-RO test environment") + // Teardown pods, PD. Ignore errors. + // Teardown should do nothing unless test failed. + podClient.Delete(rwPod.Name, &api.DeleteOptions{}) + podClient.Delete(host0ROPod.Name, &api.DeleteOptions{}) + podClient.Delete(host1ROPod.Name, &api.DeleteOptions{}) + detachAndDeletePDs(diskName, []string{host0Name, host1Name}) + }() + + By("submitting rwPod to ensure PD is formatted") + _, err = podClient.Create(rwPod) + framework.ExpectNoError(err, "Failed to create rwPod") + framework.ExpectNoError(f.WaitForPodRunningSlow(rwPod.Name)) + // Delete pod with default grace period 30s + framework.ExpectNoError(podClient.Delete(rwPod.Name, &api.DeleteOptions{}), "Failed to delete host0Pod") + framework.ExpectNoError(waitForPDDetach(diskName, host0Name)) + + By("submitting host0ROPod to kubernetes") + _, err = podClient.Create(host0ROPod) + framework.ExpectNoError(err, "Failed to create host0ROPod") + + By("submitting host1ROPod to kubernetes") + _, err = podClient.Create(host1ROPod) + framework.ExpectNoError(err, "Failed to create host1ROPod") + + framework.ExpectNoError(f.WaitForPodRunningSlow(host0ROPod.Name)) + + framework.ExpectNoError(f.WaitForPodRunningSlow(host1ROPod.Name)) + + By("deleting host0ROPod") + framework.ExpectNoError(podClient.Delete(host0ROPod.Name, &api.DeleteOptions{}), "Failed to delete host0ROPod") + + By("deleting host1ROPod") + framework.ExpectNoError(podClient.Delete(host1ROPod.Name, &api.DeleteOptions{}), "Failed to delete host1ROPod") + }) + It("should schedule a pod w/ a RW PD shared between multiple containers, write to PD, delete pod, verify contents, and repeat in rapid succession [Slow]", func() { framework.SkipUnlessProviderIs("gce", "gke", "aws") From ec5cc596962dcd773c60391c4e4adb715c12dfc1 Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Wed, 15 Jun 2016 16:02:35 -0400 Subject: [PATCH 262/339] Remove duplicated nginx image. Use nginx-slim --- cluster/images/nginx/Dockerfile | 20 ------------- cluster/images/nginx/Makefile | 28 ------------------- cluster/images/nginx/README.md | 10 ------- cluster/images/nginx/backports.list | 1 - .../e2e-image-puller.manifest | 2 +- test/e2e/generated_clientset.go | 2 +- test/e2e/kubectl.go | 2 +- test/e2e/petset.go | 2 +- test/e2e/pods.go | 8 +++--- .../kubectl/pod-with-readiness-probe.yaml | 2 +- test/e2e_node/container_list.go | 2 +- 11 files changed, 10 insertions(+), 69 deletions(-) delete mode 100644 cluster/images/nginx/Dockerfile delete mode 100644 cluster/images/nginx/Makefile delete mode 100644 cluster/images/nginx/README.md delete mode 100644 cluster/images/nginx/backports.list diff --git a/cluster/images/nginx/Dockerfile b/cluster/images/nginx/Dockerfile deleted file mode 100644 index 145c7c1c7a..0000000000 --- a/cluster/images/nginx/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM google/debian:wheezy - -COPY backports.list /etc/apt/sources.list.d/backports.list - -RUN apt-get update -RUN apt-get -t wheezy-backports -yy -q install nginx diff --git a/cluster/images/nginx/Makefile b/cluster/images/nginx/Makefile deleted file mode 100644 index f49694695d..0000000000 --- a/cluster/images/nginx/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -### Nginx image -# This image is used to run nginx on the master. - -# Current 'live' version is v1 -# Please make sure that you update this comment if you build/push new -# versions. -VERSION=v2 - -all: - docker build -t gcr.io/google_containers/nginx:${VERSION} . - gcloud docker push gcr.io/google_containers/nginx:${VERSION} - -.PHONY: all - diff --git a/cluster/images/nginx/README.md b/cluster/images/nginx/README.md deleted file mode 100644 index e001d13ce8..0000000000 --- a/cluster/images/nginx/README.md +++ /dev/null @@ -1,10 +0,0 @@ -### Nginx image -This image is used to run nginx on the master. - -#### Instructions -make - - - - -[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/cluster/images/nginx/README.md?pixel)]() diff --git a/cluster/images/nginx/backports.list b/cluster/images/nginx/backports.list deleted file mode 100644 index 8174be2c91..0000000000 --- a/cluster/images/nginx/backports.list +++ /dev/null @@ -1 +0,0 @@ -deb http://gce_debian_mirror.storage.googleapis.com wheezy-backports main non-free diff --git a/cluster/saltbase/salt/e2e-image-puller/e2e-image-puller.manifest b/cluster/saltbase/salt/e2e-image-puller/e2e-image-puller.manifest index e17aefdd49..e1a76d04a5 100644 --- a/cluster/saltbase/salt/e2e-image-puller/e2e-image-puller.manifest +++ b/cluster/saltbase/salt/e2e-image-puller/e2e-image-puller.manifest @@ -27,7 +27,7 @@ spec: command: - /bin/sh - -c - - "for i in gcr.io/google_containers/busybox gcr.io/google_containers/busybox:1.24 gcr.io/google_containers/dnsutils:e2e gcr.io/google_containers/eptest:0.1 gcr.io/google_containers/fakegitserver:0.1 gcr.io/google_containers/hostexec:1.2 gcr.io/google_containers/iperf:e2e gcr.io/google_containers/jessie-dnsutils:e2e gcr.io/google_containers/liveness:e2e gcr.io/google_containers/mounttest:0.2 gcr.io/google_containers/mounttest:0.5 gcr.io/google_containers/mounttest:0.6 gcr.io/google_containers/mounttest-user:0.3 gcr.io/google_containers/netexec:1.4 gcr.io/google_containers/netexec:1.5 gcr.io/google_containers/nettest:1.7 gcr.io/google_containers/nettest:1.8 gcr.io/google_containers/nginx:1.7.9 gcr.io/google_containers/nginx-slim:0.5 gcr.io/google_containers/n-way-http:1.0 gcr.io/google_containers/pause:2.0 gcr.io/google_containers/pause-amd64:3.0 gcr.io/google_containers/porter:cd5cb5791ebaa8641955f0e8c2a9bed669b1eaab gcr.io/google_containers/portforwardtester:1.0 gcr.io/google_containers/redis:e2e gcr.io/google_containers/resource_consumer:beta4 gcr.io/google_containers/resource_consumer/controller:beta4 gcr.io/google_containers/serve_hostname:v1.4 gcr.io/google_containers/servicelb:0.1 gcr.io/google_containers/test-webserver:e2e gcr.io/google_containers/ubuntu:14.04 gcr.io/google_containers/update-demo:kitten gcr.io/google_containers/update-demo:nautilus gcr.io/google_containers/volume-ceph:0.1 gcr.io/google_containers/volume-gluster:0.2 gcr.io/google_containers/volume-iscsi:0.1 gcr.io/google_containers/volume-nfs:0.6 gcr.io/google_containers/volume-rbd:0.1 gcr.io/google_samples/gb-redisslave:v1; do echo $(date '+%X') pulling $i; docker pull $i 1>/dev/null; done; exit 0;" + - "for i in gcr.io/google_containers/busybox gcr.io/google_containers/busybox:1.24 gcr.io/google_containers/dnsutils:e2e gcr.io/google_containers/eptest:0.1 gcr.io/google_containers/fakegitserver:0.1 gcr.io/google_containers/hostexec:1.2 gcr.io/google_containers/iperf:e2e gcr.io/google_containers/jessie-dnsutils:e2e gcr.io/google_containers/liveness:e2e gcr.io/google_containers/mounttest:0.2 gcr.io/google_containers/mounttest:0.5 gcr.io/google_containers/mounttest:0.6 gcr.io/google_containers/mounttest-user:0.3 gcr.io/google_containers/netexec:1.4 gcr.io/google_containers/netexec:1.5 gcr.io/google_containers/nettest:1.7 gcr.io/google_containers/nettest:1.8 gcr.io/google_containers/nginx-slim:0.7 gcr.io/google_containers/n-way-http:1.0 gcr.io/google_containers/pause:2.0 gcr.io/google_containers/pause-amd64:3.0 gcr.io/google_containers/porter:cd5cb5791ebaa8641955f0e8c2a9bed669b1eaab gcr.io/google_containers/portforwardtester:1.0 gcr.io/google_containers/redis:e2e gcr.io/google_containers/resource_consumer:beta4 gcr.io/google_containers/resource_consumer/controller:beta4 gcr.io/google_containers/serve_hostname:v1.4 gcr.io/google_containers/test-webserver:e2e gcr.io/google_containers/ubuntu:14.04 gcr.io/google_containers/update-demo:kitten gcr.io/google_containers/update-demo:nautilus gcr.io/google_containers/volume-ceph:0.1 gcr.io/google_containers/volume-gluster:0.2 gcr.io/google_containers/volume-iscsi:0.1 gcr.io/google_containers/volume-nfs:0.6 gcr.io/google_containers/volume-rbd:0.1 gcr.io/google_samples/gb-redisslave:v1; do echo $(date '+%X') pulling $i; docker pull $i 1>/dev/null; done; exit 0;" securityContext: privileged: true volumeMounts: diff --git a/test/e2e/generated_clientset.go b/test/e2e/generated_clientset.go index 1432144dac..78fd4b9162 100644 --- a/test/e2e/generated_clientset.go +++ b/test/e2e/generated_clientset.go @@ -47,7 +47,7 @@ func testingPod(name, value string) v1.Pod { Containers: []v1.Container{ { Name: "nginx", - Image: "gcr.io/google_containers/nginx:1.7.9", + Image: "gcr.io/google_containers/nginx-slim:0.7", Ports: []v1.ContainerPort{{ContainerPort: 80}}, LivenessProbe: &v1.Probe{ Handler: v1.Handler{ diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index e147cbd512..111b71d53e 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -83,7 +83,7 @@ const ( pausePodName = "pause" runJobTimeout = 5 * time.Minute busyboxImage = "gcr.io/google_containers/busybox:1.24" - nginxImage = "gcr.io/google_containers/nginx:1.7.9" + nginxImage = "gcr.io/google_containers/nginx-slim:0.7" kubeCtlManifestPath = "test/e2e/testing-manifests/kubectl" redisControllerFilename = "redis-master-controller.json" redisServiceFilename = "redis-master-service.json" diff --git a/test/e2e/petset.go b/test/e2e/petset.go index d50d10b30b..db177e4653 100644 --- a/test/e2e/petset.go +++ b/test/e2e/petset.go @@ -737,7 +737,7 @@ func newPetSet(name, ns, governingSvcName string, replicas int, petMounts []api. Containers: []api.Container{ { Name: "nginx", - Image: "gcr.io/google_containers/nginx-slim:0.5", + Image: "gcr.io/google_containers/nginx-slim:0.7", VolumeMounts: mounts, }, }, diff --git a/test/e2e/pods.go b/test/e2e/pods.go index a7d96dc33f..8af49303b7 100644 --- a/test/e2e/pods.go +++ b/test/e2e/pods.go @@ -281,7 +281,7 @@ var _ = framework.KubeDescribe("Pods", func() { Containers: []api.Container{ { Name: "nginx", - Image: "gcr.io/google_containers/nginx:1.7.9", + Image: "gcr.io/google_containers/nginx-slim:0.7", Ports: []api.ContainerPort{{ContainerPort: 80}}, LivenessProbe: &api.Probe{ Handler: api.Handler{ @@ -428,7 +428,7 @@ var _ = framework.KubeDescribe("Pods", func() { Containers: []api.Container{ { Name: "nginx", - Image: "gcr.io/google_containers/nginx:1.7.9", + Image: "gcr.io/google_containers/nginx-slim:0.7", Ports: []api.ContainerPort{{ContainerPort: 80}}, LivenessProbe: &api.Probe{ Handler: api.Handler{ @@ -514,7 +514,7 @@ var _ = framework.KubeDescribe("Pods", func() { Containers: []api.Container{ { Name: "nginx", - Image: "gcr.io/google_containers/nginx:1.7.9", + Image: "gcr.io/google_containers/nginx-slim:0.7", Ports: []api.ContainerPort{{ContainerPort: 80}}, LivenessProbe: &api.Probe{ Handler: api.Handler{ @@ -1351,7 +1351,7 @@ var _ = framework.KubeDescribe("Pods", func() { if err != nil { framework.Failf("failed to get pod: %v", err) } - pod.Spec.Containers[0].Image = "gcr.io/google_containers/nginx:1.7.9" + pod.Spec.Containers[0].Image = "gcr.io/google_containers/nginx-slim:0.7" pod, err = podClient.Update(pod) if err != nil { framework.Failf("error updating pod=%s/%s %v", podName, containerName, err) diff --git a/test/e2e/testing-manifests/kubectl/pod-with-readiness-probe.yaml b/test/e2e/testing-manifests/kubectl/pod-with-readiness-probe.yaml index 187a90f803..e4a595d14a 100644 --- a/test/e2e/testing-manifests/kubectl/pod-with-readiness-probe.yaml +++ b/test/e2e/testing-manifests/kubectl/pod-with-readiness-probe.yaml @@ -7,7 +7,7 @@ metadata: spec: containers: - name: nginx - image: gcr.io/google_containers/nginx:1.7.9 + image: gcr.io/google_containers/nginx-slim:0.7 ports: - containerPort: 80 readinessProbe: diff --git a/test/e2e_node/container_list.go b/test/e2e_node/container_list.go index 0eddc28e76..0a75e6f265 100644 --- a/test/e2e_node/container_list.go +++ b/test/e2e_node/container_list.go @@ -48,7 +48,7 @@ var ImageRegistry = map[int]string{ busyBoxImage: "gcr.io/google_containers/busybox:1.24", hostExecImage: "gcr.io/google_containers/hostexec:1.2", netExecImage: "gcr.io/google_containers/netexec:1.4", - nginxImage: "gcr.io/google_containers/nginx:1.7.9", + nginxImage: "gcr.io/google_containers/nginx-slim:0.7", pauseImage: framework.GetPauseImageNameForHostArch(), } From 42827482b2fc23b05eb4606b4d20425cd7df57ce Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Tue, 28 Jun 2016 10:53:50 -0700 Subject: [PATCH 263/339] Build: Add KUBE_GCS_RELEASE_BUCKET_MIRROR option to push-ci-build.sh And start pushing to new CI bucket as well. --- build/common.sh | 26 ++++++++++++++++++++++++-- build/push-ci-build.sh | 1 + 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/build/common.sh b/build/common.sh index d4301bc23e..6984e2d147 100755 --- a/build/common.sh +++ b/build/common.sh @@ -1229,6 +1229,16 @@ function kube::release::gcs::copy_release_artifacts() { fi gsutil ls -lhr "${gcs_destination}" || return 1 + + if [[ -n "${KUBE_GCS_RELEASE_BUCKET_MIRROR:-}" ]]; then + local -r gcs_mirror="gs://${KUBE_GCS_RELEASE_BUCKET_MIRROR}/${KUBE_GCS_RELEASE_PREFIX}" + kube::log::status "Mirroring build to ${gcs_mirror}" + gsutil -q -m "${gcs_options[@]+${gcs_options[@]}}" rsync -d -r "${gcs_destination}" "${gcs_mirror}" || return 1 + if [[ ${KUBE_GCS_MAKE_PUBLIC} =~ ^[yY]$ ]]; then + kube::log::status "Marking all uploaded mirror objects public" + gsutil -q -m acl ch -R -g all:R "${gcs_mirror}" >/dev/null 2>&1 || return 1 + fi + fi } # Publish a new ci version, (latest,) but only if the release files actually @@ -1493,7 +1503,19 @@ function kube::release::gcs::verify_ci_ge() { # If new version is greater than the GCS version function kube::release::gcs::publish() { local -r publish_file="${1-}" - local -r publish_file_dst="gs://${KUBE_GCS_RELEASE_BUCKET}/${publish_file}" + + kube::release::gcs::publish_to_bucket "${KUBE_GCS_RELEASE_BUCKET}" "${publish_file}" || return 1 + + if [[ -n "${KUBE_GCS_RELEASE_BUCKET_MIRROR:-}" ]]; then + kube::release::gcs::publish_to_bucket "${KUBE_GCS_RELEASE_BUCKET_MIRROR}" "${publish_file}" || return 1 + fi +} + + +function kube::release::gcs::publish_to_bucket() { + local -r publish_bucket="${1}" + local -r publish_file="${2}" + local -r publish_file_dst="gs://${publish_bucket}/${publish_file}" mkdir -p "${RELEASE_STAGE}/upload" || return 1 echo "${KUBE_GCS_PUBLISH_VERSION}" > "${RELEASE_STAGE}/upload/latest" || return 1 @@ -1506,7 +1528,7 @@ function kube::release::gcs::publish() { gsutil acl ch -R -g all:R "${publish_file_dst}" >/dev/null 2>&1 || return 1 gsutil setmeta -h "Cache-Control:private, max-age=0" "${publish_file_dst}" >/dev/null 2>&1 || return 1 # If public, validate public link - local -r public_link="https://storage.googleapis.com/${KUBE_GCS_RELEASE_BUCKET}/${publish_file}" + local -r public_link="https://storage.googleapis.com/${publish_bucket}/${publish_file}" kube::log::status "Validating uploaded version file at ${public_link}" contents="$(curl -s "${public_link}")" else diff --git a/build/push-ci-build.sh b/build/push-ci-build.sh index 6d74878ffa..4e131ad60e 100755 --- a/build/push-ci-build.sh +++ b/build/push-ci-build.sh @@ -31,6 +31,7 @@ KUBE_GCS_MAKE_PUBLIC='y' KUBE_GCS_UPLOAD_RELEASE='y' KUBE_GCS_DELETE_EXISTING='n' : ${KUBE_GCS_RELEASE_BUCKET:='kubernetes-release'} +: ${KUBE_GCS_RELEASE_BUCKET_MIRROR:='kubernetes-release-dev'} KUBE_GCS_RELEASE_PREFIX="ci/${LATEST}" KUBE_GCS_PUBLISH_VERSION="${LATEST}" From 92485326b1bd40ca6377fc184bdb7dddde3b3391 Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Tue, 28 Jun 2016 16:42:26 -0700 Subject: [PATCH 264/339] Change references to gs://kubernetes-release/ci Change over to gs://kubernetes-release-dev/ci. This should be all the places we reference gs://kubernetes-release/ci or https://storage.googleapis.com/kubernetes-release/ci. I'm happy to be wrong. Follow-on to #28172 --- cluster/common.sh | 15 ++++++++++----- cluster/gce/upgrade.sh | 2 +- docs/devel/getting-builds.md | 6 +++--- hack/get-build.sh | 3 ++- hack/jenkins/e2e-runner.sh | 23 +++++++++++++---------- 5 files changed, 29 insertions(+), 20 deletions(-) diff --git a/cluster/common.sh b/cluster/common.sh index 5765228d0b..aa662f9248 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -292,7 +292,7 @@ function detect-master-from-kubeconfig() { # Sets KUBE_VERSION variable to the proper version number (e.g. "v1.0.6", # "v1.2.0-alpha.1.881+376438b69c7612") or a version' publication of the form -# / (e.g. "release/stable",' "ci/latest-1"). +# / (e.g. "release/stable",' "ci/latest-1"). # # See the docs on getting builds for more information about version # publication. @@ -303,7 +303,12 @@ function detect-master-from-kubeconfig() { # KUBE_VERSION function set_binary_version() { if [[ "${1}" =~ "/" ]]; then - KUBE_VERSION=$(gsutil cat gs://kubernetes-release/${1}.txt) + IFS='/' read -a path <<< "${1}" + if [[ "${path[0]}" == "release" ]]; then + KUBE_VERSION=$(gsutil cat "gs://kubernetes-release/${1}.txt") + else + KUBE_VERSION=$(gsutil cat "gs://kubernetes-release-dev/${1}.txt") + fi else KUBE_VERSION=${1} fi @@ -334,8 +339,8 @@ function tars_from_version() { KUBE_MANIFESTS_TAR_URL="${SERVER_BINARY_TAR_URL/server-linux-amd64/manifests}" KUBE_MANIFESTS_TAR_HASH=$(curl ${KUBE_MANIFESTS_TAR_URL} | sha1sum | awk '{print $1}') elif [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then - SERVER_BINARY_TAR_URL="https://storage.googleapis.com/kubernetes-release/ci/${KUBE_VERSION}/kubernetes-server-linux-amd64.tar.gz" - SALT_TAR_URL="https://storage.googleapis.com/kubernetes-release/ci/${KUBE_VERSION}/kubernetes-salt.tar.gz" + SERVER_BINARY_TAR_URL="https://storage.googleapis.com/kubernetes-release-dev/ci/${KUBE_VERSION}/kubernetes-server-linux-amd64.tar.gz" + SALT_TAR_URL="https://storage.googleapis.com/kubernetes-release-dev/ci/${KUBE_VERSION}/kubernetes-salt.tar.gz" # TODO: Clean this up. KUBE_MANIFESTS_TAR_URL="${SERVER_BINARY_TAR_URL/server-linux-amd64/manifests}" KUBE_MANIFESTS_TAR_HASH=$(curl ${KUBE_MANIFESTS_TAR_URL} | sha1sum | awk '{print $1}') @@ -484,7 +489,7 @@ function build-runtime-config() { if [[ -n ${appends} ]]; then if [[ -n ${RUNTIME_CONFIG} ]]; then RUNTIME_CONFIG="${RUNTIME_CONFIG},${appends}" - else + else RUNTIME_CONFIG="${appends}" fi fi diff --git a/cluster/gce/upgrade.sh b/cluster/gce/upgrade.sh index 5b56a0759c..cb9f8139c7 100755 --- a/cluster/gce/upgrade.sh +++ b/cluster/gce/upgrade.sh @@ -59,7 +59,7 @@ function usage() { release_stable=$(gsutil cat gs://kubernetes-release/release/stable.txt) release_latest=$(gsutil cat gs://kubernetes-release/release/latest.txt) - ci_latest=$(gsutil cat gs://kubernetes-release/ci/latest.txt) + ci_latest=$(gsutil cat gs://kubernetes-release-dev/ci/latest.txt) echo "Right now, versions are as follows:" echo " release/stable: ${0} ${release_stable}" diff --git a/docs/devel/getting-builds.md b/docs/devel/getting-builds.md index bd6143d521..52e9c193f5 100644 --- a/docs/devel/getting-builds.md +++ b/docs/devel/getting-builds.md @@ -59,9 +59,9 @@ Finally, you can just print the latest or stable version: You can also use the gsutil tool to explore the Google Cloud Storage release buckets. Here are some examples: ```sh -gsutil cat gs://kubernetes-release/ci/latest.txt # output the latest ci version number -gsutil cat gs://kubernetes-release/ci/latest-green.txt # output the latest ci version number that passed gce e2e -gsutil ls gs://kubernetes-release/ci/v0.20.0-29-g29a55cc/ # list the contents of a ci release +gsutil cat gs://kubernetes-release-dev/ci/latest.txt # output the latest ci version number +gsutil cat gs://kubernetes-release-dev/ci/latest-green.txt # output the latest ci version number that passed gce e2e +gsutil ls gs://kubernetes-release-dev/ci/v0.20.0-29-g29a55cc/ # list the contents of a ci release gsutil ls gs://kubernetes-release/release # list all official releases and rcs ``` diff --git a/hack/get-build.sh b/hack/get-build.sh index 8771a3a7c5..baff5f4abb 100755 --- a/hack/get-build.sh +++ b/hack/get-build.sh @@ -23,6 +23,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. source "${KUBE_ROOT}/cluster/common.sh" declare -r KUBE_RELEASE_BUCKET_URL="https://storage.googleapis.com/kubernetes-release" +declare -r KUBE_DEV_RELEASE_BUCKET_URL="https://storage.googleapis.com/kubernetes-release-dev" declare -r KUBE_TAR_NAME="kubernetes.tar.gz" usage() { @@ -74,7 +75,7 @@ else if [[ ${KUBE_VERSION} =~ ${KUBE_RELEASE_VERSION_REGEX} ]]; then curl --fail -o "kubernetes-${KUBE_VERSION}.tar.gz" "${KUBE_RELEASE_BUCKET_URL}/release/${KUBE_VERSION}/${KUBE_TAR_NAME}" elif [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then - curl --fail -o "kubernetes-${KUBE_VERSION}.tar.gz" "${KUBE_RELEASE_BUCKET_URL}/ci/${KUBE_VERSION}/${KUBE_TAR_NAME}" + curl --fail -o "kubernetes-${KUBE_VERSION}.tar.gz" "${KUBE_DEV_RELEASE_BUCKET_URL}/ci/${KUBE_VERSION}/${KUBE_TAR_NAME}" else echo "Version doesn't match regexp" >&2 exit 1 diff --git a/hack/jenkins/e2e-runner.sh b/hack/jenkins/e2e-runner.sh index a8583e6b64..c951dfb683 100755 --- a/hack/jenkins/e2e-runner.sh +++ b/hack/jenkins/e2e-runner.sh @@ -22,6 +22,7 @@ set -o pipefail set -o xtrace : ${KUBE_GCS_RELEASE_BUCKET:="kubernetes-release"} +: ${KUBE_GCS_DEV_RELEASE_BUCKET:="kubernetes-release-dev"} function running_in_docker() { grep -q docker /proc/self/cgroup @@ -47,10 +48,15 @@ function fetch_server_version_tars() { function fetch_published_version_tars() { local -r published_version="${1}" IFS='/' read -a varr <<< "${published_version}" - bucket="${varr[0]}" - build_version=$(gsutil cat gs://${KUBE_GCS_RELEASE_BUCKET}/${published_version}.txt) + path="${varr[0]}" + if [[ "${path}" == "release" ]]; then + local -r bucket="${KUBE_GCS_RELEASE_BUCKET}" + else + local -r bucket="${KUBE_GCS_DEV_RELEASE_BUCKET}" + fi + build_version=$(gsutil cat "gs://${bucket}/${published_version}.txt") echo "Using published version $bucket/$build_version (from ${published_version})" - fetch_tars_from_gcs "${bucket}" "${build_version}" + fetch_tars_from_gcs "gs://${bucket}/${path}" "${build_version}" unpack_binaries # Set CLUSTER_API_VERSION for GKE CI export CLUSTER_API_VERSION=$(echo ${build_version} | cut -c 2-) @@ -64,13 +70,10 @@ function clean_binaries() { } function fetch_tars_from_gcs() { - local -r bucket="${1}" + local -r gspath="${1}" local -r build_version="${2}" - echo "Pulling binaries from GCS; using server version ${bucket}/${build_version}." - gsutil -mq cp \ - "gs://${KUBE_GCS_RELEASE_BUCKET}/${bucket}/${build_version}/kubernetes.tar.gz" \ - "gs://${KUBE_GCS_RELEASE_BUCKET}/${bucket}/${build_version}/kubernetes-test.tar.gz" \ - . + echo "Pulling binaries from GCS; using server version ${gspath}/${build_version}." + gsutil -mq cp "${gspath}/${build_version}/kubernetes.tar.gz" "${gspath}/${build_version}/kubernetes-test.tar.gz" . } function unpack_binaries() { @@ -190,7 +193,7 @@ function e2e_test() { if [[ "${E2E_PUBLISH_GREEN_VERSION:-}" == "true" && ${exitcode} == 0 ]]; then # Use plaintext version file packaged with kubernetes.tar.gz echo "Publish version to ci/latest-green.txt: $(cat version)" - gsutil cp ./version gs://kubernetes-release/ci/latest-green.txt + gsutil cp ./version "gs://${KUBE_GCS_DEV_RELEASE_BUCKET}/ci/latest-green.txt" fi } From 3778ca196ee06816816305bb90ebb861f9c5478b Mon Sep 17 00:00:00 2001 From: Girish Kalele Date: Tue, 24 May 2016 11:35:45 -0700 Subject: [PATCH 265/339] Remove comment about empty selectors --- api/swagger-spec/v1.json | 2 +- docs/api-reference/v1/definitions.html | 4 ++-- pkg/api/v1/generated.proto | 2 +- pkg/api/v1/types.go | 2 +- pkg/api/v1/types_swagger_doc_generated.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/swagger-spec/v1.json b/api/swagger-spec/v1.json index c2a1b3a7ea..a55b9a04f7 100644 --- a/api/swagger-spec/v1.json +++ b/api/swagger-spec/v1.json @@ -19226,7 +19226,7 @@ }, "selector": { "type": "object", - "description": "This service will route traffic to pods having labels matching this selector. Label keys and values that must match in order to receive traffic for this service. If empty, all pods are selected, if not specified, endpoints must be manually specified. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview" + "description": "This service will route traffic to pods having labels matching this selector. Label keys and values that must match in order to receive traffic for this service. If not specified, endpoints must be manually specified and the system will not automatically manage them. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview" }, "clusterIP": { "type": "string", diff --git a/docs/api-reference/v1/definitions.html b/docs/api-reference/v1/definitions.html index fe8c19f020..904a97d2b0 100755 --- a/docs/api-reference/v1/definitions.html +++ b/docs/api-reference/v1/definitions.html @@ -7885,7 +7885,7 @@ The resulting set of endpoints can be viewed as:

selector

-

This service will route traffic to pods having labels matching this selector. Label keys and values that must match in order to receive traffic for this service. If empty, all pods are selected, if not specified, endpoints must be manually specified. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview

+

This service will route traffic to pods having labels matching this selector. Label keys and values that must match in order to receive traffic for this service. If not specified, endpoints must be manually specified and the system will not automatically manage them. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview

false

object

@@ -8153,7 +8153,7 @@ The resulting set of endpoints can be viewed as:
diff --git a/pkg/api/v1/generated.proto b/pkg/api/v1/generated.proto index 249b9ddbae..2964344f2d 100644 --- a/pkg/api/v1/generated.proto +++ b/pkg/api/v1/generated.proto @@ -2676,7 +2676,7 @@ message ServiceSpec { // This service will route traffic to pods having labels matching this selector. // Label keys and values that must match in order to receive traffic for this service. - // If empty, all pods are selected, if not specified, endpoints must be manually specified. + // If not specified, endpoints must be manually specified and the system will not automatically manage them. // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview map selector = 2; diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index 5079c36f75..d527484db6 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -2048,7 +2048,7 @@ type ServiceSpec struct { // This service will route traffic to pods having labels matching this selector. // Label keys and values that must match in order to receive traffic for this service. - // If empty, all pods are selected, if not specified, endpoints must be manually specified. + // If not specified, endpoints must be manually specified and the system will not automatically manage them. // More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,2,rep,name=selector"` diff --git a/pkg/api/v1/types_swagger_doc_generated.go b/pkg/api/v1/types_swagger_doc_generated.go index 26b45ccaf5..1c10626fd0 100644 --- a/pkg/api/v1/types_swagger_doc_generated.go +++ b/pkg/api/v1/types_swagger_doc_generated.go @@ -1614,7 +1614,7 @@ func (ServiceProxyOptions) SwaggerDoc() map[string]string { var map_ServiceSpec = map[string]string{ "": "ServiceSpec describes the attributes that a user creates on a service.", "ports": "The list of ports that are exposed by this service. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies", - "selector": "This service will route traffic to pods having labels matching this selector. Label keys and values that must match in order to receive traffic for this service. If empty, all pods are selected, if not specified, endpoints must be manually specified. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview", + "selector": "This service will route traffic to pods having labels matching this selector. Label keys and values that must match in order to receive traffic for this service. If not specified, endpoints must be manually specified and the system will not automatically manage them. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#overview", "clusterIP": "ClusterIP is usually assigned by the master and is the IP address of the service. If specified, it will be allocated to the service if it is unused or else creation of the service will fail. Valid values are None, empty string (\"\"), or a valid IP address. 'None' can be specified for a headless service when proxying is not required. Cannot be updated. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#virtual-ips-and-service-proxies", "type": "Type of exposed service. Must be ClusterIP, NodePort, or LoadBalancer. Defaults to ClusterIP. More info: http://releases.k8s.io/HEAD/docs/user-guide/services.md#external-services", "externalIPs": "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. A previous form of this functionality exists as the deprecatedPublicIPs field. When using this field, callers should also clear the deprecatedPublicIPs field.", From 88b10b1dc04c6a64469e01b2350f8acee42199c9 Mon Sep 17 00:00:00 2001 From: nikhiljindal Date: Tue, 28 Jun 2016 13:37:03 -0700 Subject: [PATCH 266/339] Removing unneeded fields from Cluster API object --- .../apis/federation/deep_copy_generated.go | 36 -- federation/apis/federation/types.generated.go | 441 +++-------------- federation/apis/federation/types.go | 11 - .../v1alpha1/conversion_generated.go | 59 --- .../v1alpha1/deep_copy_generated.go | 36 -- .../apis/federation/v1alpha1/generated.pb.go | 451 ------------------ .../apis/federation/v1alpha1/generated.proto | 15 - .../federation/v1alpha1/types.generated.go | 443 +++-------------- federation/apis/federation/v1alpha1/types.go | 11 - pkg/kubectl/describe.go | 16 - pkg/kubectl/describe_test.go | 2 +- pkg/kubectl/resource_printer.go | 3 +- 12 files changed, 125 insertions(+), 1399 deletions(-) diff --git a/federation/apis/federation/deep_copy_generated.go b/federation/apis/federation/deep_copy_generated.go index e9936ff49e..0b03ff9b3a 100644 --- a/federation/apis/federation/deep_copy_generated.go +++ b/federation/apis/federation/deep_copy_generated.go @@ -22,7 +22,6 @@ package federation import ( api "k8s.io/kubernetes/pkg/api" - resource "k8s.io/kubernetes/pkg/api/resource" unversioned "k8s.io/kubernetes/pkg/api/unversioned" conversion "k8s.io/kubernetes/pkg/conversion" ) @@ -32,7 +31,6 @@ func init() { DeepCopy_federation_Cluster, DeepCopy_federation_ClusterCondition, DeepCopy_federation_ClusterList, - DeepCopy_federation_ClusterMeta, DeepCopy_federation_ClusterSpec, DeepCopy_federation_ClusterStatus, DeepCopy_federation_ServerAddressByClientCIDR, @@ -93,11 +91,6 @@ func DeepCopy_federation_ClusterList(in ClusterList, out *ClusterList, c *conver return nil } -func DeepCopy_federation_ClusterMeta(in ClusterMeta, out *ClusterMeta, c *conversion.Cloner) error { - out.Version = in.Version - return nil -} - func DeepCopy_federation_ClusterSpec(in ClusterSpec, out *ClusterSpec, c *conversion.Cloner) error { if in.ServerAddressByClientCIDRs != nil { in, out := in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs @@ -134,35 +127,6 @@ func DeepCopy_federation_ClusterStatus(in ClusterStatus, out *ClusterStatus, c * } else { out.Conditions = nil } - if in.Capacity != nil { - in, out := in.Capacity, &out.Capacity - *out = make(api.ResourceList) - for key, val := range in { - newVal := new(resource.Quantity) - if err := resource.DeepCopy_resource_Quantity(val, newVal, c); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Capacity = nil - } - if in.Allocatable != nil { - in, out := in.Allocatable, &out.Allocatable - *out = make(api.ResourceList) - for key, val := range in { - newVal := new(resource.Quantity) - if err := resource.DeepCopy_resource_Quantity(val, newVal, c); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Allocatable = nil - } - if err := DeepCopy_federation_ClusterMeta(in.ClusterMeta, &out.ClusterMeta, c); err != nil { - return err - } if in.Zones != nil { in, out := in.Zones, &out.Zones *out = make([]string, len(in)) diff --git a/federation/apis/federation/types.generated.go b/federation/apis/federation/types.generated.go index 483b5e8a44..95ebc5994b 100644 --- a/federation/apis/federation/types.generated.go +++ b/federation/apis/federation/types.generated.go @@ -26,9 +26,8 @@ import ( "fmt" codec1978 "github.com/ugorji/go/codec" pkg1_api "k8s.io/kubernetes/pkg/api" - pkg3_resource "k8s.io/kubernetes/pkg/api/resource" pkg2_unversioned "k8s.io/kubernetes/pkg/api/unversioned" - pkg4_types "k8s.io/kubernetes/pkg/types" + pkg3_types "k8s.io/kubernetes/pkg/types" "reflect" "runtime" time "time" @@ -65,11 +64,10 @@ func init() { } if false { // reference the types, but skip this branch at build/run time var v0 pkg1_api.LocalObjectReference - var v1 pkg3_resource.Quantity - var v2 pkg2_unversioned.Time - var v3 pkg4_types.UID - var v4 time.Time - _, _, _, _, _ = v0, v1, v2, v3, v4 + var v1 pkg2_unversioned.Time + var v2 pkg3_types.UID + var v3 time.Time + _, _, _, _ = v0, v1, v2, v3 } } @@ -985,175 +983,6 @@ func (x *ClusterCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *ClusterMeta) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [1]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Version != "" - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(1) - } else { - yynn2 = 0 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Version)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("version")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Version)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ClusterMeta) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap1234 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray1234 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ClusterMeta) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3 := string(yys3Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3 { - case "version": - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ClusterMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = string(r.DecodeString()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj5-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -1168,18 +997,15 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [6]bool + var yyq2 [3]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = len(x.Conditions) != 0 - yyq2[1] = len(x.Capacity) != 0 - yyq2[2] = len(x.Allocatable) != 0 - yyq2[3] = len(x.Zones) != 0 - yyq2[4] = x.Region != "" - yyq2[5] = x.Version != "" + yyq2[1] = len(x.Zones) != 0 + yyq2[2] = x.Region != "" var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(6) + r.EncodeArrayStart(3) } else { yynn2 = 0 for _, b := range yyq2 { @@ -1226,79 +1052,29 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[1] { - if x.Capacity == nil { + if x.Zones == nil { r.EncodeNil() } else { - yysf7 := &x.Capacity - yysf7.CodecEncodeSelf(e) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncSliceStringV(x.Zones, false, e) + } } } else { r.EncodeNil() } } else { if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("capacity")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Capacity == nil { - r.EncodeNil() - } else { - yysf8 := &x.Capacity - yysf8.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - if x.Allocatable == nil { - r.EncodeNil() - } else { - yysf10 := &x.Allocatable - yysf10.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("allocatable")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Allocatable == nil { - r.EncodeNil() - } else { - yysf11 := &x.Allocatable - yysf11.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { - if x.Zones == nil { - r.EncodeNil() - } else { - yym13 := z.EncBinary() - _ = yym13 - if false { - } else { - z.F.EncSliceStringV(x.Zones, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("zones")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Zones == nil { r.EncodeNil() } else { - yym14 := z.EncBinary() - _ = yym14 + yym8 := z.EncBinary() + _ = yym8 if false { } else { z.F.EncSliceStringV(x.Zones, false, e) @@ -1308,9 +1084,9 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - yym16 := z.EncBinary() - _ = yym16 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Region)) @@ -1319,43 +1095,18 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2[4] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("region")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym17 := z.EncBinary() - _ = yym17 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Region)) } } } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[5] { - yym19 := z.EncBinary() - _ = yym19 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Version)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("version")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym20 := z.EncBinary() - _ = yym20 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Version)) - } - } - } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -1429,30 +1180,16 @@ func (x *ClusterStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { h.decSliceClusterCondition((*[]ClusterCondition)(yyv4), d) } } - case "capacity": - if r.TryDecodeAsNil() { - x.Capacity = nil - } else { - yyv6 := &x.Capacity - yyv6.CodecDecodeSelf(d) - } - case "allocatable": - if r.TryDecodeAsNil() { - x.Allocatable = nil - } else { - yyv7 := &x.Allocatable - yyv7.CodecDecodeSelf(d) - } case "zones": if r.TryDecodeAsNil() { x.Zones = nil } else { - yyv8 := &x.Zones - yym9 := z.DecBinary() - _ = yym9 + yyv6 := &x.Zones + yym7 := z.DecBinary() + _ = yym7 if false { } else { - z.F.DecSliceStringX(yyv8, false, d) + z.F.DecSliceStringX(yyv6, false, d) } } case "region": @@ -1461,12 +1198,6 @@ func (x *ClusterStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } else { x.Region = string(r.DecodeString()) } - case "version": - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = string(r.DecodeString()) - } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -1478,16 +1209,16 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb12 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb12 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1495,55 +1226,21 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv13 := &x.Conditions - yym14 := z.DecBinary() - _ = yym14 + yyv10 := &x.Conditions + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceClusterCondition((*[]ClusterCondition)(yyv13), d) + h.decSliceClusterCondition((*[]ClusterCondition)(yyv10), d) } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb12 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb12 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Capacity = nil - } else { - yyv15 := &x.Capacity - yyv15.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Allocatable = nil - } else { - yyv16 := &x.Allocatable - yyv16.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1551,21 +1248,21 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Zones = nil } else { - yyv17 := &x.Zones - yym18 := z.DecBinary() - _ = yym18 + yyv12 := &x.Zones + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecSliceStringX(yyv17, false, d) + z.F.DecSliceStringX(yyv12, false, d) } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb12 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb12 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1575,34 +1272,18 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Region = string(r.DecodeString()) } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = string(r.DecodeString()) - } for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb12 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb12 { + if yyb9 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj12-1, "") + z.DecStructFieldNotFound(yyj9-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2571,7 +2252,7 @@ func (x codecSelfer1234) decSliceCluster(v *[]Cluster, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 368) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 336) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/federation/apis/federation/types.go b/federation/apis/federation/types.go index f8980823ed..10a9d8beee 100644 --- a/federation/apis/federation/types.go +++ b/federation/apis/federation/types.go @@ -71,21 +71,10 @@ type ClusterCondition struct { Message string `json:"message,omitempty"` } -// Cluster metadata -type ClusterMeta struct { - // Release version of the cluster. - Version string `json:"version,omitempty"` -} - // ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally. type ClusterStatus struct { // Conditions is an array of current cluster conditions. Conditions []ClusterCondition `json:"conditions,omitempty"` - // Capacity represents the total resources of the cluster - Capacity api.ResourceList `json:"capacity,omitempty"` - // Allocatable represents the total resources of a cluster that are available for scheduling. - Allocatable api.ResourceList `json:"allocatable,omitempty"` - ClusterMeta `json:",inline"` // Zones is the list of avaliability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. // These will always be in the same region. Zones []string `json:"zones,omitempty"` diff --git a/federation/apis/federation/v1alpha1/conversion_generated.go b/federation/apis/federation/v1alpha1/conversion_generated.go index d09902d996..b308a39887 100644 --- a/federation/apis/federation/v1alpha1/conversion_generated.go +++ b/federation/apis/federation/v1alpha1/conversion_generated.go @@ -23,7 +23,6 @@ package v1alpha1 import ( federation "k8s.io/kubernetes/federation/apis/federation" api "k8s.io/kubernetes/pkg/api" - resource "k8s.io/kubernetes/pkg/api/resource" v1 "k8s.io/kubernetes/pkg/api/v1" conversion "k8s.io/kubernetes/pkg/conversion" ) @@ -36,8 +35,6 @@ func init() { Convert_federation_ClusterCondition_To_v1alpha1_ClusterCondition, Convert_v1alpha1_ClusterList_To_federation_ClusterList, Convert_federation_ClusterList_To_v1alpha1_ClusterList, - Convert_v1alpha1_ClusterMeta_To_federation_ClusterMeta, - Convert_federation_ClusterMeta_To_v1alpha1_ClusterMeta, Convert_v1alpha1_ClusterSpec_To_federation_ClusterSpec, Convert_federation_ClusterSpec_To_v1alpha1_ClusterSpec, Convert_v1alpha1_ClusterStatus_To_federation_ClusterStatus, @@ -178,24 +175,6 @@ func Convert_federation_ClusterList_To_v1alpha1_ClusterList(in *federation.Clust return autoConvert_federation_ClusterList_To_v1alpha1_ClusterList(in, out, s) } -func autoConvert_v1alpha1_ClusterMeta_To_federation_ClusterMeta(in *ClusterMeta, out *federation.ClusterMeta, s conversion.Scope) error { - out.Version = in.Version - return nil -} - -func Convert_v1alpha1_ClusterMeta_To_federation_ClusterMeta(in *ClusterMeta, out *federation.ClusterMeta, s conversion.Scope) error { - return autoConvert_v1alpha1_ClusterMeta_To_federation_ClusterMeta(in, out, s) -} - -func autoConvert_federation_ClusterMeta_To_v1alpha1_ClusterMeta(in *federation.ClusterMeta, out *ClusterMeta, s conversion.Scope) error { - out.Version = in.Version - return nil -} - -func Convert_federation_ClusterMeta_To_v1alpha1_ClusterMeta(in *federation.ClusterMeta, out *ClusterMeta, s conversion.Scope) error { - return autoConvert_federation_ClusterMeta_To_v1alpha1_ClusterMeta(in, out, s) -} - func autoConvert_v1alpha1_ClusterSpec_To_federation_ClusterSpec(in *ClusterSpec, out *federation.ClusterSpec, s conversion.Scope) error { if in.ServerAddressByClientCIDRs != nil { in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs @@ -266,15 +245,6 @@ func autoConvert_v1alpha1_ClusterStatus_To_federation_ClusterStatus(in *ClusterS } else { out.Conditions = nil } - if err := v1.Convert_v1_ResourceList_To_api_ResourceList(&in.Capacity, &out.Capacity, s); err != nil { - return err - } - if err := v1.Convert_v1_ResourceList_To_api_ResourceList(&in.Allocatable, &out.Allocatable, s); err != nil { - return err - } - if err := Convert_v1alpha1_ClusterMeta_To_federation_ClusterMeta(&in.ClusterMeta, &out.ClusterMeta, s); err != nil { - return err - } out.Zones = in.Zones out.Region = in.Region return nil @@ -296,35 +266,6 @@ func autoConvert_federation_ClusterStatus_To_v1alpha1_ClusterStatus(in *federati } else { out.Conditions = nil } - if in.Capacity != nil { - in, out := &in.Capacity, &out.Capacity - *out = make(v1.ResourceList, len(*in)) - for key, val := range *in { - newVal := new(resource.Quantity) - if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil { - return err - } - (*out)[v1.ResourceName(key)] = *newVal - } - } else { - out.Capacity = nil - } - if in.Allocatable != nil { - in, out := &in.Allocatable, &out.Allocatable - *out = make(v1.ResourceList, len(*in)) - for key, val := range *in { - newVal := new(resource.Quantity) - if err := api.Convert_resource_Quantity_To_resource_Quantity(&val, newVal, s); err != nil { - return err - } - (*out)[v1.ResourceName(key)] = *newVal - } - } else { - out.Allocatable = nil - } - if err := Convert_federation_ClusterMeta_To_v1alpha1_ClusterMeta(&in.ClusterMeta, &out.ClusterMeta, s); err != nil { - return err - } out.Zones = in.Zones out.Region = in.Region return nil diff --git a/federation/apis/federation/v1alpha1/deep_copy_generated.go b/federation/apis/federation/v1alpha1/deep_copy_generated.go index 52e672ccb2..64217a1d1a 100644 --- a/federation/apis/federation/v1alpha1/deep_copy_generated.go +++ b/federation/apis/federation/v1alpha1/deep_copy_generated.go @@ -22,7 +22,6 @@ package v1alpha1 import ( api "k8s.io/kubernetes/pkg/api" - resource "k8s.io/kubernetes/pkg/api/resource" unversioned "k8s.io/kubernetes/pkg/api/unversioned" v1 "k8s.io/kubernetes/pkg/api/v1" conversion "k8s.io/kubernetes/pkg/conversion" @@ -33,7 +32,6 @@ func init() { DeepCopy_v1alpha1_Cluster, DeepCopy_v1alpha1_ClusterCondition, DeepCopy_v1alpha1_ClusterList, - DeepCopy_v1alpha1_ClusterMeta, DeepCopy_v1alpha1_ClusterSpec, DeepCopy_v1alpha1_ClusterStatus, DeepCopy_v1alpha1_ServerAddressByClientCIDR, @@ -94,11 +92,6 @@ func DeepCopy_v1alpha1_ClusterList(in ClusterList, out *ClusterList, c *conversi return nil } -func DeepCopy_v1alpha1_ClusterMeta(in ClusterMeta, out *ClusterMeta, c *conversion.Cloner) error { - out.Version = in.Version - return nil -} - func DeepCopy_v1alpha1_ClusterSpec(in ClusterSpec, out *ClusterSpec, c *conversion.Cloner) error { if in.ServerAddressByClientCIDRs != nil { in, out := in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs @@ -135,35 +128,6 @@ func DeepCopy_v1alpha1_ClusterStatus(in ClusterStatus, out *ClusterStatus, c *co } else { out.Conditions = nil } - if in.Capacity != nil { - in, out := in.Capacity, &out.Capacity - *out = make(v1.ResourceList) - for key, val := range in { - newVal := new(resource.Quantity) - if err := resource.DeepCopy_resource_Quantity(val, newVal, c); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Capacity = nil - } - if in.Allocatable != nil { - in, out := in.Allocatable, &out.Allocatable - *out = make(v1.ResourceList) - for key, val := range in { - newVal := new(resource.Quantity) - if err := resource.DeepCopy_resource_Quantity(val, newVal, c); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Allocatable = nil - } - if err := DeepCopy_v1alpha1_ClusterMeta(in.ClusterMeta, &out.ClusterMeta, c); err != nil { - return err - } if in.Zones != nil { in, out := in.Zones, &out.Zones *out = make([]string, len(in)) diff --git a/federation/apis/federation/v1alpha1/generated.pb.go b/federation/apis/federation/v1alpha1/generated.pb.go index dbb8c8ad32..2d700bcd0d 100644 --- a/federation/apis/federation/v1alpha1/generated.pb.go +++ b/federation/apis/federation/v1alpha1/generated.pb.go @@ -28,7 +28,6 @@ limitations under the License. Cluster ClusterCondition ClusterList - ClusterMeta ClusterSpec ClusterStatus ServerAddressByClientCIDR @@ -39,8 +38,6 @@ import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import k8s_io_kubernetes_pkg_api_resource "k8s.io/kubernetes/pkg/api/resource" - import k8s_io_kubernetes_pkg_api_v1 "k8s.io/kubernetes/pkg/api/v1" import io "io" @@ -62,10 +59,6 @@ func (m *ClusterList) Reset() { *m = ClusterList{} } func (m *ClusterList) String() string { return proto.CompactTextString(m) } func (*ClusterList) ProtoMessage() {} -func (m *ClusterMeta) Reset() { *m = ClusterMeta{} } -func (m *ClusterMeta) String() string { return proto.CompactTextString(m) } -func (*ClusterMeta) ProtoMessage() {} - func (m *ClusterSpec) Reset() { *m = ClusterSpec{} } func (m *ClusterSpec) String() string { return proto.CompactTextString(m) } func (*ClusterSpec) ProtoMessage() {} @@ -82,7 +75,6 @@ func init() { proto.RegisterType((*Cluster)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.Cluster") proto.RegisterType((*ClusterCondition)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.ClusterCondition") proto.RegisterType((*ClusterList)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.ClusterList") - proto.RegisterType((*ClusterMeta)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.ClusterMeta") proto.RegisterType((*ClusterSpec)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.ClusterSpec") proto.RegisterType((*ClusterStatus)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.ClusterStatus") proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.ServerAddressByClientCIDR") @@ -217,28 +209,6 @@ func (m *ClusterList) MarshalTo(data []byte) (int, error) { return i, nil } -func (m *ClusterMeta) Marshal() (data []byte, err error) { - size := m.Size() - data = make([]byte, size) - n, err := m.MarshalTo(data) - if err != nil { - return nil, err - } - return data[:n], nil -} - -func (m *ClusterMeta) MarshalTo(data []byte) (int, error) { - var i int - _ = i - var l int - _ = l - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(m.Version))) - i += copy(data[i:], m.Version) - return i, nil -} - func (m *ClusterSpec) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) @@ -306,58 +276,6 @@ func (m *ClusterStatus) MarshalTo(data []byte) (int, error) { i += n } } - if len(m.Capacity) > 0 { - for k := range m.Capacity { - data[i] = 0x12 - i++ - v := m.Capacity[k] - msgSize := (&v).Size() - mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(msgSize)) - i = encodeVarintGenerated(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n8, err := (&v).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n8 - } - } - if len(m.Allocatable) > 0 { - for k := range m.Allocatable { - data[i] = 0x1a - i++ - v := m.Allocatable[k] - msgSize := (&v).Size() - mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + msgSize + sovGenerated(uint64(msgSize)) - i = encodeVarintGenerated(data, i, uint64(mapSize)) - data[i] = 0xa - i++ - i = encodeVarintGenerated(data, i, uint64(len(k))) - i += copy(data[i:], k) - data[i] = 0x12 - i++ - i = encodeVarintGenerated(data, i, uint64((&v).Size())) - n9, err := (&v).MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n9 - } - } - data[i] = 0x22 - i++ - i = encodeVarintGenerated(data, i, uint64(m.ClusterMeta.Size())) - n10, err := m.ClusterMeta.MarshalTo(data[i:]) - if err != nil { - return 0, err - } - i += n10 if len(m.Zones) > 0 { for _, s := range m.Zones { data[i] = 0x2a @@ -477,14 +395,6 @@ func (m *ClusterList) Size() (n int) { return n } -func (m *ClusterMeta) Size() (n int) { - var l int - _ = l - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - func (m *ClusterSpec) Size() (n int) { var l int _ = l @@ -510,26 +420,6 @@ func (m *ClusterStatus) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } - if len(m.Capacity) > 0 { - for k, v := range m.Capacity { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.Allocatable) > 0 { - for k, v := range m.Allocatable { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - l = m.ClusterMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) if len(m.Zones) > 0 { for _, s := range m.Zones { l = len(s) @@ -1041,85 +931,6 @@ func (m *ClusterList) Unmarshal(data []byte) error { } return nil } -func (m *ClusterMeta) Unmarshal(data []byte) error { - l := len(data) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterMeta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(data[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(data[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ClusterSpec) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 @@ -1294,268 +1105,6 @@ func (m *ClusterStatus) Unmarshal(data []byte) error { return err } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := k8s_io_kubernetes_pkg_api_v1.ResourceName(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.Capacity == nil { - m.Capacity = make(k8s_io_kubernetes_pkg_api_v1.ResourceList) - } - m.Capacity[k8s_io_kubernetes_pkg_api_v1.ResourceName(mapkey)] = *mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Allocatable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := k8s_io_kubernetes_pkg_api_v1.ResourceName(data[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &k8s_io_kubernetes_pkg_api_resource.Quantity{} - if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - if m.Allocatable == nil { - m.Allocatable = make(k8s_io_kubernetes_pkg_api_v1.ResourceList) - } - m.Allocatable[k8s_io_kubernetes_pkg_api_v1.ResourceName(mapkey)] = *mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := data[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ClusterMeta.Unmarshal(data[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Zones", wireType) diff --git a/federation/apis/federation/v1alpha1/generated.proto b/federation/apis/federation/v1alpha1/generated.proto index ddc9fd32c1..560a30f052 100644 --- a/federation/apis/federation/v1alpha1/generated.proto +++ b/federation/apis/federation/v1alpha1/generated.proto @@ -21,7 +21,6 @@ syntax = 'proto2'; package k8s.io.kubernetes.federation.apis.federation.v1alpha1; -import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; @@ -73,12 +72,6 @@ message ClusterList { repeated Cluster items = 2; } -// Cluster metadata -message ClusterMeta { - // Release version of the cluster. - optional string version = 1; -} - // ClusterSpec describes the attributes of a kubernetes cluster. message ClusterSpec { // A map of client CIDR to server address. @@ -100,14 +93,6 @@ message ClusterStatus { // Conditions is an array of current cluster conditions. repeated ClusterCondition conditions = 1; - // Capacity represents the total resources of the cluster - map capacity = 2; - - // Allocatable represents the total resources of a cluster that are available for scheduling. - map allocatable = 3; - - optional ClusterMeta clusterMeta = 4; - // Zones is the list of avaliability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. // These will always be in the same region. repeated string zones = 5; diff --git a/federation/apis/federation/v1alpha1/types.generated.go b/federation/apis/federation/v1alpha1/types.generated.go index 8dd23421d5..5034cab934 100644 --- a/federation/apis/federation/v1alpha1/types.generated.go +++ b/federation/apis/federation/v1alpha1/types.generated.go @@ -25,10 +25,9 @@ import ( "errors" "fmt" codec1978 "github.com/ugorji/go/codec" - pkg3_resource "k8s.io/kubernetes/pkg/api/resource" pkg2_unversioned "k8s.io/kubernetes/pkg/api/unversioned" pkg1_v1 "k8s.io/kubernetes/pkg/api/v1" - pkg4_types "k8s.io/kubernetes/pkg/types" + pkg3_types "k8s.io/kubernetes/pkg/types" "reflect" "runtime" time "time" @@ -64,12 +63,11 @@ func init() { panic(err) } if false { // reference the types, but skip this branch at build/run time - var v0 pkg3_resource.Quantity - var v1 pkg2_unversioned.Time - var v2 pkg1_v1.LocalObjectReference - var v3 pkg4_types.UID - var v4 time.Time - _, _, _, _, _ = v0, v1, v2, v3, v4 + var v0 pkg2_unversioned.Time + var v1 pkg1_v1.LocalObjectReference + var v2 pkg3_types.UID + var v3 time.Time + _, _, _, _ = v0, v1, v2, v3 } } @@ -985,175 +983,6 @@ func (x *ClusterCondition) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } -func (x *ClusterMeta) CodecEncodeSelf(e *codec1978.Encoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperEncoder(e) - _, _, _ = h, z, r - if x == nil { - r.EncodeNil() - } else { - yym1 := z.EncBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else { - yysep2 := !z.EncBinary() - yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [1]bool - _, _, _ = yysep2, yyq2, yy2arr2 - const yyr2 bool = false - yyq2[0] = x.Version != "" - var yynn2 int - if yyr2 || yy2arr2 { - r.EncodeArrayStart(1) - } else { - yynn2 = 0 - for _, b := range yyq2 { - if b { - yynn2++ - } - } - r.EncodeMapStart(yynn2) - yynn2 = 0 - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[0] { - yym4 := z.EncBinary() - _ = yym4 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Version)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[0] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("version")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym5 := z.EncBinary() - _ = yym5 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Version)) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - z.EncSendContainerState(codecSelfer_containerMapEnd1234) - } - } - } -} - -func (x *ClusterMeta) CodecDecodeSelf(d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 - if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else { - yyct2 := r.ContainerType() - if yyct2 == codecSelferValueTypeMap1234 { - yyl2 := r.ReadMapStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerMapEnd1234) - } else { - x.codecDecodeSelfFromMap(yyl2, d) - } - } else if yyct2 == codecSelferValueTypeArray1234 { - yyl2 := r.ReadArrayStart() - if yyl2 == 0 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - } else { - x.codecDecodeSelfFromArray(yyl2, d) - } - } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234) - } - } -} - -func (x *ClusterMeta) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc - var yyhl3 bool = l >= 0 - for yyj3 := 0; ; yyj3++ { - if yyhl3 { - if yyj3 >= l { - break - } - } else { - if r.CheckBreak() { - break - } - } - z.DecSendContainerState(codecSelfer_containerMapKey1234) - yys3Slc = r.DecodeBytes(yys3Slc, true, true) - yys3 := string(yys3Slc) - z.DecSendContainerState(codecSelfer_containerMapValue1234) - switch yys3 { - case "version": - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = string(r.DecodeString()) - } - default: - z.DecStructFieldNotFound(-1, yys3) - } // end switch yys3 - } // end for yyj3 - z.DecSendContainerState(codecSelfer_containerMapEnd1234) -} - -func (x *ClusterMeta) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { - var h codecSelfer1234 - z, r := codec1978.GenHelperDecoder(d) - _, _, _ = h, z, r - var yyj5 int - var yyb5 bool - var yyhl5 bool = l >= 0 - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = string(r.DecodeString()) - } - for { - yyj5++ - if yyhl5 { - yyb5 = yyj5 > l - } else { - yyb5 = r.CheckBreak() - } - if yyb5 { - break - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj5-1, "") - } - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) -} - func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) { var h codecSelfer1234 z, r := codec1978.GenHelperEncoder(e) @@ -1168,18 +997,15 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [6]bool + var yyq2 [3]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = len(x.Conditions) != 0 - yyq2[1] = len(x.Capacity) != 0 - yyq2[2] = len(x.Allocatable) != 0 - yyq2[3] = len(x.Zones) != 0 - yyq2[4] = x.Region != "" - yyq2[5] = x.Version != "" + yyq2[1] = len(x.Zones) != 0 + yyq2[2] = x.Region != "" var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(6) + r.EncodeArrayStart(3) } else { yynn2 = 0 for _, b := range yyq2 { @@ -1226,79 +1052,29 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[1] { - if x.Capacity == nil { + if x.Zones == nil { r.EncodeNil() } else { - yysf7 := &x.Capacity - yysf7.CodecEncodeSelf(e) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + z.F.EncSliceStringV(x.Zones, false, e) + } } } else { r.EncodeNil() } } else { if yyq2[1] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("capacity")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Capacity == nil { - r.EncodeNil() - } else { - yysf8 := &x.Capacity - yysf8.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[2] { - if x.Allocatable == nil { - r.EncodeNil() - } else { - yysf10 := &x.Allocatable - yysf10.CodecEncodeSelf(e) - } - } else { - r.EncodeNil() - } - } else { - if yyq2[2] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("allocatable")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - if x.Allocatable == nil { - r.EncodeNil() - } else { - yysf11 := &x.Allocatable - yysf11.CodecEncodeSelf(e) - } - } - } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[3] { - if x.Zones == nil { - r.EncodeNil() - } else { - yym13 := z.EncBinary() - _ = yym13 - if false { - } else { - z.F.EncSliceStringV(x.Zones, false, e) - } - } - } else { - r.EncodeNil() - } - } else { - if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("zones")) z.EncSendContainerState(codecSelfer_containerMapValue1234) if x.Zones == nil { r.EncodeNil() } else { - yym14 := z.EncBinary() - _ = yym14 + yym8 := z.EncBinary() + _ = yym8 if false { } else { z.F.EncSliceStringV(x.Zones, false, e) @@ -1308,9 +1084,9 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) { } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[4] { - yym16 := z.EncBinary() - _ = yym16 + if yyq2[2] { + yym10 := z.EncBinary() + _ = yym10 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Region)) @@ -1319,43 +1095,18 @@ func (x *ClusterStatus) CodecEncodeSelf(e *codec1978.Encoder) { r.EncodeString(codecSelferC_UTF81234, "") } } else { - if yyq2[4] { + if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) r.EncodeString(codecSelferC_UTF81234, string("region")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym17 := z.EncBinary() - _ = yym17 + yym11 := z.EncBinary() + _ = yym11 if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.Region)) } } } - if yyr2 || yy2arr2 { - z.EncSendContainerState(codecSelfer_containerArrayElem1234) - if yyq2[5] { - yym19 := z.EncBinary() - _ = yym19 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Version)) - } - } else { - r.EncodeString(codecSelferC_UTF81234, "") - } - } else { - if yyq2[5] { - z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("version")) - z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym20 := z.EncBinary() - _ = yym20 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Version)) - } - } - } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayEnd1234) } else { @@ -1429,30 +1180,16 @@ func (x *ClusterStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { h.decSliceClusterCondition((*[]ClusterCondition)(yyv4), d) } } - case "capacity": - if r.TryDecodeAsNil() { - x.Capacity = nil - } else { - yyv6 := &x.Capacity - yyv6.CodecDecodeSelf(d) - } - case "allocatable": - if r.TryDecodeAsNil() { - x.Allocatable = nil - } else { - yyv7 := &x.Allocatable - yyv7.CodecDecodeSelf(d) - } case "zones": if r.TryDecodeAsNil() { x.Zones = nil } else { - yyv8 := &x.Zones - yym9 := z.DecBinary() - _ = yym9 + yyv6 := &x.Zones + yym7 := z.DecBinary() + _ = yym7 if false { } else { - z.F.DecSliceStringX(yyv8, false, d) + z.F.DecSliceStringX(yyv6, false, d) } } case "region": @@ -1461,12 +1198,6 @@ func (x *ClusterStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { } else { x.Region = string(r.DecodeString()) } - case "version": - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = string(r.DecodeString()) - } default: z.DecStructFieldNotFound(-1, yys3) } // end switch yys3 @@ -1478,16 +1209,16 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj12 int - var yyb12 bool - var yyhl12 bool = l >= 0 - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + var yyj9 int + var yyb9 bool + var yyhl9 bool = l >= 0 + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb12 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb12 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1495,55 +1226,21 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Conditions = nil } else { - yyv13 := &x.Conditions - yym14 := z.DecBinary() - _ = yym14 + yyv10 := &x.Conditions + yym11 := z.DecBinary() + _ = yym11 if false { } else { - h.decSliceClusterCondition((*[]ClusterCondition)(yyv13), d) + h.decSliceClusterCondition((*[]ClusterCondition)(yyv10), d) } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb12 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb12 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Capacity = nil - } else { - yyv15 := &x.Capacity - yyv15.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Allocatable = nil - } else { - yyv16 := &x.Allocatable - yyv16.CodecDecodeSelf(d) - } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1551,21 +1248,21 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Zones = nil } else { - yyv17 := &x.Zones - yym18 := z.DecBinary() - _ = yym18 + yyv12 := &x.Zones + yym13 := z.DecBinary() + _ = yym13 if false { } else { - z.F.DecSliceStringX(yyv17, false, d) + z.F.DecSliceStringX(yyv12, false, d) } } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb12 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb12 { + if yyb9 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -1575,34 +1272,18 @@ func (x *ClusterStatus) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Region = string(r.DecodeString()) } - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l - } else { - yyb12 = r.CheckBreak() - } - if yyb12 { - z.DecSendContainerState(codecSelfer_containerArrayEnd1234) - return - } - z.DecSendContainerState(codecSelfer_containerArrayElem1234) - if r.TryDecodeAsNil() { - x.Version = "" - } else { - x.Version = string(r.DecodeString()) - } for { - yyj12++ - if yyhl12 { - yyb12 = yyj12 > l + yyj9++ + if yyhl9 { + yyb9 = yyj9 > l } else { - yyb12 = r.CheckBreak() + yyb9 = r.CheckBreak() } - if yyb12 { + if yyb9 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj12-1, "") + z.DecStructFieldNotFound(yyj9-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -2571,7 +2252,7 @@ func (x codecSelfer1234) decSliceCluster(v *[]Cluster, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 368) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 336) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/federation/apis/federation/v1alpha1/types.go b/federation/apis/federation/v1alpha1/types.go index be2dd8f4d9..d53d6aa939 100644 --- a/federation/apis/federation/v1alpha1/types.go +++ b/federation/apis/federation/v1alpha1/types.go @@ -71,21 +71,10 @@ type ClusterCondition struct { Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` } -// Cluster metadata -type ClusterMeta struct { - // Release version of the cluster. - Version string `json:"version,omitempty" protobuf:"bytes,1,opt,name=version"` -} - // ClusterStatus is information about the current status of a cluster updated by cluster controller peridocally. type ClusterStatus struct { // Conditions is an array of current cluster conditions. Conditions []ClusterCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"` - // Capacity represents the total resources of the cluster - Capacity v1.ResourceList `json:"capacity,omitempty" protobuf:"bytes,2,rep,name=capacity,casttype=k8s.io/kubernetes/pkg/api/v1.ResourceList,castkey=k8s.io/kubernetes/pkg/api/v1.ResourceName"` - // Allocatable represents the total resources of a cluster that are available for scheduling. - Allocatable v1.ResourceList `json:"allocatable,omitempty" protobuf:"bytes,3,rep,name=allocatable,casttype=k8s.io/kubernetes/pkg/api/v1.ResourceList,castkey=k8s.io/kubernetes/pkg/api/v1.ResourceName"` - ClusterMeta `json:",inline" protobuf:"bytes,4,opt,name=clusterMeta"` // Zones is the list of avaliability zones in which the nodes of the cluster exist, e.g. 'us-east1-a'. // These will always be in the same region. Zones []string `json:"zones,omitempty" protobuf:"bytes,5,rep,name=zones"` diff --git a/pkg/kubectl/describe.go b/pkg/kubectl/describe.go index a29725c381..adf7593f3a 100644 --- a/pkg/kubectl/describe.go +++ b/pkg/kubectl/describe.go @@ -2116,22 +2116,6 @@ func describeCluster(cluster *federation.Cluster) (string, error) { c.Message) } } - - fmt.Fprintf(out, "Version:\t%s\n", cluster.Status.Version) - - if len(cluster.Status.Capacity) > 0 { - fmt.Fprintf(out, "Capacity:\n") - for resource, value := range cluster.Status.Capacity { - fmt.Fprintf(out, " %s:\t%s\n", resource, value.String()) - } - } - - if len(cluster.Status.Allocatable) > 0 { - fmt.Fprintf(out, "Allocatable:\n") - for resource, value := range cluster.Status.Allocatable { - fmt.Fprintf(out, " %s:\t%s\n", resource, value.String()) - } - } return nil }) } diff --git a/pkg/kubectl/describe_test.go b/pkg/kubectl/describe_test.go index 3ce344fe91..38119186b3 100644 --- a/pkg/kubectl/describe_test.go +++ b/pkg/kubectl/describe_test.go @@ -568,7 +568,7 @@ func TestDescribeCluster(t *testing.T) { if err != nil { t.Errorf("unexpected error: %v", err) } - if !strings.Contains(out, "foo") || !strings.Contains(out, "Version:") { + if !strings.Contains(out, "foo") { t.Errorf("unexpected out: %s", out) } } diff --git a/pkg/kubectl/resource_printer.go b/pkg/kubectl/resource_printer.go index 39c65fcfb9..54bc7b4e5d 100644 --- a/pkg/kubectl/resource_printer.go +++ b/pkg/kubectl/resource_printer.go @@ -863,10 +863,9 @@ func printCluster(c *federation.Cluster, w io.Writer, options PrintOptions) erro statuses = append(statuses, "Unknown") } - if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", + if _, err := fmt.Fprintf(w, "%s\t%s\t%s\n", c.Name, strings.Join(statuses, ","), - c.Status.Version, translateTimestamp(c.CreationTimestamp), ); err != nil { return err From 7fcf8daf6b1f60a21dd39c6556214f01e44795f9 Mon Sep 17 00:00:00 2001 From: nikhiljindal Date: Tue, 28 Jun 2016 14:17:40 -0700 Subject: [PATCH 267/339] Moving federation/v1alpha1 to federation/v1beta1 --- cmd/libs/go2idl/conversion-gen/main.go | 2 +- cmd/libs/go2idl/deepcopy-gen/main.go | 2 +- .../go2idl/go-to-protobuf/protobuf/cmd.go | 2 +- federation/apis/federation/install/install.go | 10 +- .../apis/federation/install/install_test.go | 4 +- .../v1alpha1/conversion_generated.go | 296 ------------------ .../{v1alpha1 => v1beta1}/conversion.go | 2 +- .../v1beta1/conversion_generated.go | 296 ++++++++++++++++++ .../deep_copy_generated.go | 36 +-- .../{v1alpha1 => v1beta1}/defaults.go | 2 +- .../federation/{v1alpha1 => v1beta1}/doc.go | 2 +- .../{v1alpha1 => v1beta1}/generated.pb.go | 20 +- .../{v1alpha1 => v1beta1}/generated.proto | 5 +- .../{v1alpha1 => v1beta1}/register.go | 4 +- .../{v1alpha1 => v1beta1}/types.generated.go | 2 +- .../federation/{v1alpha1 => v1beta1}/types.go | 2 +- federation/client/cache/cluster_cache.go | 12 +- .../federation_release_1_3/clientset.go | 14 +- .../federation_release_1_3/doc.go | 2 +- .../fake/clientset_generated.go | 8 +- .../federation_release_1_3/fake/doc.go | 2 +- .../typed/core/v1/doc.go | 2 +- .../typed/core/v1/fake/doc.go | 2 +- .../{v1alpha1 => v1beta1}/cluster.go | 40 +-- .../federation/{v1alpha1 => v1beta1}/doc.go | 4 +- .../{v1alpha1 => v1beta1}/fake/doc.go | 2 +- .../fake/fake_cluster.go | 46 +-- .../fake/fake_federation_client.go | 4 +- .../federation_client.go | 2 +- .../generated_expansion.go | 2 +- .../federation-apiserver/app/federation.go | 2 +- .../federation-apiserver/app/server_test.go | 2 +- .../cluster/cluster_client.go | 24 +- .../cluster/clustercontroller.go | 14 +- .../cluster/clustercontroller_test.go | 22 +- .../service/cluster_helper.go | 14 +- .../service/endpoint_helper_test.go | 10 +- .../service/servicecontroller.go | 14 +- .../service/servicecontroller_test.go | 22 +- .../util/cluster_util.go | 6 +- hack/test-go.sh | 2 +- hack/update-codegen.sh | 2 +- 42 files changed, 482 insertions(+), 481 deletions(-) delete mode 100644 federation/apis/federation/v1alpha1/conversion_generated.go rename federation/apis/federation/{v1alpha1 => v1beta1}/conversion.go (98%) create mode 100644 federation/apis/federation/v1beta1/conversion_generated.go rename federation/apis/federation/{v1alpha1 => v1beta1}/deep_copy_generated.go (70%) rename federation/apis/federation/{v1alpha1 => v1beta1}/defaults.go (97%) rename federation/apis/federation/{v1alpha1 => v1beta1}/doc.go (97%) rename federation/apis/federation/{v1alpha1 => v1beta1}/generated.pb.go (98%) rename federation/apis/federation/{v1alpha1 => v1beta1}/generated.proto (96%) rename federation/apis/federation/{v1alpha1 => v1beta1}/register.go (97%) rename federation/apis/federation/{v1alpha1 => v1beta1}/types.generated.go (99%) rename federation/apis/federation/{v1alpha1 => v1beta1}/types.go (99%) rename federation/client/clientset_generated/federation_release_1_3/typed/federation/{v1alpha1 => v1beta1}/cluster.go (75%) rename federation/client/clientset_generated/federation_release_1_3/typed/federation/{v1alpha1 => v1beta1}/doc.go (96%) rename federation/client/clientset_generated/federation_release_1_3/typed/federation/{v1alpha1 => v1beta1}/fake/doc.go (97%) rename federation/client/clientset_generated/federation_release_1_3/typed/federation/{v1alpha1 => v1beta1}/fake/fake_cluster.go (65%) rename federation/client/clientset_generated/federation_release_1_3/typed/federation/{v1alpha1 => v1beta1}/fake/fake_federation_client.go (84%) rename federation/client/clientset_generated/federation_release_1_3/typed/federation/{v1alpha1 => v1beta1}/federation_client.go (99%) rename federation/client/clientset_generated/federation_release_1_3/typed/federation/{v1alpha1 => v1beta1}/generated_expansion.go (97%) diff --git a/cmd/libs/go2idl/conversion-gen/main.go b/cmd/libs/go2idl/conversion-gen/main.go index 527763ee0c..e64e40c8bc 100644 --- a/cmd/libs/go2idl/conversion-gen/main.go +++ b/cmd/libs/go2idl/conversion-gen/main.go @@ -57,7 +57,7 @@ func main() { "k8s.io/kubernetes/pkg/apis/rbac", "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1", "k8s.io/kubernetes/federation/apis/federation", - "k8s.io/kubernetes/federation/apis/federation/v1alpha1", + "k8s.io/kubernetes/federation/apis/federation/v1beta1", "k8s.io/kubernetes/pkg/conversion", "k8s.io/kubernetes/pkg/runtime", } diff --git a/cmd/libs/go2idl/deepcopy-gen/main.go b/cmd/libs/go2idl/deepcopy-gen/main.go index c757fd0ab7..c38c5624f3 100644 --- a/cmd/libs/go2idl/deepcopy-gen/main.go +++ b/cmd/libs/go2idl/deepcopy-gen/main.go @@ -75,7 +75,7 @@ func main() { "k8s.io/kubernetes/pkg/apis/rbac", "k8s.io/kubernetes/pkg/apis/rbac/v1alpha1", "k8s.io/kubernetes/federation/apis/federation", - "k8s.io/kubernetes/federation/apis/federation/v1alpha1", + "k8s.io/kubernetes/federation/apis/federation/v1beta1", } if err := arguments.Execute( diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go index c2a75461fa..9362244dab 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go @@ -73,7 +73,7 @@ func New() *Generator { `k8s.io/kubernetes/pkg/apis/batch/v2alpha1`, `k8s.io/kubernetes/pkg/apis/apps/v1alpha1`, `k8s.io/kubernetes/pkg/apis/rbac/v1alpha1`, - `k8s.io/kubernetes/federation/apis/federation/v1alpha1`, + `k8s.io/kubernetes/federation/apis/federation/v1beta1`, `k8s.io/kubernetes/pkg/apis/certificates/v1alpha1`, }, ","), DropEmbeddedFields: "k8s.io/kubernetes/pkg/api/unversioned.TypeMeta", diff --git a/federation/apis/federation/install/install.go b/federation/apis/federation/install/install.go index 4c09c75d9a..a1dc24cab5 100644 --- a/federation/apis/federation/install/install.go +++ b/federation/apis/federation/install/install.go @@ -22,7 +22,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/federation/apis/federation" - "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" "k8s.io/kubernetes/pkg/api/unversioned" @@ -37,7 +37,7 @@ const importPrefix = "k8s.io/kubernetes/federation/apis/federation" var accessor = meta.NewAccessor() // availableVersions lists all known external versions for this group from most preferred to least preferred -var availableVersions = []unversioned.GroupVersion{v1alpha1.SchemeGroupVersion} +var availableVersions = []unversioned.GroupVersion{v1beta1.SchemeGroupVersion} func init() { registered.RegisterVersions(availableVersions) @@ -101,7 +101,7 @@ func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper // string, or an error if the version is not known. func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) { switch version { - case v1alpha1.SchemeGroupVersion: + case v1beta1.SchemeGroupVersion: return &meta.VersionInterfaces{ ObjectConvertor: api.Scheme, MetadataAccessor: accessor, @@ -122,8 +122,8 @@ func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) { continue } switch v { - case v1alpha1.SchemeGroupVersion: - v1alpha1.AddToScheme(api.Scheme) + case v1beta1.SchemeGroupVersion: + v1beta1.AddToScheme(api.Scheme) } } } diff --git a/federation/apis/federation/install/install_test.go b/federation/apis/federation/install/install_test.go index 87f1ef65d5..cf38c169a7 100644 --- a/federation/apis/federation/install/install_test.go +++ b/federation/apis/federation/install/install_test.go @@ -21,7 +21,7 @@ import ( "testing" "k8s.io/kubernetes/federation/apis/federation" - "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apimachinery/registered" @@ -77,7 +77,7 @@ func TestInterfacesFor(t *testing.T) { } func TestRESTMapper(t *testing.T) { - gv := v1alpha1.SchemeGroupVersion + gv := v1beta1.SchemeGroupVersion clusterGVK := gv.WithKind("Cluster") if gvk, err := registered.GroupOrDie(federation.GroupName).RESTMapper.KindFor(gv.WithResource("clusters")); err != nil || gvk != clusterGVK { diff --git a/federation/apis/federation/v1alpha1/conversion_generated.go b/federation/apis/federation/v1alpha1/conversion_generated.go deleted file mode 100644 index b308a39887..0000000000 --- a/federation/apis/federation/v1alpha1/conversion_generated.go +++ /dev/null @@ -1,296 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2016 The Kubernetes Authors All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This file was autogenerated by conversion-gen. Do not edit it manually! - -package v1alpha1 - -import ( - federation "k8s.io/kubernetes/federation/apis/federation" - api "k8s.io/kubernetes/pkg/api" - v1 "k8s.io/kubernetes/pkg/api/v1" - conversion "k8s.io/kubernetes/pkg/conversion" -) - -func init() { - if err := api.Scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_Cluster_To_federation_Cluster, - Convert_federation_Cluster_To_v1alpha1_Cluster, - Convert_v1alpha1_ClusterCondition_To_federation_ClusterCondition, - Convert_federation_ClusterCondition_To_v1alpha1_ClusterCondition, - Convert_v1alpha1_ClusterList_To_federation_ClusterList, - Convert_federation_ClusterList_To_v1alpha1_ClusterList, - Convert_v1alpha1_ClusterSpec_To_federation_ClusterSpec, - Convert_federation_ClusterSpec_To_v1alpha1_ClusterSpec, - Convert_v1alpha1_ClusterStatus_To_federation_ClusterStatus, - Convert_federation_ClusterStatus_To_v1alpha1_ClusterStatus, - Convert_v1alpha1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR, - Convert_federation_ServerAddressByClientCIDR_To_v1alpha1_ServerAddressByClientCIDR, - ); err != nil { - // if one of the conversion functions is malformed, detect it immediately. - panic(err) - } -} - -func autoConvert_v1alpha1_Cluster_To_federation_Cluster(in *Cluster, out *federation.Cluster, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_v1alpha1_ClusterSpec_To_federation_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha1_ClusterStatus_To_federation_ClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_v1alpha1_Cluster_To_federation_Cluster(in *Cluster, out *federation.Cluster, s conversion.Scope) error { - return autoConvert_v1alpha1_Cluster_To_federation_Cluster(in, out, s) -} - -func autoConvert_federation_Cluster_To_v1alpha1_Cluster(in *federation.Cluster, out *Cluster, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { - return err - } - if err := Convert_federation_ClusterSpec_To_v1alpha1_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_federation_ClusterStatus_To_v1alpha1_ClusterStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -func Convert_federation_Cluster_To_v1alpha1_Cluster(in *federation.Cluster, out *Cluster, s conversion.Scope) error { - return autoConvert_federation_Cluster_To_v1alpha1_Cluster(in, out, s) -} - -func autoConvert_v1alpha1_ClusterCondition_To_federation_ClusterCondition(in *ClusterCondition, out *federation.ClusterCondition, s conversion.Scope) error { - out.Type = federation.ClusterConditionType(in.Type) - out.Status = api.ConditionStatus(in.Status) - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil { - return err - } - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { - return err - } - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -func Convert_v1alpha1_ClusterCondition_To_federation_ClusterCondition(in *ClusterCondition, out *federation.ClusterCondition, s conversion.Scope) error { - return autoConvert_v1alpha1_ClusterCondition_To_federation_ClusterCondition(in, out, s) -} - -func autoConvert_federation_ClusterCondition_To_v1alpha1_ClusterCondition(in *federation.ClusterCondition, out *ClusterCondition, s conversion.Scope) error { - out.Type = ClusterConditionType(in.Type) - out.Status = v1.ConditionStatus(in.Status) - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil { - return err - } - if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { - return err - } - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -func Convert_federation_ClusterCondition_To_v1alpha1_ClusterCondition(in *federation.ClusterCondition, out *ClusterCondition, s conversion.Scope) error { - return autoConvert_federation_ClusterCondition_To_v1alpha1_ClusterCondition(in, out, s) -} - -func autoConvert_v1alpha1_ClusterList_To_federation_ClusterList(in *ClusterList, out *federation.ClusterList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]federation.Cluster, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_Cluster_To_federation_Cluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_v1alpha1_ClusterList_To_federation_ClusterList(in *ClusterList, out *federation.ClusterList, s conversion.Scope) error { - return autoConvert_v1alpha1_ClusterList_To_federation_ClusterList(in, out, s) -} - -func autoConvert_federation_ClusterList_To_v1alpha1_ClusterList(in *federation.ClusterList, out *ClusterList, s conversion.Scope) error { - if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { - return err - } - if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { - return err - } - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Cluster, len(*in)) - for i := range *in { - if err := Convert_federation_Cluster_To_v1alpha1_Cluster(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -func Convert_federation_ClusterList_To_v1alpha1_ClusterList(in *federation.ClusterList, out *ClusterList, s conversion.Scope) error { - return autoConvert_federation_ClusterList_To_v1alpha1_ClusterList(in, out, s) -} - -func autoConvert_v1alpha1_ClusterSpec_To_federation_ClusterSpec(in *ClusterSpec, out *federation.ClusterSpec, s conversion.Scope) error { - if in.ServerAddressByClientCIDRs != nil { - in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs - *out = make([]federation.ServerAddressByClientCIDR, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.ServerAddressByClientCIDRs = nil - } - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(api.LocalObjectReference) - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(*in, *out, 0); err != nil { - return err - } - } else { - out.SecretRef = nil - } - return nil -} - -func Convert_v1alpha1_ClusterSpec_To_federation_ClusterSpec(in *ClusterSpec, out *federation.ClusterSpec, s conversion.Scope) error { - return autoConvert_v1alpha1_ClusterSpec_To_federation_ClusterSpec(in, out, s) -} - -func autoConvert_federation_ClusterSpec_To_v1alpha1_ClusterSpec(in *federation.ClusterSpec, out *ClusterSpec, s conversion.Scope) error { - if in.ServerAddressByClientCIDRs != nil { - in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs - *out = make([]ServerAddressByClientCIDR, len(*in)) - for i := range *in { - if err := Convert_federation_ServerAddressByClientCIDR_To_v1alpha1_ServerAddressByClientCIDR(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.ServerAddressByClientCIDRs = nil - } - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(v1.LocalObjectReference) - // TODO: Inefficient conversion - can we improve it? - if err := s.Convert(*in, *out, 0); err != nil { - return err - } - } else { - out.SecretRef = nil - } - return nil -} - -func Convert_federation_ClusterSpec_To_v1alpha1_ClusterSpec(in *federation.ClusterSpec, out *ClusterSpec, s conversion.Scope) error { - return autoConvert_federation_ClusterSpec_To_v1alpha1_ClusterSpec(in, out, s) -} - -func autoConvert_v1alpha1_ClusterStatus_To_federation_ClusterStatus(in *ClusterStatus, out *federation.ClusterStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]federation.ClusterCondition, len(*in)) - for i := range *in { - if err := Convert_v1alpha1_ClusterCondition_To_federation_ClusterCondition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - out.Zones = in.Zones - out.Region = in.Region - return nil -} - -func Convert_v1alpha1_ClusterStatus_To_federation_ClusterStatus(in *ClusterStatus, out *federation.ClusterStatus, s conversion.Scope) error { - return autoConvert_v1alpha1_ClusterStatus_To_federation_ClusterStatus(in, out, s) -} - -func autoConvert_federation_ClusterStatus_To_v1alpha1_ClusterStatus(in *federation.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]ClusterCondition, len(*in)) - for i := range *in { - if err := Convert_federation_ClusterCondition_To_v1alpha1_ClusterCondition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Conditions = nil - } - out.Zones = in.Zones - out.Region = in.Region - return nil -} - -func Convert_federation_ClusterStatus_To_v1alpha1_ClusterStatus(in *federation.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { - return autoConvert_federation_ClusterStatus_To_v1alpha1_ClusterStatus(in, out, s) -} - -func autoConvert_v1alpha1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(in *ServerAddressByClientCIDR, out *federation.ServerAddressByClientCIDR, s conversion.Scope) error { - out.ClientCIDR = in.ClientCIDR - out.ServerAddress = in.ServerAddress - return nil -} - -func Convert_v1alpha1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(in *ServerAddressByClientCIDR, out *federation.ServerAddressByClientCIDR, s conversion.Scope) error { - return autoConvert_v1alpha1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(in, out, s) -} - -func autoConvert_federation_ServerAddressByClientCIDR_To_v1alpha1_ServerAddressByClientCIDR(in *federation.ServerAddressByClientCIDR, out *ServerAddressByClientCIDR, s conversion.Scope) error { - out.ClientCIDR = in.ClientCIDR - out.ServerAddress = in.ServerAddress - return nil -} - -func Convert_federation_ServerAddressByClientCIDR_To_v1alpha1_ServerAddressByClientCIDR(in *federation.ServerAddressByClientCIDR, out *ServerAddressByClientCIDR, s conversion.Scope) error { - return autoConvert_federation_ServerAddressByClientCIDR_To_v1alpha1_ServerAddressByClientCIDR(in, out, s) -} diff --git a/federation/apis/federation/v1alpha1/conversion.go b/federation/apis/federation/v1beta1/conversion.go similarity index 98% rename from federation/apis/federation/v1alpha1/conversion.go rename to federation/apis/federation/v1beta1/conversion.go index c4c8ebbb37..f8d396e86d 100644 --- a/federation/apis/federation/v1alpha1/conversion.go +++ b/federation/apis/federation/v1beta1/conversion.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "fmt" diff --git a/federation/apis/federation/v1beta1/conversion_generated.go b/federation/apis/federation/v1beta1/conversion_generated.go new file mode 100644 index 0000000000..5877d00828 --- /dev/null +++ b/federation/apis/federation/v1beta1/conversion_generated.go @@ -0,0 +1,296 @@ +// +build !ignore_autogenerated + +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This file was autogenerated by conversion-gen. Do not edit it manually! + +package v1beta1 + +import ( + federation "k8s.io/kubernetes/federation/apis/federation" + api "k8s.io/kubernetes/pkg/api" + v1 "k8s.io/kubernetes/pkg/api/v1" + conversion "k8s.io/kubernetes/pkg/conversion" +) + +func init() { + if err := api.Scheme.AddGeneratedConversionFuncs( + Convert_v1beta1_Cluster_To_federation_Cluster, + Convert_federation_Cluster_To_v1beta1_Cluster, + Convert_v1beta1_ClusterCondition_To_federation_ClusterCondition, + Convert_federation_ClusterCondition_To_v1beta1_ClusterCondition, + Convert_v1beta1_ClusterList_To_federation_ClusterList, + Convert_federation_ClusterList_To_v1beta1_ClusterList, + Convert_v1beta1_ClusterSpec_To_federation_ClusterSpec, + Convert_federation_ClusterSpec_To_v1beta1_ClusterSpec, + Convert_v1beta1_ClusterStatus_To_federation_ClusterStatus, + Convert_federation_ClusterStatus_To_v1beta1_ClusterStatus, + Convert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR, + Convert_federation_ServerAddressByClientCIDR_To_v1beta1_ServerAddressByClientCIDR, + ); err != nil { + // if one of the conversion functions is malformed, detect it immediately. + panic(err) + } +} + +func autoConvert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation.Cluster, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + // TODO: Inefficient conversion - can we improve it? + if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { + return err + } + if err := Convert_v1beta1_ClusterSpec_To_federation_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1beta1_ClusterStatus_To_federation_ClusterStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_v1beta1_Cluster_To_federation_Cluster(in *Cluster, out *federation.Cluster, s conversion.Scope) error { + return autoConvert_v1beta1_Cluster_To_federation_Cluster(in, out, s) +} + +func autoConvert_federation_Cluster_To_v1beta1_Cluster(in *federation.Cluster, out *Cluster, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + // TODO: Inefficient conversion - can we improve it? + if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil { + return err + } + if err := Convert_federation_ClusterSpec_To_v1beta1_ClusterSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_federation_ClusterStatus_To_v1beta1_ClusterStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +func Convert_federation_Cluster_To_v1beta1_Cluster(in *federation.Cluster, out *Cluster, s conversion.Scope) error { + return autoConvert_federation_Cluster_To_v1beta1_Cluster(in, out, s) +} + +func autoConvert_v1beta1_ClusterCondition_To_federation_ClusterCondition(in *ClusterCondition, out *federation.ClusterCondition, s conversion.Scope) error { + out.Type = federation.ClusterConditionType(in.Type) + out.Status = api.ConditionStatus(in.Status) + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil { + return err + } + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { + return err + } + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_v1beta1_ClusterCondition_To_federation_ClusterCondition(in *ClusterCondition, out *federation.ClusterCondition, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterCondition_To_federation_ClusterCondition(in, out, s) +} + +func autoConvert_federation_ClusterCondition_To_v1beta1_ClusterCondition(in *federation.ClusterCondition, out *ClusterCondition, s conversion.Scope) error { + out.Type = ClusterConditionType(in.Type) + out.Status = v1.ConditionStatus(in.Status) + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastProbeTime, &out.LastProbeTime, s); err != nil { + return err + } + if err := api.Convert_unversioned_Time_To_unversioned_Time(&in.LastTransitionTime, &out.LastTransitionTime, s); err != nil { + return err + } + out.Reason = in.Reason + out.Message = in.Message + return nil +} + +func Convert_federation_ClusterCondition_To_v1beta1_ClusterCondition(in *federation.ClusterCondition, out *ClusterCondition, s conversion.Scope) error { + return autoConvert_federation_ClusterCondition_To_v1beta1_ClusterCondition(in, out, s) +} + +func autoConvert_v1beta1_ClusterList_To_federation_ClusterList(in *ClusterList, out *federation.ClusterList, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]federation.Cluster, len(*in)) + for i := range *in { + if err := Convert_v1beta1_Cluster_To_federation_Cluster(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_v1beta1_ClusterList_To_federation_ClusterList(in *ClusterList, out *federation.ClusterList, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterList_To_federation_ClusterList(in, out, s) +} + +func autoConvert_federation_ClusterList_To_v1beta1_ClusterList(in *federation.ClusterList, out *ClusterList, s conversion.Scope) error { + if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { + return err + } + if err := api.Convert_unversioned_ListMeta_To_unversioned_ListMeta(&in.ListMeta, &out.ListMeta, s); err != nil { + return err + } + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Cluster, len(*in)) + for i := range *in { + if err := Convert_federation_Cluster_To_v1beta1_Cluster(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +func Convert_federation_ClusterList_To_v1beta1_ClusterList(in *federation.ClusterList, out *ClusterList, s conversion.Scope) error { + return autoConvert_federation_ClusterList_To_v1beta1_ClusterList(in, out, s) +} + +func autoConvert_v1beta1_ClusterSpec_To_federation_ClusterSpec(in *ClusterSpec, out *federation.ClusterSpec, s conversion.Scope) error { + if in.ServerAddressByClientCIDRs != nil { + in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs + *out = make([]federation.ServerAddressByClientCIDR, len(*in)) + for i := range *in { + if err := Convert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.ServerAddressByClientCIDRs = nil + } + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(api.LocalObjectReference) + // TODO: Inefficient conversion - can we improve it? + if err := s.Convert(*in, *out, 0); err != nil { + return err + } + } else { + out.SecretRef = nil + } + return nil +} + +func Convert_v1beta1_ClusterSpec_To_federation_ClusterSpec(in *ClusterSpec, out *federation.ClusterSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterSpec_To_federation_ClusterSpec(in, out, s) +} + +func autoConvert_federation_ClusterSpec_To_v1beta1_ClusterSpec(in *federation.ClusterSpec, out *ClusterSpec, s conversion.Scope) error { + if in.ServerAddressByClientCIDRs != nil { + in, out := &in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs + *out = make([]ServerAddressByClientCIDR, len(*in)) + for i := range *in { + if err := Convert_federation_ServerAddressByClientCIDR_To_v1beta1_ServerAddressByClientCIDR(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.ServerAddressByClientCIDRs = nil + } + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(v1.LocalObjectReference) + // TODO: Inefficient conversion - can we improve it? + if err := s.Convert(*in, *out, 0); err != nil { + return err + } + } else { + out.SecretRef = nil + } + return nil +} + +func Convert_federation_ClusterSpec_To_v1beta1_ClusterSpec(in *federation.ClusterSpec, out *ClusterSpec, s conversion.Scope) error { + return autoConvert_federation_ClusterSpec_To_v1beta1_ClusterSpec(in, out, s) +} + +func autoConvert_v1beta1_ClusterStatus_To_federation_ClusterStatus(in *ClusterStatus, out *federation.ClusterStatus, s conversion.Scope) error { + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]federation.ClusterCondition, len(*in)) + for i := range *in { + if err := Convert_v1beta1_ClusterCondition_To_federation_ClusterCondition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + out.Zones = in.Zones + out.Region = in.Region + return nil +} + +func Convert_v1beta1_ClusterStatus_To_federation_ClusterStatus(in *ClusterStatus, out *federation.ClusterStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ClusterStatus_To_federation_ClusterStatus(in, out, s) +} + +func autoConvert_federation_ClusterStatus_To_v1beta1_ClusterStatus(in *federation.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]ClusterCondition, len(*in)) + for i := range *in { + if err := Convert_federation_ClusterCondition_To_v1beta1_ClusterCondition(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Conditions = nil + } + out.Zones = in.Zones + out.Region = in.Region + return nil +} + +func Convert_federation_ClusterStatus_To_v1beta1_ClusterStatus(in *federation.ClusterStatus, out *ClusterStatus, s conversion.Scope) error { + return autoConvert_federation_ClusterStatus_To_v1beta1_ClusterStatus(in, out, s) +} + +func autoConvert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(in *ServerAddressByClientCIDR, out *federation.ServerAddressByClientCIDR, s conversion.Scope) error { + out.ClientCIDR = in.ClientCIDR + out.ServerAddress = in.ServerAddress + return nil +} + +func Convert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(in *ServerAddressByClientCIDR, out *federation.ServerAddressByClientCIDR, s conversion.Scope) error { + return autoConvert_v1beta1_ServerAddressByClientCIDR_To_federation_ServerAddressByClientCIDR(in, out, s) +} + +func autoConvert_federation_ServerAddressByClientCIDR_To_v1beta1_ServerAddressByClientCIDR(in *federation.ServerAddressByClientCIDR, out *ServerAddressByClientCIDR, s conversion.Scope) error { + out.ClientCIDR = in.ClientCIDR + out.ServerAddress = in.ServerAddress + return nil +} + +func Convert_federation_ServerAddressByClientCIDR_To_v1beta1_ServerAddressByClientCIDR(in *federation.ServerAddressByClientCIDR, out *ServerAddressByClientCIDR, s conversion.Scope) error { + return autoConvert_federation_ServerAddressByClientCIDR_To_v1beta1_ServerAddressByClientCIDR(in, out, s) +} diff --git a/federation/apis/federation/v1alpha1/deep_copy_generated.go b/federation/apis/federation/v1beta1/deep_copy_generated.go similarity index 70% rename from federation/apis/federation/v1alpha1/deep_copy_generated.go rename to federation/apis/federation/v1beta1/deep_copy_generated.go index 64217a1d1a..0d53b4a6a9 100644 --- a/federation/apis/federation/v1alpha1/deep_copy_generated.go +++ b/federation/apis/federation/v1beta1/deep_copy_generated.go @@ -18,7 +18,7 @@ limitations under the License. // This file was autogenerated by deepcopy-gen. Do not edit it manually! -package v1alpha1 +package v1beta1 import ( api "k8s.io/kubernetes/pkg/api" @@ -29,35 +29,35 @@ import ( func init() { if err := api.Scheme.AddGeneratedDeepCopyFuncs( - DeepCopy_v1alpha1_Cluster, - DeepCopy_v1alpha1_ClusterCondition, - DeepCopy_v1alpha1_ClusterList, - DeepCopy_v1alpha1_ClusterSpec, - DeepCopy_v1alpha1_ClusterStatus, - DeepCopy_v1alpha1_ServerAddressByClientCIDR, + DeepCopy_v1beta1_Cluster, + DeepCopy_v1beta1_ClusterCondition, + DeepCopy_v1beta1_ClusterList, + DeepCopy_v1beta1_ClusterSpec, + DeepCopy_v1beta1_ClusterStatus, + DeepCopy_v1beta1_ServerAddressByClientCIDR, ); err != nil { // if one of the deep copy functions is malformed, detect it immediately. panic(err) } } -func DeepCopy_v1alpha1_Cluster(in Cluster, out *Cluster, c *conversion.Cloner) error { +func DeepCopy_v1beta1_Cluster(in Cluster, out *Cluster, c *conversion.Cloner) error { if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } if err := v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil { return err } - if err := DeepCopy_v1alpha1_ClusterSpec(in.Spec, &out.Spec, c); err != nil { + if err := DeepCopy_v1beta1_ClusterSpec(in.Spec, &out.Spec, c); err != nil { return err } - if err := DeepCopy_v1alpha1_ClusterStatus(in.Status, &out.Status, c); err != nil { + if err := DeepCopy_v1beta1_ClusterStatus(in.Status, &out.Status, c); err != nil { return err } return nil } -func DeepCopy_v1alpha1_ClusterCondition(in ClusterCondition, out *ClusterCondition, c *conversion.Cloner) error { +func DeepCopy_v1beta1_ClusterCondition(in ClusterCondition, out *ClusterCondition, c *conversion.Cloner) error { out.Type = in.Type out.Status = in.Status if err := unversioned.DeepCopy_unversioned_Time(in.LastProbeTime, &out.LastProbeTime, c); err != nil { @@ -71,7 +71,7 @@ func DeepCopy_v1alpha1_ClusterCondition(in ClusterCondition, out *ClusterConditi return nil } -func DeepCopy_v1alpha1_ClusterList(in ClusterList, out *ClusterList, c *conversion.Cloner) error { +func DeepCopy_v1beta1_ClusterList(in ClusterList, out *ClusterList, c *conversion.Cloner) error { if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { return err } @@ -82,7 +82,7 @@ func DeepCopy_v1alpha1_ClusterList(in ClusterList, out *ClusterList, c *conversi in, out := in.Items, &out.Items *out = make([]Cluster, len(in)) for i := range in { - if err := DeepCopy_v1alpha1_Cluster(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_v1beta1_Cluster(in[i], &(*out)[i], c); err != nil { return err } } @@ -92,12 +92,12 @@ func DeepCopy_v1alpha1_ClusterList(in ClusterList, out *ClusterList, c *conversi return nil } -func DeepCopy_v1alpha1_ClusterSpec(in ClusterSpec, out *ClusterSpec, c *conversion.Cloner) error { +func DeepCopy_v1beta1_ClusterSpec(in ClusterSpec, out *ClusterSpec, c *conversion.Cloner) error { if in.ServerAddressByClientCIDRs != nil { in, out := in.ServerAddressByClientCIDRs, &out.ServerAddressByClientCIDRs *out = make([]ServerAddressByClientCIDR, len(in)) for i := range in { - if err := DeepCopy_v1alpha1_ServerAddressByClientCIDR(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_v1beta1_ServerAddressByClientCIDR(in[i], &(*out)[i], c); err != nil { return err } } @@ -116,12 +116,12 @@ func DeepCopy_v1alpha1_ClusterSpec(in ClusterSpec, out *ClusterSpec, c *conversi return nil } -func DeepCopy_v1alpha1_ClusterStatus(in ClusterStatus, out *ClusterStatus, c *conversion.Cloner) error { +func DeepCopy_v1beta1_ClusterStatus(in ClusterStatus, out *ClusterStatus, c *conversion.Cloner) error { if in.Conditions != nil { in, out := in.Conditions, &out.Conditions *out = make([]ClusterCondition, len(in)) for i := range in { - if err := DeepCopy_v1alpha1_ClusterCondition(in[i], &(*out)[i], c); err != nil { + if err := DeepCopy_v1beta1_ClusterCondition(in[i], &(*out)[i], c); err != nil { return err } } @@ -139,7 +139,7 @@ func DeepCopy_v1alpha1_ClusterStatus(in ClusterStatus, out *ClusterStatus, c *co return nil } -func DeepCopy_v1alpha1_ServerAddressByClientCIDR(in ServerAddressByClientCIDR, out *ServerAddressByClientCIDR, c *conversion.Cloner) error { +func DeepCopy_v1beta1_ServerAddressByClientCIDR(in ServerAddressByClientCIDR, out *ServerAddressByClientCIDR, c *conversion.Cloner) error { out.ClientCIDR = in.ClientCIDR out.ServerAddress = in.ServerAddress return nil diff --git a/federation/apis/federation/v1alpha1/defaults.go b/federation/apis/federation/v1beta1/defaults.go similarity index 97% rename from federation/apis/federation/v1alpha1/defaults.go rename to federation/apis/federation/v1beta1/defaults.go index d69bb7f044..b096ce2fda 100644 --- a/federation/apis/federation/v1alpha1/defaults.go +++ b/federation/apis/federation/v1beta1/defaults.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "k8s.io/kubernetes/pkg/runtime" diff --git a/federation/apis/federation/v1alpha1/doc.go b/federation/apis/federation/v1beta1/doc.go similarity index 97% rename from federation/apis/federation/v1alpha1/doc.go rename to federation/apis/federation/v1beta1/doc.go index 65a03a2093..cfdb87c53d 100644 --- a/federation/apis/federation/v1alpha1/doc.go +++ b/federation/apis/federation/v1beta1/doc.go @@ -15,4 +15,4 @@ limitations under the License. */ // +genconversion=true -package v1alpha1 +package v1beta1 diff --git a/federation/apis/federation/v1alpha1/generated.pb.go b/federation/apis/federation/v1beta1/generated.pb.go similarity index 98% rename from federation/apis/federation/v1alpha1/generated.pb.go rename to federation/apis/federation/v1beta1/generated.pb.go index 2d700bcd0d..e9193b6089 100644 --- a/federation/apis/federation/v1alpha1/generated.pb.go +++ b/federation/apis/federation/v1beta1/generated.pb.go @@ -15,14 +15,14 @@ limitations under the License. */ // Code generated by protoc-gen-gogo. -// source: k8s.io/kubernetes/federation/apis/federation/v1alpha1/generated.proto +// source: k8s.io/kubernetes/federation/apis/federation/v1beta1/generated.proto // DO NOT EDIT! /* - Package v1alpha1 is a generated protocol buffer package. + Package v1beta1 is a generated protocol buffer package. It is generated from these files: - k8s.io/kubernetes/federation/apis/federation/v1alpha1/generated.proto + k8s.io/kubernetes/federation/apis/federation/v1beta1/generated.proto It has these top-level messages: Cluster @@ -32,7 +32,7 @@ limitations under the License. ClusterStatus ServerAddressByClientCIDR */ -package v1alpha1 +package v1beta1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" @@ -72,12 +72,12 @@ func (m *ServerAddressByClientCIDR) String() string { return proto.CompactTextSt func (*ServerAddressByClientCIDR) ProtoMessage() {} func init() { - proto.RegisterType((*Cluster)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.Cluster") - proto.RegisterType((*ClusterCondition)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.ClusterCondition") - proto.RegisterType((*ClusterList)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.ClusterList") - proto.RegisterType((*ClusterSpec)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.ClusterSpec") - proto.RegisterType((*ClusterStatus)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.ClusterStatus") - proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.kubernetes.federation.apis.federation.v1alpha1.ServerAddressByClientCIDR") + proto.RegisterType((*Cluster)(nil), "k8s.io.kubernetes.federation.apis.federation.v1beta1.Cluster") + proto.RegisterType((*ClusterCondition)(nil), "k8s.io.kubernetes.federation.apis.federation.v1beta1.ClusterCondition") + proto.RegisterType((*ClusterList)(nil), "k8s.io.kubernetes.federation.apis.federation.v1beta1.ClusterList") + proto.RegisterType((*ClusterSpec)(nil), "k8s.io.kubernetes.federation.apis.federation.v1beta1.ClusterSpec") + proto.RegisterType((*ClusterStatus)(nil), "k8s.io.kubernetes.federation.apis.federation.v1beta1.ClusterStatus") + proto.RegisterType((*ServerAddressByClientCIDR)(nil), "k8s.io.kubernetes.federation.apis.federation.v1beta1.ServerAddressByClientCIDR") } func (m *Cluster) Marshal() (data []byte, err error) { size := m.Size() diff --git a/federation/apis/federation/v1alpha1/generated.proto b/federation/apis/federation/v1beta1/generated.proto similarity index 96% rename from federation/apis/federation/v1alpha1/generated.proto rename to federation/apis/federation/v1beta1/generated.proto index 560a30f052..811f40f434 100644 --- a/federation/apis/federation/v1alpha1/generated.proto +++ b/federation/apis/federation/v1beta1/generated.proto @@ -19,14 +19,15 @@ limitations under the License. syntax = 'proto2'; -package k8s.io.kubernetes.federation.apis.federation.v1alpha1; +package k8s.io.kubernetes.federation.apis.federation.v1beta1; +import "k8s.io/kubernetes/pkg/api/resource/generated.proto"; import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto"; import "k8s.io/kubernetes/pkg/api/v1/generated.proto"; import "k8s.io/kubernetes/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". -option go_package = "v1alpha1"; +option go_package = "v1beta1"; // Information about a registered cluster in a federated kubernetes setup. Clusters are not namespaced and have unique names in the federation. message Cluster { diff --git a/federation/apis/federation/v1alpha1/register.go b/federation/apis/federation/v1beta1/register.go similarity index 97% rename from federation/apis/federation/v1alpha1/register.go rename to federation/apis/federation/v1beta1/register.go index 1cb015ec9f..46dc3f10b7 100644 --- a/federation/apis/federation/v1alpha1/register.go +++ b/federation/apis/federation/v1beta1/register.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "k8s.io/kubernetes/pkg/api/unversioned" @@ -27,7 +27,7 @@ import ( const GroupName = "federation" // SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1alpha1"} +var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1beta1"} // Adds the list of known types to api.Scheme. func AddToScheme(scheme *runtime.Scheme) { diff --git a/federation/apis/federation/v1alpha1/types.generated.go b/federation/apis/federation/v1beta1/types.generated.go similarity index 99% rename from federation/apis/federation/v1alpha1/types.generated.go rename to federation/apis/federation/v1beta1/types.generated.go index 5034cab934..e4d7246f24 100644 --- a/federation/apis/federation/v1alpha1/types.generated.go +++ b/federation/apis/federation/v1beta1/types.generated.go @@ -19,7 +19,7 @@ limitations under the License. // THIS FILE IS AUTO-GENERATED BY codecgen. // ************************************************************ -package v1alpha1 +package v1beta1 import ( "errors" diff --git a/federation/apis/federation/v1alpha1/types.go b/federation/apis/federation/v1beta1/types.go similarity index 99% rename from federation/apis/federation/v1alpha1/types.go rename to federation/apis/federation/v1beta1/types.go index d53d6aa939..f15988e2f8 100644 --- a/federation/apis/federation/v1alpha1/types.go +++ b/federation/apis/federation/v1beta1/types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( "k8s.io/kubernetes/pkg/api/unversioned" diff --git a/federation/client/cache/cluster_cache.go b/federation/client/cache/cluster_cache.go index 4147254173..593919c4da 100644 --- a/federation/client/cache/cluster_cache.go +++ b/federation/client/cache/cluster_cache.go @@ -18,7 +18,7 @@ package cache import ( "github.com/golang/glog" - "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + "k8s.io/kubernetes/federation/apis/federation/v1beta1" kubeCache "k8s.io/kubernetes/pkg/client/cache" ) @@ -28,16 +28,16 @@ type StoreToClusterLister struct { kubeCache.Store } -func (s *StoreToClusterLister) List() (clusters v1alpha1.ClusterList, err error) { +func (s *StoreToClusterLister) List() (clusters v1beta1.ClusterList, err error) { for _, m := range s.Store.List() { - clusters.Items = append(clusters.Items, *(m.(*v1alpha1.Cluster))) + clusters.Items = append(clusters.Items, *(m.(*v1beta1.Cluster))) } return clusters, nil } // ClusterConditionPredicate is a function that indicates whether the given cluster's conditions meet // some set of criteria defined by the function. -type ClusterConditionPredicate func(cluster v1alpha1.Cluster) bool +type ClusterConditionPredicate func(cluster v1beta1.Cluster) bool // storeToClusterConditionLister filters and returns nodes matching the given type and status from the store. type storeToClusterConditionLister struct { @@ -51,9 +51,9 @@ func (s *StoreToClusterLister) ClusterCondition(predicate ClusterConditionPredic } // List returns a list of clusters that match the conditions defined by the predicate functions in the storeToClusterConditionLister. -func (s storeToClusterConditionLister) List() (clusters v1alpha1.ClusterList, err error) { +func (s storeToClusterConditionLister) List() (clusters v1beta1.ClusterList, err error) { for _, m := range s.store.List() { - cluster := *m.(*v1alpha1.Cluster) + cluster := *m.(*v1beta1.Cluster) if s.predicate(cluster) { clusters.Items = append(clusters.Items, cluster) } else { diff --git a/federation/client/clientset_generated/federation_release_1_3/clientset.go b/federation/client/clientset_generated/federation_release_1_3/clientset.go index 66116c2f08..6f7087e1a3 100644 --- a/federation/client/clientset_generated/federation_release_1_3/clientset.go +++ b/federation/client/clientset_generated/federation_release_1_3/clientset.go @@ -19,7 +19,7 @@ package federation_release_1_3 import ( "github.com/golang/glog" v1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/core/v1" - v1alpha1federation "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1" + v1beta1federation "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1" restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/util/flowcontrol" @@ -27,7 +27,7 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface - Federation() v1alpha1federation.FederationInterface + Federation() v1beta1federation.FederationInterface Core() v1core.CoreInterface } @@ -35,12 +35,12 @@ type Interface interface { // version included in a Clientset. type Clientset struct { *discovery.DiscoveryClient - *v1alpha1federation.FederationClient + *v1beta1federation.FederationClient *v1core.CoreClient } // Federation retrieves the FederationClient -func (c *Clientset) Federation() v1alpha1federation.FederationInterface { +func (c *Clientset) Federation() v1beta1federation.FederationInterface { if c == nil { return nil } @@ -68,7 +68,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { } var clientset Clientset var err error - clientset.FederationClient, err = v1alpha1federation.NewForConfig(&configShallowCopy) + clientset.FederationClient, err = v1beta1federation.NewForConfig(&configShallowCopy) if err != nil { return nil, err } @@ -89,7 +89,7 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { // panics if there is an error in the config. func NewForConfigOrDie(c *restclient.Config) *Clientset { var clientset Clientset - clientset.FederationClient = v1alpha1federation.NewForConfigOrDie(c) + clientset.FederationClient = v1beta1federation.NewForConfigOrDie(c) clientset.CoreClient = v1core.NewForConfigOrDie(c) clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) @@ -99,7 +99,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c *restclient.RESTClient) *Clientset { var clientset Clientset - clientset.FederationClient = v1alpha1federation.New(c) + clientset.FederationClient = v1beta1federation.New(c) clientset.CoreClient = v1core.New(c) clientset.DiscoveryClient = discovery.NewDiscoveryClient(c) diff --git a/federation/client/clientset_generated/federation_release_1_3/doc.go b/federation/client/clientset_generated/federation_release_1_3/doc.go index 44d6b8f097..a8e764c63d 100644 --- a/federation/client/clientset_generated/federation_release_1_3/doc.go +++ b/federation/client/clientset_generated/federation_release_1_3/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service] --input=[../../federation/apis/federation/v1alpha1,api/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service] --input=[../../federation/apis/federation/v1beta1,api/v1] // This package has the automatically generated clientset. package federation_release_1_3 diff --git a/federation/client/clientset_generated/federation_release_1_3/fake/clientset_generated.go b/federation/client/clientset_generated/federation_release_1_3/fake/clientset_generated.go index 8af3fd9ef4..edb4f79a88 100644 --- a/federation/client/clientset_generated/federation_release_1_3/fake/clientset_generated.go +++ b/federation/client/clientset_generated/federation_release_1_3/fake/clientset_generated.go @@ -20,8 +20,8 @@ import ( clientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3" v1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/core/v1" fakev1core "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake" - v1alpha1federation "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1" - fakev1alpha1federation "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake" + v1beta1federation "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1" + fakev1beta1federation "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/apimachinery/registered" "k8s.io/kubernetes/pkg/client/testing/core" @@ -62,8 +62,8 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { var _ clientset.Interface = &Clientset{} // Federation retrieves the FederationClient -func (c *Clientset) Federation() v1alpha1federation.FederationInterface { - return &fakev1alpha1federation.FakeFederation{Fake: &c.Fake} +func (c *Clientset) Federation() v1beta1federation.FederationInterface { + return &fakev1beta1federation.FakeFederation{Fake: &c.Fake} } // Core retrieves the CoreClient diff --git a/federation/client/clientset_generated/federation_release_1_3/fake/doc.go b/federation/client/clientset_generated/federation_release_1_3/fake/doc.go index cd0b07c206..31950d235f 100644 --- a/federation/client/clientset_generated/federation_release_1_3/fake/doc.go +++ b/federation/client/clientset_generated/federation_release_1_3/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service] --input=[../../federation/apis/federation/v1alpha1,api/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service] --input=[../../federation/apis/federation/v1beta1,api/v1] // This package has the automatically generated fake clientset. package fake diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/doc.go b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/doc.go index e85a01c7c5..d07e71e3a4 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/doc.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service] --input=[../../federation/apis/federation/v1alpha1,api/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service] --input=[../../federation/apis/federation/v1beta1,api/v1] // This package has the automatically generated typed clients. package v1 diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/doc.go b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/doc.go index 846226b3be..0b5fe9d5df 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/doc.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service] --input=[../../federation/apis/federation/v1alpha1,api/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service] --input=[../../federation/apis/federation/v1beta1,api/v1] // Package fake has the automatically generated clients. package fake diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/cluster.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/cluster.go similarity index 75% rename from federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/cluster.go rename to federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/cluster.go index e09ca93fb5..19012ff8e3 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/cluster.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/cluster.go @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( - v1alpha1 "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" api "k8s.io/kubernetes/pkg/api" watch "k8s.io/kubernetes/pkg/watch" ) @@ -30,15 +30,15 @@ type ClustersGetter interface { // ClusterInterface has methods to work with Cluster resources. type ClusterInterface interface { - Create(*v1alpha1.Cluster) (*v1alpha1.Cluster, error) - Update(*v1alpha1.Cluster) (*v1alpha1.Cluster, error) - UpdateStatus(*v1alpha1.Cluster) (*v1alpha1.Cluster, error) + Create(*v1beta1.Cluster) (*v1beta1.Cluster, error) + Update(*v1beta1.Cluster) (*v1beta1.Cluster, error) + UpdateStatus(*v1beta1.Cluster) (*v1beta1.Cluster, error) Delete(name string, options *api.DeleteOptions) error DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error - Get(name string) (*v1alpha1.Cluster, error) - List(opts api.ListOptions) (*v1alpha1.ClusterList, error) + Get(name string) (*v1beta1.Cluster, error) + List(opts api.ListOptions) (*v1beta1.ClusterList, error) Watch(opts api.ListOptions) (watch.Interface, error) - Patch(name string, pt api.PatchType, data []byte) (result *v1alpha1.Cluster, err error) + Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.Cluster, err error) ClusterExpansion } @@ -55,8 +55,8 @@ func newClusters(c *FederationClient) *clusters { } // Create takes the representation of a cluster and creates it. Returns the server's representation of the cluster, and an error, if there is any. -func (c *clusters) Create(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, err error) { - result = &v1alpha1.Cluster{} +func (c *clusters) Create(cluster *v1beta1.Cluster) (result *v1beta1.Cluster, err error) { + result = &v1beta1.Cluster{} err = c.client.Post(). Resource("clusters"). Body(cluster). @@ -66,8 +66,8 @@ func (c *clusters) Create(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, } // Update takes the representation of a cluster and updates it. Returns the server's representation of the cluster, and an error, if there is any. -func (c *clusters) Update(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, err error) { - result = &v1alpha1.Cluster{} +func (c *clusters) Update(cluster *v1beta1.Cluster) (result *v1beta1.Cluster, err error) { + result = &v1beta1.Cluster{} err = c.client.Put(). Resource("clusters"). Name(cluster.Name). @@ -77,8 +77,8 @@ func (c *clusters) Update(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, return } -func (c *clusters) UpdateStatus(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, err error) { - result = &v1alpha1.Cluster{} +func (c *clusters) UpdateStatus(cluster *v1beta1.Cluster) (result *v1beta1.Cluster, err error) { + result = &v1beta1.Cluster{} err = c.client.Put(). Resource("clusters"). Name(cluster.Name). @@ -110,8 +110,8 @@ func (c *clusters) DeleteCollection(options *api.DeleteOptions, listOptions api. } // Get takes name of the cluster, and returns the corresponding cluster object, and an error if there is any. -func (c *clusters) Get(name string) (result *v1alpha1.Cluster, err error) { - result = &v1alpha1.Cluster{} +func (c *clusters) Get(name string) (result *v1beta1.Cluster, err error) { + result = &v1beta1.Cluster{} err = c.client.Get(). Resource("clusters"). Name(name). @@ -121,8 +121,8 @@ func (c *clusters) Get(name string) (result *v1alpha1.Cluster, err error) { } // List takes label and field selectors, and returns the list of Clusters that match those selectors. -func (c *clusters) List(opts api.ListOptions) (result *v1alpha1.ClusterList, err error) { - result = &v1alpha1.ClusterList{} +func (c *clusters) List(opts api.ListOptions) (result *v1beta1.ClusterList, err error) { + result = &v1beta1.ClusterList{} err = c.client.Get(). Resource("clusters"). VersionedParams(&opts, api.ParameterCodec). @@ -141,8 +141,8 @@ func (c *clusters) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched cluster. -func (c *clusters) Patch(name string, pt api.PatchType, data []byte) (result *v1alpha1.Cluster, err error) { - result = &v1alpha1.Cluster{} +func (c *clusters) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.Cluster, err error) { + result = &v1beta1.Cluster{} err = c.client.Patch(pt). Resource("clusters"). Name(name). diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/doc.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/doc.go similarity index 96% rename from federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/doc.go rename to federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/doc.go index 79dd05ec7f..cbca5a3cf8 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/doc.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service] --input=[../../federation/apis/federation/v1alpha1,api/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service] --input=[../../federation/apis/federation/v1beta1,api/v1] // This package has the automatically generated typed clients. -package v1alpha1 +package v1beta1 diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/doc.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/doc.go similarity index 97% rename from federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/doc.go rename to federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/doc.go index 846226b3be..0b5fe9d5df 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/doc.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service] --input=[../../federation/apis/federation/v1alpha1,api/v1] +// This package is generated by client-gen with arguments: --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --included-types-overrides=[api/v1/Service] --input=[../../federation/apis/federation/v1beta1,api/v1] // Package fake has the automatically generated clients. package fake diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/fake_cluster.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_cluster.go similarity index 65% rename from federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/fake_cluster.go rename to federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_cluster.go index 4e466aecb4..ab7fa2f300 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/fake_cluster.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_cluster.go @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - v1alpha1 "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" api "k8s.io/kubernetes/pkg/api" unversioned "k8s.io/kubernetes/pkg/api/unversioned" core "k8s.io/kubernetes/pkg/client/testing/core" @@ -30,60 +30,60 @@ type FakeClusters struct { Fake *FakeFederation } -var clustersResource = unversioned.GroupVersionResource{Group: "federation", Version: "v1alpha1", Resource: "clusters"} +var clustersResource = unversioned.GroupVersionResource{Group: "federation", Version: "v1beta1", Resource: "clusters"} -func (c *FakeClusters) Create(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, err error) { +func (c *FakeClusters) Create(cluster *v1beta1.Cluster) (result *v1beta1.Cluster, err error) { obj, err := c.Fake. - Invokes(core.NewRootCreateAction(clustersResource, cluster), &v1alpha1.Cluster{}) + Invokes(core.NewRootCreateAction(clustersResource, cluster), &v1beta1.Cluster{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Cluster), err + return obj.(*v1beta1.Cluster), err } -func (c *FakeClusters) Update(cluster *v1alpha1.Cluster) (result *v1alpha1.Cluster, err error) { +func (c *FakeClusters) Update(cluster *v1beta1.Cluster) (result *v1beta1.Cluster, err error) { obj, err := c.Fake. - Invokes(core.NewRootUpdateAction(clustersResource, cluster), &v1alpha1.Cluster{}) + Invokes(core.NewRootUpdateAction(clustersResource, cluster), &v1beta1.Cluster{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Cluster), err + return obj.(*v1beta1.Cluster), err } -func (c *FakeClusters) UpdateStatus(cluster *v1alpha1.Cluster) (*v1alpha1.Cluster, error) { +func (c *FakeClusters) UpdateStatus(cluster *v1beta1.Cluster) (*v1beta1.Cluster, error) { obj, err := c.Fake. - Invokes(core.NewRootUpdateSubresourceAction(clustersResource, "status", cluster), &v1alpha1.Cluster{}) + Invokes(core.NewRootUpdateSubresourceAction(clustersResource, "status", cluster), &v1beta1.Cluster{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Cluster), err + return obj.(*v1beta1.Cluster), err } func (c *FakeClusters) Delete(name string, options *api.DeleteOptions) error { _, err := c.Fake. - Invokes(core.NewRootDeleteAction(clustersResource, name), &v1alpha1.Cluster{}) + Invokes(core.NewRootDeleteAction(clustersResource, name), &v1beta1.Cluster{}) return err } func (c *FakeClusters) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { action := core.NewRootDeleteCollectionAction(clustersResource, listOptions) - _, err := c.Fake.Invokes(action, &v1alpha1.ClusterList{}) + _, err := c.Fake.Invokes(action, &v1beta1.ClusterList{}) return err } -func (c *FakeClusters) Get(name string) (result *v1alpha1.Cluster, err error) { +func (c *FakeClusters) Get(name string) (result *v1beta1.Cluster, err error) { obj, err := c.Fake. - Invokes(core.NewRootGetAction(clustersResource, name), &v1alpha1.Cluster{}) + Invokes(core.NewRootGetAction(clustersResource, name), &v1beta1.Cluster{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Cluster), err + return obj.(*v1beta1.Cluster), err } -func (c *FakeClusters) List(opts api.ListOptions) (result *v1alpha1.ClusterList, err error) { +func (c *FakeClusters) List(opts api.ListOptions) (result *v1beta1.ClusterList, err error) { obj, err := c.Fake. - Invokes(core.NewRootListAction(clustersResource, opts), &v1alpha1.ClusterList{}) + Invokes(core.NewRootListAction(clustersResource, opts), &v1beta1.ClusterList{}) if obj == nil { return nil, err } @@ -92,8 +92,8 @@ func (c *FakeClusters) List(opts api.ListOptions) (result *v1alpha1.ClusterList, if label == nil { label = labels.Everything() } - list := &v1alpha1.ClusterList{} - for _, item := range obj.(*v1alpha1.ClusterList).Items { + list := &v1beta1.ClusterList{} + for _, item := range obj.(*v1beta1.ClusterList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -108,11 +108,11 @@ func (c *FakeClusters) Watch(opts api.ListOptions) (watch.Interface, error) { } // Patch applies the patch and returns the patched cluster. -func (c *FakeClusters) Patch(name string, pt api.PatchType, data []byte) (result *v1alpha1.Cluster, err error) { +func (c *FakeClusters) Patch(name string, pt api.PatchType, data []byte) (result *v1beta1.Cluster, err error) { obj, err := c.Fake. - Invokes(core.NewRootPatchAction(clustersResource, name, data), &v1alpha1.Cluster{}) + Invokes(core.NewRootPatchAction(clustersResource, name, data), &v1beta1.Cluster{}) if obj == nil { return nil, err } - return obj.(*v1alpha1.Cluster), err + return obj.(*v1beta1.Cluster), err } diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/fake_federation_client.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_federation_client.go similarity index 84% rename from federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/fake_federation_client.go rename to federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_federation_client.go index 48390713fd..829e6a1300 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/fake/fake_federation_client.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_federation_client.go @@ -17,7 +17,7 @@ limitations under the License. package fake import ( - v1alpha1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1" + v1beta1 "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1" restclient "k8s.io/kubernetes/pkg/client/restclient" core "k8s.io/kubernetes/pkg/client/testing/core" ) @@ -26,7 +26,7 @@ type FakeFederation struct { *core.Fake } -func (c *FakeFederation) Clusters() v1alpha1.ClusterInterface { +func (c *FakeFederation) Clusters() v1beta1.ClusterInterface { return &FakeClusters{c} } diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/federation_client.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/federation_client.go similarity index 99% rename from federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/federation_client.go rename to federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/federation_client.go index 1d2e782c01..381aa9f8d9 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/federation_client.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/federation_client.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 import ( api "k8s.io/kubernetes/pkg/api" diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/generated_expansion.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/generated_expansion.go similarity index 97% rename from federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/generated_expansion.go rename to federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/generated_expansion.go index 5a05fca2c2..ab1d777e17 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1alpha1/generated_expansion.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/generated_expansion.go @@ -14,6 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha1 +package v1beta1 type ClusterExpansion interface{} diff --git a/federation/cmd/federation-apiserver/app/federation.go b/federation/cmd/federation-apiserver/app/federation.go index f081b55d9f..a0883f76de 100644 --- a/federation/cmd/federation-apiserver/app/federation.go +++ b/federation/cmd/federation-apiserver/app/federation.go @@ -40,7 +40,7 @@ func installFederationAPIs(s *genericoptions.ServerRunOptions, g *genericapiserv apiGroupInfo := genericapiserver.APIGroupInfo{ GroupMeta: *federationGroupMeta, VersionedResourcesStorageMap: map[string]map[string]rest.Storage{ - "v1alpha1": federationResources, + "v1beta1": federationResources, }, OptionsExternalVersion: ®istered.GroupOrDie(api.GroupName).GroupVersion, Scheme: api.Scheme, diff --git a/federation/cmd/federation-apiserver/app/server_test.go b/federation/cmd/federation-apiserver/app/server_test.go index fa72048e26..a97e463d64 100644 --- a/federation/cmd/federation-apiserver/app/server_test.go +++ b/federation/cmd/federation-apiserver/app/server_test.go @@ -28,7 +28,7 @@ import ( "time" "github.com/stretchr/testify/assert" - fed_v1a1 "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + fed_v1a1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/genericapiserver/options" diff --git a/federation/pkg/federation-controller/cluster/cluster_client.go b/federation/pkg/federation-controller/cluster/cluster_client.go index 401d5e784a..3bf23433d7 100644 --- a/federation/pkg/federation-controller/cluster/cluster_client.go +++ b/federation/pkg/federation-controller/cluster/cluster_client.go @@ -21,7 +21,7 @@ import ( "strings" "github.com/golang/glog" - federation_v1alpha1 "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + federation_v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/federation/pkg/federation-controller/util" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/unversioned" @@ -44,7 +44,7 @@ type ClusterClient struct { kubeClient *clientset.Clientset } -func NewClusterClientSet(c *federation_v1alpha1.Cluster) (*ClusterClient, error) { +func NewClusterClientSet(c *federation_v1beta1.Cluster) (*ClusterClient, error) { clusterConfig, err := util.BuildClusterConfig(c) if err != nil { return nil, err @@ -64,35 +64,35 @@ func NewClusterClientSet(c *federation_v1alpha1.Cluster) (*ClusterClient, error) } // GetClusterHealthStatus gets the kubernetes cluster health status by requesting "/healthz" -func (self *ClusterClient) GetClusterHealthStatus() *federation_v1alpha1.ClusterStatus { - clusterStatus := federation_v1alpha1.ClusterStatus{} +func (self *ClusterClient) GetClusterHealthStatus() *federation_v1beta1.ClusterStatus { + clusterStatus := federation_v1beta1.ClusterStatus{} currentTime := unversioned.Now() - newClusterReadyCondition := federation_v1alpha1.ClusterCondition{ - Type: federation_v1alpha1.ClusterReady, + newClusterReadyCondition := federation_v1beta1.ClusterCondition{ + Type: federation_v1beta1.ClusterReady, Status: v1.ConditionTrue, Reason: "ClusterReady", Message: "/healthz responded with ok", LastProbeTime: currentTime, LastTransitionTime: currentTime, } - newClusterNotReadyCondition := federation_v1alpha1.ClusterCondition{ - Type: federation_v1alpha1.ClusterReady, + newClusterNotReadyCondition := federation_v1beta1.ClusterCondition{ + Type: federation_v1beta1.ClusterReady, Status: v1.ConditionFalse, Reason: "ClusterNotReady", Message: "/healthz responded without ok", LastProbeTime: currentTime, LastTransitionTime: currentTime, } - newNodeOfflineCondition := federation_v1alpha1.ClusterCondition{ - Type: federation_v1alpha1.ClusterOffline, + newNodeOfflineCondition := federation_v1beta1.ClusterCondition{ + Type: federation_v1beta1.ClusterOffline, Status: v1.ConditionTrue, Reason: "ClusterNotReachable", Message: "cluster is not reachable", LastProbeTime: currentTime, LastTransitionTime: currentTime, } - newNodeNotOfflineCondition := federation_v1alpha1.ClusterCondition{ - Type: federation_v1alpha1.ClusterOffline, + newNodeNotOfflineCondition := federation_v1beta1.ClusterCondition{ + Type: federation_v1beta1.ClusterOffline, Status: v1.ConditionFalse, Reason: "ClusterReachable", Message: "cluster is reachable", diff --git a/federation/pkg/federation-controller/cluster/clustercontroller.go b/federation/pkg/federation-controller/cluster/clustercontroller.go index e72c166815..4a0cc802cb 100644 --- a/federation/pkg/federation-controller/cluster/clustercontroller.go +++ b/federation/pkg/federation-controller/cluster/clustercontroller.go @@ -21,7 +21,7 @@ import ( "time" "github.com/golang/glog" - federation_v1alpha1 "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + federation_v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" cluster_cache "k8s.io/kubernetes/federation/client/cache" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3" "k8s.io/kubernetes/pkg/api" @@ -44,7 +44,7 @@ type ClusterController struct { // clusterMonitorPeriod is the period for updating status of cluster clusterMonitorPeriod time.Duration // clusterClusterStatusMap is a mapping of clusterName and cluster status of last sampling - clusterClusterStatusMap map[string]federation_v1alpha1.ClusterStatus + clusterClusterStatusMap map[string]federation_v1beta1.ClusterStatus // clusterKubeClientMap is a mapping of clusterName and restclient clusterKubeClientMap map[string]ClusterClient @@ -60,7 +60,7 @@ func NewclusterController(federationClient federationclientset.Interface, cluste knownClusterSet: make(sets.String), federationClient: federationClient, clusterMonitorPeriod: clusterMonitorPeriod, - clusterClusterStatusMap: make(map[string]federation_v1alpha1.ClusterStatus), + clusterClusterStatusMap: make(map[string]federation_v1beta1.ClusterStatus), clusterKubeClientMap: make(map[string]ClusterClient), } cc.clusterStore.Store, cc.clusterController = framework.NewInformer( @@ -72,7 +72,7 @@ func NewclusterController(federationClient federationclientset.Interface, cluste return cc.federationClient.Federation().Clusters().Watch(options) }, }, - &federation_v1alpha1.Cluster{}, + &federation_v1beta1.Cluster{}, controller.NoResyncPeriodFunc(), framework.ResourceEventHandlerFuncs{ DeleteFunc: cc.delFromClusterSet, @@ -85,7 +85,7 @@ func NewclusterController(federationClient federationclientset.Interface, cluste // delFromClusterSet delete a cluster from clusterSet and // delete the corresponding restclient from the map clusterKubeClientMap func (cc *ClusterController) delFromClusterSet(obj interface{}) { - cluster := obj.(*federation_v1alpha1.Cluster) + cluster := obj.(*federation_v1beta1.Cluster) cc.knownClusterSet.Delete(cluster.Name) delete(cc.clusterKubeClientMap, cluster.Name) } @@ -93,7 +93,7 @@ func (cc *ClusterController) delFromClusterSet(obj interface{}) { // addToClusterSet insert the new cluster to clusterSet and create a corresponding // restclient to map clusterKubeClientMap func (cc *ClusterController) addToClusterSet(obj interface{}) { - cluster := obj.(*federation_v1alpha1.Cluster) + cluster := obj.(*federation_v1beta1.Cluster) cc.knownClusterSet.Insert(cluster.Name) // create the restclient of cluster restClient, err := NewClusterClientSet(cluster) @@ -116,7 +116,7 @@ func (cc *ClusterController) Run() { }, cc.clusterMonitorPeriod, wait.NeverStop) } -func (cc *ClusterController) GetClusterStatus(cluster *federation_v1alpha1.Cluster) (*federation_v1alpha1.ClusterStatus, error) { +func (cc *ClusterController) GetClusterStatus(cluster *federation_v1beta1.Cluster) (*federation_v1beta1.ClusterStatus, error) { // just get the status of cluster, by requesting the restapi "/healthz" clusterClient, found := cc.clusterKubeClientMap[cluster.Name] if !found { diff --git a/federation/pkg/federation-controller/cluster/clustercontroller_test.go b/federation/pkg/federation-controller/cluster/clustercontroller_test.go index 29d96cd69d..0d6e11232b 100644 --- a/federation/pkg/federation-controller/cluster/clustercontroller_test.go +++ b/federation/pkg/federation-controller/cluster/clustercontroller_test.go @@ -23,7 +23,7 @@ import ( "net/http/httptest" "testing" - federation_v1alpha1 "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + federation_v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3" controller_util "k8s.io/kubernetes/federation/pkg/federation-controller/util" "k8s.io/kubernetes/pkg/api/testapi" @@ -35,15 +35,15 @@ import ( "k8s.io/kubernetes/pkg/util" ) -func newCluster(clusterName string, serverUrl string) *federation_v1alpha1.Cluster { - cluster := federation_v1alpha1.Cluster{ +func newCluster(clusterName string, serverUrl string) *federation_v1beta1.Cluster { + cluster := federation_v1beta1.Cluster{ TypeMeta: unversioned.TypeMeta{APIVersion: testapi.Federation.GroupVersion().String()}, ObjectMeta: v1.ObjectMeta{ UID: util.NewUUID(), Name: clusterName, }, - Spec: federation_v1alpha1.ClusterSpec{ - ServerAddressByClientCIDRs: []federation_v1alpha1.ServerAddressByClientCIDR{ + Spec: federation_v1beta1.ClusterSpec{ + ServerAddressByClientCIDRs: []federation_v1beta1.ServerAddressByClientCIDR{ { ClientCIDR: "0.0.0.0/0", ServerAddress: serverUrl, @@ -54,13 +54,13 @@ func newCluster(clusterName string, serverUrl string) *federation_v1alpha1.Clust return &cluster } -func newClusterList(cluster *federation_v1alpha1.Cluster) *federation_v1alpha1.ClusterList { - clusterList := federation_v1alpha1.ClusterList{ +func newClusterList(cluster *federation_v1beta1.Cluster) *federation_v1beta1.ClusterList { + clusterList := federation_v1beta1.ClusterList{ TypeMeta: unversioned.TypeMeta{APIVersion: testapi.Federation.GroupVersion().String()}, ListMeta: unversioned.ListMeta{ SelfLink: "foobar", }, - Items: []federation_v1alpha1.Cluster{}, + Items: []federation_v1beta1.Cluster{}, } clusterList.Items = append(clusterList.Items, *cluster) return &clusterList @@ -68,7 +68,7 @@ func newClusterList(cluster *federation_v1alpha1.Cluster) *federation_v1alpha1.C // init a fake http handler, simulate a federation apiserver, response the "DELETE" "PUT" "GET" "UPDATE" // when "canBeGotten" is false, means that user can not get the cluster cluster from apiserver -func createHttptestFakeHandlerForFederation(clusterList *federation_v1alpha1.ClusterList, canBeGotten bool) *http.HandlerFunc { +func createHttptestFakeHandlerForFederation(clusterList *federation_v1beta1.ClusterList, canBeGotten bool) *http.HandlerFunc { fakeHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { clusterListString, _ := json.Marshal(*clusterList) w.Header().Set("Content-Type", "application/json") @@ -126,7 +126,7 @@ func TestUpdateClusterStatusOK(t *testing.T) { // Override KubeconfigGetterForCluster to avoid having to setup service accounts and mount files with secret tokens. originalGetter := controller_util.KubeconfigGetterForCluster - controller_util.KubeconfigGetterForCluster = func(c *federation_v1alpha1.Cluster) clientcmd.KubeconfigGetter { + controller_util.KubeconfigGetterForCluster = func(c *federation_v1beta1.Cluster) clientcmd.KubeconfigGetter { return func() (*clientcmdapi.Config, error) { return &clientcmdapi.Config{}, nil } @@ -141,7 +141,7 @@ func TestUpdateClusterStatusOK(t *testing.T) { if !found { t.Errorf("Failed to Update Cluster Status") } else { - if (clusterStatus.Conditions[1].Status != v1.ConditionFalse) || (clusterStatus.Conditions[1].Type != federation_v1alpha1.ClusterOffline) { + if (clusterStatus.Conditions[1].Status != v1.ConditionFalse) || (clusterStatus.Conditions[1].Type != federation_v1beta1.ClusterOffline) { t.Errorf("Failed to Update Cluster Status") } } diff --git a/federation/pkg/federation-controller/service/cluster_helper.go b/federation/pkg/federation-controller/service/cluster_helper.go index 08c689f42f..c24f28495f 100644 --- a/federation/pkg/federation-controller/service/cluster_helper.go +++ b/federation/pkg/federation-controller/service/cluster_helper.go @@ -19,7 +19,7 @@ package service import ( "sync" - v1alpha1 "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/pkg/api" v1 "k8s.io/kubernetes/pkg/api/v1" cache "k8s.io/kubernetes/pkg/client/cache" @@ -38,7 +38,7 @@ import ( type clusterCache struct { clientset *release_1_3.Clientset - cluster *v1alpha1.Cluster + cluster *v1beta1.Cluster // A store of services, populated by the serviceController serviceStore cache.StoreToServiceLister // Watches changes to all services @@ -58,7 +58,7 @@ type clusterClientCache struct { clientMap map[string]*clusterCache } -func (cc *clusterClientCache) startClusterLW(cluster *v1alpha1.Cluster, clusterName string) { +func (cc *clusterClientCache) startClusterLW(cluster *v1beta1.Cluster, clusterName string) { cachedClusterClient, ok := cc.clientMap[clusterName] // only create when no existing cachedClusterClient if ok { @@ -162,7 +162,7 @@ func (cc *clusterClientCache) startClusterLW(cluster *v1alpha1.Cluster, clusterN // delFromClusterSet delete a cluster from clusterSet and // delete the corresponding restclient from the map clusterKubeClientMap func (cc *clusterClientCache) delFromClusterSet(obj interface{}) { - cluster, ok := obj.(*v1alpha1.Cluster) + cluster, ok := obj.(*v1beta1.Cluster) cc.rwlock.Lock() defer cc.rwlock.Unlock() if ok { @@ -181,10 +181,10 @@ func (cc *clusterClientCache) delFromClusterSet(obj interface{}) { // addToClusterSet inserts the new cluster to clusterSet and creates a corresponding // restclient to map clusterKubeClientMap func (cc *clusterClientCache) addToClientMap(obj interface{}) { - cluster := obj.(*v1alpha1.Cluster) + cluster := obj.(*v1beta1.Cluster) cc.rwlock.Lock() defer cc.rwlock.Unlock() - cluster, ok := obj.(*v1alpha1.Cluster) + cluster, ok := obj.(*v1beta1.Cluster) if !ok { return } @@ -196,7 +196,7 @@ func (cc *clusterClientCache) addToClientMap(obj interface{}) { } } -func newClusterClientset(c *v1alpha1.Cluster) (*release_1_3.Clientset, error) { +func newClusterClientset(c *v1beta1.Cluster) (*release_1_3.Clientset, error) { clusterConfig, err := util.BuildClusterConfig(c) if clusterConfig != nil { clientset := release_1_3.NewForConfigOrDie(restclient.AddUserAgent(clusterConfig, UserAgentName)) diff --git a/federation/pkg/federation-controller/service/endpoint_helper_test.go b/federation/pkg/federation-controller/service/endpoint_helper_test.go index c9421d819b..67c639563a 100644 --- a/federation/pkg/federation-controller/service/endpoint_helper_test.go +++ b/federation/pkg/federation-controller/service/endpoint_helper_test.go @@ -19,7 +19,7 @@ package service import ( "testing" - "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/federation/pkg/dnsprovider/providers/google/clouddns" // Only for unit testing purposes. v1 "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/sets" @@ -58,8 +58,8 @@ func TestProcessEndpointUpdate(t *testing.T) { cc := clusterClientCache{ clientMap: map[string]*clusterCache{ clusterName: { - cluster: &v1alpha1.Cluster{ - Status: v1alpha1.ClusterStatus{ + cluster: &v1beta1.Cluster{ + Status: v1beta1.ClusterStatus{ Zones: []string{"foozone"}, Region: "fooregion", }, @@ -111,8 +111,8 @@ func TestProcessEndpointDeletion(t *testing.T) { cc := clusterClientCache{ clientMap: map[string]*clusterCache{ clusterName: { - cluster: &v1alpha1.Cluster{ - Status: v1alpha1.ClusterStatus{ + cluster: &v1beta1.Cluster{ + Status: v1beta1.ClusterStatus{ Zones: []string{"foozone"}, Region: "fooregion", }, diff --git a/federation/pkg/federation-controller/service/servicecontroller.go b/federation/pkg/federation-controller/service/servicecontroller.go index 0857d4d831..5d285bc0c8 100644 --- a/federation/pkg/federation-controller/service/servicecontroller.go +++ b/federation/pkg/federation-controller/service/servicecontroller.go @@ -24,7 +24,7 @@ import ( "reflect" "github.com/golang/glog" - v1alpha1 "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" federationcache "k8s.io/kubernetes/federation/client/cache" federation_release_1_3 "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_3" "k8s.io/kubernetes/federation/pkg/dnsprovider" @@ -176,17 +176,17 @@ func New(federationClient federation_release_1_3.Interface, dns dnsprovider.Inte return s.federationClient.Federation().Clusters().Watch(options) }, }, - &v1alpha1.Cluster{}, + &v1beta1.Cluster{}, clusterSyncPeriod, framework.ResourceEventHandlerFuncs{ DeleteFunc: s.clusterCache.delFromClusterSet, AddFunc: s.clusterCache.addToClientMap, UpdateFunc: func(old, cur interface{}) { - oldCluster, ok := old.(*v1alpha1.Cluster) + oldCluster, ok := old.(*v1beta1.Cluster) if !ok { return } - curCluster, ok := cur.(*v1alpha1.Cluster) + curCluster, ok := cur.(*v1beta1.Cluster) if !ok { return } @@ -608,7 +608,7 @@ func portEqualExcludeNodePort(x, y *v1.ServicePort) bool { return true } -func clustersFromList(list *v1alpha1.ClusterList) []string { +func clustersFromList(list *v1beta1.ClusterList) []string { result := []string{} for ix := range list.Items { result = append(result, list.Items[ix].Name) @@ -619,7 +619,7 @@ func clustersFromList(list *v1alpha1.ClusterList) []string { // getClusterConditionPredicate filter all clusters meet condition of // condition.type=Ready and condition.status=true func getClusterConditionPredicate() federationcache.ClusterConditionPredicate { - return func(cluster v1alpha1.Cluster) bool { + return func(cluster v1beta1.Cluster) bool { // If we have no info, don't accept if len(cluster.Status.Conditions) == 0 { return false @@ -627,7 +627,7 @@ func getClusterConditionPredicate() federationcache.ClusterConditionPredicate { for _, cond := range cluster.Status.Conditions { //We consider the cluster for load balancing only when its ClusterReady condition status //is ConditionTrue - if cond.Type == v1alpha1.ClusterReady && cond.Status != v1.ConditionTrue { + if cond.Type == v1beta1.ClusterReady && cond.Status != v1.ConditionTrue { glog.V(4).Infof("Ignoring cluser %v with %v condition status %v", cluster.Name, cond.Type, cond.Status) return false } diff --git a/federation/pkg/federation-controller/service/servicecontroller_test.go b/federation/pkg/federation-controller/service/servicecontroller_test.go index 31f9a0235a..17eee1abc1 100644 --- a/federation/pkg/federation-controller/service/servicecontroller_test.go +++ b/federation/pkg/federation-controller/service/servicecontroller_test.go @@ -20,7 +20,7 @@ import ( "sync" "testing" - "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/federation/pkg/dnsprovider/providers/google/clouddns" // Only for unit testing purposes. "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/util/sets" @@ -39,22 +39,22 @@ func TestGetClusterConditionPredicate(t *testing.T) { } tests := []struct { - cluster v1alpha1.Cluster + cluster v1beta1.Cluster expectAccept bool name string serviceController *ServiceController }{ { - cluster: v1alpha1.Cluster{}, + cluster: v1beta1.Cluster{}, expectAccept: false, name: "empty", serviceController: &serviceController, }, { - cluster: v1alpha1.Cluster{ - Status: v1alpha1.ClusterStatus{ - Conditions: []v1alpha1.ClusterCondition{ - {Type: v1alpha1.ClusterReady, Status: v1.ConditionTrue}, + cluster: v1beta1.Cluster{ + Status: v1beta1.ClusterStatus{ + Conditions: []v1beta1.ClusterCondition{ + {Type: v1beta1.ClusterReady, Status: v1.ConditionTrue}, }, }, }, @@ -63,10 +63,10 @@ func TestGetClusterConditionPredicate(t *testing.T) { serviceController: &serviceController, }, { - cluster: v1alpha1.Cluster{ - Status: v1alpha1.ClusterStatus{ - Conditions: []v1alpha1.ClusterCondition{ - {Type: v1alpha1.ClusterReady, Status: v1.ConditionFalse}, + cluster: v1beta1.Cluster{ + Status: v1beta1.ClusterStatus{ + Conditions: []v1beta1.ClusterCondition{ + {Type: v1beta1.ClusterReady, Status: v1.ConditionFalse}, }, }, }, diff --git a/federation/pkg/federation-controller/util/cluster_util.go b/federation/pkg/federation-controller/util/cluster_util.go index 5105fa5387..d0bd34e6ef 100644 --- a/federation/pkg/federation-controller/util/cluster_util.go +++ b/federation/pkg/federation-controller/util/cluster_util.go @@ -23,7 +23,7 @@ import ( "time" "github.com/golang/glog" - federation_v1alpha1 "k8s.io/kubernetes/federation/apis/federation/v1alpha1" + federation_v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" client "k8s.io/kubernetes/pkg/client/unversioned" @@ -40,7 +40,7 @@ const ( getSecretTimeout = 1 * time.Minute ) -func BuildClusterConfig(c *federation_v1alpha1.Cluster) (*restclient.Config, error) { +func BuildClusterConfig(c *federation_v1beta1.Cluster) (*restclient.Config, error) { var serverAddress string var clusterConfig *restclient.Config hostIP, err := utilnet.ChooseHostInterface() @@ -78,7 +78,7 @@ func BuildClusterConfig(c *federation_v1alpha1.Cluster) (*restclient.Config, err // This is to inject a different kubeconfigGetter in tests. // We dont use the standard one which calls NewInCluster in tests to avoid having to setup service accounts and mount files with secret tokens. -var KubeconfigGetterForCluster = func(c *federation_v1alpha1.Cluster) clientcmd.KubeconfigGetter { +var KubeconfigGetterForCluster = func(c *federation_v1beta1.Cluster) clientcmd.KubeconfigGetter { return func() (*clientcmdapi.Config, error) { secretRefName := "" if c.Spec.SecretRef != nil { diff --git a/hack/test-go.sh b/hack/test-go.sh index fdecf45a43..617b961c58 100755 --- a/hack/test-go.sh +++ b/hack/test-go.sh @@ -60,7 +60,7 @@ KUBE_GOVERALLS_BIN=${KUBE_GOVERALLS_BIN:-} # "v1,compute/v1alpha1,experimental/v1alpha2;v1,compute/v2,experimental/v1alpha3" # FIXME: due to current implementation of a test client (see: pkg/api/testapi/testapi.go) # ONLY the last version is tested in each group. -KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,autoscaling/v1,batch/v1,batch/v2alpha1,extensions/v1beta1,apps/v1alpha1,federation/v1alpha1,policy/v1alpha1,rbac.authorization.k8s.io/v1alpha1,certificates/v1alpha1"} +KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,autoscaling/v1,batch/v1,batch/v2alpha1,extensions/v1beta1,apps/v1alpha1,federation/v1beta1,policy/v1alpha1,rbac.authorization.k8s.io/v1alpha1,certificates/v1alpha1"} # once we have multiple group supports # Create a junit-style XML test report in this directory if set. KUBE_JUNIT_REPORT_DIR=${KUBE_JUNIT_REPORT_DIR:-} diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 02530a7062..a884db7ff1 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -46,7 +46,7 @@ ${clientgen} -t "$@" ${clientgen} --clientset-name="release_1_3" --input="api/v1,extensions/v1beta1,autoscaling/v1,batch/v1" # Clientgen for federation clientset. ${clientgen} --clientset-name=federation_internalclientset --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/","api/" --included-types-overrides="api/Service" "$@" -${clientgen} --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/v1alpha1","api/v1" --included-types-overrides="api/v1/Service" "$@" +${clientgen} --clientset-name=federation_release_1_3 --clientset-path=k8s.io/kubernetes/federation/client/clientset_generated --input="../../federation/apis/federation/v1beta1","api/v1" --included-types-overrides="api/v1/Service" "$@" ${conversiongen} "$@" ${deepcopygen} "$@" ${setgen} "$@" From 376b5f247ad429c9094c5714a4e7e603e4335577 Mon Sep 17 00:00:00 2001 From: "Tim St. Clair" Date: Tue, 28 Jun 2016 17:20:08 -0700 Subject: [PATCH 268/339] Refactor common pod patterns to e2e framework. --- test/e2e/e2e_test.go | 3 +- test/e2e/framework/pods.go | 72 ++++++++++++++++++++ test/e2e/framework/test_context.go | 30 ++++++--- test/e2e_node/configmap.go | 13 ++-- test/e2e_node/container.go | 27 +++----- test/e2e_node/container_manager_test.go | 16 ++--- test/e2e_node/downward_api_test.go | 2 +- test/e2e_node/e2e_node_suite_test.go | 13 +++- test/e2e_node/kubelet_test.go | 81 +++++++++-------------- test/e2e_node/privileged_test.go | 3 +- test/e2e_node/runtime_conformance_test.go | 18 ++--- test/e2e_node/util.go | 7 +- 12 files changed, 166 insertions(+), 119 deletions(-) create mode 100644 test/e2e/framework/pods.go diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 076f2354bd..3697aeb1b6 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -23,7 +23,8 @@ import ( ) func init() { - framework.RegisterFlags() + framework.RegisterCommonFlags() + framework.RegisterClusterFlags() } func TestE2E(t *testing.T) { diff --git a/test/e2e/framework/pods.go b/test/e2e/framework/pods.go new file mode 100644 index 0000000000..8530c2fc77 --- /dev/null +++ b/test/e2e/framework/pods.go @@ -0,0 +1,72 @@ +/* +Copyright 2016 The Kubernetes Authors All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package framework + +import ( + "sync" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/client/unversioned" + + . "github.com/onsi/gomega" +) + +// TODO: Consolidate pod-specific framework functions here. + +// Convenience method for getting a pod client interface in the framework's namespace. +func (f *Framework) PodClient() unversioned.PodInterface { + return f.Client.Pods(f.Namespace.Name) +} + +// Create a new pod according to the framework specifications, and wait for it to start. +func (f *Framework) CreatePod(pod *api.Pod) { + f.CreatePodAsync(pod) + ExpectNoError(f.WaitForPodRunning(pod.Name)) +} + +// Create a new pod according to the framework specifications (don't wait for it to start). +func (f *Framework) CreatePodAsync(pod *api.Pod) { + f.MungePodSpec(pod) + _, err := f.PodClient().Create(pod) + ExpectNoError(err, "Error creating Pod") +} + +// Batch version of CreatePod. All pods are created before waiting. +func (f *Framework) CreatePods(pods []*api.Pod) { + for _, pod := range pods { + f.CreatePodAsync(pod) + } + var wg sync.WaitGroup + for _, pod := range pods { + wg.Add(1) + podName := pod.Name + go func() { + ExpectNoError(f.WaitForPodRunning(podName)) + wg.Done() + }() + } + wg.Wait() +} + +// Apply test-suite specific transformations to the pod spec. +// TODO: figure out a nicer, more generic way to tie this to framework instances. +func (f *Framework) MungePodSpec(pod *api.Pod) { + if TestContext.NodeName != "" { + Expect(pod.Spec.NodeName).To(Or(BeZero(), Equal(TestContext.NodeName)), "Test misconfigured") + pod.Spec.NodeName = TestContext.NodeName + } +} diff --git a/test/e2e/framework/test_context.go b/test/e2e/framework/test_context.go index 28d653f493..05dd829ab6 100644 --- a/test/e2e/framework/test_context.go +++ b/test/e2e/framework/test_context.go @@ -65,6 +65,8 @@ type TestContextType struct { CreateTestingNS CreateTestingNSFn // If set to true test will dump data about the namespace in which test was running. DumpLogsOnFailure bool + // Name of the node to run tests on (node e2e suite only). + NodeName string } type CloudConfig struct { @@ -83,7 +85,8 @@ type CloudConfig struct { var TestContext TestContextType var federatedKubeContext string -func RegisterFlags() { +// Register flags common to all e2e test suites. +func RegisterCommonFlags() { // Turn on verbose by default to get spec names config.DefaultReporterConfig.Verbose = true @@ -93,6 +96,19 @@ func RegisterFlags() { // Randomize specs as well as suites config.GinkgoConfig.RandomizeAllSpecs = true + flag.StringVar(&TestContext.GatherKubeSystemResourceUsageData, "gather-resource-usage", "false", "If set to 'true' or 'all' framework will be monitoring resource usage of system all add-ons in (some) e2e tests, if set to 'master' framework will be monitoring master node only, if set to 'none' of 'false' monitoring will be turned off.") + flag.BoolVar(&TestContext.GatherLogsSizes, "gather-logs-sizes", false, "If set to true framework will be monitoring logs sizes on all machines running e2e tests.") + flag.BoolVar(&TestContext.GatherMetricsAfterTest, "gather-metrics-at-teardown", false, "If set to true framwork will gather metrics from all components after each test.") + flag.StringVar(&TestContext.OutputPrintType, "output-print-type", "hr", "Comma separated list: 'hr' for human readable summaries 'json' for JSON ones.") + flag.BoolVar(&TestContext.DumpLogsOnFailure, "dump-logs-on-failure", true, "If set to true test will dump data about the namespace in which test was running.") +} + +// Register flags specific to the cluster e2e test suite. +func RegisterClusterFlags() { + // TODO: Move to common flags once namespace deletion is fixed for node e2e. + flag.BoolVar(&TestContext.DeleteNamespace, "delete-namespace", true, "If true tests will delete namespace after completion. It is only designed to make debugging easier, DO NOT turn it off by default.") + + flag.BoolVar(&TestContext.VerifyServiceAccount, "e2e-verify-service-account", true, "If true tests will verify the service account before running.") flag.StringVar(&TestContext.KubeConfig, clientcmd.RecommendedConfigPathFlag, os.Getenv(clientcmd.RecommendedConfigPathEnvVar), "Path to kubeconfig containing embedded authinfo.") flag.StringVar(&TestContext.KubeContext, clientcmd.FlagContext, "", "kubeconfig context to use/override. If unset, will use value from 'current-context'") flag.StringVar(&TestContext.KubeAPIContentType, "kube-api-content-type", "", "ContentType used to communicate with apiserver") @@ -126,12 +142,10 @@ func RegisterFlags() { flag.DurationVar(&TestContext.SystemPodsStartupTimeout, "system-pods-startup-timeout", 10*time.Minute, "Timeout for waiting for all system pods to be running before starting tests.") flag.StringVar(&TestContext.UpgradeTarget, "upgrade-target", "ci/latest", "Version to upgrade to (e.g. 'release/stable', 'release/latest', 'ci/latest', '0.19.1', '0.19.1-669-gabac8c8') if doing an upgrade test.") flag.StringVar(&TestContext.PrometheusPushGateway, "prom-push-gateway", "", "The URL to prometheus gateway, so that metrics can be pushed during e2es and scraped by prometheus. Typically something like 127.0.0.1:9091.") - flag.BoolVar(&TestContext.VerifyServiceAccount, "e2e-verify-service-account", true, "If true tests will verify the service account before running.") - flag.BoolVar(&TestContext.DeleteNamespace, "delete-namespace", true, "If true tests will delete namespace after completion. It is only designed to make debugging easier, DO NOT turn it off by default.") flag.BoolVar(&TestContext.CleanStart, "clean-start", false, "If true, purge all namespaces except default and system before running tests. This serves to Cleanup test namespaces from failed/interrupted e2e runs in a long-lived cluster.") - flag.StringVar(&TestContext.GatherKubeSystemResourceUsageData, "gather-resource-usage", "false", "If set to 'true' or 'all' framework will be monitoring resource usage of system all add-ons in (some) e2e tests, if set to 'master' framework will be monitoring master node only, if set to 'none' of 'false' monitoring will be turned off.") - flag.BoolVar(&TestContext.GatherLogsSizes, "gather-logs-sizes", false, "If set to true framework will be monitoring logs sizes on all machines running e2e tests.") - flag.BoolVar(&TestContext.GatherMetricsAfterTest, "gather-metrics-at-teardown", false, "If set to true framwork will gather metrics from all components after each test.") - flag.StringVar(&TestContext.OutputPrintType, "output-print-type", "hr", "Comma separated list: 'hr' for human readable summaries 'json' for JSON ones.") - flag.BoolVar(&TestContext.DumpLogsOnFailure, "dump-logs-on-failure", true, "If set to true test will dump data about the namespace in which test was running.") +} + +// Register flags specific to the node e2e test suite. +func RegisterNodeFlags() { + flag.StringVar(&TestContext.NodeName, "node-name", "", "Name of the node to run tests on (node e2e suite only).") } diff --git a/test/e2e_node/configmap.go b/test/e2e_node/configmap.go index 4e6c40ec7f..53b377105b 100644 --- a/test/e2e_node/configmap.go +++ b/test/e2e_node/configmap.go @@ -121,13 +121,8 @@ var _ = framework.KubeDescribe("ConfigMap", func() { }, } - assignPodToNode(pod) - By("Creating the pod") - _, err = f.Client.Pods(f.Namespace.Name).Create(pod) - Expect(err).NotTo(HaveOccurred()) - - framework.ExpectNoError(framework.WaitForPodRunningInNamespace(f.Client, pod.Name, f.Namespace.Name)) + f.CreatePod(pod) pollLogs := func() (string, error) { return framework.GetPodLogs(f.Client, f.Namespace.Name, pod.Name, containerName) @@ -184,7 +179,7 @@ var _ = framework.KubeDescribe("ConfigMap", func() { }, } - assignPodToNode(pod) + f.MungePodSpec(pod) framework.TestContainerOutput("consume configMaps", f.Client, pod, 0, []string{ "CONFIG_DATA_1=value-1", @@ -265,7 +260,7 @@ func doConfigMapE2EWithoutMappings(f *framework.Framework, uid, fsGroup int64) { pod.Spec.SecurityContext.FSGroup = &fsGroup } - assignPodToNode(pod) + f.MungePodSpec(pod) framework.TestContainerOutput("consume configMaps", f.Client, pod, 0, []string{ "content of file \"/etc/configmap-volume/data-1\": value-1", @@ -338,7 +333,7 @@ func doConfigMapE2EWithMappings(f *framework.Framework, uid, fsGroup int64) { pod.Spec.SecurityContext.FSGroup = &fsGroup } - assignPodToNode(pod) + f.MungePodSpec(pod) framework.TestContainerOutput("consume configMaps", f.Client, pod, 0, []string{ "content of file \"/etc/configmap-volume/path/to/data-2\": value-2", diff --git a/test/e2e_node/container.go b/test/e2e_node/container.go index ca5cd238f6..faaa6d6727 100644 --- a/test/e2e_node/container.go +++ b/test/e2e_node/container.go @@ -21,24 +21,23 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" - client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/util" + "k8s.io/kubernetes/test/e2e/framework" ) // One pod one container +// TODO: This should be migrated to the e2e framework. type ConformanceContainer struct { + Framework *framework.Framework Container api.Container - Client *client.Client RestartPolicy api.RestartPolicy Volumes []api.Volume ImagePullSecrets []string - NodeName string - Namespace string podName string } -func (cc *ConformanceContainer) Create() error { +func (cc *ConformanceContainer) Create() { cc.podName = cc.Container.Name + string(util.NewUUID()) imagePullSecrets := []api.LocalObjectReference{} for _, s := range cc.ImagePullSecrets { @@ -46,11 +45,9 @@ func (cc *ConformanceContainer) Create() error { } pod := &api.Pod{ ObjectMeta: api.ObjectMeta{ - Name: cc.podName, - Namespace: cc.Namespace, + Name: cc.podName, }, Spec: api.PodSpec{ - NodeName: cc.NodeName, RestartPolicy: cc.RestartPolicy, Containers: []api.Container{ cc.Container, @@ -59,17 +56,15 @@ func (cc *ConformanceContainer) Create() error { ImagePullSecrets: imagePullSecrets, }, } - - _, err := cc.Client.Pods(cc.Namespace).Create(pod) - return err + cc.Framework.CreatePodAsync(pod) } func (cc *ConformanceContainer) Delete() error { - return cc.Client.Pods(cc.Namespace).Delete(cc.podName, api.NewDeleteOptions(0)) + return cc.Framework.PodClient().Delete(cc.podName, api.NewDeleteOptions(0)) } func (cc *ConformanceContainer) IsReady() (bool, error) { - pod, err := cc.Client.Pods(cc.Namespace).Get(cc.podName) + pod, err := cc.Framework.PodClient().Get(cc.podName) if err != nil { return false, err } @@ -77,7 +72,7 @@ func (cc *ConformanceContainer) IsReady() (bool, error) { } func (cc *ConformanceContainer) GetPhase() (api.PodPhase, error) { - pod, err := cc.Client.Pods(cc.Namespace).Get(cc.podName) + pod, err := cc.Framework.PodClient().Get(cc.podName) if err != nil { return api.PodUnknown, err } @@ -85,7 +80,7 @@ func (cc *ConformanceContainer) GetPhase() (api.PodPhase, error) { } func (cc *ConformanceContainer) GetStatus() (api.ContainerStatus, error) { - pod, err := cc.Client.Pods(cc.Namespace).Get(cc.podName) + pod, err := cc.Framework.PodClient().Get(cc.podName) if err != nil { return api.ContainerStatus{}, err } @@ -97,7 +92,7 @@ func (cc *ConformanceContainer) GetStatus() (api.ContainerStatus, error) { } func (cc *ConformanceContainer) Present() (bool, error) { - _, err := cc.Client.Pods(cc.Namespace).Get(cc.podName) + _, err := cc.Framework.PodClient().Get(cc.podName) if err == nil { return true, nil } diff --git a/test/e2e_node/container_manager_test.go b/test/e2e_node/container_manager_test.go index 9acfc5b423..dec3151f5a 100644 --- a/test/e2e_node/container_manager_test.go +++ b/test/e2e_node/container_manager_test.go @@ -36,14 +36,11 @@ var _ = framework.KubeDescribe("Kubelet Container Manager", func() { BeforeEach(func() { podName = "bin-false" + string(util.NewUUID()) - pod := &api.Pod{ + f.CreatePodAsync(&api.Pod{ ObjectMeta: api.ObjectMeta{ - Name: podName, - Namespace: f.Namespace.Name, + Name: podName, }, Spec: api.PodSpec{ - // Force the Pod to schedule to the node without a scheduler running - NodeName: *nodeName, // Don't restart the Pod since it is expected to exit RestartPolicy: api.RestartPolicyNever, Containers: []api.Container{ @@ -54,15 +51,12 @@ var _ = framework.KubeDescribe("Kubelet Container Manager", func() { }, }, }, - } - - _, err := f.Client.Pods(f.Namespace.Name).Create(pod) - Expect(err).To(BeNil(), fmt.Sprintf("Error creating Pod %v", err)) + }) }) It("should have an error terminated reason", func() { Eventually(func() error { - podData, err := f.Client.Pods(f.Namespace.Name).Get(podName) + podData, err := f.PodClient().Get(podName) if err != nil { return err } @@ -81,7 +75,7 @@ var _ = framework.KubeDescribe("Kubelet Container Manager", func() { }) It("should be possible to delete", func() { - err := f.Client.Pods(f.Namespace.Name).Delete(podName, &api.DeleteOptions{}) + err := f.PodClient().Delete(podName, &api.DeleteOptions{}) Expect(err).To(BeNil(), fmt.Sprintf("Error deleting Pod %v", err)) }) }) diff --git a/test/e2e_node/downward_api_test.go b/test/e2e_node/downward_api_test.go index 0c9c88ebb0..41f1913508 100644 --- a/test/e2e_node/downward_api_test.go +++ b/test/e2e_node/downward_api_test.go @@ -158,7 +158,7 @@ func testDownwardAPI(f *framework.Framework, podName string, env []api.EnvVar, e RestartPolicy: api.RestartPolicyNever, }, } - assignPodToNode(pod) + f.MungePodSpec(pod) f.TestContainerOutputRegexp("downward api env vars", pod, 0, expectations) } diff --git a/test/e2e_node/e2e_node_suite_test.go b/test/e2e_node/e2e_node_suite_test.go index ae1f84563f..450d2abb62 100644 --- a/test/e2e_node/e2e_node_suite_test.go +++ b/test/e2e_node/e2e_node_suite_test.go @@ -31,6 +31,8 @@ import ( "testing" "time" + "k8s.io/kubernetes/test/e2e/framework" + "github.com/golang/glog" . "github.com/onsi/ginkgo" more_reporters "github.com/onsi/ginkgo/reporters" @@ -42,6 +44,11 @@ var e2es *e2eService var prePullImages = flag.Bool("prepull-images", true, "If true, prepull images so image pull failures do not cause test failures.") var junitFileNumber = flag.Int("junit-file-number", 1, "Used to create junit filename - e.g. junit_01.xml.") +func init() { + framework.RegisterCommonFlags() + framework.RegisterNodeFlags() +} + func TestE2eNode(t *testing.T) { flag.Parse() @@ -67,12 +74,12 @@ var _ = BeforeSuite(func() { if *buildServices { buildGo() } - if *nodeName == "" { + if framework.TestContext.NodeName == "" { output, err := exec.Command("hostname").CombinedOutput() if err != nil { glog.Fatalf("Could not get node name from hostname %v. Output:\n%s", err, output) } - *nodeName = strings.TrimSpace(fmt.Sprintf("%s", output)) + framework.TestContext.NodeName = strings.TrimSpace(fmt.Sprintf("%s", output)) } // Pre-pull the images tests depend on so we can fail immediately if there is an image pull issue @@ -89,7 +96,7 @@ var _ = BeforeSuite(func() { maskLocksmithdOnCoreos() if *startServices { - e2es = newE2eService(*nodeName) + e2es = newE2eService(framework.TestContext.NodeName) if err := e2es.start(); err != nil { Fail(fmt.Sprintf("Unable to start node services.\n%v", err)) } diff --git a/test/e2e_node/kubelet_test.go b/test/e2e_node/kubelet_test.go index 6a8bed5e99..4ae05c5b6a 100644 --- a/test/e2e_node/kubelet_test.go +++ b/test/e2e_node/kubelet_test.go @@ -42,14 +42,11 @@ var _ = framework.KubeDescribe("Kubelet", func() { Context("when scheduling a busybox command in a pod", func() { podName := "busybox-scheduling-" + string(util.NewUUID()) It("it should print the output to logs", func() { - podClient := f.Client.Pods(f.Namespace.Name) - pod := &api.Pod{ + f.CreatePod(&api.Pod{ ObjectMeta: api.ObjectMeta{ Name: podName, }, Spec: api.PodSpec{ - // Force the Pod to schedule to the node without a scheduler running - NodeName: *nodeName, // Don't restart the Pod since it is expected to exit RestartPolicy: api.RestartPolicyNever, Containers: []api.Container{ @@ -60,14 +57,10 @@ var _ = framework.KubeDescribe("Kubelet", func() { }, }, }, - } - defer podClient.Delete(pod.Name, nil) - _, err := podClient.Create(pod) - Expect(err).To(BeNil(), fmt.Sprintf("Error creating Pod %v", err)) - framework.ExpectNoError(f.WaitForPodRunning(pod.Name)) + }) Eventually(func() string { sinceTime := apiUnversioned.NewTime(time.Now().Add(time.Duration(-1 * time.Hour))) - rc, err := podClient.GetLogs(podName, &api.PodLogOptions{SinceTime: &sinceTime}).Stream() + rc, err := f.PodClient().GetLogs(podName, &api.PodLogOptions{SinceTime: &sinceTime}).Stream() if err != nil { return "" } @@ -82,15 +75,12 @@ var _ = framework.KubeDescribe("Kubelet", func() { Context("when scheduling a read only busybox container", func() { podName := "busybox-readonly-fs" + string(util.NewUUID()) It("it should not write to root filesystem", func() { - podClient := f.Client.Pods(f.Namespace.Name) isReadOnly := true - pod := &api.Pod{ + f.CreatePod(&api.Pod{ ObjectMeta: api.ObjectMeta{ Name: podName, }, Spec: api.PodSpec{ - // Force the Pod to schedule to the node without a scheduler running - NodeName: *nodeName, // Don't restart the Pod since it is expected to exit RestartPolicy: api.RestartPolicyNever, Containers: []api.Container{ @@ -104,12 +94,9 @@ var _ = framework.KubeDescribe("Kubelet", func() { }, }, }, - } - defer podClient.Delete(pod.Name, nil) - _, err := podClient.Create(pod) - Expect(err).To(BeNil(), fmt.Sprintf("Error creating Pod %v", err)) + }) Eventually(func() string { - rc, err := podClient.GetLogs(podName, &api.PodLogOptions{}).Stream() + rc, err := f.PodClient().GetLogs(podName, &api.PodLogOptions{}).Stream() if err != nil { return "" } @@ -172,46 +159,38 @@ func createSummaryTestPods(f *framework.Framework, podNamePrefix string, count i podNames.Insert(fmt.Sprintf("%s%v", podNamePrefix, i)) } + var pods []*api.Pod for _, podName := range podNames.List() { - createPod(f, podName, []api.Container{ - { - Image: ImageRegistry[busyBoxImage], - Command: []string{"sh", "-c", "while true; do echo 'hello world' | tee /test-empty-dir-mnt/file ; sleep 1; done"}, - Name: podName + containerSuffix, - VolumeMounts: []api.VolumeMount{ - {MountPath: "/test-empty-dir-mnt", Name: volumeNamePrefix}, + pods = append(pods, &api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: podName, + }, + Spec: api.PodSpec{ + // Don't restart the Pod since it is expected to exit + RestartPolicy: api.RestartPolicyNever, + Containers: []api.Container{ + { + Image: ImageRegistry[busyBoxImage], + Command: []string{"sh", "-c", "while true; do echo 'hello world' | tee /test-empty-dir-mnt/file ; sleep 1; done"}, + Name: podName + containerSuffix, + VolumeMounts: []api.VolumeMount{ + {MountPath: "/test-empty-dir-mnt", Name: volumeNamePrefix}, + }, + }, + }, + Volumes: []api.Volume{ + // TODO: Test secret volumes + // TODO: Test hostpath volumes + {Name: volumeNamePrefix, VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, }, }, - }, []api.Volume{ - // TODO: Test secret volumes - // TODO: Test hostpath volumes - {Name: volumeNamePrefix, VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}}, }) } + f.CreatePods(pods) return podNames, volumes } -func createPod(f *framework.Framework, podName string, containers []api.Container, volumes []api.Volume) { - podClient := f.Client.Pods(f.Namespace.Name) - pod := &api.Pod{ - ObjectMeta: api.ObjectMeta{ - Name: podName, - }, - Spec: api.PodSpec{ - // Force the Pod to schedule to the node without a scheduler running - NodeName: *nodeName, - // Don't restart the Pod since it is expected to exit - RestartPolicy: api.RestartPolicyNever, - Containers: containers, - Volumes: volumes, - }, - } - _, err := podClient.Create(pod) - Expect(err).To(BeNil(), fmt.Sprintf("Error creating Pod %v", err)) - framework.ExpectNoError(f.WaitForPodRunning(pod.Name)) -} - // Returns pods missing from summary. func podsMissingFromSummary(s stats.Summary, expectedPods sets.String) sets.String { expectedPods = sets.StringKeySet(expectedPods) @@ -244,7 +223,7 @@ func testSummaryMetrics(s stats.Summary, podNamePrefix string) error { nonNilValue = "expected %q to not be nil" nonZeroValue = "expected %q to not be zero" ) - if s.Node.NodeName != *nodeName { + if s.Node.NodeName != framework.TestContext.NodeName { return fmt.Errorf("unexpected node name - %q", s.Node.NodeName) } if s.Node.CPU.UsageCoreNanoSeconds == nil { diff --git a/test/e2e_node/privileged_test.go b/test/e2e_node/privileged_test.go index b3194cf466..bff719a1e2 100644 --- a/test/e2e_node/privileged_test.go +++ b/test/e2e_node/privileged_test.go @@ -27,6 +27,7 @@ import ( "k8s.io/kubernetes/pkg/apimachinery/registered" "k8s.io/kubernetes/pkg/client/restclient" client "k8s.io/kubernetes/pkg/client/unversioned" + "k8s.io/kubernetes/test/e2e/framework" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -211,7 +212,7 @@ func createPodAndWaitUntilRunning(c *client.Client, pod *api.Pod) *api.Pod { func createPodWithSpec(c *client.Client, pod *api.Pod) (*api.Pod, error) { // Manually assign pod to node because we don't run the scheduler in node // e2e tests. - assignPodToNode(pod) + pod.Spec.NodeName = framework.TestContext.NodeName createdPod, err := c.Pods(pod.Namespace).Create(pod) return createdPod, err } diff --git a/test/e2e_node/runtime_conformance_test.go b/test/e2e_node/runtime_conformance_test.go index 6d74482d05..bf92786908 100644 --- a/test/e2e_node/runtime_conformance_test.go +++ b/test/e2e_node/runtime_conformance_test.go @@ -97,14 +97,12 @@ while true; do sleep 1; done testContainer.Name = testCase.Name testContainer.Command = []string{"sh", "-c", tmpCmd} terminateContainer := ConformanceContainer{ + Framework: f, Container: testContainer, - Client: f.Client, RestartPolicy: testCase.RestartPolicy, Volumes: testVolumes, - NodeName: *nodeName, - Namespace: f.Namespace.Name, } - Expect(terminateContainer.Create()).To(Succeed()) + terminateContainer.Create() defer terminateContainer.Delete() By("it should get the expected 'RestartCount'") @@ -136,6 +134,7 @@ while true; do sleep 1; done terminationMessage := "DONE" terminationMessagePath := "/dev/termination-log" c := ConformanceContainer{ + Framework: f, Container: api.Container{ Image: ImageRegistry[busyBoxImage], Name: name, @@ -143,14 +142,11 @@ while true; do sleep 1; done Args: []string{fmt.Sprintf("/bin/echo -n %s > %s", terminationMessage, terminationMessagePath)}, TerminationMessagePath: terminationMessagePath, }, - Client: f.Client, RestartPolicy: api.RestartPolicyNever, - NodeName: *nodeName, - Namespace: f.Namespace.Name, } By("create the container") - Expect(c.Create()).To(Succeed()) + c.Create() defer c.Delete() By("wait for the container to succeed") @@ -236,6 +232,7 @@ while true; do sleep 1; done name := "image-pull-test" command := []string{"/bin/sh", "-c", "while true; do sleep 1; done"} container := ConformanceContainer{ + Framework: f, Container: api.Container{ Name: name, Image: testCase.image, @@ -243,10 +240,7 @@ while true; do sleep 1; done // PullAlways makes sure that the image will always be pulled even if it is present before the test. ImagePullPolicy: api.PullAlways, }, - Client: f.Client, RestartPolicy: api.RestartPolicyNever, - NodeName: *nodeName, - Namespace: f.Namespace.Name, } if testCase.secret { secret.Name = "image-pull-secret-" + string(util.NewUUID()) @@ -258,7 +252,7 @@ while true; do sleep 1; done } By("create the container") - Expect(container.Create()).To(Succeed()) + container.Create() defer container.Delete() By("check the pod phase") diff --git a/test/e2e_node/util.go b/test/e2e_node/util.go index d9f4149fd6..d5431d186a 100644 --- a/test/e2e_node/util.go +++ b/test/e2e_node/util.go @@ -19,14 +19,13 @@ package e2e_node import ( "flag" - "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/restclient" "k8s.io/kubernetes/test/e2e/framework" ) var kubeletAddress = flag.String("kubelet-address", "http://127.0.0.1:10255", "Host and port of the kubelet") var apiServerAddress = flag.String("api-server-address", "http://127.0.0.1:8080", "Host and port of the api server") -var nodeName = flag.String("node-name", "", "Name of the node") + var buildServices = flag.Bool("build-services", true, "If true, build local executables") var startServices = flag.Bool("start-services", true, "If true, start local node services") var stopServices = flag.Bool("stop-services", true, "If true, stop local node services after running tests") @@ -42,7 +41,3 @@ func NewDefaultFramework(baseName string) *framework.Framework { ClientBurst: 100, }, nil, f) } - -func assignPodToNode(pod *api.Pod) { - pod.Spec.NodeName = *nodeName -} From 989416b3296c9f23f32749905a28ab9d593cf0f2 Mon Sep 17 00:00:00 2001 From: PingWang Date: Wed, 29 Jun 2016 11:11:52 +0800 Subject: [PATCH 269/339] Add error log for Run function in server.go Signed-off-by: PingWang --- plugin/cmd/kube-scheduler/app/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/cmd/kube-scheduler/app/server.go b/plugin/cmd/kube-scheduler/app/server.go index 16d5e87eb6..48c632e6fe 100644 --- a/plugin/cmd/kube-scheduler/app/server.go +++ b/plugin/cmd/kube-scheduler/app/server.go @@ -76,6 +76,7 @@ func Run(s *options.SchedulerServer) error { } kubeconfig, err := clientcmd.BuildConfigFromFlags(s.Master, s.Kubeconfig) if err != nil { + glog.Errorf("unable to build config from flags: %v", err) return err } @@ -134,6 +135,7 @@ func Run(s *options.SchedulerServer) error { id, err := os.Hostname() if err != nil { + glog.Errorf("unable to get hostname: %v", err) return err } From b754695adb6c8d3b42c6e0956d963324471c116f Mon Sep 17 00:00:00 2001 From: Daniel Smith Date: Tue, 28 Jun 2016 16:23:10 -0700 Subject: [PATCH 270/339] unstable -> failed (for presubmit tests) --- hack/jenkins/e2e-runner.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hack/jenkins/e2e-runner.sh b/hack/jenkins/e2e-runner.sh index a8583e6b64..35155ee6f6 100755 --- a/hack/jenkins/e2e-runner.sh +++ b/hack/jenkins/e2e-runner.sh @@ -192,6 +192,7 @@ function e2e_test() { echo "Publish version to ci/latest-green.txt: $(cat version)" gsutil cp ./version gs://kubernetes-release/ci/latest-green.txt fi + return ${exitcode} } echo "--------------------------------------------------------------------------------" @@ -199,6 +200,10 @@ echo "Test Environment:" printenv | sort echo "--------------------------------------------------------------------------------" +# Set this var instead of exiting-- we must do the cluster teardown step. We'll +# return this at the very end. +EXIT_CODE=0 + # We get the Kubernetes tarballs unless we are going to use old ones if [[ "${JENKINS_USE_EXISTING_BINARIES:-}" =~ ^[yY]$ ]]; then echo "Using existing binaries; not cleaning, fetching, or unpacking new ones." @@ -329,7 +334,7 @@ if [[ -n "${JENKINS_PUBLISHED_SKEW_VERSION:-}" ]]; then if [[ "${E2E_UPGRADE_TEST:-}" == "true" ]]; then # Add a report prefix for the e2e tests so that the tests don't get overwritten when we run # the rest of the e2es. - E2E_REPORT_PREFIX='upgrade' e2e_test "${GINKGO_UPGRADE_TEST_ARGS:-}" + E2E_REPORT_PREFIX='upgrade' e2e_test "${GINKGO_UPGRADE_TEST_ARGS:-}" || EXIT_CODE=1 fi if [[ "${JENKINS_USE_SKEW_TESTS:-}" != "true" ]]; then # Back out into the old tests now that we've downloaded & maybe upgraded. @@ -344,7 +349,7 @@ if [[ -n "${JENKINS_PUBLISHED_SKEW_VERSION:-}" ]]; then fi if [[ "${E2E_TEST,,}" == "true" ]]; then - e2e_test "${GINKGO_TEST_ARGS:-}" + e2e_test "${GINKGO_TEST_ARGS:-}" || EXIT_CODE=1 fi ### Start Kubemark ### @@ -362,6 +367,8 @@ if [[ "${USE_KUBEMARK:-}" == "true" ]]; then # junit.xml results for test failures and not process the exit code. This is needed by jenkins to more gracefully # handle blocking the merge queue as a result of test failure flakes. Infrastructure failures should continue to # exit non-0. + # TODO: The above comment is no longer accurate. Need to fix this before + # turning xunit off for the postsubmit tests. See: #28200 ./test/kubemark/run-e2e-tests.sh --ginkgo.focus="${KUBEMARK_TESTS:-starting\s30\spods}" "${KUBEMARK_TEST_ARGS:-}" || dump_cluster_logs ./test/kubemark/stop-kubemark.sh NUM_NODES=${NUM_NODES_BKP} @@ -394,6 +401,8 @@ if [[ "${E2E_UP:-}" == "${E2E_DOWN:-}" && -f "${gcp_resources_before}" && -f "${ if [[ -n $(echo "${difference}" | tail -n +3 | grep -E "^\+") ]] && [[ "${FAIL_ON_GCP_RESOURCE_LEAK:-}" == "true" ]]; then echo "${difference}" echo "!!! FAIL: Google Cloud Platform resources leaked while running tests!" - exit 1 + EXIT_CODE=1 fi fi + +exit ${EXIT_CODE} From b3d6bf0dbec0ecfa6c334c90aff8affecdaf508c Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Tue, 28 Jun 2016 20:49:39 -0700 Subject: [PATCH 271/339] Remove old asm pause from third_party --- third_party/pause/LICENSE | 19 ------------- third_party/pause/Makefile | 13 --------- third_party/pause/pause.asm | 57 ------------------------------------- 3 files changed, 89 deletions(-) delete mode 100644 third_party/pause/LICENSE delete mode 100644 third_party/pause/Makefile delete mode 100644 third_party/pause/pause.asm diff --git a/third_party/pause/LICENSE b/third_party/pause/LICENSE deleted file mode 100644 index 2b5e5ff1ab..0000000000 --- a/third_party/pause/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The Expat/MIT License - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/third_party/pause/Makefile b/third_party/pause/Makefile deleted file mode 100644 index 723b8a9c4c..0000000000 --- a/third_party/pause/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -pause: pause.asm -ifneq ($(shell uname), Linux) - echo "Must build on Linux" - exit 1 -else - nasm -o $@ $< - chmod +x pause -endif - -all: pause - -clean: - rm -f pause diff --git a/third_party/pause/pause.asm b/third_party/pause/pause.asm deleted file mode 100644 index 90576d4ce1..0000000000 --- a/third_party/pause/pause.asm +++ /dev/null @@ -1,57 +0,0 @@ -; This is heavily based on https://github.com/tianon/dockerfiles/tree/master/true -; which is in turn especially thanks to: -; http://blog.markloiseau.com/2012/05/tiny-64-bit-elf-executables/ - -BITS 64 - org 0x00400000 ; Program load offset - -; 64-bit ELF header -ehdr: - ; 1), 0 (ABI ver.) - db 0x7F, "ELF", 2, 1, 1, 0 ; e_ident - times 8 db 0 ; reserved (zeroes) - - dw 2 ; e_type: Executable file - dw 0x3e ; e_machine: AMD64 - dd 1 ; e_version: current version - dq _start ; e_entry: program entry address (0x78) - dq phdr - $$ ; e_phoff program header offset (0x40) - dq 0 ; e_shoff no section headers - dd 0 ; e_flags no flags - dw ehdrsize ; e_ehsize: ELF header size (0x40) - dw phdrsize ; e_phentsize: program header size (0x38) - dw 1 ; e_phnum: one program header - dw 0 ; e_shentsize - dw 0 ; e_shnum - dw 0 ; e_shstrndx - -ehdrsize equ $ - ehdr - -; 64-bit ELF program header -phdr: - dd 1 ; p_type: loadable segment - dd 5 ; p_flags read and execute - dq 0 ; p_offset - dq $$ ; p_vaddr: start of the current section - dq $$ ; p_paddr: " " - dq filesize ; p_filesz - dq filesize ; p_memsz - dq 0x200000 ; p_align: 2^11=200000 = section alignment - -; program header size -phdrsize equ $ - phdr - -_start: - ; pause() - - mov al, 34 ; pause syscall number - syscall - - ; sys_exit(return_code) - - mov al, 60 ; sys_exit syscall number - cdq ; Sign-extend eax into edi to return 0 (success) - syscall - -; File size calculation -filesize equ $ - $$ From c723d9e5c4074c165a558ad148841b54c8bb0117 Mon Sep 17 00:00:00 2001 From: Saad Ali Date: Tue, 28 Jun 2016 06:01:07 -0700 Subject: [PATCH 272/339] Volume manager verify containers terminated before deleting --- pkg/kubelet/kubelet.go | 3 +- pkg/kubelet/kubelet_test.go | 3 +- pkg/kubelet/runonce_test.go | 3 +- .../desired_state_of_world_populator.go | 109 ++++++++++++++---- pkg/kubelet/volume/volume_manager.go | 14 ++- 5 files changed, 104 insertions(+), 28 deletions(-) diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 4f89718516..c2573313c4 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -504,7 +504,8 @@ func NewMainKubelet( hostname, klet.podManager, klet.kubeClient, - klet.volumePluginMgr) + klet.volumePluginMgr, + klet.containerRuntime) runtimeCache, err := kubecontainer.NewRuntimeCache(klet.containerRuntime) if err != nil { diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index b503382bd7..18e5c7b7d3 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -299,7 +299,8 @@ func newTestKubeletWithImageList( kubelet.hostname, kubelet.podManager, fakeKubeClient, - kubelet.volumePluginMgr) + kubelet.volumePluginMgr, + fakeRuntime) if err != nil { t.Fatalf("failed to initialize volume manager: %v", err) } diff --git a/pkg/kubelet/runonce_test.go b/pkg/kubelet/runonce_test.go index 14b8e0c506..c88ed13d61 100644 --- a/pkg/kubelet/runonce_test.go +++ b/pkg/kubelet/runonce_test.go @@ -97,7 +97,8 @@ func TestRunOnce(t *testing.T) { kb.hostname, kb.podManager, kb.kubeClient, - kb.volumePluginMgr) + kb.volumePluginMgr, + fakeRuntime) kb.networkPlugin, _ = network.InitNetworkPlugin([]network.NetworkPlugin{}, "", nettest.NewFakeHost(nil), componentconfig.HairpinNone, kb.nonMasqueradeCIDR) // TODO: Factor out "StatsProvider" from Kubelet so we don't have a cyclic dependency diff --git a/pkg/kubelet/volume/populator/desired_state_of_world_populator.go b/pkg/kubelet/volume/populator/desired_state_of_world_populator.go index bbbd499262..eecd802206 100644 --- a/pkg/kubelet/volume/populator/desired_state_of_world_populator.go +++ b/pkg/kubelet/volume/populator/desired_state_of_world_populator.go @@ -29,7 +29,9 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/pod" + "k8s.io/kubernetes/pkg/kubelet/util/format" "k8s.io/kubernetes/pkg/kubelet/volume/cache" "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util/wait" @@ -64,24 +66,31 @@ type DesiredStateOfWorldPopulator interface { func NewDesiredStateOfWorldPopulator( kubeClient internalclientset.Interface, loopSleepDuration time.Duration, + getPodStatusRetryDuration time.Duration, podManager pod.Manager, - desiredStateOfWorld cache.DesiredStateOfWorld) DesiredStateOfWorldPopulator { + desiredStateOfWorld cache.DesiredStateOfWorld, + kubeContainerRuntime kubecontainer.Runtime) DesiredStateOfWorldPopulator { return &desiredStateOfWorldPopulator{ - kubeClient: kubeClient, - loopSleepDuration: loopSleepDuration, - podManager: podManager, - desiredStateOfWorld: desiredStateOfWorld, + kubeClient: kubeClient, + loopSleepDuration: loopSleepDuration, + getPodStatusRetryDuration: getPodStatusRetryDuration, + podManager: podManager, + desiredStateOfWorld: desiredStateOfWorld, pods: processedPods{ processedPods: make(map[volumetypes.UniquePodName]bool)}, + kubeContainerRuntime: kubeContainerRuntime, } } type desiredStateOfWorldPopulator struct { - kubeClient internalclientset.Interface - loopSleepDuration time.Duration - podManager pod.Manager - desiredStateOfWorld cache.DesiredStateOfWorld - pods processedPods + kubeClient internalclientset.Interface + loopSleepDuration time.Duration + getPodStatusRetryDuration time.Duration + podManager pod.Manager + desiredStateOfWorld cache.DesiredStateOfWorld + pods processedPods + kubeContainerRuntime kubecontainer.Runtime + timeOfLastGetPodStatus time.Time } type processedPods struct { @@ -102,6 +111,20 @@ func (dswp *desiredStateOfWorldPopulator) populatorLoopFunc() func() { return func() { dswp.findAndAddNewPods() + // findAndRemoveDeletedPods() calls out to the container runtime to + // determine if the containers for a given pod are terminated. This is + // an expensive operation, therefore we limit the rate that + // findAndRemoveDeletedPods() is called independently of the main + // populator loop. + if time.Since(dswp.timeOfLastGetPodStatus) < dswp.getPodStatusRetryDuration { + glog.V(5).Infof( + "Skipping findAndRemoveDeletedPods(). Not permitted until %v (getPodStatusRetryDuration %v).", + dswp.timeOfLastGetPodStatus.Add(dswp.getPodStatusRetryDuration), + dswp.getPodStatusRetryDuration) + + return + } + dswp.findAndRemoveDeletedPods() } } @@ -117,19 +140,60 @@ func (dswp *desiredStateOfWorldPopulator) findAndAddNewPods() { // Iterate through all pods in desired state of world, and remove if they no // longer exist func (dswp *desiredStateOfWorldPopulator) findAndRemoveDeletedPods() { + var runningPods []*kubecontainer.Pod + + runningPodsFetched := false for _, volumeToMount := range dswp.desiredStateOfWorld.GetVolumesToMount() { if _, podExists := - dswp.podManager.GetPodByUID(volumeToMount.Pod.UID); !podExists { - glog.V(10).Infof( - "Removing volume %q (volSpec=%q) for pod %q from desired state.", - volumeToMount.VolumeName, - volumeToMount.VolumeSpec.Name(), - volumeToMount.PodName) - - dswp.desiredStateOfWorld.DeletePodFromVolume( - volumeToMount.PodName, volumeToMount.VolumeName) - dswp.deleteProcessedPod(volumeToMount.PodName) + dswp.podManager.GetPodByUID(volumeToMount.Pod.UID); podExists { + continue } + + // Once a pod has been deleted from kubelet pod manager, do not delete + // it immediately from volume manager. Instead, check the kubelet + // containerRuntime to verify that all containers in the pod have been + // terminated. + if !runningPodsFetched { + var getPodsErr error + runningPods, getPodsErr = dswp.kubeContainerRuntime.GetPods(false) + if getPodsErr != nil { + glog.Errorf( + "kubeContainerRuntime.findAndRemoveDeletedPods returned error %v.", + getPodsErr) + continue + } + + runningPodsFetched = true + dswp.timeOfLastGetPodStatus = time.Now() + } + + runningContainers := false + for _, runningPod := range runningPods { + if runningPod.ID == volumeToMount.Pod.UID { + if len(runningPod.Containers) > 0 { + runningContainers = true + } + + break + } + } + + if runningContainers { + glog.V(5).Infof( + "Pod %q has been removed from pod manager. However, it still has one or more containers in the non-exited state. Therefore it will not be removed from volume manager.", + format.Pod(volumeToMount.Pod)) + continue + } + + glog.V(5).Infof( + "Removing volume %q (volSpec=%q) for pod %q from desired state.", + volumeToMount.VolumeName, + volumeToMount.VolumeSpec.Name(), + format.Pod(volumeToMount.Pod)) + + dswp.desiredStateOfWorld.DeletePodFromVolume( + volumeToMount.PodName, volumeToMount.VolumeName) + dswp.deleteProcessedPod(volumeToMount.PodName) } } @@ -151,10 +215,9 @@ func (dswp *desiredStateOfWorldPopulator) processPodVolumes(pod *api.Pod) { dswp.createVolumeSpec(podVolume, pod.Namespace) if err != nil { glog.Errorf( - "Error processing volume %q for pod %q/%q: %v", + "Error processing volume %q for pod %q: %v", podVolume.Name, - pod.Namespace, - pod.Name, + format.Pod(pod), err) continue } diff --git a/pkg/kubelet/volume/volume_manager.go b/pkg/kubelet/volume/volume_manager.go index b706f811e4..886dfcb9cb 100644 --- a/pkg/kubelet/volume/volume_manager.go +++ b/pkg/kubelet/volume/volume_manager.go @@ -25,6 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/kubelet/container" + kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/pod" "k8s.io/kubernetes/pkg/kubelet/util/format" "k8s.io/kubernetes/pkg/kubelet/volume/cache" @@ -48,6 +49,12 @@ const ( // DesiredStateOfWorldPopulator loop waits between successive executions desiredStateOfWorldPopulatorLoopSleepPeriod time.Duration = 100 * time.Millisecond + // desiredStateOfWorldPopulatorGetPodStatusRetryDuration is the amount of + // time the DesiredStateOfWorldPopulator loop waits between successive pod + // cleanup calls (to prevent calling containerruntime.GetPodStatus too + // frequently). + desiredStateOfWorldPopulatorGetPodStatusRetryDuration time.Duration = 2 * time.Second + // podAttachAndMountTimeout is the maximum amount of time the // WaitForAttachAndMount call will wait for all volumes in the specified pod // to be attached and mounted. Even though cloud operations can take several @@ -120,7 +127,8 @@ func NewVolumeManager( hostName string, podManager pod.Manager, kubeClient internalclientset.Interface, - volumePluginMgr *volume.VolumePluginMgr) (VolumeManager, error) { + volumePluginMgr *volume.VolumePluginMgr, + kubeContainerRuntime kubecontainer.Runtime) (VolumeManager, error) { vm := &volumeManager{ kubeClient: kubeClient, volumePluginMgr: volumePluginMgr, @@ -143,8 +151,10 @@ func NewVolumeManager( vm.desiredStateOfWorldPopulator = populator.NewDesiredStateOfWorldPopulator( kubeClient, desiredStateOfWorldPopulatorLoopSleepPeriod, + desiredStateOfWorldPopulatorGetPodStatusRetryDuration, podManager, - vm.desiredStateOfWorld) + vm.desiredStateOfWorld, + kubeContainerRuntime) return vm, nil } From ca17e4745f4421f07c291946f143401f6fa5b19b Mon Sep 17 00:00:00 2001 From: Hongchao Deng Date: Thu, 2 Jun 2016 17:30:43 -0700 Subject: [PATCH 273/339] docs: client default config of qps and burst --- pkg/client/restclient/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/client/restclient/config.go b/pkg/client/restclient/config.go index 0741e3c2d8..2e4f9d41ee 100644 --- a/pkg/client/restclient/config.go +++ b/pkg/client/restclient/config.go @@ -93,10 +93,10 @@ type Config struct { // on top of the returned RoundTripper. WrapTransport func(rt http.RoundTripper) http.RoundTripper - // QPS indicates the maximum QPS to the master from this client. If zero, QPS is unlimited. + // QPS indicates the maximum QPS to the master from this client. If zero, default is 5. QPS float32 - // Maximum burst for throttle + // Maximum burst for throttle. If zero, default is 10. Burst int // Rate limiter for limiting connections to the master from this client. If present overwrites QPS/Burst From 55d3597456fbce3f10d9ad2b1a573e22bb75fb75 Mon Sep 17 00:00:00 2001 From: Hongchao Deng Date: Mon, 6 Jun 2016 15:30:41 -0700 Subject: [PATCH 274/339] change default value of QPS and burst to constant --- .../generators/generator_for_group.go | 6 ----- .../typed/core/v1/core_client.go | 6 ----- .../federation/v1beta1/federation_client.go | 6 ----- .../autoscaling/v1/autoscaling_client.go | 6 ----- .../typed/batch/v1/batch_client.go | 6 ----- .../release_1_3/typed/core/v1/core_client.go | 6 ----- .../extensions/v1beta1/extensions_client.go | 6 ----- pkg/client/restclient/config.go | 27 ++++++++++++------- pkg/client/typed/dynamic/client.go | 7 ----- pkg/client/unversioned/apps.go | 6 ----- pkg/client/unversioned/autoscaling.go | 6 ----- pkg/client/unversioned/batch.go | 6 ----- pkg/client/unversioned/extensions.go | 6 ----- pkg/client/unversioned/helper_test.go | 2 -- pkg/client/unversioned/policy.go | 6 ----- pkg/client/unversioned/rbac.go | 6 ----- 16 files changed, 18 insertions(+), 96 deletions(-) diff --git a/cmd/libs/go2idl/client-gen/generators/generator_for_group.go b/cmd/libs/go2idl/client-gen/generators/generator_for_group.go index 7ae31d9faf..23424c6b0e 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator_for_group.go +++ b/cmd/libs/go2idl/client-gen/generators/generator_for_group.go @@ -244,12 +244,6 @@ func setConfigDefaults(config *$.Config|raw$) error { config.NegotiatedSerializer = $.directCodecFactory|raw${CodecFactory: $.codecs|raw$} - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } ` diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/core_client.go b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/core_client.go index 19593ab679..5ec32b2d54 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/core_client.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/core_client.go @@ -83,12 +83,6 @@ func setConfigDefaults(config *restclient.Config) error { config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/federation_client.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/federation_client.go index 381aa9f8d9..952fa6896f 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/federation_client.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/federation_client.go @@ -83,12 +83,6 @@ func setConfigDefaults(config *restclient.Config) error { config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } diff --git a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/autoscaling_client.go b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/autoscaling_client.go index a0fb01144e..2072ff9bbd 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/autoscaling_client.go +++ b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/autoscaling_client.go @@ -83,12 +83,6 @@ func setConfigDefaults(config *restclient.Config) error { config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } diff --git a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/batch_client.go b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/batch_client.go index 018d2c688a..527d53e568 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/batch_client.go +++ b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/batch_client.go @@ -83,12 +83,6 @@ func setConfigDefaults(config *restclient.Config) error { config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/core_client.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/core_client.go index 3804b8cb3b..201aa94d8b 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/core_client.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/core_client.go @@ -153,12 +153,6 @@ func setConfigDefaults(config *restclient.Config) error { config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/extensions_client.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/extensions_client.go index 23aa5b219e..3389f4ace2 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/extensions_client.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/extensions_client.go @@ -123,12 +123,6 @@ func setConfigDefaults(config *restclient.Config) error { config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } diff --git a/pkg/client/restclient/config.go b/pkg/client/restclient/config.go index 2e4f9d41ee..5a62371558 100644 --- a/pkg/client/restclient/config.go +++ b/pkg/client/restclient/config.go @@ -37,6 +37,11 @@ import ( "k8s.io/kubernetes/pkg/version" ) +const ( + DefaultQPS float32 = 5.0 + DefaultBurst int = 10 +) + // Config holds the common attributes that can be passed to a Kubernetes client on // initialization. type Config struct { @@ -93,10 +98,12 @@ type Config struct { // on top of the returned RoundTripper. WrapTransport func(rt http.RoundTripper) http.RoundTripper - // QPS indicates the maximum QPS to the master from this client. If zero, default is 5. + // QPS indicates the maximum QPS to the master from this client. + // If it's zero, the created RESTClient will use DefaultQPS: 5 QPS float32 - // Maximum burst for throttle. If zero, default is 10. + // Maximum burst for throttle. + // If it's zero, the created RESTClient will use DefaultBurst: 10. Burst int // Rate limiter for limiting connections to the master from this client. If present overwrites QPS/Burst @@ -158,6 +165,14 @@ func RESTClientFor(config *Config) (*RESTClient, error) { if config.NegotiatedSerializer == nil { return nil, fmt.Errorf("NegotiatedSerializer is required when initializing a RESTClient") } + qps := config.QPS + if config.QPS == 0.0 { + qps = DefaultQPS + } + burst := config.Burst + if config.Burst == 0 { + burst = DefaultBurst + } baseURL, versionedAPIPath, err := defaultServerUrlFor(config) if err != nil { @@ -174,7 +189,7 @@ func RESTClientFor(config *Config) (*RESTClient, error) { httpClient = &http.Client{Transport: transport} } - return NewRESTClient(baseURL, versionedAPIPath, config.ContentConfig, config.QPS, config.Burst, config.RateLimiter, httpClient) + return NewRESTClient(baseURL, versionedAPIPath, config.ContentConfig, qps, burst, config.RateLimiter, httpClient) } // UnversionedRESTClientFor is the same as RESTClientFor, except that it allows @@ -214,12 +229,6 @@ func SetKubernetesDefaults(config *Config) error { if len(config.UserAgent) == 0 { config.UserAgent = DefaultKubernetesUserAgent() } - if config.QPS == 0.0 { - config.QPS = 5.0 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } diff --git a/pkg/client/typed/dynamic/client.go b/pkg/client/typed/dynamic/client.go index 26369bd582..be22321053 100644 --- a/pkg/client/typed/dynamic/client.go +++ b/pkg/client/typed/dynamic/client.go @@ -69,13 +69,6 @@ func NewClient(conf *restclient.Config) (*Client, error) { conf.UserAgent = restclient.DefaultKubernetesUserAgent() } - if conf.QPS == 0.0 { - conf.QPS = 5.0 - } - if conf.Burst == 0 { - conf.Burst = 10 - } - cl, err := restclient.RESTClientFor(conf) if err != nil { return nil, err diff --git a/pkg/client/unversioned/apps.go b/pkg/client/unversioned/apps.go index 1905c29c24..a355e6f9b8 100644 --- a/pkg/client/unversioned/apps.go +++ b/pkg/client/unversioned/apps.go @@ -73,11 +73,5 @@ func setAppsDefaults(config *restclient.Config) error { config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion) config.NegotiatedSerializer = api.Codecs - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } diff --git a/pkg/client/unversioned/autoscaling.go b/pkg/client/unversioned/autoscaling.go index 9e543c9d3a..af166886e6 100644 --- a/pkg/client/unversioned/autoscaling.go +++ b/pkg/client/unversioned/autoscaling.go @@ -74,11 +74,5 @@ func setAutoscalingDefaults(config *restclient.Config) error { config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion) config.NegotiatedSerializer = api.Codecs - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } diff --git a/pkg/client/unversioned/batch.go b/pkg/client/unversioned/batch.go index 40fc49dc12..6cb4393190 100644 --- a/pkg/client/unversioned/batch.go +++ b/pkg/client/unversioned/batch.go @@ -104,11 +104,5 @@ func setBatchDefaults(config *restclient.Config, gv *unversioned.GroupVersion) e config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion) config.NegotiatedSerializer = api.Codecs - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } diff --git a/pkg/client/unversioned/extensions.go b/pkg/client/unversioned/extensions.go index 3c9114d9a8..393b09fb26 100644 --- a/pkg/client/unversioned/extensions.go +++ b/pkg/client/unversioned/extensions.go @@ -128,11 +128,5 @@ func setExtensionsDefaults(config *restclient.Config) error { config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion) config.NegotiatedSerializer = api.Codecs - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } diff --git a/pkg/client/unversioned/helper_test.go b/pkg/client/unversioned/helper_test.go index 0e186e4c78..365734ffd0 100644 --- a/pkg/client/unversioned/helper_test.go +++ b/pkg/client/unversioned/helper_test.go @@ -44,8 +44,6 @@ func TestSetKubernetesDefaults(t *testing.T) { Codec: testapi.Default.Codec(), NegotiatedSerializer: testapi.Default.NegotiatedSerializer(), }, - QPS: 5, - Burst: 10, }, false, }, diff --git a/pkg/client/unversioned/policy.go b/pkg/client/unversioned/policy.go index 8b06ce275a..1edc4b7786 100644 --- a/pkg/client/unversioned/policy.go +++ b/pkg/client/unversioned/policy.go @@ -73,11 +73,5 @@ func setPolicyDefaults(config *restclient.Config) error { config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion) config.NegotiatedSerializer = api.Codecs - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } diff --git a/pkg/client/unversioned/rbac.go b/pkg/client/unversioned/rbac.go index 76ec392c3e..27bc5c1edb 100644 --- a/pkg/client/unversioned/rbac.go +++ b/pkg/client/unversioned/rbac.go @@ -93,11 +93,5 @@ func setRbacDefaults(config *restclient.Config) error { config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion) config.NegotiatedSerializer = api.Codecs - if config.QPS == 0 { - config.QPS = 5 - } - if config.Burst == 0 { - config.Burst = 10 - } return nil } From a6903159d8e6c3f6f13634fe5d3a9a538292c022 Mon Sep 17 00:00:00 2001 From: Marcin Wielgus Date: Wed, 29 Jun 2016 09:28:11 +0200 Subject: [PATCH 275/339] Check if Cluster Autoscaler still works if there is an extran non-autoscaled node pool in the cluster. --- test/e2e/cluster_size_autoscaling.go | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/test/e2e/cluster_size_autoscaling.go b/test/e2e/cluster_size_autoscaling.go index 7894cd5a3f..651a0e14ae 100644 --- a/test/e2e/cluster_size_autoscaling.go +++ b/test/e2e/cluster_size_autoscaling.go @@ -132,6 +132,42 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() { framework.ExpectNoError(waitForAllCaPodsReadyInNamespace(f, c)) }) + It("should increase cluster size if pending pods are small and there is another node pool that is not autoscaled [Feature:ClusterSizeAutoscalingScaleUp]", func() { + framework.SkipUnlessProviderIs("gke") + + By("Creating new node-pool with one n1-standard-4 machine") + const extraPoolName = "extra-pool" + output, err := exec.Command("gcloud", "alpha", "container", "node-pools", "create", extraPoolName, "--quiet", + "--machine-type=n1-standard-4", + "--num-nodes=1", + "--project="+framework.TestContext.CloudConfig.ProjectID, + "--zone="+framework.TestContext.CloudConfig.Zone, + "--cluster="+framework.TestContext.CloudConfig.Cluster).CombinedOutput() + defer func() { + glog.Infof("Deleting node pool %s", extraPoolName) + output, err := exec.Command("gcloud", "alpha", "container", "node-pools", "delete", extraPoolName, "--quiet", + "--project="+framework.TestContext.CloudConfig.ProjectID, + "--zone="+framework.TestContext.CloudConfig.Zone, + "--cluster="+framework.TestContext.CloudConfig.Cluster).CombinedOutput() + if err != nil { + glog.Infof("Error: %v", err) + } + glog.Infof("Node-pool deletion output: %s", output) + }() + framework.ExpectNoError(err) + glog.Infof("Creating node-pool: %s", output) + framework.ExpectNoError(framework.WaitForClusterSize(c, nodeCount+1, resizeTimeout)) + glog.Infof("Not enabling cluster autoscaler for the node pool (on purpose).") + + ReserveMemory(f, "memory-reservation", 100, nodeCount*memCapacityMb, false) + defer framework.DeleteRC(f.Client, f.Namespace.Name, "memory-reservation") + + // Verify, that cluster size is increased + framework.ExpectNoError(WaitForClusterSizeFunc(f.Client, + func(size int) bool { return size >= nodeCount+1 }, scaleUpTimeout)) + framework.ExpectNoError(waitForAllCaPodsReadyInNamespace(f, c)) + }) + It("should increase cluster size if pods are pending due to host port conflict [Feature:ClusterSizeAutoscalingScaleUp]", func() { CreateHostPortPods(f, "host-port", nodeCount+2, false) defer framework.DeleteRC(f.Client, f.Namespace.Name, "host-port") From 3e65d075846ac269e0a47224c2d5bb7bd3dd03b5 Mon Sep 17 00:00:00 2001 From: Quinton Hoole Date: Wed, 29 Jun 2016 00:34:43 -0700 Subject: [PATCH 276/339] I think I fixed all of the Federation e2e tests! --- test/e2e/federated-service.go | 42 ++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/test/e2e/federated-service.go b/test/e2e/federated-service.go index f65d62d971..95385b58e6 100644 --- a/test/e2e/federated-service.go +++ b/test/e2e/federated-service.go @@ -106,6 +106,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { } framework.Logf("%d clusters are Ready", len(contexts)) + clusterClientSets = make([]*release_1_3.Clientset, len(clusterList.Items)) for i, cluster := range clusterList.Items { framework.Logf("Creating a clientset for the cluster %s", cluster.Name) @@ -125,7 +126,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { cfg.QPS = KubeAPIQPS cfg.Burst = KubeAPIBurst clset := release_1_3.NewForConfigOrDie(restclient.AddUserAgent(cfg, UserAgentName)) - clusterClientSets = append(clusterClientSets, clset) + clusterClientSets[i] = clset } clusterNamespaceCreated = make([]bool, len(clusterClientSets)) @@ -221,10 +222,15 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { if backendPods != nil { deleteBackendPodsOrFail(clusterClientSets, f.Namespace.Name, backendPods) backendPods = nil + } else { + By("No backend pods to delete. BackendPods is nil.") } + if service != nil { deleteServiceOrFail(f.FederationClientset_1_3, f.Namespace.Name, service.Name) service = nil + } else { + By("No service to delete. Service is nil") } }) @@ -252,7 +258,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { // Delete all the backend pods from the shard which is local to the discovery pod. deleteBackendPodsOrFail([]*release_1_3.Clientset{f.Clientset_1_3}, f.Namespace.Name, []*v1.Pod{backendPods[0]}) - backendPods[0] = nil // So we don't try to delete it again in an outer AfterEach + }) It("should be able to discover a non-local federated service", func() { @@ -279,7 +285,7 @@ var _ = framework.KubeDescribe("[Feature:Federation]", func() { fmt.Sprintf("%s.%s.svc.cluster.local.", FederatedServiceName, f.Namespace.Name), } for i, name := range localSvcDNSNames { - discoverService(f, name, false, FederatedServicePodName+strconv.Itoa(i)) + discoverService(f, name, false, "federated-service-e2e-discovery-pod-"+strconv.Itoa(i)) } }) }) @@ -452,17 +458,24 @@ func discoverService(f *framework.Framework, name string, exists bool, podName s }, } + By(fmt.Sprintf("Creating pod %q in namespace %q", pod.Name, f.Namespace.Name)) _, err := f.Client.Pods(f.Namespace.Name).Create(pod) framework.ExpectNoError(err, "Trying to create pod to run %q", command) - defer func() { f.Client.Pods(f.Namespace.Name).Delete(podName, api.NewDeleteOptions(0)) }() + By(fmt.Sprintf("Successfully created pod %q in namespace %q", pod.Name, f.Namespace.Name)) + defer func() { + By(fmt.Sprintf("Deleting pod %q from namespace %q", podName, f.Namespace.Name)) + err := f.Client.Pods(f.Namespace.Name).Delete(podName, api.NewDeleteOptions(0)) + framework.ExpectNoError(err, "Deleting pod %q from namespace %q", podName, f.Namespace.Name) + By(fmt.Sprintf("Deleted pod %q from namespace %q", podName, f.Namespace.Name)) + }() if exists { // TODO(mml): Eventually check the IP address is correct, too. Eventually(podExitCodeDetector(f, podName, 0), 3*DNSTTL, time.Second*2). Should(BeNil(), "%q should exit 0, but it never did", command) } else { - Consistently(podExitCodeDetector(f, podName, 0), 3*DNSTTL, time.Second*2). - ShouldNot(BeNil(), "%q should never exit 0, but it did", command) + Eventually(podExitCodeDetector(f, podName, 0), 3*DNSTTL, time.Second*2). + ShouldNot(BeNil(), "%q should eventually not exit 0, but it always did", command) } } @@ -473,9 +486,9 @@ If creation of any pod fails, the test fails (possibly with a partially created func createBackendPodsOrFail(clusterClientSets []*release_1_3.Clientset, namespace string, name string) []*v1.Pod { pod := &v1.Pod{ ObjectMeta: v1.ObjectMeta{ - Name: name, - Namespace: namespace, - Labels: FederatedServiceLabels, + Name: name, + // Namespace: namespace, + Labels: FederatedServiceLabels, }, Spec: v1.PodSpec{ Containers: []v1.Container{ @@ -489,8 +502,10 @@ func createBackendPodsOrFail(clusterClientSets []*release_1_3.Clientset, namespa } pods := make([]*v1.Pod, len(clusterClientSets)) for i, client := range clusterClientSets { + By(fmt.Sprintf("Creating pod %q in namespace %q in cluster %d", pod.Name, namespace, i)) createdPod, err := client.Core().Pods(namespace).Create(pod) framework.ExpectNoError(err, "Creating pod %q in namespace %q in cluster %d", name, namespace, i) + By(fmt.Sprintf("Successfully created pod %q in namespace %q in cluster %d: %v", pod.Name, namespace, i, *createdPod)) pods[i] = createdPod } return pods @@ -507,7 +522,14 @@ func deleteBackendPodsOrFail(clusterClientSets []*release_1_3.Clientset, namespa for i, client := range clusterClientSets { if pods[i] != nil { err := client.Core().Pods(namespace).Delete(pods[i].Name, api.NewDeleteOptions(0)) - framework.ExpectNoError(err, "Deleting pod %q in namespace %q from cluster %d", pods[i].Name, namespace, i) + if errors.IsNotFound(err) { + By(fmt.Sprintf("Pod %q in namespace %q in cluster %d does not exist. No need to delete it.", pods[i].Name, namespace, i)) + } else { + framework.ExpectNoError(err, "Deleting pod %q in namespace %q from cluster %d", pods[i].Name, namespace, i) + } + By(fmt.Sprintf("Backend pod %q in namespace %q in cluster %d deleted or does not exist", pods[i].Name, namespace, i)) + } else { + By(fmt.Sprintf("No backend pod to delete for cluster %d", i)) } } } From c9f5eea1f6146813ee0f3e2ec485d0ad3d329670 Mon Sep 17 00:00:00 2001 From: Marcin Wielgus Date: Wed, 29 Jun 2016 12:19:49 +0200 Subject: [PATCH 277/339] E2e test for disabling cluster autoscaler in GKE --- test/e2e/cluster_size_autoscaling.go | 121 ++++++++++++++++++--------- 1 file changed, 83 insertions(+), 38 deletions(-) diff --git a/test/e2e/cluster_size_autoscaling.go b/test/e2e/cluster_size_autoscaling.go index 651a0e14ae..8872abd9ea 100644 --- a/test/e2e/cluster_size_autoscaling.go +++ b/test/e2e/cluster_size_autoscaling.go @@ -137,25 +137,8 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() { By("Creating new node-pool with one n1-standard-4 machine") const extraPoolName = "extra-pool" - output, err := exec.Command("gcloud", "alpha", "container", "node-pools", "create", extraPoolName, "--quiet", - "--machine-type=n1-standard-4", - "--num-nodes=1", - "--project="+framework.TestContext.CloudConfig.ProjectID, - "--zone="+framework.TestContext.CloudConfig.Zone, - "--cluster="+framework.TestContext.CloudConfig.Cluster).CombinedOutput() - defer func() { - glog.Infof("Deleting node pool %s", extraPoolName) - output, err := exec.Command("gcloud", "alpha", "container", "node-pools", "delete", extraPoolName, "--quiet", - "--project="+framework.TestContext.CloudConfig.ProjectID, - "--zone="+framework.TestContext.CloudConfig.Zone, - "--cluster="+framework.TestContext.CloudConfig.Cluster).CombinedOutput() - if err != nil { - glog.Infof("Error: %v", err) - } - glog.Infof("Node-pool deletion output: %s", output) - }() - framework.ExpectNoError(err) - glog.Infof("Creating node-pool: %s", output) + addNodePool(extraPoolName, "n1-standard-4") + defer deleteNodePool(extraPoolName) framework.ExpectNoError(framework.WaitForClusterSize(c, nodeCount+1, resizeTimeout)) glog.Infof("Not enabling cluster autoscaler for the node pool (on purpose).") @@ -168,6 +151,18 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() { framework.ExpectNoError(waitForAllCaPodsReadyInNamespace(f, c)) }) + It("should disable node pool autoscaling [Feature:ClusterSizeAutoscalingScaleUp]", func() { + framework.SkipUnlessProviderIs("gke") + + By("Creating new node-pool with one n1-standard-4 machine") + const extraPoolName = "extra-pool" + addNodePool(extraPoolName, "n1-standard-4") + defer deleteNodePool(extraPoolName) + framework.ExpectNoError(framework.WaitForClusterSize(c, nodeCount+1, resizeTimeout)) + framework.ExpectNoError(enableAutoscaler(extraPoolName, 1, 2)) + framework.ExpectNoError(disableAutoscaler(extraPoolName, 1, 2)) + }) + It("should increase cluster size if pods are pending due to host port conflict [Feature:ClusterSizeAutoscalingScaleUp]", func() { CreateHostPortPods(f, "host-port", nodeCount+2, false) defer framework.DeleteRC(f.Client, f.Namespace.Name, "host-port") @@ -230,25 +225,8 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() { By("Creating new node-pool with one n1-standard-4 machine") const extraPoolName = "extra-pool" - output, err := exec.Command("gcloud", "alpha", "container", "node-pools", "create", extraPoolName, "--quiet", - "--machine-type=n1-standard-4", - "--num-nodes=1", - "--project="+framework.TestContext.CloudConfig.ProjectID, - "--zone="+framework.TestContext.CloudConfig.Zone, - "--cluster="+framework.TestContext.CloudConfig.Cluster).CombinedOutput() - defer func() { - glog.Infof("Deleting node pool %s", extraPoolName) - output, err := exec.Command("gcloud", "alpha", "container", "node-pools", "delete", extraPoolName, "--quiet", - "--project="+framework.TestContext.CloudConfig.ProjectID, - "--zone="+framework.TestContext.CloudConfig.Zone, - "--cluster="+framework.TestContext.CloudConfig.Cluster).CombinedOutput() - if err != nil { - glog.Infof("Error: %v", err) - } - glog.Infof("Node-pool deletion output: %s", output) - }() - framework.ExpectNoError(err) - glog.Infof("Creating node-pool: %s", output) + addNodePool(extraPoolName, "n1-standard-4") + defer deleteNodePool(extraPoolName) framework.ExpectNoError(framework.WaitForClusterSize(c, nodeCount+1, resizeTimeout)) framework.ExpectNoError(enableAutoscaler(extraPoolName, 1, 2)) @@ -356,6 +334,73 @@ func enableAutoscaler(nodePool string, minCount, maxCount int) error { return fmt.Errorf("autoscaler not enabled") } +func disableAutoscaler(nodePool string, minCount, maxCount int) error { + + if nodePool == "default-pool" { + glog.Infof("Using gcloud to disable autoscaling for pool %s", nodePool) + + output, err := exec.Command("gcloud", "alpha", "container", "clusters", "update", framework.TestContext.CloudConfig.Cluster, + "--no-enable-autoscaling", + "--node-pool="+nodePool, + "--project="+framework.TestContext.CloudConfig.ProjectID, + "--zone="+framework.TestContext.CloudConfig.Zone).Output() + + if err != nil { + return fmt.Errorf("Failed to enable autoscaling: %v", err) + } + glog.Infof("Config update result: %s", output) + + } else { + glog.Infof("Using direct api access to disable autoscaling for pool %s", nodePool) + updateRequest := "{" + + " \"update\": {" + + " \"desiredNodePoolId\": \"" + nodePool + "\"," + + " \"desiredNodePoolAutoscaling\": {" + + " \"enabled\": \"false\"," + + " }" + + " }" + + "}" + + url := getGKEClusterUrl() + glog.Infof("Using gke api url %s", url) + putResult, err := doPut(url, updateRequest) + if err != nil { + return fmt.Errorf("Failed to put %s: %v", url, err) + } + glog.Infof("Config update result: %s", putResult) + } + + for startTime := time.Now(); startTime.Add(gkeUpdateTimeout).After(time.Now()); time.Sleep(30 * time.Second) { + if val, err := isAutoscalerEnabled(minCount); err == nil && !val { + return nil + } + } + return fmt.Errorf("autoscaler still enabled") +} + +func addNodePool(name string, machineType string) { + output, err := exec.Command("gcloud", "alpha", "container", "node-pools", "create", name, "--quiet", + "--machine-type="+machineType, + "--num-nodes=1", + "--project="+framework.TestContext.CloudConfig.ProjectID, + "--zone="+framework.TestContext.CloudConfig.Zone, + "--cluster="+framework.TestContext.CloudConfig.Cluster).CombinedOutput() + framework.ExpectNoError(err) + glog.Infof("Creating node-pool %s: %s", name, output) +} + +func deleteNodePool(name string) { + glog.Infof("Deleting node pool %s", name) + output, err := exec.Command("gcloud", "alpha", "container", "node-pools", "delete", name, "--quiet", + "--project="+framework.TestContext.CloudConfig.ProjectID, + "--zone="+framework.TestContext.CloudConfig.Zone, + "--cluster="+framework.TestContext.CloudConfig.Cluster).CombinedOutput() + if err != nil { + glog.Infof("Error: %v", err) + } + glog.Infof("Node-pool deletion output: %s", output) +} + func doPut(url, content string) (string, error) { req, err := http.NewRequest("PUT", url, bytes.NewBuffer([]byte(content))) req.Header.Set("Content-Type", "application/json") From d81f7a0f22117ff3efde6ecc8d9825c11af30b21 Mon Sep 17 00:00:00 2001 From: Dmitry Shulyak Date: Thu, 19 May 2016 13:58:36 +0300 Subject: [PATCH 278/339] Use strategic patch to replace changeCause in patch command --- pkg/kubectl/cmd/patch.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkg/kubectl/cmd/patch.go b/pkg/kubectl/cmd/patch.go index be03af38da..759ac0e44a 100644 --- a/pkg/kubectl/cmd/patch.go +++ b/pkg/kubectl/cmd/patch.go @@ -167,17 +167,18 @@ func RunPatch(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []stri if !options.Local { helper := resource.NewHelper(client, mapping) - patchedObject, err := helper.Patch(namespace, name, patchType, patchBytes) + _, err := helper.Patch(namespace, name, patchType, patchBytes) if err != nil { return err } if cmdutil.ShouldRecord(cmd, info) { - if err := cmdutil.RecordChangeCause(patchedObject, f.Command()); err == nil { - // don't return an error on failure. The patch itself succeeded, its only the hint for that change that failed - // don't bother checking for failures of this replace, because a failure to indicate the hint doesn't fail the command - // also, don't force the replacement. If the replacement fails on a resourceVersion conflict, then it means this - // record hint is likely to be invalid anyway, so avoid the bad hint - resource.NewHelper(client, mapping).Replace(namespace, name, false, patchedObject) + // don't return an error on failure. The patch itself succeeded, its only the hint for that change that failed + // don't bother checking for failures of this replace, because a failure to indicate the hint doesn't fail the command + // also, don't force the replacement. If the replacement fails on a resourceVersion conflict, then it means this + // record hint is likely to be invalid anyway, so avoid the bad hint + patch, err := cmdutil.ChangeResourcePatch(info, f.Command()) + if err == nil { + helper.Patch(info.Namespace, info.Name, api.StrategicMergePatchType, patch) } } count++ @@ -208,7 +209,7 @@ func RunPatch(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []stri } // TODO: if we ever want to go generic, this allows a clean -o yaml without trying to print columns or anything // rawExtension := &runtime.Unknown{ - // Raw: originalPatchedObjJS, + // Raw: originalPatchedObjJS, // } printer, err := f.PrinterForMapping(cmd, mapping, false) From ee1d48033366cfbb2e32fc98af6d37c0789e03c2 Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Wed, 29 Jun 2016 07:55:53 -0700 Subject: [PATCH 279/339] Revert "Merge pull request #28193 from zmerlynn/pull-ci-elsewhere" This reverts commit d965b4719cb113f8f607e991755b09a3b0dbb33d, reversing changes made to 08a28e5123d3ef2aac444e8398979fec2cdc74eb. --- cluster/common.sh | 15 +++++---------- cluster/gce/upgrade.sh | 2 +- docs/devel/getting-builds.md | 6 +++--- hack/get-build.sh | 3 +-- hack/jenkins/e2e-runner.sh | 23 ++++++++++------------- 5 files changed, 20 insertions(+), 29 deletions(-) diff --git a/cluster/common.sh b/cluster/common.sh index aa662f9248..5765228d0b 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -292,7 +292,7 @@ function detect-master-from-kubeconfig() { # Sets KUBE_VERSION variable to the proper version number (e.g. "v1.0.6", # "v1.2.0-alpha.1.881+376438b69c7612") or a version' publication of the form -# / (e.g. "release/stable",' "ci/latest-1"). +# / (e.g. "release/stable",' "ci/latest-1"). # # See the docs on getting builds for more information about version # publication. @@ -303,12 +303,7 @@ function detect-master-from-kubeconfig() { # KUBE_VERSION function set_binary_version() { if [[ "${1}" =~ "/" ]]; then - IFS='/' read -a path <<< "${1}" - if [[ "${path[0]}" == "release" ]]; then - KUBE_VERSION=$(gsutil cat "gs://kubernetes-release/${1}.txt") - else - KUBE_VERSION=$(gsutil cat "gs://kubernetes-release-dev/${1}.txt") - fi + KUBE_VERSION=$(gsutil cat gs://kubernetes-release/${1}.txt) else KUBE_VERSION=${1} fi @@ -339,8 +334,8 @@ function tars_from_version() { KUBE_MANIFESTS_TAR_URL="${SERVER_BINARY_TAR_URL/server-linux-amd64/manifests}" KUBE_MANIFESTS_TAR_HASH=$(curl ${KUBE_MANIFESTS_TAR_URL} | sha1sum | awk '{print $1}') elif [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then - SERVER_BINARY_TAR_URL="https://storage.googleapis.com/kubernetes-release-dev/ci/${KUBE_VERSION}/kubernetes-server-linux-amd64.tar.gz" - SALT_TAR_URL="https://storage.googleapis.com/kubernetes-release-dev/ci/${KUBE_VERSION}/kubernetes-salt.tar.gz" + SERVER_BINARY_TAR_URL="https://storage.googleapis.com/kubernetes-release/ci/${KUBE_VERSION}/kubernetes-server-linux-amd64.tar.gz" + SALT_TAR_URL="https://storage.googleapis.com/kubernetes-release/ci/${KUBE_VERSION}/kubernetes-salt.tar.gz" # TODO: Clean this up. KUBE_MANIFESTS_TAR_URL="${SERVER_BINARY_TAR_URL/server-linux-amd64/manifests}" KUBE_MANIFESTS_TAR_HASH=$(curl ${KUBE_MANIFESTS_TAR_URL} | sha1sum | awk '{print $1}') @@ -489,7 +484,7 @@ function build-runtime-config() { if [[ -n ${appends} ]]; then if [[ -n ${RUNTIME_CONFIG} ]]; then RUNTIME_CONFIG="${RUNTIME_CONFIG},${appends}" - else + else RUNTIME_CONFIG="${appends}" fi fi diff --git a/cluster/gce/upgrade.sh b/cluster/gce/upgrade.sh index cb9f8139c7..5b56a0759c 100755 --- a/cluster/gce/upgrade.sh +++ b/cluster/gce/upgrade.sh @@ -59,7 +59,7 @@ function usage() { release_stable=$(gsutil cat gs://kubernetes-release/release/stable.txt) release_latest=$(gsutil cat gs://kubernetes-release/release/latest.txt) - ci_latest=$(gsutil cat gs://kubernetes-release-dev/ci/latest.txt) + ci_latest=$(gsutil cat gs://kubernetes-release/ci/latest.txt) echo "Right now, versions are as follows:" echo " release/stable: ${0} ${release_stable}" diff --git a/docs/devel/getting-builds.md b/docs/devel/getting-builds.md index 52e9c193f5..bd6143d521 100644 --- a/docs/devel/getting-builds.md +++ b/docs/devel/getting-builds.md @@ -59,9 +59,9 @@ Finally, you can just print the latest or stable version: You can also use the gsutil tool to explore the Google Cloud Storage release buckets. Here are some examples: ```sh -gsutil cat gs://kubernetes-release-dev/ci/latest.txt # output the latest ci version number -gsutil cat gs://kubernetes-release-dev/ci/latest-green.txt # output the latest ci version number that passed gce e2e -gsutil ls gs://kubernetes-release-dev/ci/v0.20.0-29-g29a55cc/ # list the contents of a ci release +gsutil cat gs://kubernetes-release/ci/latest.txt # output the latest ci version number +gsutil cat gs://kubernetes-release/ci/latest-green.txt # output the latest ci version number that passed gce e2e +gsutil ls gs://kubernetes-release/ci/v0.20.0-29-g29a55cc/ # list the contents of a ci release gsutil ls gs://kubernetes-release/release # list all official releases and rcs ``` diff --git a/hack/get-build.sh b/hack/get-build.sh index baff5f4abb..8771a3a7c5 100755 --- a/hack/get-build.sh +++ b/hack/get-build.sh @@ -23,7 +23,6 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. source "${KUBE_ROOT}/cluster/common.sh" declare -r KUBE_RELEASE_BUCKET_URL="https://storage.googleapis.com/kubernetes-release" -declare -r KUBE_DEV_RELEASE_BUCKET_URL="https://storage.googleapis.com/kubernetes-release-dev" declare -r KUBE_TAR_NAME="kubernetes.tar.gz" usage() { @@ -75,7 +74,7 @@ else if [[ ${KUBE_VERSION} =~ ${KUBE_RELEASE_VERSION_REGEX} ]]; then curl --fail -o "kubernetes-${KUBE_VERSION}.tar.gz" "${KUBE_RELEASE_BUCKET_URL}/release/${KUBE_VERSION}/${KUBE_TAR_NAME}" elif [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then - curl --fail -o "kubernetes-${KUBE_VERSION}.tar.gz" "${KUBE_DEV_RELEASE_BUCKET_URL}/ci/${KUBE_VERSION}/${KUBE_TAR_NAME}" + curl --fail -o "kubernetes-${KUBE_VERSION}.tar.gz" "${KUBE_RELEASE_BUCKET_URL}/ci/${KUBE_VERSION}/${KUBE_TAR_NAME}" else echo "Version doesn't match regexp" >&2 exit 1 diff --git a/hack/jenkins/e2e-runner.sh b/hack/jenkins/e2e-runner.sh index c951dfb683..a8583e6b64 100755 --- a/hack/jenkins/e2e-runner.sh +++ b/hack/jenkins/e2e-runner.sh @@ -22,7 +22,6 @@ set -o pipefail set -o xtrace : ${KUBE_GCS_RELEASE_BUCKET:="kubernetes-release"} -: ${KUBE_GCS_DEV_RELEASE_BUCKET:="kubernetes-release-dev"} function running_in_docker() { grep -q docker /proc/self/cgroup @@ -48,15 +47,10 @@ function fetch_server_version_tars() { function fetch_published_version_tars() { local -r published_version="${1}" IFS='/' read -a varr <<< "${published_version}" - path="${varr[0]}" - if [[ "${path}" == "release" ]]; then - local -r bucket="${KUBE_GCS_RELEASE_BUCKET}" - else - local -r bucket="${KUBE_GCS_DEV_RELEASE_BUCKET}" - fi - build_version=$(gsutil cat "gs://${bucket}/${published_version}.txt") + bucket="${varr[0]}" + build_version=$(gsutil cat gs://${KUBE_GCS_RELEASE_BUCKET}/${published_version}.txt) echo "Using published version $bucket/$build_version (from ${published_version})" - fetch_tars_from_gcs "gs://${bucket}/${path}" "${build_version}" + fetch_tars_from_gcs "${bucket}" "${build_version}" unpack_binaries # Set CLUSTER_API_VERSION for GKE CI export CLUSTER_API_VERSION=$(echo ${build_version} | cut -c 2-) @@ -70,10 +64,13 @@ function clean_binaries() { } function fetch_tars_from_gcs() { - local -r gspath="${1}" + local -r bucket="${1}" local -r build_version="${2}" - echo "Pulling binaries from GCS; using server version ${gspath}/${build_version}." - gsutil -mq cp "${gspath}/${build_version}/kubernetes.tar.gz" "${gspath}/${build_version}/kubernetes-test.tar.gz" . + echo "Pulling binaries from GCS; using server version ${bucket}/${build_version}." + gsutil -mq cp \ + "gs://${KUBE_GCS_RELEASE_BUCKET}/${bucket}/${build_version}/kubernetes.tar.gz" \ + "gs://${KUBE_GCS_RELEASE_BUCKET}/${bucket}/${build_version}/kubernetes-test.tar.gz" \ + . } function unpack_binaries() { @@ -193,7 +190,7 @@ function e2e_test() { if [[ "${E2E_PUBLISH_GREEN_VERSION:-}" == "true" && ${exitcode} == 0 ]]; then # Use plaintext version file packaged with kubernetes.tar.gz echo "Publish version to ci/latest-green.txt: $(cat version)" - gsutil cp ./version "gs://${KUBE_GCS_DEV_RELEASE_BUCKET}/ci/latest-green.txt" + gsutil cp ./version gs://kubernetes-release/ci/latest-green.txt fi } From fe64293c6a8e3bbdb9ac616f1a4b1e13e906b574 Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Wed, 29 Jun 2016 07:56:48 -0700 Subject: [PATCH 280/339] Revert "Merge pull request #28172 from zmerlynn/push-alt-ci" This reverts commit 43437e4528a48fb24d9515706f8a90e242d89e27, reversing changes made to 532491aab66467e1284fddf6e06c830b7f65da76. --- build/common.sh | 26 ++------------------------ build/push-ci-build.sh | 1 - 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/build/common.sh b/build/common.sh index 6984e2d147..d4301bc23e 100755 --- a/build/common.sh +++ b/build/common.sh @@ -1229,16 +1229,6 @@ function kube::release::gcs::copy_release_artifacts() { fi gsutil ls -lhr "${gcs_destination}" || return 1 - - if [[ -n "${KUBE_GCS_RELEASE_BUCKET_MIRROR:-}" ]]; then - local -r gcs_mirror="gs://${KUBE_GCS_RELEASE_BUCKET_MIRROR}/${KUBE_GCS_RELEASE_PREFIX}" - kube::log::status "Mirroring build to ${gcs_mirror}" - gsutil -q -m "${gcs_options[@]+${gcs_options[@]}}" rsync -d -r "${gcs_destination}" "${gcs_mirror}" || return 1 - if [[ ${KUBE_GCS_MAKE_PUBLIC} =~ ^[yY]$ ]]; then - kube::log::status "Marking all uploaded mirror objects public" - gsutil -q -m acl ch -R -g all:R "${gcs_mirror}" >/dev/null 2>&1 || return 1 - fi - fi } # Publish a new ci version, (latest,) but only if the release files actually @@ -1503,19 +1493,7 @@ function kube::release::gcs::verify_ci_ge() { # If new version is greater than the GCS version function kube::release::gcs::publish() { local -r publish_file="${1-}" - - kube::release::gcs::publish_to_bucket "${KUBE_GCS_RELEASE_BUCKET}" "${publish_file}" || return 1 - - if [[ -n "${KUBE_GCS_RELEASE_BUCKET_MIRROR:-}" ]]; then - kube::release::gcs::publish_to_bucket "${KUBE_GCS_RELEASE_BUCKET_MIRROR}" "${publish_file}" || return 1 - fi -} - - -function kube::release::gcs::publish_to_bucket() { - local -r publish_bucket="${1}" - local -r publish_file="${2}" - local -r publish_file_dst="gs://${publish_bucket}/${publish_file}" + local -r publish_file_dst="gs://${KUBE_GCS_RELEASE_BUCKET}/${publish_file}" mkdir -p "${RELEASE_STAGE}/upload" || return 1 echo "${KUBE_GCS_PUBLISH_VERSION}" > "${RELEASE_STAGE}/upload/latest" || return 1 @@ -1528,7 +1506,7 @@ function kube::release::gcs::publish_to_bucket() { gsutil acl ch -R -g all:R "${publish_file_dst}" >/dev/null 2>&1 || return 1 gsutil setmeta -h "Cache-Control:private, max-age=0" "${publish_file_dst}" >/dev/null 2>&1 || return 1 # If public, validate public link - local -r public_link="https://storage.googleapis.com/${publish_bucket}/${publish_file}" + local -r public_link="https://storage.googleapis.com/${KUBE_GCS_RELEASE_BUCKET}/${publish_file}" kube::log::status "Validating uploaded version file at ${public_link}" contents="$(curl -s "${public_link}")" else diff --git a/build/push-ci-build.sh b/build/push-ci-build.sh index 4e131ad60e..6d74878ffa 100755 --- a/build/push-ci-build.sh +++ b/build/push-ci-build.sh @@ -31,7 +31,6 @@ KUBE_GCS_MAKE_PUBLIC='y' KUBE_GCS_UPLOAD_RELEASE='y' KUBE_GCS_DELETE_EXISTING='n' : ${KUBE_GCS_RELEASE_BUCKET:='kubernetes-release'} -: ${KUBE_GCS_RELEASE_BUCKET_MIRROR:='kubernetes-release-dev'} KUBE_GCS_RELEASE_PREFIX="ci/${LATEST}" KUBE_GCS_PUBLISH_VERSION="${LATEST}" From 21b218ce4f9122e4a1064dc04c965d651753522c Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Tue, 17 May 2016 14:59:43 +0300 Subject: [PATCH 281/339] Add link to diagram of `kubectl drain` issue kubernetes/kubernetes.github.io#501 --- pkg/kubectl/cmd/drain.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/kubectl/cmd/drain.go b/pkg/kubectl/cmd/drain.go index 07e79d790c..af5c7f6056 100644 --- a/pkg/kubectl/cmd/drain.go +++ b/pkg/kubectl/cmd/drain.go @@ -137,6 +137,8 @@ var ( When you are ready to put the node back into service, use kubectl uncordon, which will make the node schedulable again. + + ![Workflow](http://kubernetes.io/images/docs/kubectl_drain.svg) `) drain_example = dedent.Dedent(` From ae313b6c8b7fb73ca0bd9227aa502d125aa7ea6e Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Wed, 29 Jun 2016 11:52:07 -0700 Subject: [PATCH 282/339] Revert "Revert "Merge pull request #28172 from zmerlynn/push-alt-ci"" This reverts commit fe64293c6a8e3bbdb9ac616f1a4b1e13e906b574. --- build/common.sh | 26 ++++++++++++++++++++++++-- build/push-ci-build.sh | 1 + 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/build/common.sh b/build/common.sh index d4301bc23e..6984e2d147 100755 --- a/build/common.sh +++ b/build/common.sh @@ -1229,6 +1229,16 @@ function kube::release::gcs::copy_release_artifacts() { fi gsutil ls -lhr "${gcs_destination}" || return 1 + + if [[ -n "${KUBE_GCS_RELEASE_BUCKET_MIRROR:-}" ]]; then + local -r gcs_mirror="gs://${KUBE_GCS_RELEASE_BUCKET_MIRROR}/${KUBE_GCS_RELEASE_PREFIX}" + kube::log::status "Mirroring build to ${gcs_mirror}" + gsutil -q -m "${gcs_options[@]+${gcs_options[@]}}" rsync -d -r "${gcs_destination}" "${gcs_mirror}" || return 1 + if [[ ${KUBE_GCS_MAKE_PUBLIC} =~ ^[yY]$ ]]; then + kube::log::status "Marking all uploaded mirror objects public" + gsutil -q -m acl ch -R -g all:R "${gcs_mirror}" >/dev/null 2>&1 || return 1 + fi + fi } # Publish a new ci version, (latest,) but only if the release files actually @@ -1493,7 +1503,19 @@ function kube::release::gcs::verify_ci_ge() { # If new version is greater than the GCS version function kube::release::gcs::publish() { local -r publish_file="${1-}" - local -r publish_file_dst="gs://${KUBE_GCS_RELEASE_BUCKET}/${publish_file}" + + kube::release::gcs::publish_to_bucket "${KUBE_GCS_RELEASE_BUCKET}" "${publish_file}" || return 1 + + if [[ -n "${KUBE_GCS_RELEASE_BUCKET_MIRROR:-}" ]]; then + kube::release::gcs::publish_to_bucket "${KUBE_GCS_RELEASE_BUCKET_MIRROR}" "${publish_file}" || return 1 + fi +} + + +function kube::release::gcs::publish_to_bucket() { + local -r publish_bucket="${1}" + local -r publish_file="${2}" + local -r publish_file_dst="gs://${publish_bucket}/${publish_file}" mkdir -p "${RELEASE_STAGE}/upload" || return 1 echo "${KUBE_GCS_PUBLISH_VERSION}" > "${RELEASE_STAGE}/upload/latest" || return 1 @@ -1506,7 +1528,7 @@ function kube::release::gcs::publish() { gsutil acl ch -R -g all:R "${publish_file_dst}" >/dev/null 2>&1 || return 1 gsutil setmeta -h "Cache-Control:private, max-age=0" "${publish_file_dst}" >/dev/null 2>&1 || return 1 # If public, validate public link - local -r public_link="https://storage.googleapis.com/${KUBE_GCS_RELEASE_BUCKET}/${publish_file}" + local -r public_link="https://storage.googleapis.com/${publish_bucket}/${publish_file}" kube::log::status "Validating uploaded version file at ${public_link}" contents="$(curl -s "${public_link}")" else diff --git a/build/push-ci-build.sh b/build/push-ci-build.sh index 6d74878ffa..4e131ad60e 100755 --- a/build/push-ci-build.sh +++ b/build/push-ci-build.sh @@ -31,6 +31,7 @@ KUBE_GCS_MAKE_PUBLIC='y' KUBE_GCS_UPLOAD_RELEASE='y' KUBE_GCS_DELETE_EXISTING='n' : ${KUBE_GCS_RELEASE_BUCKET:='kubernetes-release'} +: ${KUBE_GCS_RELEASE_BUCKET_MIRROR:='kubernetes-release-dev'} KUBE_GCS_RELEASE_PREFIX="ci/${LATEST}" KUBE_GCS_PUBLISH_VERSION="${LATEST}" From df455d120ba9d3ff92d21e02d7f33db6d33ce3bc Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Mon, 27 Jun 2016 12:42:47 -0700 Subject: [PATCH 283/339] node e2e: install nsenter on trusty images This is required to run kubelet with kubenet. --- test/e2e_node/environment/setup_host.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/e2e_node/environment/setup_host.sh b/test/e2e_node/environment/setup_host.sh index 48393469cc..052ccd40b0 100755 --- a/test/e2e_node/environment/setup_host.sh +++ b/test/e2e_node/environment/setup_host.sh @@ -62,6 +62,25 @@ if [ $? -ne 0 ]; then rm -r etcd-v2.2.5-linux-amd64* fi +# Install nsenter for ubuntu images +cat /etc/*-release | grep "ID=ubuntu" +if [ $? -eq 0 ]; then + if ! which nsenter > /dev/null; then + echo "Do not find nsenter. Install it." + mkdir -p /tmp/nsenter-install + cd /tmp/nsenter-install + curl https://www.kernel.org/pub/linux/utils/util-linux/v2.24/util-linux-2.24.tar.gz | tar -zxf- + sudo apt-get update + sudo apt-get --yes install make + sudo apt-get --yes install gcc + cd util-linux-2.24 + ./configure --without-ncurses + make nsenter + sudo cp nsenter /usr/local/bin + rm -rf /tmp/nsenter-install + fi +fi + # Install docker hash docker 2>/dev/null if [ $? -ne 0 ]; then From b096b4a2db74a88b6d620d9f9b539675d891d0a7 Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Wed, 29 Jun 2016 10:15:33 -0700 Subject: [PATCH 284/339] node e2e: install cni on the host This is required to run kubelet with kubenet. --- test/e2e_node/e2e_remote.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/e2e_node/e2e_remote.go b/test/e2e_node/e2e_remote.go index a9ae1de2a6..38491d5262 100644 --- a/test/e2e_node/e2e_remote.go +++ b/test/e2e_node/e2e_remote.go @@ -40,7 +40,12 @@ var ginkgoFlags = flag.String("ginkgo-flags", "", "Passed to ginkgo to specify a var sshOptionsMap map[string]string -const archiveName = "e2e_node_test.tar.gz" +const ( + archiveName = "e2e_node_test.tar.gz" + CNI_RELEASE = "c864f0e1ea73719b8f4582402b0847064f9883b0" +) + +var CNI_URL = fmt.Sprintf("https://storage.googleapis.com/kubernetes-release/network-plugins/cni-%s.tar.gz", CNI_RELEASE) var hostnameIpOverrides = struct { sync.RWMutex @@ -152,6 +157,14 @@ func RunRemote(archive string, host string, cleanup bool, junitFileNumber int, s } } + // Install the cni plugin. Note that /opt/cni does not get cleaned up after + // the test completes. + if _, err := RunSshCommand("ssh", GetHostnameOrIp(host), "--", "sh", "-c", + getSshCommand(" ; ", "sudo mkdir -p /opt/cni", fmt.Sprintf("sudo wget -O - %s | sudo tar -xz -C /opt/cni", CNI_URL))); err != nil { + // Exit failure with the error + return "", false, err + } + // Create the temp staging directory glog.Infof("Staging test binaries on %s", host) tmp := fmt.Sprintf("/tmp/gcloud-e2e-%d", rand.Int31()) From 9c7da9c1164b028263072dd1aacea27ae0f34197 Mon Sep 17 00:00:00 2001 From: Jeff Grafton Date: Wed, 29 Jun 2016 13:15:14 -0700 Subject: [PATCH 285/339] Install pip in kubekins test image and install AWS cli when needed --- hack/jenkins/dockerized-e2e-runner.sh | 2 +- hack/jenkins/e2e-runner.sh | 3 +++ hack/jenkins/gotest-dockerized.sh | 2 +- hack/jenkins/test-image/Dockerfile | 3 +++ hack/jenkins/test-image/Makefile | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hack/jenkins/dockerized-e2e-runner.sh b/hack/jenkins/dockerized-e2e-runner.sh index 6772a141dd..60666c9f42 100755 --- a/hack/jenkins/dockerized-e2e-runner.sh +++ b/hack/jenkins/dockerized-e2e-runner.sh @@ -61,5 +61,5 @@ docker run --rm=true -i \ -e "WORKSPACE=/workspace" \ "${docker_extra_args[@]:+${docker_extra_args[@]}}" \ "${METADATA_SERVER_ADD_HOST_ARGS[@]:+${METADATA_SERVER_ADD_HOST_ARGS[@]}}" \ - gcr.io/google_containers/kubekins-test:go1.6.2-docker1.9.1-rev1 \ + gcr.io/google_containers/kubekins-test:go1.6.2-docker1.9.1-rev2 \ bash -c "bash <(curl -fsS --retry 3 --keepalive-time 2 'https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/e2e-runner.sh')" diff --git a/hack/jenkins/e2e-runner.sh b/hack/jenkins/e2e-runner.sh index a8583e6b64..831ed43220 100755 --- a/hack/jenkins/e2e-runner.sh +++ b/hack/jenkins/e2e-runner.sh @@ -143,6 +143,9 @@ function dump_cluster_logs() { if running_in_docker; then curl -fsSL --retry 3 --keepalive-time 2 -o "${WORKSPACE}/google-cloud-sdk.tar.gz" 'https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz' install_google_cloud_sdk_tarball "${WORKSPACE}/google-cloud-sdk.tar.gz" / + if [[ "${KUBERNETES_PROVIDER}" == 'aws' ]]; then + pip install awscli + fi fi # Install gcloud from a custom path if provided. Used to test GKE with gcloud diff --git a/hack/jenkins/gotest-dockerized.sh b/hack/jenkins/gotest-dockerized.sh index 91b0aed495..6d7dbd395d 100755 --- a/hack/jenkins/gotest-dockerized.sh +++ b/hack/jenkins/gotest-dockerized.sh @@ -44,5 +44,5 @@ docker run --rm=true \ -e "KUBE_VERIFY_GIT_BRANCH=${KUBE_VERIFY_GIT_BRANCH:-}" \ -e "REPO_DIR=${REPO_DIR}" \ -e "HOST_ARTIFACTS_DIR=${HOST_ARTIFACTS_DIR}" \ - -i gcr.io/google_containers/kubekins-test:go1.6.2-docker1.9.1-rev1 \ + -i gcr.io/google_containers/kubekins-test:go1.6.2-docker1.9.1-rev2 \ bash -c "cd kubernetes && ${KUBE_TEST_SCRIPT:-./hack/jenkins/test-dockerized.sh}" diff --git a/hack/jenkins/test-image/Dockerfile b/hack/jenkins/test-image/Dockerfile index 816f9a998d..eeba18872d 100644 --- a/hack/jenkins/test-image/Dockerfile +++ b/hack/jenkins/test-image/Dockerfile @@ -29,17 +29,20 @@ WORKDIR /workspace # dnsutils is needed by federation cluster scripts. # file is used when uploading test artifacts to GCS. # jq is used by hack/verify-godep-licenses.sh. +# python-pip is needed to install the AWS cli. # netcat is used by integration test scripts. RUN apt-get update && apt-get install -y \ dnsutils \ file \ jq \ + python-pip \ netcat-openbsd \ rsync \ && rm -rf /var/lib/apt/lists/* RUN curl -L "https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz" |\ tar -C /usr/bin -xvzf- --strip-components=3 usr/local/bin/docker + RUN mkdir -p /go/src/k8s.io/kubernetes RUN ln -s /go/src/k8s.io/kubernetes /workspace/kubernetes diff --git a/hack/jenkins/test-image/Makefile b/hack/jenkins/test-image/Makefile index 8c7c6c76d3..ac65beedbb 100644 --- a/hack/jenkins/test-image/Makefile +++ b/hack/jenkins/test-image/Makefile @@ -16,7 +16,7 @@ all: push # Tag format: $GO_VERSION-$EMBEDDED_DOCKER_VERSION-$REVISION # These versions are specified in the Dockerfile -TAG = go1.6.2-docker1.9.1-rev1 +TAG = go1.6.2-docker1.9.1-rev2 container: docker build -t gcr.io/google_containers/kubekins-test . From 6de83d58537f576103d1f341e8da22fa9080b78a Mon Sep 17 00:00:00 2001 From: Girish Kalele Date: Wed, 29 Jun 2016 14:05:43 -0700 Subject: [PATCH 286/339] Update Godeps for github.com/skynetservices/skydns and github.com/miekg/dns --- Godeps/Godeps.json | 22 +- vendor/github.com/armon/go-metrics/.gitignore | 0 vendor/github.com/armon/go-metrics/metrics.go | 0 vendor/github.com/armon/go-metrics/sink.go | 0 vendor/github.com/armon/go-metrics/start.go | 0 .../github.com/armon/go-metrics/statsite.go | 0 vendor/github.com/coreos/go-oidc/jose/sig.go | 0 .../coreos/go-oidc/jose/sig_hmac.go | 0 .../github.com/coreos/go-oidc/jose/sig_rsa.go | 0 vendor/github.com/coreos/go-oidc/oidc/key.go | 0 vendor/github.com/elazarl/goproxy/all.bash | 0 .../go-msgpack/codec/msgpack_test.py | 0 vendor/github.com/kr/pty/mktypes.bash | 0 vendor/github.com/miekg/dns/README.md | 18 +- vendor/github.com/miekg/dns/client.go | 35 +- vendor/github.com/miekg/dns/defaults.go | 14 +- vendor/github.com/miekg/dns/dns.go | 38 +- vendor/github.com/miekg/dns/dnssec.go | 73 +- vendor/github.com/miekg/dns/dnssec_keyscan.go | 28 +- vendor/github.com/miekg/dns/edns.go | 95 +- vendor/github.com/miekg/dns/format.go | 9 - .../miekg/dns/{zgenerate.go => generate.go} | 31 +- vendor/github.com/miekg/dns/labels.go | 2 +- vendor/github.com/miekg/dns/msg.go | 1143 +----- vendor/github.com/miekg/dns/msg_generate.go | 337 ++ vendor/github.com/miekg/dns/msg_helpers.go | 630 +++ vendor/github.com/miekg/dns/nsecx.go | 13 +- vendor/github.com/miekg/dns/privaterr.go | 36 +- vendor/github.com/miekg/dns/rawmsg.go | 50 +- vendor/github.com/miekg/dns/reverse.go | 38 + .../miekg/dns/{zscan.go => scan.go} | 8 +- .../miekg/dns/{zscan_rr.go => scan_rr.go} | 127 - vendor/github.com/miekg/dns/server.go | 75 +- vendor/github.com/miekg/dns/sig0.go | 25 +- vendor/github.com/miekg/dns/tlsa.go | 6 +- vendor/github.com/miekg/dns/tsig.go | 156 +- vendor/github.com/miekg/dns/types.go | 94 +- vendor/github.com/miekg/dns/types_generate.go | 41 +- vendor/github.com/miekg/dns/xfr.go | 4 +- vendor/github.com/miekg/dns/zmsg.go | 3462 +++++++++++++++++ vendor/github.com/miekg/dns/ztypes.go | 16 +- vendor/github.com/pborman/uuid/dce.go | 0 vendor/github.com/pborman/uuid/doc.go | 0 vendor/github.com/pborman/uuid/node.go | 0 vendor/github.com/pborman/uuid/time.go | 0 vendor/github.com/pborman/uuid/uuid.go | 0 .../skynetservices/skydns/server/config.go | 2 +- .../skydns/server/forwarding.go | 2 +- .../skynetservices/skydns/server/server.go | 7 +- vendor/github.com/ugorji/go/codec/prebuild.sh | 0 vendor/github.com/ugorji/go/codec/test.py | 0 vendor/github.com/ugorji/go/codec/tests.sh | 0 vendor/golang.org/x/sys/unix/mkall.sh | 0 vendor/golang.org/x/sys/unix/mkerrors.sh | 0 vendor/golang.org/x/sys/unix/mksyscall.pl | 0 .../x/sys/unix/mksyscall_solaris.pl | 0 .../golang.org/x/sys/unix/mksysctl_openbsd.pl | 0 .../golang.org/x/sys/unix/mksysnum_darwin.pl | 0 .../x/sys/unix/mksysnum_dragonfly.pl | 0 .../golang.org/x/sys/unix/mksysnum_freebsd.pl | 0 .../golang.org/x/sys/unix/mksysnum_linux.pl | 0 .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 0 .../golang.org/x/sys/unix/mksysnum_openbsd.pl | 0 vendor/google.golang.org/grpc/codegen.sh | 0 vendor/google.golang.org/grpc/coverage.sh | 0 65 files changed, 5165 insertions(+), 1472 deletions(-) mode change 100644 => 100755 vendor/github.com/armon/go-metrics/.gitignore mode change 100644 => 100755 vendor/github.com/armon/go-metrics/metrics.go mode change 100644 => 100755 vendor/github.com/armon/go-metrics/sink.go mode change 100644 => 100755 vendor/github.com/armon/go-metrics/start.go mode change 100644 => 100755 vendor/github.com/armon/go-metrics/statsite.go mode change 100644 => 100755 vendor/github.com/coreos/go-oidc/jose/sig.go mode change 100644 => 100755 vendor/github.com/coreos/go-oidc/jose/sig_hmac.go mode change 100644 => 100755 vendor/github.com/coreos/go-oidc/jose/sig_rsa.go mode change 100644 => 100755 vendor/github.com/coreos/go-oidc/oidc/key.go mode change 100644 => 100755 vendor/github.com/elazarl/goproxy/all.bash mode change 100644 => 100755 vendor/github.com/hashicorp/go-msgpack/codec/msgpack_test.py mode change 100644 => 100755 vendor/github.com/kr/pty/mktypes.bash rename vendor/github.com/miekg/dns/{zgenerate.go => generate.go} (83%) create mode 100644 vendor/github.com/miekg/dns/msg_generate.go create mode 100644 vendor/github.com/miekg/dns/msg_helpers.go create mode 100644 vendor/github.com/miekg/dns/reverse.go rename vendor/github.com/miekg/dns/{zscan.go => scan.go} (99%) rename vendor/github.com/miekg/dns/{zscan_rr.go => scan_rr.go} (94%) create mode 100644 vendor/github.com/miekg/dns/zmsg.go mode change 100644 => 100755 vendor/github.com/pborman/uuid/dce.go mode change 100644 => 100755 vendor/github.com/pborman/uuid/doc.go mode change 100644 => 100755 vendor/github.com/pborman/uuid/node.go mode change 100644 => 100755 vendor/github.com/pborman/uuid/time.go mode change 100644 => 100755 vendor/github.com/pborman/uuid/uuid.go mode change 100644 => 100755 vendor/github.com/ugorji/go/codec/prebuild.sh mode change 100644 => 100755 vendor/github.com/ugorji/go/codec/test.py mode change 100644 => 100755 vendor/github.com/ugorji/go/codec/tests.sh mode change 100644 => 100755 vendor/golang.org/x/sys/unix/mkall.sh mode change 100644 => 100755 vendor/golang.org/x/sys/unix/mkerrors.sh mode change 100644 => 100755 vendor/golang.org/x/sys/unix/mksyscall.pl mode change 100644 => 100755 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl mode change 100644 => 100755 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl mode change 100644 => 100755 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl mode change 100644 => 100755 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl mode change 100644 => 100755 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl mode change 100644 => 100755 vendor/golang.org/x/sys/unix/mksysnum_linux.pl mode change 100644 => 100755 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl mode change 100644 => 100755 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl mode change 100644 => 100755 vendor/google.golang.org/grpc/codegen.sh mode change 100644 => 100755 vendor/google.golang.org/grpc/coverage.sh diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index cd23ec1760..75222688e9 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1319,7 +1319,7 @@ }, { "ImportPath": "github.com/miekg/dns", - "Rev": "c2b278e70f35902fd68b54b69238cd10bb1b7451" + "Rev": "5d001d020961ae1c184f9f8152fdc73810481677" }, { "ImportPath": "github.com/mistifyio/go-zfs", @@ -1802,28 +1802,28 @@ }, { "ImportPath": "github.com/skynetservices/skydns/cache", - "Comment": "2.5.3a-32-gf7b6fb7", - "Rev": "f7b6fb74bcfab300b4e7e0e27b1fe6c0ed555f78" + "Comment": "2.5.3a-41-g00ade30", + "Rev": "00ade3024f047d26130abf161900e0adb72a06f1" }, { "ImportPath": "github.com/skynetservices/skydns/metrics", - "Comment": "2.5.3a-32-gf7b6fb7", - "Rev": "f7b6fb74bcfab300b4e7e0e27b1fe6c0ed555f78" + "Comment": "2.5.3a-41-g00ade30", + "Rev": "00ade3024f047d26130abf161900e0adb72a06f1" }, { "ImportPath": "github.com/skynetservices/skydns/msg", - "Comment": "2.5.3a-32-gf7b6fb7", - "Rev": "f7b6fb74bcfab300b4e7e0e27b1fe6c0ed555f78" + "Comment": "2.5.3a-41-g00ade30", + "Rev": "00ade3024f047d26130abf161900e0adb72a06f1" }, { "ImportPath": "github.com/skynetservices/skydns/server", - "Comment": "2.5.3a-32-gf7b6fb7", - "Rev": "f7b6fb74bcfab300b4e7e0e27b1fe6c0ed555f78" + "Comment": "2.5.3a-41-g00ade30", + "Rev": "00ade3024f047d26130abf161900e0adb72a06f1" }, { "ImportPath": "github.com/skynetservices/skydns/singleflight", - "Comment": "2.5.3a-32-gf7b6fb7", - "Rev": "f7b6fb74bcfab300b4e7e0e27b1fe6c0ed555f78" + "Comment": "2.5.3a-41-g00ade30", + "Rev": "00ade3024f047d26130abf161900e0adb72a06f1" }, { "ImportPath": "github.com/spf13/cobra", diff --git a/vendor/github.com/armon/go-metrics/.gitignore b/vendor/github.com/armon/go-metrics/.gitignore old mode 100644 new mode 100755 diff --git a/vendor/github.com/armon/go-metrics/metrics.go b/vendor/github.com/armon/go-metrics/metrics.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/armon/go-metrics/sink.go b/vendor/github.com/armon/go-metrics/sink.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/armon/go-metrics/start.go b/vendor/github.com/armon/go-metrics/start.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/armon/go-metrics/statsite.go b/vendor/github.com/armon/go-metrics/statsite.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/coreos/go-oidc/jose/sig.go b/vendor/github.com/coreos/go-oidc/jose/sig.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/coreos/go-oidc/jose/sig_hmac.go b/vendor/github.com/coreos/go-oidc/jose/sig_hmac.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/coreos/go-oidc/jose/sig_rsa.go b/vendor/github.com/coreos/go-oidc/jose/sig_rsa.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/coreos/go-oidc/oidc/key.go b/vendor/github.com/coreos/go-oidc/oidc/key.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/elazarl/goproxy/all.bash b/vendor/github.com/elazarl/goproxy/all.bash old mode 100644 new mode 100755 diff --git a/vendor/github.com/hashicorp/go-msgpack/codec/msgpack_test.py b/vendor/github.com/hashicorp/go-msgpack/codec/msgpack_test.py old mode 100644 new mode 100755 diff --git a/vendor/github.com/kr/pty/mktypes.bash b/vendor/github.com/kr/pty/mktypes.bash old mode 100644 new mode 100755 diff --git a/vendor/github.com/miekg/dns/README.md b/vendor/github.com/miekg/dns/README.md index 011d085f18..83b4183eb8 100644 --- a/vendor/github.com/miekg/dns/README.md +++ b/vendor/github.com/miekg/dns/README.md @@ -12,7 +12,7 @@ can build servers and resolvers with it. We try to keep the "master" branch as sane as possible and at the bleeding edge of standards, avoiding breaking changes wherever reasonable. We support the last -two versions of Go, currently: 1.4 and 1.5. +two versions of Go, currently: 1.5 and 1.6. # Goals @@ -48,6 +48,8 @@ A not-so-up-to-date-list-that-may-be-actually-current: * https://github.com/miekg/unbound * https://github.com/miekg/exdns * https://dnslookup.org +* https://github.com/looterz/grimd +* https://github.com/phamhongviet/serf-dns Send pull request if you want to be listed here. @@ -61,7 +63,7 @@ Send pull request if you want to be listed here. * Server side programming (mimicking the net/http package); * Client side programming; * DNSSEC: signing, validating and key generation for DSA, RSA and ECDSA; -* EDNS0, NSID; +* EDNS0, NSID, Cookies; * AXFR/IXFR; * TSIG, SIG(0); * DNS over TLS: optional encrypted connection between client and server; @@ -111,7 +113,6 @@ Example programs can be found in the `github.com/miekg/exdns` repository. * 340{1,2,3} - NAPTR record * 3445 - Limiting the scope of (DNS)KEY * 3597 - Unknown RRs -* 4025 - IPSECKEY * 403{3,4,5} - DNSSEC + validation functions * 4255 - SSHFP record * 4343 - Case insensitivity @@ -138,8 +139,9 @@ Example programs can be found in the `github.com/miekg/exdns` repository. * 7043 - EUI48/EUI64 records * 7314 - DNS (EDNS) EXPIRE Option * 7553 - URI record +* 7858 - DNS over TLS: Initiation and Performance Considerations (draft) +* 7873 - Domain Name System (DNS) Cookies (draft-ietf-dnsop-cookies) * xxxx - EDNS0 DNS Update Lease (draft) -* yyyy - DNS over TLS: Initiation and Performance Considerations (draft) ## Loosely based upon @@ -147,11 +149,3 @@ Example programs can be found in the `github.com/miekg/exdns` repository. * `NSD` * `Net::DNS` * `GRONG` - -## TODO - -* privatekey.Precompute() when signing? -* Last remaining RRs: APL, ATMA, A6, NSAP and NXT. -* Missing in parsing: ISDN, UNSPEC, NSAP and ATMA. -* NSEC(3) cover/match/closest enclose. -* Replies with TC bit are not parsed to the end. diff --git a/vendor/github.com/miekg/dns/client.go b/vendor/github.com/miekg/dns/client.go index 7a05eb99cc..1302e4e04c 100644 --- a/vendor/github.com/miekg/dns/client.go +++ b/vendor/github.com/miekg/dns/client.go @@ -5,6 +5,7 @@ package dns import ( "bytes" "crypto/tls" + "encoding/binary" "io" "net" "time" @@ -28,9 +29,10 @@ type Client struct { Net string // if "tcp" or "tcp-tls" (DNS over TLS) a TCP query will be initiated, otherwise an UDP one (default is "" for UDP) UDPSize uint16 // minimum receive buffer for UDP messages TLSConfig *tls.Config // TLS connection configuration - DialTimeout time.Duration // net.DialTimeout, defaults to 2 seconds - ReadTimeout time.Duration // net.Conn.SetReadTimeout value for connections, defaults to 2 seconds - WriteTimeout time.Duration // net.Conn.SetWriteTimeout value for connections, defaults to 2 seconds + Timeout time.Duration // a cumulative timeout for dial, write and read, defaults to 0 (disabled) - overrides DialTimeout, ReadTimeout and WriteTimeout when non-zero + DialTimeout time.Duration // net.DialTimeout, defaults to 2 seconds - overridden by Timeout when that value is non-zero + ReadTimeout time.Duration // net.Conn.SetReadTimeout value for connections, defaults to 2 seconds - overridden by Timeout when that value is non-zero + WriteTimeout time.Duration // net.Conn.SetWriteTimeout value for connections, defaults to 2 seconds - overridden by Timeout when that value is non-zero TsigSecret map[string]string // secret(s) for Tsig map[], zonename must be fully qualified SingleInflight bool // if true suppress multiple outstanding queries for the same Qname, Qtype and Qclass group singleflight @@ -129,6 +131,9 @@ func (c *Client) Exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err erro } func (c *Client) dialTimeout() time.Duration { + if c.Timeout != 0 { + return c.Timeout + } if c.DialTimeout != 0 { return c.DialTimeout } @@ -170,6 +175,11 @@ func (c *Client) exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err erro } } + var deadline time.Time + if c.Timeout != 0 { + deadline = time.Now().Add(c.Timeout) + } + if tls { co, err = DialTimeoutWithTLS(network, a, c.TLSConfig, c.dialTimeout()) } else { @@ -192,12 +202,12 @@ func (c *Client) exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err erro } co.TsigSecret = c.TsigSecret - co.SetWriteDeadline(time.Now().Add(c.writeTimeout())) + co.SetWriteDeadline(deadlineOrTimeout(deadline, c.writeTimeout())) if err = co.WriteMsg(m); err != nil { return nil, 0, err } - co.SetReadDeadline(time.Now().Add(c.readTimeout())) + co.SetReadDeadline(deadlineOrTimeout(deadline, c.readTimeout())) r, err = co.ReadMsg() if err == nil && r.Id != m.Id { err = ErrId @@ -274,9 +284,11 @@ func (co *Conn) ReadMsgHeader(hdr *Header) ([]byte, error) { p = p[:n] if hdr != nil { - if _, err = UnpackStruct(hdr, p, 0); err != nil { + dh, _, err := unpackMsgHdr(p, 0) + if err != nil { return nil, err } + *hdr = dh } return p, err } @@ -291,7 +303,7 @@ func tcpMsgLen(t io.Reader) (int, error) { if n != 2 { return 0, ErrShortRead } - l, _ := unpackUint16(p, 0) + l := binary.BigEndian.Uint16(p) if l == 0 { return 0, ErrShortRead } @@ -383,7 +395,7 @@ func (co *Conn) Write(p []byte) (n int, err error) { return 0, &Error{err: "message too large"} } l := make([]byte, 2, lp+2) - l[0], l[1] = packUint16(uint16(lp)) + binary.BigEndian.PutUint16(l, uint16(lp)) p = append(l, p...) n, err := io.Copy(w, bytes.NewReader(p)) return int(n), err @@ -434,3 +446,10 @@ func DialTimeoutWithTLS(network, address string, tlsConfig *tls.Config, timeout } return conn, nil } + +func deadlineOrTimeout(deadline time.Time, timeout time.Duration) time.Time { + if deadline.IsZero() { + return time.Now().Add(timeout) + } + return deadline +} diff --git a/vendor/github.com/miekg/dns/defaults.go b/vendor/github.com/miekg/dns/defaults.go index 63165b4fa9..cf456165f4 100644 --- a/vendor/github.com/miekg/dns/defaults.go +++ b/vendor/github.com/miekg/dns/defaults.go @@ -142,9 +142,13 @@ func (dns *Msg) IsTsig() *TSIG { // record in the additional section will do. It returns the OPT record // found or nil. func (dns *Msg) IsEdns0() *OPT { - for _, r := range dns.Extra { - if r.Header().Rrtype == TypeOPT { - return r.(*OPT) + // EDNS0 is at the end of the additional section, start there. + // We might want to change this to *only* look at the last two + // records. So we see TSIG and/or OPT - this a slightly bigger + // change though. + for i := len(dns.Extra) - 1; i >= 0; i-- { + if dns.Extra[i].Header().Rrtype == TypeOPT { + return dns.Extra[i].(*OPT) } } return nil @@ -163,8 +167,8 @@ func IsDomainName(s string) (labels int, ok bool) { return labels, err == nil } -// IsSubDomain checks if child is indeed a child of the parent. Both child and -// parent are *not* downcased before doing the comparison. +// IsSubDomain checks if child is indeed a child of the parent. If child and parent +// are the same domain true is returned as well. func IsSubDomain(parent, child string) bool { // Entire child is contained in parent return CompareDomainName(parent, child) == CountLabel(parent) diff --git a/vendor/github.com/miekg/dns/dns.go b/vendor/github.com/miekg/dns/dns.go index a3e4a0efae..b3292287ce 100644 --- a/vendor/github.com/miekg/dns/dns.go +++ b/vendor/github.com/miekg/dns/dns.go @@ -3,17 +3,15 @@ package dns import "strconv" const ( - year68 = 1 << 31 // For RFC1982 (Serial Arithmetic) calculations in 32 bits. - // DefaultMsgSize is the standard default for messages larger than 512 bytes. - DefaultMsgSize = 4096 - // MinMsgSize is the minimal size of a DNS packet. - MinMsgSize = 512 - // MaxMsgSize is the largest possible DNS packet. - MaxMsgSize = 65535 - defaultTtl = 3600 // Default internal TTL. + year68 = 1 << 31 // For RFC1982 (Serial Arithmetic) calculations in 32 bits. + defaultTtl = 3600 // Default internal TTL. + + DefaultMsgSize = 4096 // DefaultMsgSize is the standard default for messages larger than 512 bytes. + MinMsgSize = 512 // MinMsgSize is the minimal size of a DNS packet. + MaxMsgSize = 65535 // MaxMsgSize is the largest possible DNS packet. ) -// Error represents a DNS error +// Error represents a DNS error. type Error struct{ err string } func (e *Error) Error() string { @@ -30,10 +28,13 @@ type RR interface { Header() *RR_Header // String returns the text representation of the resource record. String() string + // copy returns a copy of the RR copy() RR // len returns the length (in octets) of the uncompressed RR in wire format. len() int + // pack packs an RR into wire format. + pack([]byte, int, map[string]int, bool) (int, error) } // RR_Header is the header all DNS resource records share. @@ -42,13 +43,13 @@ type RR_Header struct { Rrtype uint16 Class uint16 Ttl uint32 - Rdlength uint16 // length of data after header + Rdlength uint16 // Length of data after header. } -// Header returns itself. This is here to make RR_Header implement the RR interface. +// Header returns itself. This is here to make RR_Header implements the RR interface. func (h *RR_Header) Header() *RR_Header { return h } -// Just to imlement the RR interface. +// Just to implement the RR interface. func (h *RR_Header) copy() RR { return nil } func (h *RR_Header) copyHeader() *RR_Header { @@ -82,19 +83,22 @@ func (h *RR_Header) len() int { return l } -// ToRFC3597 converts a known RR to the unknown RR representation -// from RFC 3597. +// ToRFC3597 converts a known RR to the unknown RR representation from RFC 3597. func (rr *RFC3597) ToRFC3597(r RR) error { buf := make([]byte, r.len()*2) - off, err := PackStruct(r, buf, 0) + off, err := PackRR(r, buf, 0, nil, false) if err != nil { return err } buf = buf[:off] - rawSetRdlength(buf, 0, off) - _, err = UnpackStruct(rr, buf, 0) + if int(r.Header().Rdlength) > off { + return ErrBuf + } + + rfc3597, _, err := unpackRFC3597(*r.Header(), buf, off-int(r.Header().Rdlength)) if err != nil { return err } + *rr = *rfc3597.(*RFC3597) return nil } diff --git a/vendor/github.com/miekg/dns/dnssec.go b/vendor/github.com/miekg/dns/dnssec.go index 84cb21421b..f5f3fbdd89 100644 --- a/vendor/github.com/miekg/dns/dnssec.go +++ b/vendor/github.com/miekg/dns/dnssec.go @@ -13,6 +13,7 @@ import ( _ "crypto/sha256" _ "crypto/sha512" "encoding/asn1" + "encoding/binary" "encoding/hex" "math/big" "sort" @@ -103,9 +104,7 @@ const ( ZONE = 1 << 8 ) -// The RRSIG needs to be converted to wireformat with some of -// the rdata (the signature) missing. Use this struct to ease -// the conversion (and re-use the pack/unpack functions). +// The RRSIG needs to be converted to wireformat with some of the rdata (the signature) missing. type rrsigWireFmt struct { TypeCovered uint16 Algorithm uint8 @@ -144,7 +143,7 @@ func (k *DNSKEY) KeyTag() uint16 { // at the base64 values. But I'm lazy. modulus, _ := fromBase64([]byte(k.PublicKey)) if len(modulus) > 1 { - x, _ := unpackUint16(modulus, len(modulus)-2) + x := binary.BigEndian.Uint16(modulus[len(modulus)-2:]) keytag = int(x) } default: @@ -154,7 +153,7 @@ func (k *DNSKEY) KeyTag() uint16 { keywire.Algorithm = k.Algorithm keywire.PublicKey = k.PublicKey wire := make([]byte, DefaultMsgSize) - n, err := PackStruct(keywire, wire, 0) + n, err := packKeyWire(keywire, wire) if err != nil { return 0 } @@ -192,7 +191,7 @@ func (k *DNSKEY) ToDS(h uint8) *DS { keywire.Algorithm = k.Algorithm keywire.PublicKey = k.PublicKey wire := make([]byte, DefaultMsgSize) - n, err := PackStruct(keywire, wire, 0) + n, err := packKeyWire(keywire, wire) if err != nil { return nil } @@ -289,7 +288,7 @@ func (rr *RRSIG) Sign(k crypto.Signer, rrset []RR) error { // Create the desired binary blob signdata := make([]byte, DefaultMsgSize) - n, err := PackStruct(sigwire, signdata, 0) + n, err := packSigWire(sigwire, signdata) if err != nil { return err } @@ -407,7 +406,7 @@ func (rr *RRSIG) Verify(k *DNSKEY, rrset []RR) error { sigwire.SignerName = strings.ToLower(rr.SignerName) // Create the desired binary blob signeddata := make([]byte, DefaultMsgSize) - n, err := PackStruct(sigwire, signeddata, 0) + n, err := packSigWire(sigwire, signeddata) if err != nil { return err } @@ -662,3 +661,61 @@ func rawSignatureData(rrset []RR, s *RRSIG) (buf []byte, err error) { } return buf, nil } + +func packSigWire(sw *rrsigWireFmt, msg []byte) (int, error) { + // copied from zmsg.go RRSIG packing + off, err := packUint16(sw.TypeCovered, msg, 0) + if err != nil { + return off, err + } + off, err = packUint8(sw.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(sw.Labels, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(sw.OrigTtl, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(sw.Expiration, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(sw.Inception, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(sw.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(sw.SignerName, msg, off, nil, false) + if err != nil { + return off, err + } + return off, nil +} + +func packKeyWire(dw *dnskeyWireFmt, msg []byte) (int, error) { + // copied from zmsg.go DNSKEY packing + off, err := packUint16(dw.Flags, msg, 0) + if err != nil { + return off, err + } + off, err = packUint8(dw.Protocol, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(dw.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(dw.PublicKey, msg, off) + if err != nil { + return off, err + } + return off, nil +} diff --git a/vendor/github.com/miekg/dns/dnssec_keyscan.go b/vendor/github.com/miekg/dns/dnssec_keyscan.go index 19a783389a..c0b54dc764 100644 --- a/vendor/github.com/miekg/dns/dnssec_keyscan.go +++ b/vendor/github.com/miekg/dns/dnssec_keyscan.go @@ -25,9 +25,9 @@ func (k *DNSKEY) NewPrivateKey(s string) (crypto.PrivateKey, error) { // The public key must be known, because some cryptographic algorithms embed // the public inside the privatekey. func (k *DNSKEY) ReadPrivateKey(q io.Reader, file string) (crypto.PrivateKey, error) { - m, e := parseKey(q, file) + m, err := parseKey(q, file) if m == nil { - return nil, e + return nil, err } if _, ok := m["private-key-format"]; !ok { return nil, ErrPrivKey @@ -42,16 +42,16 @@ func (k *DNSKEY) ReadPrivateKey(q io.Reader, file string) (crypto.PrivateKey, er } switch uint8(algo) { case DSA: - priv, e := readPrivateKeyDSA(m) - if e != nil { - return nil, e + priv, err := readPrivateKeyDSA(m) + if err != nil { + return nil, err } pub := k.publicKeyDSA() if pub == nil { return nil, ErrKey } priv.PublicKey = *pub - return priv, e + return priv, nil case RSAMD5: fallthrough case RSASHA1: @@ -61,31 +61,31 @@ func (k *DNSKEY) ReadPrivateKey(q io.Reader, file string) (crypto.PrivateKey, er case RSASHA256: fallthrough case RSASHA512: - priv, e := readPrivateKeyRSA(m) - if e != nil { - return nil, e + priv, err := readPrivateKeyRSA(m) + if err != nil { + return nil, err } pub := k.publicKeyRSA() if pub == nil { return nil, ErrKey } priv.PublicKey = *pub - return priv, e + return priv, nil case ECCGOST: return nil, ErrPrivKey case ECDSAP256SHA256: fallthrough case ECDSAP384SHA384: - priv, e := readPrivateKeyECDSA(m) - if e != nil { - return nil, e + priv, err := readPrivateKeyECDSA(m) + if err != nil { + return nil, err } pub := k.publicKeyECDSA() if pub == nil { return nil, ErrKey } priv.PublicKey = *pub - return priv, e + return priv, nil default: return nil, ErrPrivKey } diff --git a/vendor/github.com/miekg/dns/edns.go b/vendor/github.com/miekg/dns/edns.go index 0c47f6ea5a..7a58aa9b17 100644 --- a/vendor/github.com/miekg/dns/edns.go +++ b/vendor/github.com/miekg/dns/edns.go @@ -1,6 +1,7 @@ package dns import ( + "encoding/binary" "encoding/hex" "errors" "net" @@ -17,6 +18,7 @@ const ( EDNS0N3U = 0x7 // NSEC3 Hash Understood EDNS0SUBNET = 0x8 // client-subnet (RFC6891) EDNS0EXPIRE = 0x9 // EDNS0 expire + EDNS0COOKIE = 0xa // EDNS0 Cookie EDNS0SUBNETDRAFT = 0x50fa // Don't use! Use EDNS0SUBNET EDNS0LOCALSTART = 0xFDE9 // Beginning of range reserved for local/experimental use (RFC6891) EDNS0LOCALEND = 0xFFFE // End of range reserved for local/experimental use (RFC6891) @@ -56,6 +58,8 @@ func (rr *OPT) String() string { if o.(*EDNS0_SUBNET).DraftOption { s += " (draft)" } + case *EDNS0_COOKIE: + s += "\n; COOKIE: " + o.String() case *EDNS0_UL: s += "\n; UPDATE LEASE: " + o.String() case *EDNS0_LLQ: @@ -96,13 +100,16 @@ func (rr *OPT) SetVersion(v uint8) { } // ExtendedRcode returns the EDNS extended RCODE field (the upper 8 bits of the TTL). -func (rr *OPT) ExtendedRcode() uint8 { - return uint8((rr.Hdr.Ttl & 0xFF000000) >> 24) +func (rr *OPT) ExtendedRcode() int { + return int((rr.Hdr.Ttl&0xFF000000)>>24) + 15 } // SetExtendedRcode sets the EDNS extended RCODE field. func (rr *OPT) SetExtendedRcode(v uint8) { - rr.Hdr.Ttl = rr.Hdr.Ttl&0x00FFFFFF | (uint32(v) << 24) + if v < RcodeBadVers { // Smaller than 16.. Use the 4 bits you have! + return + } + rr.Hdr.Ttl = rr.Hdr.Ttl&0x00FFFFFF | (uint32(v-15) << 24) } // UDPSize returns the UDP buffer size. @@ -125,8 +132,7 @@ func (rr *OPT) SetDo() { rr.Hdr.Ttl |= _DO } -// EDNS0 defines an EDNS0 Option. An OPT RR can have multiple options appended to -// it. +// EDNS0 defines an EDNS0 Option. An OPT RR can have multiple options appended to it. type EDNS0 interface { // Option returns the option code for the option. Option() uint16 @@ -207,7 +213,7 @@ func (e *EDNS0_SUBNET) Option() uint16 { func (e *EDNS0_SUBNET) pack() ([]byte, error) { b := make([]byte, 4) - b[0], b[1] = packUint16(e.Family) + binary.BigEndian.PutUint16(b[0:], e.Family) b[2] = e.SourceNetmask b[3] = e.SourceScope switch e.Family { @@ -241,7 +247,7 @@ func (e *EDNS0_SUBNET) unpack(b []byte) error { if len(b) < 4 { return ErrBuf } - e.Family, _ = unpackUint16(b, 0) + e.Family = binary.BigEndian.Uint16(b) e.SourceNetmask = b[2] e.SourceScope = b[3] switch e.Family { @@ -283,6 +289,41 @@ func (e *EDNS0_SUBNET) String() (s string) { return } +// The Cookie EDNS0 option +// +// o := new(dns.OPT) +// o.Hdr.Name = "." +// o.Hdr.Rrtype = dns.TypeOPT +// e := new(dns.EDNS0_COOKIE) +// e.Code = dns.EDNS0COOKIE +// e.Cookie = "24a5ac.." +// o.Option = append(o.Option, e) +// +// The Cookie field consists out of a client cookie (RFC 7873 Section 4), that is +// always 8 bytes. It may then optionally be followed by the server cookie. The server +// cookie is of variable length, 8 to a maximum of 32 bytes. In other words: +// +// cCookie := o.Cookie[:16] +// sCookie := o.Cookie[16:] +// +// There is no guarantee that the Cookie string has a specific length. +type EDNS0_COOKIE struct { + Code uint16 // Always EDNS0COOKIE + Cookie string // Hex-encoded cookie data +} + +func (e *EDNS0_COOKIE) pack() ([]byte, error) { + h, err := hex.DecodeString(e.Cookie) + if err != nil { + return nil, err + } + return h, nil +} + +func (e *EDNS0_COOKIE) Option() uint16 { return EDNS0COOKIE } +func (e *EDNS0_COOKIE) unpack(b []byte) error { e.Cookie = hex.EncodeToString(b); return nil } +func (e *EDNS0_COOKIE) String() string { return e.Cookie } + // The EDNS0_UL (Update Lease) (draft RFC) option is used to tell the server to set // an expiration on an update RR. This is helpful for clients that cannot clean // up after themselves. This is a draft RFC and more information can be found at @@ -306,10 +347,7 @@ func (e *EDNS0_UL) String() string { return strconv.FormatUint(uint64(e.Lease), // Copied: http://golang.org/src/pkg/net/dnsmsg.go func (e *EDNS0_UL) pack() ([]byte, error) { b := make([]byte, 4) - b[0] = byte(e.Lease >> 24) - b[1] = byte(e.Lease >> 16) - b[2] = byte(e.Lease >> 8) - b[3] = byte(e.Lease) + binary.BigEndian.PutUint32(b, e.Lease) return b, nil } @@ -317,7 +355,7 @@ func (e *EDNS0_UL) unpack(b []byte) error { if len(b) < 4 { return ErrBuf } - e.Lease = uint32(b[0])<<24 | uint32(b[1])<<16 | uint32(b[2])<<8 | uint32(b[3]) + e.Lease = binary.BigEndian.Uint32(b) return nil } @@ -336,21 +374,11 @@ func (e *EDNS0_LLQ) Option() uint16 { return EDNS0LLQ } func (e *EDNS0_LLQ) pack() ([]byte, error) { b := make([]byte, 18) - b[0], b[1] = packUint16(e.Version) - b[2], b[3] = packUint16(e.Opcode) - b[4], b[5] = packUint16(e.Error) - b[6] = byte(e.Id >> 56) - b[7] = byte(e.Id >> 48) - b[8] = byte(e.Id >> 40) - b[9] = byte(e.Id >> 32) - b[10] = byte(e.Id >> 24) - b[11] = byte(e.Id >> 16) - b[12] = byte(e.Id >> 8) - b[13] = byte(e.Id) - b[14] = byte(e.LeaseLife >> 24) - b[15] = byte(e.LeaseLife >> 16) - b[16] = byte(e.LeaseLife >> 8) - b[17] = byte(e.LeaseLife) + binary.BigEndian.PutUint16(b[0:], e.Version) + binary.BigEndian.PutUint16(b[2:], e.Opcode) + binary.BigEndian.PutUint16(b[4:], e.Error) + binary.BigEndian.PutUint64(b[6:], e.Id) + binary.BigEndian.PutUint32(b[14:], e.LeaseLife) return b, nil } @@ -358,12 +386,11 @@ func (e *EDNS0_LLQ) unpack(b []byte) error { if len(b) < 18 { return ErrBuf } - e.Version, _ = unpackUint16(b, 0) - e.Opcode, _ = unpackUint16(b, 2) - e.Error, _ = unpackUint16(b, 4) - e.Id = uint64(b[6])<<56 | uint64(b[6+1])<<48 | uint64(b[6+2])<<40 | - uint64(b[6+3])<<32 | uint64(b[6+4])<<24 | uint64(b[6+5])<<16 | uint64(b[6+6])<<8 | uint64(b[6+7]) - e.LeaseLife = uint32(b[14])<<24 | uint32(b[14+1])<<16 | uint32(b[14+2])<<8 | uint32(b[14+3]) + e.Version = binary.BigEndian.Uint16(b[0:]) + e.Opcode = binary.BigEndian.Uint16(b[2:]) + e.Error = binary.BigEndian.Uint16(b[4:]) + e.Id = binary.BigEndian.Uint64(b[6:]) + e.LeaseLife = binary.BigEndian.Uint32(b[14:]) return nil } @@ -459,7 +486,7 @@ func (e *EDNS0_EXPIRE) unpack(b []byte) error { if len(b) < 4 { return ErrBuf } - e.Expire = uint32(b[0])<<24 | uint32(b[1])<<16 | uint32(b[2])<<8 | uint32(b[3]) + e.Expire = binary.BigEndian.Uint32(b) return nil } diff --git a/vendor/github.com/miekg/dns/format.go b/vendor/github.com/miekg/dns/format.go index 1ac1664fe2..3f5303c201 100644 --- a/vendor/github.com/miekg/dns/format.go +++ b/vendor/github.com/miekg/dns/format.go @@ -69,15 +69,6 @@ func Field(r RR, i int) string { s += " " + Type(d.Index(i).Uint()).String() } return s - case `dns:"wks"`: - if d.Len() == 0 { - return "" - } - s := strconv.Itoa(int(d.Index(0).Uint())) - for i := 0; i < d.Len(); i++ { - s += " " + strconv.Itoa(int(d.Index(i).Uint())) - } - return s default: // if it does not have a tag its a string slice fallthrough diff --git a/vendor/github.com/miekg/dns/zgenerate.go b/vendor/github.com/miekg/dns/generate.go similarity index 83% rename from vendor/github.com/miekg/dns/zgenerate.go rename to vendor/github.com/miekg/dns/generate.go index ce7b540a5d..e4481a4b0d 100644 --- a/vendor/github.com/miekg/dns/zgenerate.go +++ b/vendor/github.com/miekg/dns/generate.go @@ -2,6 +2,7 @@ package dns import ( "bytes" + "errors" "fmt" "strconv" "strings" @@ -25,7 +26,7 @@ func generate(l lex, c chan lex, t chan *Token, o string) string { if i+1 == len(l.token) { return "bad step in $GENERATE range" } - if s, e := strconv.Atoi(l.token[i+1:]); e == nil { + if s, err := strconv.Atoi(l.token[i+1:]); err == nil { if s < 0 { return "bad step in $GENERATE range" } @@ -65,7 +66,7 @@ BuildRR: escape bool dom bytes.Buffer mod string - err string + err error offset int ) @@ -104,8 +105,8 @@ BuildRR: return "bad modifier in $GENERATE" } mod, offset, err = modToPrintf(s[j+2 : j+2+sep]) - if err != "" { - return err + if err != nil { + return err.Error() } j += 2 + sep // Jump to it } @@ -119,9 +120,9 @@ BuildRR: } } // Re-parse the RR and send it on the current channel t - rx, e := NewRR("$ORIGIN " + o + "\n" + dom.String()) - if e != nil { - return e.(*ParseError).err + rx, err := NewRR("$ORIGIN " + o + "\n" + dom.String()) + if err != nil { + return err.Error() } t <- &Token{RR: rx} // Its more efficient to first built the rrlist and then parse it in @@ -131,28 +132,28 @@ BuildRR: } // Convert a $GENERATE modifier 0,0,d to something Printf can deal with. -func modToPrintf(s string) (string, int, string) { +func modToPrintf(s string) (string, int, error) { xs := strings.SplitN(s, ",", 3) if len(xs) != 3 { - return "", 0, "bad modifier in $GENERATE" + return "", 0, errors.New("bad modifier in $GENERATE") } // xs[0] is offset, xs[1] is width, xs[2] is base if xs[2] != "o" && xs[2] != "d" && xs[2] != "x" && xs[2] != "X" { - return "", 0, "bad base in $GENERATE" + return "", 0, errors.New("bad base in $GENERATE") } offset, err := strconv.Atoi(xs[0]) if err != nil || offset > 255 { - return "", 0, "bad offset in $GENERATE" + return "", 0, errors.New("bad offset in $GENERATE") } width, err := strconv.Atoi(xs[1]) if err != nil || width > 255 { - return "", offset, "bad width in $GENERATE" + return "", offset, errors.New("bad width in $GENERATE") } switch { case width < 0: - return "", offset, "bad width in $GENERATE" + return "", offset, errors.New("bad width in $GENERATE") case width == 0: - return "%" + xs[1] + xs[2], offset, "" + return "%" + xs[1] + xs[2], offset, nil } - return "%0" + xs[1] + xs[2], offset, "" + return "%0" + xs[1] + xs[2], offset, nil } diff --git a/vendor/github.com/miekg/dns/labels.go b/vendor/github.com/miekg/dns/labels.go index cb549fc672..fca5c7dd2d 100644 --- a/vendor/github.com/miekg/dns/labels.go +++ b/vendor/github.com/miekg/dns/labels.go @@ -107,7 +107,7 @@ func CountLabel(s string) (labels int) { // Split splits a name s into its label indexes. // www.miek.nl. returns []int{0, 4, 9}, www.miek.nl also returns []int{0, 4, 9}. -// The root name (.) returns nil. Also see SplitDomainName. +// The root name (.) returns nil. Also see SplitDomainName. // s must be a syntactically valid domain name. func Split(s string) []int { if s == "." { diff --git a/vendor/github.com/miekg/dns/msg.go b/vendor/github.com/miekg/dns/msg.go index 7274800fc0..ec2f7ab7bb 100644 --- a/vendor/github.com/miekg/dns/msg.go +++ b/vendor/github.com/miekg/dns/msg.go @@ -8,55 +8,54 @@ package dns +//go:generate go run msg_generate.go + import ( - "encoding/base32" - "encoding/base64" - "encoding/hex" + crand "crypto/rand" + "encoding/binary" "math/big" "math/rand" - "net" - "reflect" "strconv" - "time" ) +func init() { + // Initialize default math/rand source using crypto/rand to provide better + // security without the performance trade-off. + buf := make([]byte, 8) + _, err := crand.Read(buf) + if err != nil { + // Failed to read from cryptographic source, fallback to default initial + // seed (1) by returning early + return + } + seed := binary.BigEndian.Uint64(buf) + rand.Seed(int64(seed)) +} + const maxCompressionOffset = 2 << 13 // We have 14 bits for the compression pointer var ( - // ErrAlg indicates an error with the (DNSSEC) algorithm. - ErrAlg error = &Error{err: "bad algorithm"} - // ErrAuth indicates an error in the TSIG authentication. - ErrAuth error = &Error{err: "bad authentication"} - // ErrBuf indicates that the buffer used it too small for the message. - ErrBuf error = &Error{err: "buffer size too small"} - // ErrConnEmpty indicates a connection is being uses before it is initialized. - ErrConnEmpty error = &Error{err: "conn has no connection"} - // ErrExtendedRcode ... - ErrExtendedRcode error = &Error{err: "bad extended rcode"} - // ErrFqdn indicates that a domain name does not have a closing dot. - ErrFqdn error = &Error{err: "domain must be fully qualified"} - // ErrId indicates there is a mismatch with the message's ID. - ErrId error = &Error{err: "id mismatch"} - // ErrKeyAlg indicates that the algorithm in the key is not valid. - ErrKeyAlg error = &Error{err: "bad key algorithm"} - ErrKey error = &Error{err: "bad key"} - ErrKeySize error = &Error{err: "bad key size"} - ErrNoSig error = &Error{err: "no signature found"} - ErrPrivKey error = &Error{err: "bad private key"} - ErrRcode error = &Error{err: "bad rcode"} - ErrRdata error = &Error{err: "bad rdata"} - ErrRRset error = &Error{err: "bad rrset"} - ErrSecret error = &Error{err: "no secrets defined"} - ErrShortRead error = &Error{err: "short read"} - // ErrSig indicates that a signature can not be cryptographically validated. - ErrSig error = &Error{err: "bad signature"} - // ErrSOA indicates that no SOA RR was seen when doing zone transfers. - ErrSoa error = &Error{err: "no SOA"} - // ErrTime indicates a timing error in TSIG authentication. - ErrTime error = &Error{err: "bad time"} - // ErrTruncated indicates that we failed to unpack a truncated message. - // We unpacked as much as we had so Msg can still be used, if desired. - ErrTruncated error = &Error{err: "failed to unpack truncated message"} + ErrAlg error = &Error{err: "bad algorithm"} // ErrAlg indicates an error with the (DNSSEC) algorithm. + ErrAuth error = &Error{err: "bad authentication"} // ErrAuth indicates an error in the TSIG authentication. + ErrBuf error = &Error{err: "buffer size too small"} // ErrBuf indicates that the buffer used it too small for the message. + ErrConnEmpty error = &Error{err: "conn has no connection"} // ErrConnEmpty indicates a connection is being uses before it is initialized. + ErrExtendedRcode error = &Error{err: "bad extended rcode"} // ErrExtendedRcode ... + ErrFqdn error = &Error{err: "domain must be fully qualified"} // ErrFqdn indicates that a domain name does not have a closing dot. + ErrId error = &Error{err: "id mismatch"} // ErrId indicates there is a mismatch with the message's ID. + ErrKeyAlg error = &Error{err: "bad key algorithm"} // ErrKeyAlg indicates that the algorithm in the key is not valid. + ErrKey error = &Error{err: "bad key"} + ErrKeySize error = &Error{err: "bad key size"} + ErrNoSig error = &Error{err: "no signature found"} + ErrPrivKey error = &Error{err: "bad private key"} + ErrRcode error = &Error{err: "bad rcode"} + ErrRdata error = &Error{err: "bad rdata"} + ErrRRset error = &Error{err: "bad rrset"} + ErrSecret error = &Error{err: "no secrets defined"} + ErrShortRead error = &Error{err: "short read"} + ErrSig error = &Error{err: "bad signature"} // ErrSig indicates that a signature can not be cryptographically validated. + ErrSoa error = &Error{err: "no SOA"} // ErrSOA indicates that no SOA RR was seen when doing zone transfers. + ErrTime error = &Error{err: "bad time"} // ErrTime indicates a timing error in TSIG authentication. + ErrTruncated error = &Error{err: "failed to unpack truncated message"} // ErrTruncated indicates that we failed to unpack a truncated message. We unpacked as much as we had so Msg can still be used, if desired. ) // Id, by default, returns a 16 bits random number to be used as a @@ -67,6 +66,13 @@ var ( // dns.Id = func() uint16 { return 3 } var Id func() uint16 = id +// id returns a 16 bits random number to be used as a +// message id. The random provided should be good enough. +func id() uint16 { + id32 := rand.Uint32() + return uint16(id32) +} + // MsgHdr is a a manually-unpacked version of (id, bits). type MsgHdr struct { Id uint16 @@ -85,25 +91,13 @@ type MsgHdr struct { // Msg contains the layout of a DNS message. type Msg struct { MsgHdr - Compress bool `json:"-"` // If true, the message will be compressed when converted to wire format. This not part of the official DNS packet format. + Compress bool `json:"-"` // If true, the message will be compressed when converted to wire format. Question []Question // Holds the RR(s) of the question section. Answer []RR // Holds the RR(s) of the answer section. Ns []RR // Holds the RR(s) of the authority section. Extra []RR // Holds the RR(s) of the additional section. } -// StringToType is the reverse of TypeToString, needed for string parsing. -var StringToType = reverseInt16(TypeToString) - -// StringToClass is the reverse of ClassToString, needed for string parsing. -var StringToClass = reverseInt16(ClassToString) - -// Map of opcodes strings. -var StringToOpcode = reverseInt(OpcodeToString) - -// Map of rcodes strings. -var StringToRcode = reverseInt(RcodeToString) - // ClassToString is a maps Classes to strings for each CLASS wire type. var ClassToString = map[uint16]string{ ClassINET: "IN", @@ -131,27 +125,22 @@ var RcodeToString = map[int]string{ RcodeNameError: "NXDOMAIN", RcodeNotImplemented: "NOTIMPL", RcodeRefused: "REFUSED", - RcodeYXDomain: "YXDOMAIN", // From RFC 2136 + RcodeYXDomain: "YXDOMAIN", // See RFC 2136 RcodeYXRrset: "YXRRSET", RcodeNXRrset: "NXRRSET", RcodeNotAuth: "NOTAUTH", RcodeNotZone: "NOTZONE", RcodeBadSig: "BADSIG", // Also known as RcodeBadVers, see RFC 6891 // RcodeBadVers: "BADVERS", - RcodeBadKey: "BADKEY", - RcodeBadTime: "BADTIME", - RcodeBadMode: "BADMODE", - RcodeBadName: "BADNAME", - RcodeBadAlg: "BADALG", - RcodeBadTrunc: "BADTRUNC", + RcodeBadKey: "BADKEY", + RcodeBadTime: "BADTIME", + RcodeBadMode: "BADMODE", + RcodeBadName: "BADNAME", + RcodeBadAlg: "BADALG", + RcodeBadTrunc: "BADTRUNC", + RcodeBadCookie: "BADCOOKIE", } -// Rather than write the usual handful of routines to pack and -// unpack every message that can appear on the wire, we use -// reflection to write a generic pack/unpack for structs and then -// use it. Thus, if in the future we need to define new message -// structs, no new pack/unpack/printing code needs to be written. - // Domain names are a sequence of counted strings // split at the dots. They end with a zero-length string. @@ -291,11 +280,11 @@ func packDomainName(s string, msg []byte, off int, compression map[string]int, c if pointer != -1 { // We have two bytes (14 bits) to put the pointer in // if msg == nil, we will never do compression - msg[nameoffset], msg[nameoffset+1] = packUint16(uint16(pointer ^ 0xC000)) + binary.BigEndian.PutUint16(msg[nameoffset:], uint16(pointer^0xC000)) off = nameoffset + 1 goto End } - if msg != nil { + if msg != nil && off < len(msg) { msg[off] = 0 } End: @@ -401,7 +390,6 @@ Loop: } func packTxt(txt []string, msg []byte, offset int, tmp []byte) (int, error) { - var err error if len(txt) == 0 { if offset >= len(msg) { return offset, ErrBuf @@ -409,6 +397,7 @@ func packTxt(txt []string, msg []byte, offset int, tmp []byte) (int, error) { msg[offset] = 0 return offset, nil } + var err error for i := range txt { if len(txt[i]) > len(tmp) { return offset, ErrBuf @@ -418,12 +407,12 @@ func packTxt(txt []string, msg []byte, offset int, tmp []byte) (int, error) { return offset, err } } - return offset, err + return offset, nil } func packTxtString(s string, msg []byte, offset int, tmp []byte) (int, error) { lenByteOffset := offset - if offset >= len(msg) { + if offset >= len(msg) || len(s) > len(tmp) { return offset, ErrBuf } offset++ @@ -465,7 +454,7 @@ func packTxtString(s string, msg []byte, offset int, tmp []byte) (int, error) { } func packOctetString(s string, msg []byte, offset int, tmp []byte) (int, error) { - if offset >= len(msg) { + if offset >= len(msg) || len(s) > len(tmp) { return offset, ErrBuf } bs := tmp[:len(s)] @@ -545,764 +534,6 @@ func unpackTxtString(msg []byte, offset int) (string, int, error) { return string(s), offset, nil } -// Pack a reflect.StructValue into msg. Struct members can only be uint8, uint16, uint32, string, -// slices and other (often anonymous) structs. -func packStructValue(val reflect.Value, msg []byte, off int, compression map[string]int, compress bool) (off1 int, err error) { - var txtTmp []byte - lenmsg := len(msg) - numfield := val.NumField() - for i := 0; i < numfield; i++ { - typefield := val.Type().Field(i) - if typefield.Tag == `dns:"-"` { - continue - } - switch fv := val.Field(i); fv.Kind() { - default: - return lenmsg, &Error{err: "bad kind packing"} - case reflect.Interface: - // PrivateRR is the only RR implementation that has interface field. - // therefore it's expected that this interface would be PrivateRdata - switch data := fv.Interface().(type) { - case PrivateRdata: - n, err := data.Pack(msg[off:]) - if err != nil { - return lenmsg, err - } - off += n - default: - return lenmsg, &Error{err: "bad kind interface packing"} - } - case reflect.Slice: - switch typefield.Tag { - default: - return lenmsg, &Error{"bad tag packing slice: " + typefield.Tag.Get("dns")} - case `dns:"domain-name"`: - for j := 0; j < val.Field(i).Len(); j++ { - element := val.Field(i).Index(j).String() - off, err = PackDomainName(element, msg, off, compression, false && compress) - if err != nil { - return lenmsg, err - } - } - case `dns:"txt"`: - if txtTmp == nil { - txtTmp = make([]byte, 256*4+1) - } - off, err = packTxt(fv.Interface().([]string), msg, off, txtTmp) - if err != nil { - return lenmsg, err - } - case `dns:"opt"`: // edns - for j := 0; j < val.Field(i).Len(); j++ { - element := val.Field(i).Index(j).Interface() - b, e := element.(EDNS0).pack() - if e != nil { - return lenmsg, &Error{err: "overflow packing opt"} - } - // Option code - msg[off], msg[off+1] = packUint16(element.(EDNS0).Option()) - // Length - msg[off+2], msg[off+3] = packUint16(uint16(len(b))) - off += 4 - if off+len(b) > lenmsg { - copy(msg[off:], b) - off = lenmsg - continue - } - // Actual data - copy(msg[off:off+len(b)], b) - off += len(b) - } - case `dns:"a"`: - if val.Type().String() == "dns.IPSECKEY" { - // Field(2) is GatewayType, must be 1 - if val.Field(2).Uint() != 1 { - continue - } - } - // It must be a slice of 4, even if it is 16, we encode - // only the first 4 - if off+net.IPv4len > lenmsg { - return lenmsg, &Error{err: "overflow packing a"} - } - switch fv.Len() { - case net.IPv6len: - msg[off] = byte(fv.Index(12).Uint()) - msg[off+1] = byte(fv.Index(13).Uint()) - msg[off+2] = byte(fv.Index(14).Uint()) - msg[off+3] = byte(fv.Index(15).Uint()) - off += net.IPv4len - case net.IPv4len: - msg[off] = byte(fv.Index(0).Uint()) - msg[off+1] = byte(fv.Index(1).Uint()) - msg[off+2] = byte(fv.Index(2).Uint()) - msg[off+3] = byte(fv.Index(3).Uint()) - off += net.IPv4len - case 0: - // Allowed, for dynamic updates - default: - return lenmsg, &Error{err: "overflow packing a"} - } - case `dns:"aaaa"`: - if val.Type().String() == "dns.IPSECKEY" { - // Field(2) is GatewayType, must be 2 - if val.Field(2).Uint() != 2 { - continue - } - } - if fv.Len() == 0 { - break - } - if fv.Len() > net.IPv6len || off+fv.Len() > lenmsg { - return lenmsg, &Error{err: "overflow packing aaaa"} - } - for j := 0; j < net.IPv6len; j++ { - msg[off] = byte(fv.Index(j).Uint()) - off++ - } - case `dns:"wks"`: - // TODO(miek): this is wrong should be lenrd - if off == lenmsg { - break // dyn. updates - } - if val.Field(i).Len() == 0 { - break - } - off1 := off - for j := 0; j < val.Field(i).Len(); j++ { - serv := int(fv.Index(j).Uint()) - if off+serv/8+1 > len(msg) { - return len(msg), &Error{err: "overflow packing wks"} - } - msg[off+serv/8] |= byte(1 << (7 - uint(serv%8))) - if off+serv/8+1 > off1 { - off1 = off + serv/8 + 1 - } - } - off = off1 - case `dns:"nsec"`: // NSEC/NSEC3 - // This is the uint16 type bitmap - if val.Field(i).Len() == 0 { - // Do absolutely nothing - break - } - var lastwindow, lastlength uint16 - for j := 0; j < val.Field(i).Len(); j++ { - t := uint16(fv.Index(j).Uint()) - window := t / 256 - length := (t-window*256)/8 + 1 - if window > lastwindow && lastlength != 0 { - // New window, jump to the new offset - off += int(lastlength) + 2 - lastlength = 0 - } - if window < lastwindow || length < lastlength { - return len(msg), &Error{err: "nsec bits out of order"} - } - if off+2+int(length) > len(msg) { - return len(msg), &Error{err: "overflow packing nsec"} - } - // Setting the window # - msg[off] = byte(window) - // Setting the octets length - msg[off+1] = byte(length) - // Setting the bit value for the type in the right octet - msg[off+1+int(length)] |= byte(1 << (7 - (t % 8))) - lastwindow, lastlength = window, length - } - off += int(lastlength) + 2 - } - case reflect.Struct: - off, err = packStructValue(fv, msg, off, compression, compress) - if err != nil { - return lenmsg, err - } - case reflect.Uint8: - if off+1 > lenmsg { - return lenmsg, &Error{err: "overflow packing uint8"} - } - msg[off] = byte(fv.Uint()) - off++ - case reflect.Uint16: - if off+2 > lenmsg { - return lenmsg, &Error{err: "overflow packing uint16"} - } - i := fv.Uint() - msg[off] = byte(i >> 8) - msg[off+1] = byte(i) - off += 2 - case reflect.Uint32: - if off+4 > lenmsg { - return lenmsg, &Error{err: "overflow packing uint32"} - } - i := fv.Uint() - msg[off] = byte(i >> 24) - msg[off+1] = byte(i >> 16) - msg[off+2] = byte(i >> 8) - msg[off+3] = byte(i) - off += 4 - case reflect.Uint64: - switch typefield.Tag { - default: - if off+8 > lenmsg { - return lenmsg, &Error{err: "overflow packing uint64"} - } - i := fv.Uint() - msg[off] = byte(i >> 56) - msg[off+1] = byte(i >> 48) - msg[off+2] = byte(i >> 40) - msg[off+3] = byte(i >> 32) - msg[off+4] = byte(i >> 24) - msg[off+5] = byte(i >> 16) - msg[off+6] = byte(i >> 8) - msg[off+7] = byte(i) - off += 8 - case `dns:"uint48"`: - // Used in TSIG, where it stops at 48 bits, so we discard the upper 16 - if off+6 > lenmsg { - return lenmsg, &Error{err: "overflow packing uint64 as uint48"} - } - i := fv.Uint() - msg[off] = byte(i >> 40) - msg[off+1] = byte(i >> 32) - msg[off+2] = byte(i >> 24) - msg[off+3] = byte(i >> 16) - msg[off+4] = byte(i >> 8) - msg[off+5] = byte(i) - off += 6 - } - case reflect.String: - // There are multiple string encodings. - // The tag distinguishes ordinary strings from domain names. - s := fv.String() - switch typefield.Tag { - default: - return lenmsg, &Error{"bad tag packing string: " + typefield.Tag.Get("dns")} - case `dns:"base64"`: - b64, e := fromBase64([]byte(s)) - if e != nil { - return lenmsg, e - } - copy(msg[off:off+len(b64)], b64) - off += len(b64) - case `dns:"domain-name"`: - if val.Type().String() == "dns.IPSECKEY" { - // Field(2) is GatewayType, 1 and 2 or used for addresses - x := val.Field(2).Uint() - if x == 1 || x == 2 { - continue - } - } - if off, err = PackDomainName(s, msg, off, compression, false && compress); err != nil { - return lenmsg, err - } - case `dns:"cdomain-name"`: - if off, err = PackDomainName(s, msg, off, compression, true && compress); err != nil { - return lenmsg, err - } - case `dns:"size-base32"`: - // This is purely for NSEC3 atm, the previous byte must - // holds the length of the encoded string. As NSEC3 - // is only defined to SHA1, the hashlength is 20 (160 bits) - msg[off-1] = 20 - fallthrough - case `dns:"base32"`: - b32, e := fromBase32([]byte(s)) - if e != nil { - return lenmsg, e - } - copy(msg[off:off+len(b32)], b32) - off += len(b32) - case `dns:"size-hex"`: - fallthrough - case `dns:"hex"`: - // There is no length encoded here - h, e := hex.DecodeString(s) - if e != nil { - return lenmsg, e - } - if off+hex.DecodedLen(len(s)) > lenmsg { - return lenmsg, &Error{err: "overflow packing hex"} - } - copy(msg[off:off+hex.DecodedLen(len(s))], h) - off += hex.DecodedLen(len(s)) - case `dns:"size"`: - // the size is already encoded in the RR, we can safely use the - // length of string. String is RAW (not encoded in hex, nor base64) - copy(msg[off:off+len(s)], s) - off += len(s) - case `dns:"octet"`: - bytesTmp := make([]byte, 256) - off, err = packOctetString(fv.String(), msg, off, bytesTmp) - if err != nil { - return lenmsg, err - } - case `dns:"txt"`: - fallthrough - case "": - if txtTmp == nil { - txtTmp = make([]byte, 256*4+1) - } - off, err = packTxtString(fv.String(), msg, off, txtTmp) - if err != nil { - return lenmsg, err - } - } - } - } - return off, nil -} - -func structValue(any interface{}) reflect.Value { - return reflect.ValueOf(any).Elem() -} - -// PackStruct packs any structure to wire format. -func PackStruct(any interface{}, msg []byte, off int) (off1 int, err error) { - off, err = packStructValue(structValue(any), msg, off, nil, false) - return off, err -} - -func packStructCompress(any interface{}, msg []byte, off int, compression map[string]int, compress bool) (off1 int, err error) { - off, err = packStructValue(structValue(any), msg, off, compression, compress) - return off, err -} - -// Unpack a reflect.StructValue from msg. -// Same restrictions as packStructValue. -func unpackStructValue(val reflect.Value, msg []byte, off int) (off1 int, err error) { - lenmsg := len(msg) - for i := 0; i < val.NumField(); i++ { - if off > lenmsg { - return lenmsg, &Error{"bad offset unpacking"} - } - switch fv := val.Field(i); fv.Kind() { - default: - return lenmsg, &Error{err: "bad kind unpacking"} - case reflect.Interface: - // PrivateRR is the only RR implementation that has interface field. - // therefore it's expected that this interface would be PrivateRdata - switch data := fv.Interface().(type) { - case PrivateRdata: - n, err := data.Unpack(msg[off:]) - if err != nil { - return lenmsg, err - } - off += n - default: - return lenmsg, &Error{err: "bad kind interface unpacking"} - } - case reflect.Slice: - switch val.Type().Field(i).Tag { - default: - return lenmsg, &Error{"bad tag unpacking slice: " + val.Type().Field(i).Tag.Get("dns")} - case `dns:"domain-name"`: - // HIP record slice of name (or none) - var servers []string - var s string - for off < lenmsg { - s, off, err = UnpackDomainName(msg, off) - if err != nil { - return lenmsg, err - } - servers = append(servers, s) - } - fv.Set(reflect.ValueOf(servers)) - case `dns:"txt"`: - if off == lenmsg { - break - } - var txt []string - txt, off, err = unpackTxt(msg, off) - if err != nil { - return lenmsg, err - } - fv.Set(reflect.ValueOf(txt)) - case `dns:"opt"`: // edns0 - if off == lenmsg { - // This is an EDNS0 (OPT Record) with no rdata - // We can safely return here. - break - } - var edns []EDNS0 - Option: - code := uint16(0) - if off+4 > lenmsg { - return lenmsg, &Error{err: "overflow unpacking opt"} - } - code, off = unpackUint16(msg, off) - optlen, off1 := unpackUint16(msg, off) - if off1+int(optlen) > lenmsg { - return lenmsg, &Error{err: "overflow unpacking opt"} - } - switch code { - case EDNS0NSID: - e := new(EDNS0_NSID) - if err := e.unpack(msg[off1 : off1+int(optlen)]); err != nil { - return lenmsg, err - } - edns = append(edns, e) - off = off1 + int(optlen) - case EDNS0SUBNET, EDNS0SUBNETDRAFT: - e := new(EDNS0_SUBNET) - if err := e.unpack(msg[off1 : off1+int(optlen)]); err != nil { - return lenmsg, err - } - edns = append(edns, e) - off = off1 + int(optlen) - if code == EDNS0SUBNETDRAFT { - e.DraftOption = true - } - case EDNS0UL: - e := new(EDNS0_UL) - if err := e.unpack(msg[off1 : off1+int(optlen)]); err != nil { - return lenmsg, err - } - edns = append(edns, e) - off = off1 + int(optlen) - case EDNS0LLQ: - e := new(EDNS0_LLQ) - if err := e.unpack(msg[off1 : off1+int(optlen)]); err != nil { - return lenmsg, err - } - edns = append(edns, e) - off = off1 + int(optlen) - case EDNS0DAU: - e := new(EDNS0_DAU) - if err := e.unpack(msg[off1 : off1+int(optlen)]); err != nil { - return lenmsg, err - } - edns = append(edns, e) - off = off1 + int(optlen) - case EDNS0DHU: - e := new(EDNS0_DHU) - if err := e.unpack(msg[off1 : off1+int(optlen)]); err != nil { - return lenmsg, err - } - edns = append(edns, e) - off = off1 + int(optlen) - case EDNS0N3U: - e := new(EDNS0_N3U) - if err := e.unpack(msg[off1 : off1+int(optlen)]); err != nil { - return lenmsg, err - } - edns = append(edns, e) - off = off1 + int(optlen) - default: - e := new(EDNS0_LOCAL) - e.Code = code - if err := e.unpack(msg[off1 : off1+int(optlen)]); err != nil { - return lenmsg, err - } - edns = append(edns, e) - off = off1 + int(optlen) - } - if off < lenmsg { - goto Option - } - fv.Set(reflect.ValueOf(edns)) - case `dns:"a"`: - if val.Type().String() == "dns.IPSECKEY" { - // Field(2) is GatewayType, must be 1 - if val.Field(2).Uint() != 1 { - continue - } - } - if off == lenmsg { - break // dyn. update - } - if off+net.IPv4len > lenmsg { - return lenmsg, &Error{err: "overflow unpacking a"} - } - fv.Set(reflect.ValueOf(net.IPv4(msg[off], msg[off+1], msg[off+2], msg[off+3]))) - off += net.IPv4len - case `dns:"aaaa"`: - if val.Type().String() == "dns.IPSECKEY" { - // Field(2) is GatewayType, must be 2 - if val.Field(2).Uint() != 2 { - continue - } - } - if off == lenmsg { - break - } - if off+net.IPv6len > lenmsg { - return lenmsg, &Error{err: "overflow unpacking aaaa"} - } - fv.Set(reflect.ValueOf(net.IP{msg[off], msg[off+1], msg[off+2], msg[off+3], msg[off+4], - msg[off+5], msg[off+6], msg[off+7], msg[off+8], msg[off+9], msg[off+10], - msg[off+11], msg[off+12], msg[off+13], msg[off+14], msg[off+15]})) - off += net.IPv6len - case `dns:"wks"`: - // Rest of the record is the bitmap - var serv []uint16 - j := 0 - for off < lenmsg { - if off+1 > lenmsg { - return lenmsg, &Error{err: "overflow unpacking wks"} - } - b := msg[off] - // Check the bits one by one, and set the type - if b&0x80 == 0x80 { - serv = append(serv, uint16(j*8+0)) - } - if b&0x40 == 0x40 { - serv = append(serv, uint16(j*8+1)) - } - if b&0x20 == 0x20 { - serv = append(serv, uint16(j*8+2)) - } - if b&0x10 == 0x10 { - serv = append(serv, uint16(j*8+3)) - } - if b&0x8 == 0x8 { - serv = append(serv, uint16(j*8+4)) - } - if b&0x4 == 0x4 { - serv = append(serv, uint16(j*8+5)) - } - if b&0x2 == 0x2 { - serv = append(serv, uint16(j*8+6)) - } - if b&0x1 == 0x1 { - serv = append(serv, uint16(j*8+7)) - } - j++ - off++ - } - fv.Set(reflect.ValueOf(serv)) - case `dns:"nsec"`: // NSEC/NSEC3 - if off == len(msg) { - break - } - // Rest of the record is the type bitmap - var nsec []uint16 - length := 0 - window := 0 - lastwindow := -1 - for off < len(msg) { - if off+2 > len(msg) { - return len(msg), &Error{err: "overflow unpacking nsecx"} - } - window = int(msg[off]) - length = int(msg[off+1]) - off += 2 - if window <= lastwindow { - // RFC 4034: Blocks are present in the NSEC RR RDATA in - // increasing numerical order. - return len(msg), &Error{err: "out of order NSEC block"} - } - if length == 0 { - // RFC 4034: Blocks with no types present MUST NOT be included. - return len(msg), &Error{err: "empty NSEC block"} - } - if length > 32 { - return len(msg), &Error{err: "NSEC block too long"} - } - if off+length > len(msg) { - return len(msg), &Error{err: "overflowing NSEC block"} - } - - // Walk the bytes in the window and extract the type bits - for j := 0; j < length; j++ { - b := msg[off+j] - // Check the bits one by one, and set the type - if b&0x80 == 0x80 { - nsec = append(nsec, uint16(window*256+j*8+0)) - } - if b&0x40 == 0x40 { - nsec = append(nsec, uint16(window*256+j*8+1)) - } - if b&0x20 == 0x20 { - nsec = append(nsec, uint16(window*256+j*8+2)) - } - if b&0x10 == 0x10 { - nsec = append(nsec, uint16(window*256+j*8+3)) - } - if b&0x8 == 0x8 { - nsec = append(nsec, uint16(window*256+j*8+4)) - } - if b&0x4 == 0x4 { - nsec = append(nsec, uint16(window*256+j*8+5)) - } - if b&0x2 == 0x2 { - nsec = append(nsec, uint16(window*256+j*8+6)) - } - if b&0x1 == 0x1 { - nsec = append(nsec, uint16(window*256+j*8+7)) - } - } - off += length - lastwindow = window - } - fv.Set(reflect.ValueOf(nsec)) - } - case reflect.Struct: - off, err = unpackStructValue(fv, msg, off) - if err != nil { - return lenmsg, err - } - if val.Type().Field(i).Name == "Hdr" { - lenrd := off + int(val.FieldByName("Hdr").FieldByName("Rdlength").Uint()) - if lenrd > lenmsg { - return lenmsg, &Error{err: "overflowing header size"} - } - msg = msg[:lenrd] - lenmsg = len(msg) - } - case reflect.Uint8: - if off == lenmsg { - break - } - if off+1 > lenmsg { - return lenmsg, &Error{err: "overflow unpacking uint8"} - } - fv.SetUint(uint64(uint8(msg[off]))) - off++ - case reflect.Uint16: - if off == lenmsg { - break - } - var i uint16 - if off+2 > lenmsg { - return lenmsg, &Error{err: "overflow unpacking uint16"} - } - i, off = unpackUint16(msg, off) - fv.SetUint(uint64(i)) - case reflect.Uint32: - if off == lenmsg { - break - } - if off+4 > lenmsg { - return lenmsg, &Error{err: "overflow unpacking uint32"} - } - fv.SetUint(uint64(uint32(msg[off])<<24 | uint32(msg[off+1])<<16 | uint32(msg[off+2])<<8 | uint32(msg[off+3]))) - off += 4 - case reflect.Uint64: - if off == lenmsg { - break - } - switch val.Type().Field(i).Tag { - default: - if off+8 > lenmsg { - return lenmsg, &Error{err: "overflow unpacking uint64"} - } - fv.SetUint(uint64(uint64(msg[off])<<56 | uint64(msg[off+1])<<48 | uint64(msg[off+2])<<40 | - uint64(msg[off+3])<<32 | uint64(msg[off+4])<<24 | uint64(msg[off+5])<<16 | uint64(msg[off+6])<<8 | uint64(msg[off+7]))) - off += 8 - case `dns:"uint48"`: - // Used in TSIG where the last 48 bits are occupied, so for now, assume a uint48 (6 bytes) - if off+6 > lenmsg { - return lenmsg, &Error{err: "overflow unpacking uint64 as uint48"} - } - fv.SetUint(uint64(uint64(msg[off])<<40 | uint64(msg[off+1])<<32 | uint64(msg[off+2])<<24 | uint64(msg[off+3])<<16 | - uint64(msg[off+4])<<8 | uint64(msg[off+5]))) - off += 6 - } - case reflect.String: - var s string - if off == lenmsg { - break - } - switch val.Type().Field(i).Tag { - default: - return lenmsg, &Error{"bad tag unpacking string: " + val.Type().Field(i).Tag.Get("dns")} - case `dns:"octet"`: - s = string(msg[off:]) - off = lenmsg - case `dns:"hex"`: - hexend := lenmsg - if val.FieldByName("Hdr").FieldByName("Rrtype").Uint() == uint64(TypeHIP) { - hexend = off + int(val.FieldByName("HitLength").Uint()) - } - if hexend > lenmsg { - return lenmsg, &Error{err: "overflow unpacking HIP hex"} - } - s = hex.EncodeToString(msg[off:hexend]) - off = hexend - case `dns:"base64"`: - // Rest of the RR is base64 encoded value - b64end := lenmsg - if val.FieldByName("Hdr").FieldByName("Rrtype").Uint() == uint64(TypeHIP) { - b64end = off + int(val.FieldByName("PublicKeyLength").Uint()) - } - if b64end > lenmsg { - return lenmsg, &Error{err: "overflow unpacking HIP base64"} - } - s = toBase64(msg[off:b64end]) - off = b64end - case `dns:"cdomain-name"`: - fallthrough - case `dns:"domain-name"`: - if val.Type().String() == "dns.IPSECKEY" { - // Field(2) is GatewayType, 1 and 2 or used for addresses - x := val.Field(2).Uint() - if x == 1 || x == 2 { - continue - } - } - if off == lenmsg && int(val.FieldByName("Hdr").FieldByName("Rdlength").Uint()) == 0 { - // zero rdata is ok for dyn updates, but only if rdlength is 0 - break - } - s, off, err = UnpackDomainName(msg, off) - if err != nil { - return lenmsg, err - } - case `dns:"size-base32"`: - var size int - switch val.Type().Name() { - case "NSEC3": - switch val.Type().Field(i).Name { - case "NextDomain": - name := val.FieldByName("HashLength") - size = int(name.Uint()) - } - } - if off+size > lenmsg { - return lenmsg, &Error{err: "overflow unpacking base32"} - } - s = toBase32(msg[off : off+size]) - off += size - case `dns:"size-hex"`: - // a "size" string, but it must be encoded in hex in the string - var size int - switch val.Type().Name() { - case "NSEC3": - switch val.Type().Field(i).Name { - case "Salt": - name := val.FieldByName("SaltLength") - size = int(name.Uint()) - case "NextDomain": - name := val.FieldByName("HashLength") - size = int(name.Uint()) - } - case "TSIG": - switch val.Type().Field(i).Name { - case "MAC": - name := val.FieldByName("MACSize") - size = int(name.Uint()) - case "OtherData": - name := val.FieldByName("OtherLen") - size = int(name.Uint()) - } - } - if off+size > lenmsg { - return lenmsg, &Error{err: "overflow unpacking hex"} - } - s = hex.EncodeToString(msg[off : off+size]) - off += size - case `dns:"txt"`: - fallthrough - case "": - s, off, err = unpackTxtString(msg, off) - } - fv.SetString(s) - } - } - return off, nil -} - // Helpers for dealing with escaped bytes func isDigit(b byte) bool { return b >= '0' && b <= '9' } @@ -1310,12 +541,6 @@ func dddToByte(s []byte) byte { return byte((s[0]-'0')*100 + (s[1]-'0')*10 + (s[2] - '0')) } -// UnpackStruct unpacks a binary message from offset off to the interface -// value given. -func UnpackStruct(any interface{}, msg []byte, off int) (int, error) { - return unpackStructValue(structValue(any), msg, off) -} - // Helper function for packing and unpacking func intToBytes(i *big.Int, length int) []byte { buf := i.Bytes() @@ -1327,38 +552,6 @@ func intToBytes(i *big.Int, length int) []byte { return buf } -func unpackUint16(msg []byte, off int) (uint16, int) { - return uint16(msg[off])<<8 | uint16(msg[off+1]), off + 2 -} - -func packUint16(i uint16) (byte, byte) { - return byte(i >> 8), byte(i) -} - -func toBase32(b []byte) string { - return base32.HexEncoding.EncodeToString(b) -} - -func fromBase32(s []byte) (buf []byte, err error) { - buflen := base32.HexEncoding.DecodedLen(len(s)) - buf = make([]byte, buflen) - n, err := base32.HexEncoding.Decode(buf, s) - buf = buf[:n] - return -} - -func toBase64(b []byte) string { - return base64.StdEncoding.EncodeToString(b) -} - -func fromBase64(s []byte) (buf []byte, err error) { - buflen := base64.StdEncoding.DecodedLen(len(s)) - buf = make([]byte, buflen) - n, err := base64.StdEncoding.Decode(buf, s) - buf = buf[:n] - return -} - // PackRR packs a resource record rr into msg[off:]. // See PackDomainName for documentation about the compression. func PackRR(rr RR, msg []byte, off int, compression map[string]int, compress bool) (off1 int, err error) { @@ -1366,10 +559,11 @@ func PackRR(rr RR, msg []byte, off int, compression map[string]int, compress boo return len(msg), &Error{err: "nil rr"} } - off1, err = packStructCompress(rr, msg, off, compression, compress) + off1, err = rr.pack(msg, off, compression, compress) if err != nil { return len(msg), err } + // TODO(miek): Not sure if this is needed? If removed we can remove rawmsg.go as well. if rawSetRdlength(msg, off, off1) { return off1, nil } @@ -1378,21 +572,17 @@ func PackRR(rr RR, msg []byte, off int, compression map[string]int, compress boo // UnpackRR unpacks msg[off:] into an RR. func UnpackRR(msg []byte, off int) (rr RR, off1 int, err error) { - // unpack just the header, to find the rr type and length - var h RR_Header - off0 := off - if off, err = UnpackStruct(&h, msg, off); err != nil { + h, off, msg, err := unpackHeader(msg, off) + if err != nil { return nil, len(msg), err } end := off + int(h.Rdlength) - // make an rr of that type and re-unpack. - mk, known := TypeToRR[h.Rrtype] - if !known { - rr = new(RFC3597) + + if fn, known := typeToUnpack[h.Rrtype]; !known { + rr, off, err = unpackRFC3597(h, msg, off) } else { - rr = mk() + rr, off, err = fn(h, msg, off) } - off, err = UnpackStruct(rr, msg, off0) if off != end { return &h, end, &Error{err: "bad rdlength"} } @@ -1425,31 +615,6 @@ func unpackRRslice(l int, msg []byte, off int) (dst1 []RR, off1 int, err error) return dst, off, err } -// Reverse a map -func reverseInt8(m map[uint8]string) map[string]uint8 { - n := make(map[string]uint8) - for u, s := range m { - n[s] = u - } - return n -} - -func reverseInt16(m map[uint16]string) map[string]uint16 { - n := make(map[string]uint16) - for u, s := range m { - n[s] = u - } - return n -} - -func reverseInt(m map[int]string) map[string]int { - n := make(map[string]int) - for u, s := range m { - n[s] = u - } - return n -} - // Convert a MsgHdr to a string, with dig-like headers: // //;; opcode: QUERY, status: NOERROR, id: 48404 @@ -1503,8 +668,12 @@ func (dns *Msg) Pack() (msg []byte, err error) { // PackBuffer packs a Msg, using the given buffer buf. If buf is too small // a new buffer is allocated. func (dns *Msg) PackBuffer(buf []byte) (msg []byte, err error) { - var dh Header - var compression map[string]int + // We use a similar function in tsig.go's stripTsig. + var ( + dh Header + compression map[string]int + ) + if dns.Compress { compression = make(map[string]int) // Compression pointer mappings } @@ -1572,12 +741,12 @@ func (dns *Msg) PackBuffer(buf []byte) (msg []byte, err error) { // Pack it in: header and then the pieces. off := 0 - off, err = packStructCompress(&dh, msg, off, compression, dns.Compress) + off, err = dh.pack(msg, off, compression, dns.Compress) if err != nil { return nil, err } for i := 0; i < len(question); i++ { - off, err = packStructCompress(&question[i], msg, off, compression, dns.Compress) + off, err = question[i].pack(msg, off, compression, dns.Compress) if err != nil { return nil, err } @@ -1605,12 +774,17 @@ func (dns *Msg) PackBuffer(buf []byte) (msg []byte, err error) { // Unpack unpacks a binary message to a Msg structure. func (dns *Msg) Unpack(msg []byte) (err error) { - // Header. - var dh Header - off := 0 - if off, err = UnpackStruct(&dh, msg, off); err != nil { + var ( + dh Header + off int + ) + if dh, off, err = unpackMsgHdr(msg, off); err != nil { return err } + if off == len(msg) { + return ErrTruncated + } + dns.Id = dh.Id dns.Response = (dh.Bits & _QR) != 0 dns.Opcode = int(dh.Bits>>11) & 0xF @@ -1626,10 +800,10 @@ func (dns *Msg) Unpack(msg []byte) (err error) { // Optimistically use the count given to us in the header dns.Question = make([]Question, 0, int(dh.Qdcount)) - var q Question for i := 0; i < int(dh.Qdcount); i++ { off1 := off - off, err = UnpackStruct(&q, msg, off) + var q Question + q, off, err = unpackQuestion(msg, off) if err != nil { // Even if Truncated is set, we only will set ErrTruncated if we // actually got the questions @@ -1655,6 +829,7 @@ func (dns *Msg) Unpack(msg []byte) (err error) { } // The header counts might have been wrong so we need to update it dh.Arcount = uint16(len(dns.Extra)) + if off != len(msg) { // TODO(miek) make this an error? // use PackOpt to let people tell how detailed the error reporting should be? @@ -1728,6 +903,9 @@ func (dns *Msg) Len() int { } } for i := 0; i < len(dns.Answer); i++ { + if dns.Answer[i] == nil { + continue + } l += dns.Answer[i].len() if dns.Compress { k, ok := compressionLenSearch(compression, dns.Answer[i].Header().Name) @@ -1743,6 +921,9 @@ func (dns *Msg) Len() int { } } for i := 0; i < len(dns.Ns); i++ { + if dns.Ns[i] == nil { + continue + } l += dns.Ns[i].len() if dns.Compress { k, ok := compressionLenSearch(compression, dns.Ns[i].Header().Name) @@ -1758,6 +939,9 @@ func (dns *Msg) Len() int { } } for i := 0; i < len(dns.Extra); i++ { + if dns.Extra[i] == nil { + continue + } l += dns.Extra[i].len() if dns.Compress { k, ok := compressionLenSearch(compression, dns.Extra[i].Header().Name) @@ -1807,7 +991,7 @@ func compressionLenSearch(c map[string]int, s string) (int, bool) { return 0, false } -// TODO(miek): should add all types, because the all can be *used* for compression. +// TODO(miek): should add all types, because the all can be *used* for compression. Autogenerate from msg_generate and put in zmsg.go func compressionLenHelperType(c map[string]int, r RR) { switch x := r.(type) { case *NS: @@ -1833,11 +1017,23 @@ func compressionLenHelperType(c map[string]int, r RR) { compressionLenHelper(c, x.Md) case *RT: compressionLenHelper(c, x.Host) + case *RP: + compressionLenHelper(c, x.Mbox) + compressionLenHelper(c, x.Txt) case *MINFO: compressionLenHelper(c, x.Rmail) compressionLenHelper(c, x.Email) case *AFSDB: compressionLenHelper(c, x.Hostname) + case *SRV: + compressionLenHelper(c, x.Target) + case *NAPTR: + compressionLenHelper(c, x.Replacement) + case *RRSIG: + compressionLenHelper(c, x.SignerName) + case *NSEC: + compressionLenHelper(c, x.NextDomain) + // HIP? } } @@ -1850,6 +1046,8 @@ func compressionLenSearchType(c map[string]int, r RR) (int, bool) { return compressionLenSearch(c, x.Mx) case *CNAME: return compressionLenSearch(c, x.Target) + case *DNAME: + return compressionLenSearch(c, x.Target) case *PTR: return compressionLenSearch(c, x.Ptr) case *SOA: @@ -1884,27 +1082,14 @@ func compressionLenSearchType(c map[string]int, r RR) (int, bool) { return 0, false } -// id returns a 16 bits random number to be used as a -// message id. The random provided should be good enough. -func id() uint16 { - return uint16(rand.Int()) ^ uint16(time.Now().Nanosecond()) -} - // Copy returns a new RR which is a deep-copy of r. -func Copy(r RR) RR { - r1 := r.copy() - return r1 -} +func Copy(r RR) RR { r1 := r.copy(); return r1 } // Len returns the length (in octets) of the uncompressed RR in wire format. -func Len(r RR) int { - return r.len() -} +func Len(r RR) int { return r.len() } // Copy returns a new *Msg which is a deep-copy of dns. -func (dns *Msg) Copy() *Msg { - return dns.CopyTo(new(Msg)) -} +func (dns *Msg) Copy() *Msg { return dns.CopyTo(new(Msg)) } // CopyTo copies the contents to the provided message using a deep-copy and returns the copy. func (dns *Msg) CopyTo(r1 *Msg) *Msg { @@ -1948,3 +1133,99 @@ func (dns *Msg) CopyTo(r1 *Msg) *Msg { return r1 } + +func (q *Question) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := PackDomainName(q.Name, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = packUint16(q.Qtype, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(q.Qclass, msg, off) + if err != nil { + return off, err + } + return off, nil +} + +func unpackQuestion(msg []byte, off int) (Question, int, error) { + var ( + q Question + err error + ) + q.Name, off, err = UnpackDomainName(msg, off) + if err != nil { + return q, off, err + } + if off == len(msg) { + return q, off, nil + } + q.Qtype, off, err = unpackUint16(msg, off) + if err != nil { + return q, off, err + } + if off == len(msg) { + return q, off, nil + } + q.Qclass, off, err = unpackUint16(msg, off) + if off == len(msg) { + return q, off, nil + } + return q, off, err +} + +func (dh *Header) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := packUint16(dh.Id, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(dh.Bits, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(dh.Qdcount, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(dh.Ancount, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(dh.Nscount, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(dh.Arcount, msg, off) + return off, err +} + +func unpackMsgHdr(msg []byte, off int) (Header, int, error) { + var ( + dh Header + err error + ) + dh.Id, off, err = unpackUint16(msg, off) + if err != nil { + return dh, off, err + } + dh.Bits, off, err = unpackUint16(msg, off) + if err != nil { + return dh, off, err + } + dh.Qdcount, off, err = unpackUint16(msg, off) + if err != nil { + return dh, off, err + } + dh.Ancount, off, err = unpackUint16(msg, off) + if err != nil { + return dh, off, err + } + dh.Nscount, off, err = unpackUint16(msg, off) + if err != nil { + return dh, off, err + } + dh.Arcount, off, err = unpackUint16(msg, off) + return dh, off, err +} diff --git a/vendor/github.com/miekg/dns/msg_generate.go b/vendor/github.com/miekg/dns/msg_generate.go new file mode 100644 index 0000000000..166b3af00c --- /dev/null +++ b/vendor/github.com/miekg/dns/msg_generate.go @@ -0,0 +1,337 @@ +//+build ignore + +// msg_generate.go is meant to run with go generate. It will use +// go/{importer,types} to track down all the RR struct types. Then for each type +// it will generate pack/unpack methods based on the struct tags. The generated source is +// written to zmsg.go, and is meant to be checked into git. +package main + +import ( + "bytes" + "fmt" + "go/format" + "go/importer" + "go/types" + "log" + "os" + "strings" +) + +var packageHdr = ` +// *** DO NOT MODIFY *** +// AUTOGENERATED BY go generate from msg_generate.go + +package dns + +` + +// getTypeStruct will take a type and the package scope, and return the +// (innermost) struct if the type is considered a RR type (currently defined as +// those structs beginning with a RR_Header, could be redefined as implementing +// the RR interface). The bool return value indicates if embedded structs were +// resolved. +func getTypeStruct(t types.Type, scope *types.Scope) (*types.Struct, bool) { + st, ok := t.Underlying().(*types.Struct) + if !ok { + return nil, false + } + if st.Field(0).Type() == scope.Lookup("RR_Header").Type() { + return st, false + } + if st.Field(0).Anonymous() { + st, _ := getTypeStruct(st.Field(0).Type(), scope) + return st, true + } + return nil, false +} + +func main() { + // Import and type-check the package + pkg, err := importer.Default().Import("github.com/miekg/dns") + fatalIfErr(err) + scope := pkg.Scope() + + // Collect actual types (*X) + var namedTypes []string + for _, name := range scope.Names() { + o := scope.Lookup(name) + if o == nil || !o.Exported() { + continue + } + if st, _ := getTypeStruct(o.Type(), scope); st == nil { + continue + } + if name == "PrivateRR" { + continue + } + + // Check if corresponding TypeX exists + if scope.Lookup("Type"+o.Name()) == nil && o.Name() != "RFC3597" { + log.Fatalf("Constant Type%s does not exist.", o.Name()) + } + + namedTypes = append(namedTypes, o.Name()) + } + + b := &bytes.Buffer{} + b.WriteString(packageHdr) + + fmt.Fprint(b, "// pack*() functions\n\n") + for _, name := range namedTypes { + o := scope.Lookup(name) + st, _ := getTypeStruct(o.Type(), scope) + + fmt.Fprintf(b, "func (rr *%s) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {\n", name) + fmt.Fprint(b, `off, err := rr.Hdr.pack(msg, off, compression, compress) +if err != nil { + return off, err +} +headerEnd := off +`) + for i := 1; i < st.NumFields(); i++ { + o := func(s string) { + fmt.Fprintf(b, s, st.Field(i).Name()) + fmt.Fprint(b, `if err != nil { +return off, err +} +`) + } + + if _, ok := st.Field(i).Type().(*types.Slice); ok { + switch st.Tag(i) { + case `dns:"-"`: // ignored + case `dns:"txt"`: + o("off, err = packStringTxt(rr.%s, msg, off)\n") + case `dns:"opt"`: + o("off, err = packDataOpt(rr.%s, msg, off)\n") + case `dns:"nsec"`: + o("off, err = packDataNsec(rr.%s, msg, off)\n") + case `dns:"domain-name"`: + o("off, err = packDataDomainNames(rr.%s, msg, off, compression, compress)\n") + default: + log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) + } + continue + } + + switch { + case st.Tag(i) == `dns:"-"`: // ignored + case st.Tag(i) == `dns:"cdomain-name"`: + fallthrough + case st.Tag(i) == `dns:"domain-name"`: + o("off, err = PackDomainName(rr.%s, msg, off, compression, compress)\n") + case st.Tag(i) == `dns:"a"`: + o("off, err = packDataA(rr.%s, msg, off)\n") + case st.Tag(i) == `dns:"aaaa"`: + o("off, err = packDataAAAA(rr.%s, msg, off)\n") + case st.Tag(i) == `dns:"uint48"`: + o("off, err = packUint48(rr.%s, msg, off)\n") + case st.Tag(i) == `dns:"txt"`: + o("off, err = packString(rr.%s, msg, off)\n") + + case strings.HasPrefix(st.Tag(i), `dns:"size-base32`): // size-base32 can be packed just like base32 + fallthrough + case st.Tag(i) == `dns:"base32"`: + o("off, err = packStringBase32(rr.%s, msg, off)\n") + + case strings.HasPrefix(st.Tag(i), `dns:"size-base64`): // size-base64 can be packed just like base64 + fallthrough + case st.Tag(i) == `dns:"base64"`: + o("off, err = packStringBase64(rr.%s, msg, off)\n") + + case strings.HasPrefix(st.Tag(i), `dns:"size-hex`): // size-hex can be packed just like hex + fallthrough + case st.Tag(i) == `dns:"hex"`: + o("off, err = packStringHex(rr.%s, msg, off)\n") + + case st.Tag(i) == `dns:"octet"`: + o("off, err = packStringOctet(rr.%s, msg, off)\n") + case st.Tag(i) == "": + switch st.Field(i).Type().(*types.Basic).Kind() { + case types.Uint8: + o("off, err = packUint8(rr.%s, msg, off)\n") + case types.Uint16: + o("off, err = packUint16(rr.%s, msg, off)\n") + case types.Uint32: + o("off, err = packUint32(rr.%s, msg, off)\n") + case types.Uint64: + o("off, err = packUint64(rr.%s, msg, off)\n") + case types.String: + o("off, err = packString(rr.%s, msg, off)\n") + default: + log.Fatalln(name, st.Field(i).Name()) + } + default: + log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) + } + } + // We have packed everything, only now we know the rdlength of this RR + fmt.Fprintln(b, "rr.Header().Rdlength = uint16(off- headerEnd)") + fmt.Fprintln(b, "return off, nil }\n") + } + + fmt.Fprint(b, "// unpack*() functions\n\n") + for _, name := range namedTypes { + o := scope.Lookup(name) + st, _ := getTypeStruct(o.Type(), scope) + + fmt.Fprintf(b, "func unpack%s(h RR_Header, msg []byte, off int) (RR, int, error) {\n", name) + fmt.Fprintf(b, "rr := new(%s)\n", name) + fmt.Fprint(b, "rr.Hdr = h\n") + fmt.Fprint(b, `if noRdata(h) { +return rr, off, nil + } +var err error +rdStart := off +_ = rdStart + +`) + for i := 1; i < st.NumFields(); i++ { + o := func(s string) { + fmt.Fprintf(b, s, st.Field(i).Name()) + fmt.Fprint(b, `if err != nil { +return rr, off, err +} +`) + } + + // size-* are special, because they reference a struct member we should use for the length. + if strings.HasPrefix(st.Tag(i), `dns:"size-`) { + structMember := structMember(st.Tag(i)) + structTag := structTag(st.Tag(i)) + switch structTag { + case "hex": + fmt.Fprintf(b, "rr.%s, off, err = unpackStringHex(msg, off, off + int(rr.%s))\n", st.Field(i).Name(), structMember) + case "base32": + fmt.Fprintf(b, "rr.%s, off, err = unpackStringBase32(msg, off, off + int(rr.%s))\n", st.Field(i).Name(), structMember) + case "base64": + fmt.Fprintf(b, "rr.%s, off, err = unpackStringBase64(msg, off, off + int(rr.%s))\n", st.Field(i).Name(), structMember) + default: + log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) + } + fmt.Fprint(b, `if err != nil { +return rr, off, err +} +`) + continue + } + + if _, ok := st.Field(i).Type().(*types.Slice); ok { + switch st.Tag(i) { + case `dns:"-"`: // ignored + case `dns:"txt"`: + o("rr.%s, off, err = unpackStringTxt(msg, off)\n") + case `dns:"opt"`: + o("rr.%s, off, err = unpackDataOpt(msg, off)\n") + case `dns:"nsec"`: + o("rr.%s, off, err = unpackDataNsec(msg, off)\n") + case `dns:"domain-name"`: + o("rr.%s, off, err = unpackDataDomainNames(msg, off, rdStart + int(rr.Hdr.Rdlength))\n") + default: + log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) + } + continue + } + + switch st.Tag(i) { + case `dns:"-"`: // ignored + case `dns:"cdomain-name"`: + fallthrough + case `dns:"domain-name"`: + o("rr.%s, off, err = UnpackDomainName(msg, off)\n") + case `dns:"a"`: + o("rr.%s, off, err = unpackDataA(msg, off)\n") + case `dns:"aaaa"`: + o("rr.%s, off, err = unpackDataAAAA(msg, off)\n") + case `dns:"uint48"`: + o("rr.%s, off, err = unpackUint48(msg, off)\n") + case `dns:"txt"`: + o("rr.%s, off, err = unpackString(msg, off)\n") + case `dns:"base32"`: + o("rr.%s, off, err = unpackStringBase32(msg, off, rdStart + int(rr.Hdr.Rdlength))\n") + case `dns:"base64"`: + o("rr.%s, off, err = unpackStringBase64(msg, off, rdStart + int(rr.Hdr.Rdlength))\n") + case `dns:"hex"`: + o("rr.%s, off, err = unpackStringHex(msg, off, rdStart + int(rr.Hdr.Rdlength))\n") + case `dns:"octet"`: + o("rr.%s, off, err = unpackStringOctet(msg, off)\n") + case "": + switch st.Field(i).Type().(*types.Basic).Kind() { + case types.Uint8: + o("rr.%s, off, err = unpackUint8(msg, off)\n") + case types.Uint16: + o("rr.%s, off, err = unpackUint16(msg, off)\n") + case types.Uint32: + o("rr.%s, off, err = unpackUint32(msg, off)\n") + case types.Uint64: + o("rr.%s, off, err = unpackUint64(msg, off)\n") + case types.String: + o("rr.%s, off, err = unpackString(msg, off)\n") + default: + log.Fatalln(name, st.Field(i).Name()) + } + default: + log.Fatalln(name, st.Field(i).Name(), st.Tag(i)) + } + // If we've hit len(msg) we return without error. + if i < st.NumFields()-1 { + fmt.Fprintf(b, `if off == len(msg) { +return rr, off, nil + } +`) + } + } + fmt.Fprintf(b, "return rr, off, err }\n\n") + } + // Generate typeToUnpack map + fmt.Fprintln(b, "var typeToUnpack = map[uint16]func(RR_Header, []byte, int) (RR, int, error){") + for _, name := range namedTypes { + if name == "RFC3597" { + continue + } + fmt.Fprintf(b, "Type%s: unpack%s,\n", name, name) + } + fmt.Fprintln(b, "}\n") + + // gofmt + res, err := format.Source(b.Bytes()) + if err != nil { + b.WriteTo(os.Stderr) + log.Fatal(err) + } + + // write result + f, err := os.Create("zmsg.go") + fatalIfErr(err) + defer f.Close() + f.Write(res) +} + +// structMember will take a tag like dns:"size-base32:SaltLength" and return the last part of this string. +func structMember(s string) string { + fields := strings.Split(s, ":") + if len(fields) == 0 { + return "" + } + f := fields[len(fields)-1] + // f should have a closing " + if len(f) > 1 { + return f[:len(f)-1] + } + return f +} + +// structTag will take a tag like dns:"size-base32:SaltLength" and return base32. +func structTag(s string) string { + fields := strings.Split(s, ":") + if len(fields) < 2 { + return "" + } + return fields[1][len("\"size-"):] +} + +func fatalIfErr(err error) { + if err != nil { + log.Fatal(err) + } +} diff --git a/vendor/github.com/miekg/dns/msg_helpers.go b/vendor/github.com/miekg/dns/msg_helpers.go new file mode 100644 index 0000000000..e7a9500cc0 --- /dev/null +++ b/vendor/github.com/miekg/dns/msg_helpers.go @@ -0,0 +1,630 @@ +package dns + +import ( + "encoding/base32" + "encoding/base64" + "encoding/binary" + "encoding/hex" + "net" + "strconv" +) + +// helper functions called from the generated zmsg.go + +// These function are named after the tag to help pack/unpack, if there is no tag it is the name +// of the type they pack/unpack (string, int, etc). We prefix all with unpackData or packData, so packDataA or +// packDataDomainName. + +func unpackDataA(msg []byte, off int) (net.IP, int, error) { + if off+net.IPv4len > len(msg) { + return nil, len(msg), &Error{err: "overflow unpacking a"} + } + a := append(make(net.IP, 0, net.IPv4len), msg[off:off+net.IPv4len]...) + off += net.IPv4len + return a, off, nil +} + +func packDataA(a net.IP, msg []byte, off int) (int, error) { + // It must be a slice of 4, even if it is 16, we encode only the first 4 + if off+net.IPv4len > len(msg) { + return len(msg), &Error{err: "overflow packing a"} + } + switch len(a) { + case net.IPv4len, net.IPv6len: + copy(msg[off:], a.To4()) + off += net.IPv4len + case 0: + // Allowed, for dynamic updates. + default: + return len(msg), &Error{err: "overflow packing a"} + } + return off, nil +} + +func unpackDataAAAA(msg []byte, off int) (net.IP, int, error) { + if off+net.IPv6len > len(msg) { + return nil, len(msg), &Error{err: "overflow unpacking aaaa"} + } + aaaa := append(make(net.IP, 0, net.IPv6len), msg[off:off+net.IPv6len]...) + off += net.IPv6len + return aaaa, off, nil +} + +func packDataAAAA(aaaa net.IP, msg []byte, off int) (int, error) { + if off+net.IPv6len > len(msg) { + return len(msg), &Error{err: "overflow packing aaaa"} + } + + switch len(aaaa) { + case net.IPv6len: + copy(msg[off:], aaaa) + off += net.IPv6len + case 0: + // Allowed, dynamic updates. + default: + return len(msg), &Error{err: "overflow packing aaaa"} + } + return off, nil +} + +// unpackHeader unpacks an RR header, returning the offset to the end of the header and a +// re-sliced msg according to the expected length of the RR. +func unpackHeader(msg []byte, off int) (rr RR_Header, off1 int, truncmsg []byte, err error) { + hdr := RR_Header{} + if off == len(msg) { + return hdr, off, msg, nil + } + + hdr.Name, off, err = UnpackDomainName(msg, off) + if err != nil { + return hdr, len(msg), msg, err + } + hdr.Rrtype, off, err = unpackUint16(msg, off) + if err != nil { + return hdr, len(msg), msg, err + } + hdr.Class, off, err = unpackUint16(msg, off) + if err != nil { + return hdr, len(msg), msg, err + } + hdr.Ttl, off, err = unpackUint32(msg, off) + if err != nil { + return hdr, len(msg), msg, err + } + hdr.Rdlength, off, err = unpackUint16(msg, off) + if err != nil { + return hdr, len(msg), msg, err + } + msg, err = truncateMsgFromRdlength(msg, off, hdr.Rdlength) + return hdr, off, msg, nil +} + +// pack packs an RR header, returning the offset to the end of the header. +// See PackDomainName for documentation about the compression. +func (hdr RR_Header) pack(msg []byte, off int, compression map[string]int, compress bool) (off1 int, err error) { + if off == len(msg) { + return off, nil + } + + off, err = PackDomainName(hdr.Name, msg, off, compression, compress) + if err != nil { + return len(msg), err + } + off, err = packUint16(hdr.Rrtype, msg, off) + if err != nil { + return len(msg), err + } + off, err = packUint16(hdr.Class, msg, off) + if err != nil { + return len(msg), err + } + off, err = packUint32(hdr.Ttl, msg, off) + if err != nil { + return len(msg), err + } + off, err = packUint16(hdr.Rdlength, msg, off) + if err != nil { + return len(msg), err + } + return off, nil +} + +// helper helper functions. + +// truncateMsgFromRdLength truncates msg to match the expected length of the RR. +// Returns an error if msg is smaller than the expected size. +func truncateMsgFromRdlength(msg []byte, off int, rdlength uint16) (truncmsg []byte, err error) { + lenrd := off + int(rdlength) + if lenrd > len(msg) { + return msg, &Error{err: "overflowing header size"} + } + return msg[:lenrd], nil +} + +func fromBase32(s []byte) (buf []byte, err error) { + buflen := base32.HexEncoding.DecodedLen(len(s)) + buf = make([]byte, buflen) + n, err := base32.HexEncoding.Decode(buf, s) + buf = buf[:n] + return +} + +func toBase32(b []byte) string { return base32.HexEncoding.EncodeToString(b) } + +func fromBase64(s []byte) (buf []byte, err error) { + buflen := base64.StdEncoding.DecodedLen(len(s)) + buf = make([]byte, buflen) + n, err := base64.StdEncoding.Decode(buf, s) + buf = buf[:n] + return +} + +func toBase64(b []byte) string { return base64.StdEncoding.EncodeToString(b) } + +// dynamicUpdate returns true if the Rdlength is zero. +func noRdata(h RR_Header) bool { return h.Rdlength == 0 } + +func unpackUint8(msg []byte, off int) (i uint8, off1 int, err error) { + if off+1 > len(msg) { + return 0, len(msg), &Error{err: "overflow unpacking uint8"} + } + return uint8(msg[off]), off + 1, nil +} + +func packUint8(i uint8, msg []byte, off int) (off1 int, err error) { + if off+1 > len(msg) { + return len(msg), &Error{err: "overflow packing uint8"} + } + msg[off] = byte(i) + return off + 1, nil +} + +func unpackUint16(msg []byte, off int) (i uint16, off1 int, err error) { + if off+2 > len(msg) { + return 0, len(msg), &Error{err: "overflow unpacking uint16"} + } + return binary.BigEndian.Uint16(msg[off:]), off + 2, nil +} + +func packUint16(i uint16, msg []byte, off int) (off1 int, err error) { + if off+2 > len(msg) { + return len(msg), &Error{err: "overflow packing uint16"} + } + binary.BigEndian.PutUint16(msg[off:], i) + return off + 2, nil +} + +func unpackUint32(msg []byte, off int) (i uint32, off1 int, err error) { + if off+4 > len(msg) { + return 0, len(msg), &Error{err: "overflow unpacking uint32"} + } + return binary.BigEndian.Uint32(msg[off:]), off + 4, nil +} + +func packUint32(i uint32, msg []byte, off int) (off1 int, err error) { + if off+4 > len(msg) { + return len(msg), &Error{err: "overflow packing uint32"} + } + binary.BigEndian.PutUint32(msg[off:], i) + return off + 4, nil +} + +func unpackUint48(msg []byte, off int) (i uint64, off1 int, err error) { + if off+6 > len(msg) { + return 0, len(msg), &Error{err: "overflow unpacking uint64 as uint48"} + } + // Used in TSIG where the last 48 bits are occupied, so for now, assume a uint48 (6 bytes) + i = (uint64(uint64(msg[off])<<40 | uint64(msg[off+1])<<32 | uint64(msg[off+2])<<24 | uint64(msg[off+3])<<16 | + uint64(msg[off+4])<<8 | uint64(msg[off+5]))) + off += 6 + return i, off, nil +} + +func packUint48(i uint64, msg []byte, off int) (off1 int, err error) { + if off+6 > len(msg) { + return len(msg), &Error{err: "overflow packing uint64 as uint48"} + } + msg[off] = byte(i >> 40) + msg[off+1] = byte(i >> 32) + msg[off+2] = byte(i >> 24) + msg[off+3] = byte(i >> 16) + msg[off+4] = byte(i >> 8) + msg[off+5] = byte(i) + off += 6 + return off, nil +} + +func unpackUint64(msg []byte, off int) (i uint64, off1 int, err error) { + if off+8 > len(msg) { + return 0, len(msg), &Error{err: "overflow unpacking uint64"} + } + return binary.BigEndian.Uint64(msg[off:]), off + 8, nil +} + +func packUint64(i uint64, msg []byte, off int) (off1 int, err error) { + if off+8 > len(msg) { + return len(msg), &Error{err: "overflow packing uint64"} + } + binary.BigEndian.PutUint64(msg[off:], i) + off += 8 + return off, nil +} + +func unpackString(msg []byte, off int) (string, int, error) { + if off+1 > len(msg) { + return "", off, &Error{err: "overflow unpacking txt"} + } + l := int(msg[off]) + if off+l+1 > len(msg) { + return "", off, &Error{err: "overflow unpacking txt"} + } + s := make([]byte, 0, l) + for _, b := range msg[off+1 : off+1+l] { + switch b { + case '"', '\\': + s = append(s, '\\', b) + case '\t', '\r', '\n': + s = append(s, b) + default: + if b < 32 || b > 127 { // unprintable + var buf [3]byte + bufs := strconv.AppendInt(buf[:0], int64(b), 10) + s = append(s, '\\') + for i := 0; i < 3-len(bufs); i++ { + s = append(s, '0') + } + for _, r := range bufs { + s = append(s, r) + } + } else { + s = append(s, b) + } + } + } + off += 1 + l + return string(s), off, nil +} + +func packString(s string, msg []byte, off int) (int, error) { + txtTmp := make([]byte, 256*4+1) + off, err := packTxtString(s, msg, off, txtTmp) + if err != nil { + return len(msg), err + } + return off, nil +} + +func unpackStringBase32(msg []byte, off, end int) (string, int, error) { + if end > len(msg) { + return "", len(msg), &Error{err: "overflow unpacking base32"} + } + s := toBase32(msg[off:end]) + return s, end, nil +} + +func packStringBase32(s string, msg []byte, off int) (int, error) { + b32, err := fromBase32([]byte(s)) + if err != nil { + return len(msg), err + } + if off+len(b32) > len(msg) { + return len(msg), &Error{err: "overflow packing base32"} + } + copy(msg[off:off+len(b32)], b32) + off += len(b32) + return off, nil +} + +func unpackStringBase64(msg []byte, off, end int) (string, int, error) { + // Rest of the RR is base64 encoded value, so we don't need an explicit length + // to be set. Thus far all RR's that have base64 encoded fields have those as their + // last one. What we do need is the end of the RR! + if end > len(msg) { + return "", len(msg), &Error{err: "overflow unpacking base64"} + } + s := toBase64(msg[off:end]) + return s, end, nil +} + +func packStringBase64(s string, msg []byte, off int) (int, error) { + b64, err := fromBase64([]byte(s)) + if err != nil { + return len(msg), err + } + if off+len(b64) > len(msg) { + return len(msg), &Error{err: "overflow packing base64"} + } + copy(msg[off:off+len(b64)], b64) + off += len(b64) + return off, nil +} + +func unpackStringHex(msg []byte, off, end int) (string, int, error) { + // Rest of the RR is hex encoded value, so we don't need an explicit length + // to be set. NSEC and TSIG have hex fields with a length field. + // What we do need is the end of the RR! + if end > len(msg) { + return "", len(msg), &Error{err: "overflow unpacking hex"} + } + + s := hex.EncodeToString(msg[off:end]) + return s, end, nil +} + +func packStringHex(s string, msg []byte, off int) (int, error) { + h, err := hex.DecodeString(s) + if err != nil { + return len(msg), err + } + if off+(len(h)) > len(msg) { + return len(msg), &Error{err: "overflow packing hex"} + } + copy(msg[off:off+len(h)], h) + off += len(h) + return off, nil +} + +func unpackStringTxt(msg []byte, off int) ([]string, int, error) { + txt, off, err := unpackTxt(msg, off) + if err != nil { + return nil, len(msg), err + } + return txt, off, nil +} + +func packStringTxt(s []string, msg []byte, off int) (int, error) { + txtTmp := make([]byte, 256*4+1) // If the whole string consists out of \DDD we need this many. + off, err := packTxt(s, msg, off, txtTmp) + if err != nil { + return len(msg), err + } + return off, nil +} + +func unpackDataOpt(msg []byte, off int) ([]EDNS0, int, error) { + var edns []EDNS0 +Option: + code := uint16(0) + if off+4 > len(msg) { + return nil, len(msg), &Error{err: "overflow unpacking opt"} + } + code = binary.BigEndian.Uint16(msg[off:]) + off += 2 + optlen := binary.BigEndian.Uint16(msg[off:]) + off += 2 + if off+int(optlen) > len(msg) { + return nil, len(msg), &Error{err: "overflow unpacking opt"} + } + switch code { + case EDNS0NSID: + e := new(EDNS0_NSID) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0SUBNET, EDNS0SUBNETDRAFT: + e := new(EDNS0_SUBNET) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + if code == EDNS0SUBNETDRAFT { + e.DraftOption = true + } + case EDNS0COOKIE: + e := new(EDNS0_COOKIE) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0UL: + e := new(EDNS0_UL) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0LLQ: + e := new(EDNS0_LLQ) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0DAU: + e := new(EDNS0_DAU) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0DHU: + e := new(EDNS0_DHU) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + case EDNS0N3U: + e := new(EDNS0_N3U) + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + default: + e := new(EDNS0_LOCAL) + e.Code = code + if err := e.unpack(msg[off : off+int(optlen)]); err != nil { + return nil, len(msg), err + } + edns = append(edns, e) + off += int(optlen) + } + + if off < len(msg) { + goto Option + } + + return edns, off, nil +} + +func packDataOpt(options []EDNS0, msg []byte, off int) (int, error) { + for _, el := range options { + b, err := el.pack() + if err != nil || off+3 > len(msg) { + return len(msg), &Error{err: "overflow packing opt"} + } + binary.BigEndian.PutUint16(msg[off:], el.Option()) // Option code + binary.BigEndian.PutUint16(msg[off+2:], uint16(len(b))) // Length + off += 4 + if off+len(b) > len(msg) { + copy(msg[off:], b) + off = len(msg) + continue + } + // Actual data + copy(msg[off:off+len(b)], b) + off += len(b) + } + return off, nil +} + +func unpackStringOctet(msg []byte, off int) (string, int, error) { + s := string(msg[off:]) + return s, len(msg), nil +} + +func packStringOctet(s string, msg []byte, off int) (int, error) { + txtTmp := make([]byte, 256*4+1) + off, err := packOctetString(s, msg, off, txtTmp) + if err != nil { + return len(msg), err + } + return off, nil +} + +func unpackDataNsec(msg []byte, off int) ([]uint16, int, error) { + var nsec []uint16 + length, window, lastwindow := 0, 0, -1 + for off < len(msg) { + if off+2 > len(msg) { + return nsec, len(msg), &Error{err: "overflow unpacking nsecx"} + } + window = int(msg[off]) + length = int(msg[off+1]) + off += 2 + if window <= lastwindow { + // RFC 4034: Blocks are present in the NSEC RR RDATA in + // increasing numerical order. + return nsec, len(msg), &Error{err: "out of order NSEC block"} + } + if length == 0 { + // RFC 4034: Blocks with no types present MUST NOT be included. + return nsec, len(msg), &Error{err: "empty NSEC block"} + } + if length > 32 { + return nsec, len(msg), &Error{err: "NSEC block too long"} + } + if off+length > len(msg) { + return nsec, len(msg), &Error{err: "overflowing NSEC block"} + } + + // Walk the bytes in the window and extract the type bits + for j := 0; j < length; j++ { + b := msg[off+j] + // Check the bits one by one, and set the type + if b&0x80 == 0x80 { + nsec = append(nsec, uint16(window*256+j*8+0)) + } + if b&0x40 == 0x40 { + nsec = append(nsec, uint16(window*256+j*8+1)) + } + if b&0x20 == 0x20 { + nsec = append(nsec, uint16(window*256+j*8+2)) + } + if b&0x10 == 0x10 { + nsec = append(nsec, uint16(window*256+j*8+3)) + } + if b&0x8 == 0x8 { + nsec = append(nsec, uint16(window*256+j*8+4)) + } + if b&0x4 == 0x4 { + nsec = append(nsec, uint16(window*256+j*8+5)) + } + if b&0x2 == 0x2 { + nsec = append(nsec, uint16(window*256+j*8+6)) + } + if b&0x1 == 0x1 { + nsec = append(nsec, uint16(window*256+j*8+7)) + } + } + off += length + lastwindow = window + } + return nsec, off, nil +} + +func packDataNsec(bitmap []uint16, msg []byte, off int) (int, error) { + if len(bitmap) == 0 { + return off, nil + } + var lastwindow, lastlength uint16 + for j := 0; j < len(bitmap); j++ { + t := bitmap[j] + window := t / 256 + length := (t-window*256)/8 + 1 + if window > lastwindow && lastlength != 0 { // New window, jump to the new offset + off += int(lastlength) + 2 + lastlength = 0 + } + if window < lastwindow || length < lastlength { + return len(msg), &Error{err: "nsec bits out of order"} + } + if off+2+int(length) > len(msg) { + return len(msg), &Error{err: "overflow packing nsec"} + } + // Setting the window # + msg[off] = byte(window) + // Setting the octets length + msg[off+1] = byte(length) + // Setting the bit value for the type in the right octet + msg[off+1+int(length)] |= byte(1 << (7 - (t % 8))) + lastwindow, lastlength = window, length + } + off += int(lastlength) + 2 + return off, nil +} + +func unpackDataDomainNames(msg []byte, off, end int) ([]string, int, error) { + var ( + servers []string + s string + err error + ) + if end > len(msg) { + return nil, len(msg), &Error{err: "overflow unpacking domain names"} + } + for off < end { + s, off, err = UnpackDomainName(msg, off) + if err != nil { + return servers, len(msg), err + } + servers = append(servers, s) + } + return servers, off, nil +} + +func packDataDomainNames(names []string, msg []byte, off int, compression map[string]int, compress bool) (int, error) { + var err error + for j := 0; j < len(names); j++ { + off, err = PackDomainName(names[j], msg, off, compression, false && compress) + if err != nil { + return len(msg), err + } + } + return off, nil +} diff --git a/vendor/github.com/miekg/dns/nsecx.go b/vendor/github.com/miekg/dns/nsecx.go index d2392c6ec6..6f10f3e65b 100644 --- a/vendor/github.com/miekg/dns/nsecx.go +++ b/vendor/github.com/miekg/dns/nsecx.go @@ -11,13 +11,12 @@ type saltWireFmt struct { Salt string `dns:"size-hex"` } -// HashName hashes a string (label) according to RFC 5155. It returns the hashed string in -// uppercase. +// HashName hashes a string (label) according to RFC 5155. It returns the hashed string in uppercase. func HashName(label string, ha uint8, iter uint16, salt string) string { saltwire := new(saltWireFmt) saltwire.Salt = salt wire := make([]byte, DefaultMsgSize) - n, err := PackStruct(saltwire, wire, 0) + n, err := packSaltWire(saltwire, wire) if err != nil { return "" } @@ -110,3 +109,11 @@ func (rr *NSEC3) Match(name string) bool { } return false } + +func packSaltWire(sw *saltWireFmt, msg []byte) (int, error) { + off, err := packStringHex(sw.Salt, msg, 0) + if err != nil { + return off, err + } + return off, nil +} diff --git a/vendor/github.com/miekg/dns/privaterr.go b/vendor/github.com/miekg/dns/privaterr.go index c78f885912..6b08e6e959 100644 --- a/vendor/github.com/miekg/dns/privaterr.go +++ b/vendor/github.com/miekg/dns/privaterr.go @@ -65,6 +65,20 @@ func (r *PrivateRR) copy() RR { } return rr } +func (r *PrivateRR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := r.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + n, err := r.Data.Pack(msg[off:]) + if err != nil { + return len(msg), err + } + off += n + r.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} // PrivateHandle registers a private resource record type. It requires // string and numeric representation of private RR type and generator function as argument. @@ -75,19 +89,36 @@ func PrivateHandle(rtypestr string, rtype uint16, generator func() PrivateRdata) TypeToString[rtype] = rtypestr StringToType[rtypestr] = rtype + typeToUnpack[rtype] = func(h RR_Header, msg []byte, off int) (RR, int, error) { + if noRdata(h) { + return &h, off, nil + } + var err error + + rr := mkPrivateRR(h.Rrtype) + rr.Hdr = h + + off1, err := rr.Data.Unpack(msg[off:]) + off += off1 + if err != nil { + return rr, off, err + } + return rr, off, err + } + setPrivateRR := func(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { rr := mkPrivateRR(h.Rrtype) rr.Hdr = h var l lex text := make([]string, 0, 2) // could be 0..N elements, median is probably 1 - FETCH: + Fetch: for { // TODO(miek): we could also be returning _QUOTE, this might or might not // be an issue (basically parsing TXT becomes hard) switch l = <-c; l.value { case zNewline, zEOF: - break FETCH + break Fetch case zString: text = append(text, l.token) } @@ -112,6 +143,7 @@ func PrivateHandleRemove(rtype uint16) { delete(TypeToString, rtype) delete(typeToparserFunc, rtype) delete(StringToType, rtypestr) + delete(typeToUnpack, rtype) } return } diff --git a/vendor/github.com/miekg/dns/rawmsg.go b/vendor/github.com/miekg/dns/rawmsg.go index b4a706b938..6e21fba7e1 100644 --- a/vendor/github.com/miekg/dns/rawmsg.go +++ b/vendor/github.com/miekg/dns/rawmsg.go @@ -1,52 +1,6 @@ package dns -// These raw* functions do not use reflection, they directly set the values -// in the buffer. There are faster than their reflection counterparts. - -// RawSetId sets the message id in buf. -func rawSetId(msg []byte, i uint16) bool { - if len(msg) < 2 { - return false - } - msg[0], msg[1] = packUint16(i) - return true -} - -// rawSetQuestionLen sets the length of the question section. -func rawSetQuestionLen(msg []byte, i uint16) bool { - if len(msg) < 6 { - return false - } - msg[4], msg[5] = packUint16(i) - return true -} - -// rawSetAnswerLen sets the length of the answer section. -func rawSetAnswerLen(msg []byte, i uint16) bool { - if len(msg) < 8 { - return false - } - msg[6], msg[7] = packUint16(i) - return true -} - -// rawSetsNsLen sets the length of the authority section. -func rawSetNsLen(msg []byte, i uint16) bool { - if len(msg) < 10 { - return false - } - msg[8], msg[9] = packUint16(i) - return true -} - -// rawSetExtraLen sets the length of the additional section. -func rawSetExtraLen(msg []byte, i uint16) bool { - if len(msg) < 12 { - return false - } - msg[10], msg[11] = packUint16(i) - return true -} +import "encoding/binary" // rawSetRdlength sets the rdlength in the header of // the RR. The offset 'off' must be positioned at the @@ -90,6 +44,6 @@ Loop: if rdatalen > 0xFFFF { return false } - msg[off], msg[off+1] = packUint16(uint16(rdatalen)) + binary.BigEndian.PutUint16(msg[off:], uint16(rdatalen)) return true } diff --git a/vendor/github.com/miekg/dns/reverse.go b/vendor/github.com/miekg/dns/reverse.go new file mode 100644 index 0000000000..099dac9486 --- /dev/null +++ b/vendor/github.com/miekg/dns/reverse.go @@ -0,0 +1,38 @@ +package dns + +// StringToType is the reverse of TypeToString, needed for string parsing. +var StringToType = reverseInt16(TypeToString) + +// StringToClass is the reverse of ClassToString, needed for string parsing. +var StringToClass = reverseInt16(ClassToString) + +// Map of opcodes strings. +var StringToOpcode = reverseInt(OpcodeToString) + +// Map of rcodes strings. +var StringToRcode = reverseInt(RcodeToString) + +// Reverse a map +func reverseInt8(m map[uint8]string) map[string]uint8 { + n := make(map[string]uint8, len(m)) + for u, s := range m { + n[s] = u + } + return n +} + +func reverseInt16(m map[uint16]string) map[string]uint16 { + n := make(map[string]uint16, len(m)) + for u, s := range m { + n[s] = u + } + return n +} + +func reverseInt(m map[int]string) map[string]int { + n := make(map[string]int, len(m)) + for u, s := range m { + n[s] = u + } + return n +} diff --git a/vendor/github.com/miekg/dns/zscan.go b/vendor/github.com/miekg/dns/scan.go similarity index 99% rename from vendor/github.com/miekg/dns/zscan.go rename to vendor/github.com/miekg/dns/scan.go index 5c10fbaaaa..0e83797fb5 100644 --- a/vendor/github.com/miekg/dns/zscan.go +++ b/vendor/github.com/miekg/dns/scan.go @@ -377,8 +377,8 @@ func parseZone(r io.Reader, origin, f string, t chan *Token, include int) { t <- &Token{Error: &ParseError{f, "expecting $GENERATE value, not this...", l}} return } - if e := generate(l, c, t, origin); e != "" { - t <- &Token{Error: &ParseError{f, e, l}} + if errMsg := generate(l, c, t, origin); errMsg != "" { + t <- &Token{Error: &ParseError{f, errMsg, l}} return } st = zExpectOwnerDir @@ -966,8 +966,8 @@ func stringToNodeID(l lex) (uint64, *ParseError) { return 0, &ParseError{l.token, "bad NID/L64 NodeID/Locator64", l} } s := l.token[0:4] + l.token[5:9] + l.token[10:14] + l.token[15:19] - u, e := strconv.ParseUint(s, 16, 64) - if e != nil { + u, err := strconv.ParseUint(s, 16, 64) + if err != nil { return 0, &ParseError{l.token, "bad NID/L64 NodeID/Locator64", l} } return u, nil diff --git a/vendor/github.com/miekg/dns/zscan_rr.go b/vendor/github.com/miekg/dns/scan_rr.go similarity index 94% rename from vendor/github.com/miekg/dns/zscan_rr.go rename to vendor/github.com/miekg/dns/scan_rr.go index ead9614d13..e521dc063e 100644 --- a/vendor/github.com/miekg/dns/zscan_rr.go +++ b/vendor/github.com/miekg/dns/scan_rr.go @@ -1443,64 +1443,6 @@ func setEUI64(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { return rr, nil, "" } -func setWKS(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { - rr := new(WKS) - rr.Hdr = h - - l := <-c - if l.length == 0 { - return rr, nil, l.comment - } - rr.Address = net.ParseIP(l.token) - if rr.Address == nil || l.err { - return nil, &ParseError{f, "bad WKS Address", l}, "" - } - - <-c // zBlank - l = <-c - proto := "tcp" - i, e := strconv.Atoi(l.token) - if e != nil || l.err { - return nil, &ParseError{f, "bad WKS Protocol", l}, "" - } - rr.Protocol = uint8(i) - switch rr.Protocol { - case 17: - proto = "udp" - case 6: - proto = "tcp" - default: - return nil, &ParseError{f, "bad WKS Protocol", l}, "" - } - - <-c - l = <-c - rr.BitMap = make([]uint16, 0) - var ( - k int - err error - ) - for l.value != zNewline && l.value != zEOF { - switch l.value { - case zBlank: - // Ok - case zString: - if k, err = net.LookupPort(proto, l.token); err != nil { - i, e := strconv.Atoi(l.token) // If a number use that - if e != nil { - return nil, &ParseError{f, "bad WKS BitMap", l}, "" - } - rr.BitMap = append(rr.BitMap, uint16(i)) - } - rr.BitMap = append(rr.BitMap, uint16(k)) - default: - return nil, &ParseError{f, "bad WKS BitMap", l}, "" - } - l = <-c - } - return rr, nil, l.comment -} - func setSSHFP(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { rr := new(SSHFP) rr.Hdr = h @@ -2103,73 +2045,6 @@ func setPX(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { return rr, nil, "" } -func setIPSECKEY(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { - rr := new(IPSECKEY) - rr.Hdr = h - l := <-c - if l.length == 0 { - return rr, nil, l.comment - } - i, err := strconv.Atoi(l.token) - if err != nil || l.err { - return nil, &ParseError{f, "bad IPSECKEY Precedence", l}, "" - } - rr.Precedence = uint8(i) - <-c // zBlank - l = <-c - i, err = strconv.Atoi(l.token) - if err != nil || l.err { - return nil, &ParseError{f, "bad IPSECKEY GatewayType", l}, "" - } - rr.GatewayType = uint8(i) - <-c // zBlank - l = <-c - i, err = strconv.Atoi(l.token) - if err != nil || l.err { - return nil, &ParseError{f, "bad IPSECKEY Algorithm", l}, "" - } - rr.Algorithm = uint8(i) - - // Now according to GatewayType we can have different elements here - <-c // zBlank - l = <-c - switch rr.GatewayType { - case 0: - fallthrough - case 3: - rr.GatewayName = l.token - if l.token == "@" { - rr.GatewayName = o - } - _, ok := IsDomainName(l.token) - if !ok || l.length == 0 || l.err { - return nil, &ParseError{f, "bad IPSECKEY GatewayName", l}, "" - } - if rr.GatewayName[l.length-1] != '.' { - rr.GatewayName = appendOrigin(rr.GatewayName, o) - } - case 1: - rr.GatewayA = net.ParseIP(l.token) - if rr.GatewayA == nil { - return nil, &ParseError{f, "bad IPSECKEY GatewayA", l}, "" - } - case 2: - rr.GatewayAAAA = net.ParseIP(l.token) - if rr.GatewayAAAA == nil { - return nil, &ParseError{f, "bad IPSECKEY GatewayAAAA", l}, "" - } - default: - return nil, &ParseError{f, "bad IPSECKEY GatewayType", l}, "" - } - - s, e, c1 := endingToString(c, "bad IPSECKEY PublicKey", f) - if e != nil { - return nil, e, c1 - } - rr.PublicKey = s - return rr, nil, c1 -} - func setCAA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) { rr := new(CAA) rr.Hdr = h @@ -2224,7 +2099,6 @@ var typeToparserFunc = map[uint16]parserFunc{ TypeGPOS: {setGPOS, false}, TypeHINFO: {setHINFO, true}, TypeHIP: {setHIP, true}, - TypeIPSECKEY: {setIPSECKEY, true}, TypeKX: {setKX, false}, TypeL32: {setL32, false}, TypeL64: {setL64, false}, @@ -2265,6 +2139,5 @@ var typeToparserFunc = map[uint16]parserFunc{ TypeUID: {setUID, false}, TypeUINFO: {setUINFO, true}, TypeURI: {setURI, true}, - TypeWKS: {setWKS, true}, TypeX25: {setX25, false}, } diff --git a/vendor/github.com/miekg/dns/server.go b/vendor/github.com/miekg/dns/server.go index edc5c6258c..2b4bff49f2 100644 --- a/vendor/github.com/miekg/dns/server.go +++ b/vendor/github.com/miekg/dns/server.go @@ -5,6 +5,7 @@ package dns import ( "bytes" "crypto/tls" + "encoding/binary" "io" "net" "sync" @@ -320,20 +321,20 @@ func (srv *Server) ListenAndServe() error { } switch srv.Net { case "tcp", "tcp4", "tcp6": - a, e := net.ResolveTCPAddr(srv.Net, addr) - if e != nil { - return e + a, err := net.ResolveTCPAddr(srv.Net, addr) + if err != nil { + return err } - l, e := net.ListenTCP(srv.Net, a) - if e != nil { - return e + l, err := net.ListenTCP(srv.Net, a) + if err != nil { + return err } srv.Listener = l srv.started = true srv.lock.Unlock() - e = srv.serveTCP(l) + err = srv.serveTCP(l) srv.lock.Lock() // to satisfy the defer at the top - return e + return err case "tcp-tls", "tcp4-tls", "tcp6-tls": network := "tcp" if srv.Net == "tcp4-tls" { @@ -342,24 +343,24 @@ func (srv *Server) ListenAndServe() error { network = "tcp6" } - l, e := tls.Listen(network, addr, srv.TLSConfig) - if e != nil { - return e + l, err := tls.Listen(network, addr, srv.TLSConfig) + if err != nil { + return err } srv.Listener = l srv.started = true srv.lock.Unlock() - e = srv.serveTCP(l) + err = srv.serveTCP(l) srv.lock.Lock() // to satisfy the defer at the top - return e + return err case "udp", "udp4", "udp6": - a, e := net.ResolveUDPAddr(srv.Net, addr) - if e != nil { - return e + a, err := net.ResolveUDPAddr(srv.Net, addr) + if err != nil { + return err } - l, e := net.ListenUDP(srv.Net, a) - if e != nil { - return e + l, err := net.ListenUDP(srv.Net, a) + if err != nil { + return err } if e := setUDPSocketOptions(l); e != nil { return e @@ -367,9 +368,9 @@ func (srv *Server) ListenAndServe() error { srv.PacketConn = l srv.started = true srv.lock.Unlock() - e = srv.serveUDP(l) + err = srv.serveUDP(l) srv.lock.Lock() // to satisfy the defer at the top - return e + return err } return &Error{err: "bad network"} } @@ -473,21 +474,21 @@ func (srv *Server) serveTCP(l net.Listener) error { rtimeout := srv.getReadTimeout() // deadline is not used here for { - rw, e := l.Accept() - if e != nil { - if neterr, ok := e.(net.Error); ok && neterr.Temporary() { + rw, err := l.Accept() + if err != nil { + if neterr, ok := err.(net.Error); ok && neterr.Temporary() { continue } - return e + return err } - m, e := reader.ReadTCP(rw, rtimeout) + m, err := reader.ReadTCP(rw, rtimeout) srv.lock.RLock() if !srv.started { srv.lock.RUnlock() return nil } srv.lock.RUnlock() - if e != nil { + if err != nil { continue } srv.inFlight.Add(1) @@ -516,14 +517,14 @@ func (srv *Server) serveUDP(l *net.UDPConn) error { rtimeout := srv.getReadTimeout() // deadline is not used here for { - m, s, e := reader.ReadUDP(l, rtimeout) + m, s, err := reader.ReadUDP(l, rtimeout) srv.lock.RLock() if !srv.started { srv.lock.RUnlock() return nil } srv.lock.RUnlock() - if e != nil { + if err != nil { continue } srv.inFlight.Add(1) @@ -596,8 +597,8 @@ Exit: if srv.IdleTimeout != nil { idleTimeout = srv.IdleTimeout() } - m, e := reader.ReadTCP(w.tcp, idleTimeout) - if e == nil { + m, err = reader.ReadTCP(w.tcp, idleTimeout) + if err == nil { q++ goto Redo } @@ -615,7 +616,7 @@ func (srv *Server) readTCP(conn net.Conn, timeout time.Duration) ([]byte, error) } return nil, ErrShortRead } - length, _ := unpackUint16(l, 0) + length := binary.BigEndian.Uint16(l) if length == 0 { return nil, ErrShortRead } @@ -643,10 +644,10 @@ func (srv *Server) readTCP(conn net.Conn, timeout time.Duration) ([]byte, error) func (srv *Server) readUDP(conn *net.UDPConn, timeout time.Duration) ([]byte, *SessionUDP, error) { conn.SetReadDeadline(time.Now().Add(timeout)) m := make([]byte, srv.UDPSize) - n, s, e := ReadFromSessionUDP(conn, m) - if e != nil || n == 0 { - if e != nil { - return nil, nil, e + n, s, err := ReadFromSessionUDP(conn, m) + if err != nil || n == 0 { + if err != nil { + return nil, nil, err } return nil, nil, ErrShortRead } @@ -690,7 +691,7 @@ func (w *response) Write(m []byte) (int, error) { return 0, &Error{err: "message too large"} } l := make([]byte, 2, 2+lm) - l[0], l[1] = packUint16(uint16(lm)) + binary.BigEndian.PutUint16(l, uint16(lm)) m = append(l, m...) n, err := io.Copy(w.tcp, bytes.NewReader(m)) diff --git a/vendor/github.com/miekg/dns/sig0.go b/vendor/github.com/miekg/dns/sig0.go index 0fccddbc15..2dce06af82 100644 --- a/vendor/github.com/miekg/dns/sig0.go +++ b/vendor/github.com/miekg/dns/sig0.go @@ -5,6 +5,7 @@ import ( "crypto/dsa" "crypto/ecdsa" "crypto/rsa" + "encoding/binary" "math/big" "strings" "time" @@ -67,13 +68,13 @@ func (rr *SIG) Sign(k crypto.Signer, m *Msg) ([]byte, error) { } // Adjust sig data length rdoff := len(mbuf) + 1 + 2 + 2 + 4 - rdlen, _ := unpackUint16(buf, rdoff) + rdlen := binary.BigEndian.Uint16(buf[rdoff:]) rdlen += uint16(len(sig)) - buf[rdoff], buf[rdoff+1] = packUint16(rdlen) + binary.BigEndian.PutUint16(buf[rdoff:], rdlen) // Adjust additional count - adc, _ := unpackUint16(buf, 10) + adc := binary.BigEndian.Uint16(buf[10:]) adc++ - buf[10], buf[11] = packUint16(adc) + binary.BigEndian.PutUint16(buf[10:], adc) return buf, nil } @@ -103,10 +104,11 @@ func (rr *SIG) Verify(k *KEY, buf []byte) error { hasher := hash.New() buflen := len(buf) - qdc, _ := unpackUint16(buf, 4) - anc, _ := unpackUint16(buf, 6) - auc, _ := unpackUint16(buf, 8) - adc, offset := unpackUint16(buf, 10) + qdc := binary.BigEndian.Uint16(buf[4:]) + anc := binary.BigEndian.Uint16(buf[6:]) + auc := binary.BigEndian.Uint16(buf[8:]) + adc := binary.BigEndian.Uint16(buf[10:]) + offset := 12 var err error for i := uint16(0); i < qdc && offset < buflen; i++ { _, offset, err = UnpackDomainName(buf, offset) @@ -127,7 +129,8 @@ func (rr *SIG) Verify(k *KEY, buf []byte) error { continue } var rdlen uint16 - rdlen, offset = unpackUint16(buf, offset) + rdlen = binary.BigEndian.Uint16(buf[offset:]) + offset += 2 offset += int(rdlen) } if offset >= buflen { @@ -149,9 +152,9 @@ func (rr *SIG) Verify(k *KEY, buf []byte) error { if offset+4+4 >= buflen { return &Error{err: "overflow unpacking signed message"} } - expire := uint32(buf[offset])<<24 | uint32(buf[offset+1])<<16 | uint32(buf[offset+2])<<8 | uint32(buf[offset+3]) + expire := binary.BigEndian.Uint32(buf[offset:]) offset += 4 - incept := uint32(buf[offset])<<24 | uint32(buf[offset+1])<<16 | uint32(buf[offset+2])<<8 | uint32(buf[offset+3]) + incept := binary.BigEndian.Uint32(buf[offset:]) offset += 4 now := uint32(time.Now().Unix()) if now < incept || now > expire { diff --git a/vendor/github.com/miekg/dns/tlsa.go b/vendor/github.com/miekg/dns/tlsa.go index 0a550dc6cb..34fe6615aa 100644 --- a/vendor/github.com/miekg/dns/tlsa.go +++ b/vendor/github.com/miekg/dns/tlsa.go @@ -78,9 +78,9 @@ func TLSAName(name, service, network string) (string, error) { if !IsFqdn(name) { return "", ErrFqdn } - p, e := net.LookupPort(network, service) - if e != nil { - return "", e + p, err := net.LookupPort(network, service) + if err != nil { + return "", err } return "_" + strconv.Itoa(p) + "._" + network + "." + name, nil } diff --git a/vendor/github.com/miekg/dns/tsig.go b/vendor/github.com/miekg/dns/tsig.go index c3374e1940..78365e1c5b 100644 --- a/vendor/github.com/miekg/dns/tsig.go +++ b/vendor/github.com/miekg/dns/tsig.go @@ -6,6 +6,7 @@ import ( "crypto/sha1" "crypto/sha256" "crypto/sha512" + "encoding/binary" "encoding/hex" "hash" "io" @@ -30,11 +31,11 @@ type TSIG struct { TimeSigned uint64 `dns:"uint48"` Fudge uint16 MACSize uint16 - MAC string `dns:"size-hex"` + MAC string `dns:"size-hex:MACSize"` OrigId uint16 Error uint16 OtherLen uint16 - OtherData string `dns:"size-hex"` + OtherData string `dns:"size-hex:OtherLen"` } // TSIG has no official presentation format, but this will suffice. @@ -68,14 +69,13 @@ type tsigWireFmt struct { // MACSize, MAC and OrigId excluded Error uint16 OtherLen uint16 - OtherData string `dns:"size-hex"` + OtherData string `dns:"size-hex:OtherLen"` } -// If we have the MAC use this type to convert it to wiredata. -// Section 3.4.3. Request MAC +// If we have the MAC use this type to convert it to wiredata. Section 3.4.3. Request MAC type macWireFmt struct { MACSize uint16 - MAC string `dns:"size-hex"` + MAC string `dns:"size-hex:MACSize"` } // 3.3. Time values used in TSIG calculations @@ -141,7 +141,9 @@ func TsigGenerate(m *Msg, secret, requestMAC string, timersOnly bool) ([]byte, s return nil, "", err } mbuf = append(mbuf, tbuf...) - rawSetExtraLen(mbuf, uint16(len(m.Extra)+1)) + // Update the ArCount directly in the buffer. + binary.BigEndian.PutUint16(mbuf[10:], uint16(len(m.Extra)+1)) + return mbuf, t.MAC, nil } @@ -212,7 +214,7 @@ func tsigBuffer(msgbuf []byte, rr *TSIG, requestMAC string, timersOnly bool) []b m.MACSize = uint16(len(requestMAC) / 2) m.MAC = requestMAC buf = make([]byte, len(requestMAC)) // long enough - n, _ := PackStruct(m, buf, 0) + n, _ := packMacWire(m, buf) buf = buf[:n] } @@ -221,7 +223,7 @@ func tsigBuffer(msgbuf []byte, rr *TSIG, requestMAC string, timersOnly bool) []b tsig := new(timerWireFmt) tsig.TimeSigned = rr.TimeSigned tsig.Fudge = rr.Fudge - n, _ := PackStruct(tsig, tsigvar, 0) + n, _ := packTimerWire(tsig, tsigvar) tsigvar = tsigvar[:n] } else { tsig := new(tsigWireFmt) @@ -234,7 +236,7 @@ func tsigBuffer(msgbuf []byte, rr *TSIG, requestMAC string, timersOnly bool) []b tsig.Error = rr.Error tsig.OtherLen = rr.OtherLen tsig.OtherData = rr.OtherData - n, _ := PackStruct(tsig, tsigvar, 0) + n, _ := packTsigWire(tsig, tsigvar) tsigvar = tsigvar[:n] } @@ -249,60 +251,54 @@ func tsigBuffer(msgbuf []byte, rr *TSIG, requestMAC string, timersOnly bool) []b // Strip the TSIG from the raw message. func stripTsig(msg []byte) ([]byte, *TSIG, error) { - // Copied from msg.go's Unpack() - // Header. - var dh Header - var err error - dns := new(Msg) - rr := new(TSIG) - off := 0 - tsigoff := 0 - if off, err = UnpackStruct(&dh, msg, off); err != nil { + // Copied from msg.go's Unpack() Header, but modified. + var ( + dh Header + err error + ) + off, tsigoff := 0, 0 + + if dh, off, err = unpackMsgHdr(msg, off); err != nil { return nil, nil, err } if dh.Arcount == 0 { return nil, nil, ErrNoSig } + // Rcode, see msg.go Unpack() if int(dh.Bits&0xF) == RcodeNotAuth { return nil, nil, ErrAuth } - // Arrays. - dns.Question = make([]Question, dh.Qdcount) - dns.Answer = make([]RR, dh.Ancount) - dns.Ns = make([]RR, dh.Nscount) - dns.Extra = make([]RR, dh.Arcount) + for i := 0; i < int(dh.Qdcount); i++ { + _, off, err = unpackQuestion(msg, off) + if err != nil { + return nil, nil, err + } + } - for i := 0; i < len(dns.Question); i++ { - off, err = UnpackStruct(&dns.Question[i], msg, off) - if err != nil { - return nil, nil, err - } + _, off, err = unpackRRslice(int(dh.Ancount), msg, off) + if err != nil { + return nil, nil, err } - for i := 0; i < len(dns.Answer); i++ { - dns.Answer[i], off, err = UnpackRR(msg, off) - if err != nil { - return nil, nil, err - } + _, off, err = unpackRRslice(int(dh.Nscount), msg, off) + if err != nil { + return nil, nil, err } - for i := 0; i < len(dns.Ns); i++ { - dns.Ns[i], off, err = UnpackRR(msg, off) - if err != nil { - return nil, nil, err - } - } - for i := 0; i < len(dns.Extra); i++ { + + rr := new(TSIG) + var extra RR + for i := 0; i < int(dh.Arcount); i++ { tsigoff = off - dns.Extra[i], off, err = UnpackRR(msg, off) + extra, off, err = UnpackRR(msg, off) if err != nil { return nil, nil, err } - if dns.Extra[i].Header().Rrtype == TypeTSIG { - rr = dns.Extra[i].(*TSIG) + if extra.Header().Rrtype == TypeTSIG { + rr = extra.(*TSIG) // Adjust Arcount. - arcount, _ := unpackUint16(msg, 10) - msg[10], msg[11] = packUint16(arcount - 1) + arcount := binary.BigEndian.Uint16(msg[10:]) + binary.BigEndian.PutUint16(msg[10:], arcount-1) break } } @@ -318,3 +314,71 @@ func tsigTimeToString(t uint64) string { ti := time.Unix(int64(t), 0).UTC() return ti.Format("20060102150405") } + +func packTsigWire(tw *tsigWireFmt, msg []byte) (int, error) { + // copied from zmsg.go TSIG packing + // RR_Header + off, err := PackDomainName(tw.Name, msg, 0, nil, false) + if err != nil { + return off, err + } + off, err = packUint16(tw.Class, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(tw.Ttl, msg, off) + if err != nil { + return off, err + } + + off, err = PackDomainName(tw.Algorithm, msg, off, nil, false) + if err != nil { + return off, err + } + off, err = packUint48(tw.TimeSigned, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(tw.Fudge, msg, off) + if err != nil { + return off, err + } + + off, err = packUint16(tw.Error, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(tw.OtherLen, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(tw.OtherData, msg, off) + if err != nil { + return off, err + } + return off, nil +} + +func packMacWire(mw *macWireFmt, msg []byte) (int, error) { + off, err := packUint16(mw.MACSize, msg, 0) + if err != nil { + return off, err + } + off, err = packStringHex(mw.MAC, msg, off) + if err != nil { + return off, err + } + return off, nil +} + +func packTimerWire(tw *timerWireFmt, msg []byte) (int, error) { + off, err := packUint48(tw.TimeSigned, msg, 0) + if err != nil { + return off, err + } + off, err = packUint16(tw.Fudge, msg, off) + if err != nil { + return off, err + } + return off, nil +} diff --git a/vendor/github.com/miekg/dns/types.go b/vendor/github.com/miekg/dns/types.go index 64143dba51..e737064790 100644 --- a/vendor/github.com/miekg/dns/types.go +++ b/vendor/github.com/miekg/dns/types.go @@ -1,7 +1,6 @@ package dns import ( - "encoding/base64" "fmt" "net" "strconv" @@ -35,7 +34,6 @@ const ( TypeMG uint16 = 8 TypeMR uint16 = 9 TypeNULL uint16 = 10 - TypeWKS uint16 = 11 TypePTR uint16 = 12 TypeHINFO uint16 = 13 TypeMINFO uint16 = 14 @@ -65,7 +63,6 @@ const ( TypeOPT uint16 = 41 // EDNS TypeDS uint16 = 43 TypeSSHFP uint16 = 44 - TypeIPSECKEY uint16 = 45 TypeRRSIG uint16 = 46 TypeNSEC uint16 = 47 TypeDNSKEY uint16 = 48 @@ -136,6 +133,7 @@ const ( RcodeBadName = 20 RcodeBadAlg = 21 RcodeBadTrunc = 22 // TSIG + RcodeBadCookie = 23 // DNS Cookies // Message Opcodes. There is no 3. OpcodeQuery = 0 @@ -871,57 +869,6 @@ func (rr *SSHFP) String() string { " " + strings.ToUpper(rr.FingerPrint) } -type IPSECKEY struct { - Hdr RR_Header - Precedence uint8 - // GatewayType: 1: A record, 2: AAAA record, 3: domainname. - // 0 is use for no type and GatewayName should be "." then. - GatewayType uint8 - Algorithm uint8 - // Gateway can be an A record, AAAA record or a domain name. - GatewayA net.IP `dns:"a"` - GatewayAAAA net.IP `dns:"aaaa"` - GatewayName string `dns:"domain-name"` - PublicKey string `dns:"base64"` -} - -func (rr *IPSECKEY) String() string { - s := rr.Hdr.String() + strconv.Itoa(int(rr.Precedence)) + - " " + strconv.Itoa(int(rr.GatewayType)) + - " " + strconv.Itoa(int(rr.Algorithm)) - switch rr.GatewayType { - case 0: - fallthrough - case 3: - s += " " + rr.GatewayName - case 1: - s += " " + rr.GatewayA.String() - case 2: - s += " " + rr.GatewayAAAA.String() - default: - s += " ." - } - s += " " + rr.PublicKey - return s -} - -func (rr *IPSECKEY) len() int { - l := rr.Hdr.len() + 3 + 1 - switch rr.GatewayType { - default: - fallthrough - case 0: - fallthrough - case 3: - l += len(rr.GatewayName) - case 1: - l += 4 - case 2: - l += 16 - } - return l + base64.StdEncoding.DecodedLen(len(rr.PublicKey)) -} - type KEY struct { DNSKEY } @@ -973,9 +920,9 @@ type NSEC3 struct { Flags uint8 Iterations uint16 SaltLength uint8 - Salt string `dns:"size-hex"` + Salt string `dns:"size-hex:SaltLength"` HashLength uint8 - NextDomain string `dns:"size-base32"` + NextDomain string `dns:"size-base32:HashLength"` TypeBitMap []uint16 `dns:"nsec"` } @@ -1105,8 +1052,8 @@ type HIP struct { HitLength uint8 PublicKeyAlgorithm uint8 PublicKeyLength uint16 - Hit string `dns:"hex"` - PublicKey string `dns:"base64"` + Hit string `dns:"size-hex:HitLength"` + PublicKey string `dns:"size-base64:PublicKeyLength"` RendezvousServers []string `dns:"domain-name"` } @@ -1128,31 +1075,6 @@ type NINFO struct { func (rr *NINFO) String() string { return rr.Hdr.String() + sprintTxt(rr.ZSData) } -type WKS struct { - Hdr RR_Header - Address net.IP `dns:"a"` - Protocol uint8 - BitMap []uint16 `dns:"wks"` -} - -func (rr *WKS) len() int { - // TODO: this is missing something... - return rr.Hdr.len() + net.IPv4len + 1 -} - -func (rr *WKS) String() (s string) { - s = rr.Hdr.String() - if rr.Address != nil { - s += rr.Address.String() - } - // TODO(miek): missing protocol here, see /etc/protocols - for i := 0; i < len(rr.BitMap); i++ { - // should lookup the port - s += " " + strconv.Itoa(int(rr.BitMap[i])) - } - return s -} - type NID struct { Hdr RR_Header Preference uint16 @@ -1286,9 +1208,9 @@ func TimeToString(t uint32) string { // string values like "20110403154150" to an 32 bit integer. // It takes serial arithmetic (RFC 1982) into account. func StringToTime(s string) (uint32, error) { - t, e := time.Parse("20060102150405", s) - if e != nil { - return 0, e + t, err := time.Parse("20060102150405", s) + if err != nil { + return 0, err } mod := (t.Unix() / year68) - 1 if mod < 0 { diff --git a/vendor/github.com/miekg/dns/types_generate.go b/vendor/github.com/miekg/dns/types_generate.go index b8d1cd26b0..bf80da329c 100644 --- a/vendor/github.com/miekg/dns/types_generate.go +++ b/vendor/github.com/miekg/dns/types_generate.go @@ -20,16 +20,14 @@ import ( ) var skipLen = map[string]struct{}{ - "NSEC": {}, - "NSEC3": {}, - "OPT": {}, - "WKS": {}, - "IPSECKEY": {}, + "NSEC": {}, + "NSEC3": {}, + "OPT": {}, } var packageHdr = ` // *** DO NOT MODIFY *** -// AUTOGENERATED BY go generate +// AUTOGENERATED BY go generate from type_generate.go package dns @@ -173,26 +171,30 @@ func main() { continue } - switch st.Tag(i) { - case `dns:"-"`: + switch { + case st.Tag(i) == `dns:"-"`: // ignored - case `dns:"cdomain-name"`, `dns:"domain-name"`: + case st.Tag(i) == `dns:"cdomain-name"`, st.Tag(i) == `dns:"domain-name"`: o("l += len(rr.%s) + 1\n") - case `dns:"octet"`: + case st.Tag(i) == `dns:"octet"`: o("l += len(rr.%s)\n") - case `dns:"base64"`: + case strings.HasPrefix(st.Tag(i), `dns:"size-base64`): + fallthrough + case st.Tag(i) == `dns:"base64"`: o("l += base64.StdEncoding.DecodedLen(len(rr.%s))\n") - case `dns:"size-hex"`, `dns:"hex"`: + case strings.HasPrefix(st.Tag(i), `dns:"size-hex`): + fallthrough + case st.Tag(i) == `dns:"hex"`: o("l += len(rr.%s)/2 + 1\n") - case `dns:"a"`: + case st.Tag(i) == `dns:"a"`: o("l += net.IPv4len // %s\n") - case `dns:"aaaa"`: + case st.Tag(i) == `dns:"aaaa"`: o("l += net.IPv6len // %s\n") - case `dns:"txt"`: + case st.Tag(i) == `dns:"txt"`: o("for _, t := range rr.%s { l += len(t) + 1 }\n") - case `dns:"uint48"`: + case st.Tag(i) == `dns:"uint48"`: o("l += 6 // %s\n") - case "": + case st.Tag(i) == "": switch st.Field(i).Type().(*types.Basic).Kind() { case types.Uint8: o("l += 1 // %s\n") @@ -229,7 +231,10 @@ func main() { if sl, ok := st.Field(i).Type().(*types.Slice); ok { t := sl.Underlying().String() t = strings.TrimPrefix(t, "[]") - t = strings.TrimPrefix(t, "github.com/miekg/dns.") + if strings.Contains(t, ".") { + splits := strings.Split(t, ".") + t = splits[len(splits)-1] + } fmt.Fprintf(b, "%s := make([]%s, len(rr.%s)); copy(%s, rr.%s)\n", f, t, f, f, f) fields = append(fields, f) diff --git a/vendor/github.com/miekg/dns/xfr.go b/vendor/github.com/miekg/dns/xfr.go index 7d3a67b8e4..7346deffbb 100644 --- a/vendor/github.com/miekg/dns/xfr.go +++ b/vendor/github.com/miekg/dns/xfr.go @@ -162,8 +162,8 @@ func (t *Transfer) inIxfr(id uint16, c chan *Envelope) { // // ch := make(chan *dns.Envelope) // tr := new(dns.Transfer) -// tr.Out(w, r, ch) -// c <- &dns.Envelope{RR: []dns.RR{soa, rr1, rr2, rr3, soa}} +// go tr.Out(w, r, ch) +// ch <- &dns.Envelope{RR: []dns.RR{soa, rr1, rr2, rr3, soa}} // close(ch) // w.Hijack() // // w.Close() // Client closes connection diff --git a/vendor/github.com/miekg/dns/zmsg.go b/vendor/github.com/miekg/dns/zmsg.go new file mode 100644 index 0000000000..e5f3cf2974 --- /dev/null +++ b/vendor/github.com/miekg/dns/zmsg.go @@ -0,0 +1,3462 @@ +// *** DO NOT MODIFY *** +// AUTOGENERATED BY go generate from msg_generate.go + +package dns + +// pack*() functions + +func (rr *A) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packDataA(rr.A, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *AAAA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packDataAAAA(rr.AAAA, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *AFSDB) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Subtype, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Hostname, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *ANY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *CAA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Flag, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Tag, msg, off) + if err != nil { + return off, err + } + off, err = packStringOctet(rr.Value, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *CDNSKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Protocol, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.PublicKey, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *CDS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.DigestType, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Digest, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *CERT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Type, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.Certificate, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *CNAME) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Target, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *DHCID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringBase64(rr.Digest, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *DLV) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.DigestType, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Digest, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *DNAME) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Target, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *DNSKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Protocol, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.PublicKey, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *DS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.DigestType, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Digest, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *EID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringHex(rr.Endpoint, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *EUI48) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint48(rr.Address, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *EUI64) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint64(rr.Address, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *GID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint32(rr.Gid, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *GPOS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packString(rr.Longitude, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Latitude, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Altitude, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *HINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packString(rr.Cpu, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Os, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *HIP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.HitLength, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.PublicKeyAlgorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.PublicKeyLength, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Hit, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.PublicKey, msg, off) + if err != nil { + return off, err + } + off, err = packDataDomainNames(rr.RendezvousServers, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *KEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Protocol, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.PublicKey, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *KX) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Exchanger, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *L32) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = packDataA(rr.Locator32, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *L64) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = packUint64(rr.Locator64, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *LOC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Version, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Size, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.HorizPre, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.VertPre, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Latitude, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Longitude, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Altitude, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *LP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Fqdn, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MB) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Mb, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MD) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Md, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MF) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Mf, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Mg, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Rmail, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Email, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Mr, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *MX) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Mx, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NAPTR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Order, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Service, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Regexp, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Replacement, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = packUint64(rr.NodeID, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NIMLOC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringHex(rr.Locator, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringTxt(rr.ZSData, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Ns, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NSAPPTR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Ptr, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NSEC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.NextDomain, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = packDataNsec(rr.TypeBitMap, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NSEC3) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Hash, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Iterations, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.SaltLength, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Salt, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.HashLength, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase32(rr.NextDomain, msg, off) + if err != nil { + return off, err + } + off, err = packDataNsec(rr.TypeBitMap, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *NSEC3PARAM) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Hash, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Iterations, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.SaltLength, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Salt, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *OPENPGPKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringBase64(rr.PublicKey, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *OPT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packDataOpt(rr.Option, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *PTR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Ptr, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *PX) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Map822, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Mapx400, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *RFC3597) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringHex(rr.Rdata, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *RKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Flags, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Protocol, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.PublicKey, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *RP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Mbox, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Txt, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *RRSIG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.TypeCovered, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Labels, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.OrigTtl, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Expiration, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Inception, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.SignerName, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.Signature, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *RT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Preference, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Host, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *SIG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.TypeCovered, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Labels, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.OrigTtl, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Expiration, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Inception, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.SignerName, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = packStringBase64(rr.Signature, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *SOA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Ns, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Mbox, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = packUint32(rr.Serial, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Refresh, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Retry, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Expire, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Minttl, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *SPF) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringTxt(rr.Txt, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *SRV) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Priority, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Weight, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Port, msg, off) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.Target, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *SSHFP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Type, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.FingerPrint, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *TA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.KeyTag, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Algorithm, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.DigestType, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Digest, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *TALINK) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.PreviousName, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = PackDomainName(rr.NextName, msg, off, compression, compress) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *TKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Algorithm, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = packUint32(rr.Inception, msg, off) + if err != nil { + return off, err + } + off, err = packUint32(rr.Expiration, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Mode, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Error, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.KeySize, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.Key, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.OtherLen, msg, off) + if err != nil { + return off, err + } + off, err = packString(rr.OtherData, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *TLSA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint8(rr.Usage, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.Selector, msg, off) + if err != nil { + return off, err + } + off, err = packUint8(rr.MatchingType, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.Certificate, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *TSIG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = PackDomainName(rr.Algorithm, msg, off, compression, compress) + if err != nil { + return off, err + } + off, err = packUint48(rr.TimeSigned, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Fudge, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.MACSize, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.MAC, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.OrigId, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Error, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.OtherLen, msg, off) + if err != nil { + return off, err + } + off, err = packStringHex(rr.OtherData, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *TXT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packStringTxt(rr.Txt, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *UID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint32(rr.Uid, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *UINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packString(rr.Uinfo, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *URI) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packUint16(rr.Priority, msg, off) + if err != nil { + return off, err + } + off, err = packUint16(rr.Weight, msg, off) + if err != nil { + return off, err + } + off, err = packStringOctet(rr.Target, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +func (rr *X25) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) { + off, err := rr.Hdr.pack(msg, off, compression, compress) + if err != nil { + return off, err + } + headerEnd := off + off, err = packString(rr.PSDNAddress, msg, off) + if err != nil { + return off, err + } + rr.Header().Rdlength = uint16(off - headerEnd) + return off, nil +} + +// unpack*() functions + +func unpackA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(A) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.A, off, err = unpackDataA(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackAAAA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(AAAA) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.AAAA, off, err = unpackDataAAAA(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackAFSDB(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(AFSDB) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Subtype, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Hostname, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackANY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(ANY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + return rr, off, err +} + +func unpackCAA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(CAA) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Flag, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Tag, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Value, off, err = unpackStringOctet(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackCDNSKEY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(CDNSKEY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Flags, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Protocol, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackCDS(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(CDS) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.DigestType, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackCERT(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(CERT) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Type, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Certificate, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackCNAME(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(CNAME) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Target, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackDHCID(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(DHCID) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Digest, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackDLV(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(DLV) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.DigestType, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackDNAME(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(DNAME) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Target, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackDNSKEY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(DNSKEY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Flags, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Protocol, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackDS(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(DS) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.DigestType, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackEID(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(EID) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Endpoint, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackEUI48(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(EUI48) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Address, off, err = unpackUint48(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackEUI64(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(EUI64) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Address, off, err = unpackUint64(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackGID(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(GID) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Gid, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackGPOS(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(GPOS) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Longitude, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Latitude, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Altitude, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackHINFO(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(HINFO) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Cpu, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Os, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackHIP(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(HIP) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.HitLength, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.PublicKeyAlgorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.PublicKeyLength, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Hit, off, err = unpackStringHex(msg, off, off+int(rr.HitLength)) + if err != nil { + return rr, off, err + } + rr.PublicKey, off, err = unpackStringBase64(msg, off, off+int(rr.PublicKeyLength)) + if err != nil { + return rr, off, err + } + rr.RendezvousServers, off, err = unpackDataDomainNames(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackKEY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(KEY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Flags, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Protocol, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackKX(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(KX) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Exchanger, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackL32(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(L32) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Locator32, off, err = unpackDataA(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackL64(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(L64) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Locator64, off, err = unpackUint64(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackLOC(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(LOC) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Version, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Size, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.HorizPre, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.VertPre, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Latitude, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Longitude, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Altitude, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackLP(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(LP) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Fqdn, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMB(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MB) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Mb, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMD(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MD) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Md, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMF(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MF) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Mf, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMG(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MG) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Mg, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMINFO(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MINFO) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Rmail, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Email, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMR(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MR) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Mr, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackMX(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(MX) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Mx, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNAPTR(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NAPTR) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Order, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Flags, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Service, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Regexp, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Replacement, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNID(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NID) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.NodeID, off, err = unpackUint64(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNIMLOC(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NIMLOC) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Locator, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNINFO(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NINFO) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.ZSData, off, err = unpackStringTxt(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNS(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NS) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Ns, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNSAPPTR(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NSAPPTR) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Ptr, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNSEC(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NSEC) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.NextDomain, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.TypeBitMap, off, err = unpackDataNsec(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNSEC3(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NSEC3) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Hash, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Flags, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Iterations, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.SaltLength, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Salt, off, err = unpackStringHex(msg, off, off+int(rr.SaltLength)) + if err != nil { + return rr, off, err + } + rr.HashLength, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.NextDomain, off, err = unpackStringBase32(msg, off, off+int(rr.HashLength)) + if err != nil { + return rr, off, err + } + rr.TypeBitMap, off, err = unpackDataNsec(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackNSEC3PARAM(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(NSEC3PARAM) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Hash, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Flags, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Iterations, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.SaltLength, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Salt, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackOPENPGPKEY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(OPENPGPKEY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackOPT(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(OPT) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Option, off, err = unpackDataOpt(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackPTR(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(PTR) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Ptr, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackPX(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(PX) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Map822, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Mapx400, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackRFC3597(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(RFC3597) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Rdata, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackRKEY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(RKEY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Flags, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Protocol, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackRP(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(RP) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Mbox, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Txt, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackRRSIG(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(RRSIG) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.TypeCovered, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Labels, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.OrigTtl, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Expiration, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Inception, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.SignerName, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Signature, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackRT(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(RT) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Preference, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Host, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackSIG(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(SIG) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.TypeCovered, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Labels, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.OrigTtl, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Expiration, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Inception, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.SignerName, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Signature, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackSOA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(SOA) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Ns, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Mbox, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Serial, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Refresh, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Retry, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Expire, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Minttl, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackSPF(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(SPF) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Txt, off, err = unpackStringTxt(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackSRV(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(SRV) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Priority, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Weight, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Port, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Target, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackSSHFP(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(SSHFP) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Type, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.FingerPrint, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackTA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(TA) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.KeyTag, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Algorithm, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.DigestType, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackTALINK(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(TALINK) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.PreviousName, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.NextName, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackTKEY(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(TKEY) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Algorithm, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Inception, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Expiration, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Mode, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Error, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.KeySize, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Key, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.OtherLen, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.OtherData, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackTLSA(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(TLSA) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Usage, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Selector, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.MatchingType, off, err = unpackUint8(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Certificate, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackTSIG(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(TSIG) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Algorithm, off, err = UnpackDomainName(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.TimeSigned, off, err = unpackUint48(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Fudge, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.MACSize, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.MAC, off, err = unpackStringHex(msg, off, off+int(rr.MACSize)) + if err != nil { + return rr, off, err + } + rr.OrigId, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Error, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.OtherLen, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.OtherData, off, err = unpackStringHex(msg, off, off+int(rr.OtherLen)) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackTXT(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(TXT) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Txt, off, err = unpackStringTxt(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackUID(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(UID) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Uid, off, err = unpackUint32(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackUINFO(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(UINFO) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Uinfo, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackURI(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(URI) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.Priority, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Weight, off, err = unpackUint16(msg, off) + if err != nil { + return rr, off, err + } + if off == len(msg) { + return rr, off, nil + } + rr.Target, off, err = unpackStringOctet(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +func unpackX25(h RR_Header, msg []byte, off int) (RR, int, error) { + rr := new(X25) + rr.Hdr = h + if noRdata(h) { + return rr, off, nil + } + var err error + rdStart := off + _ = rdStart + + rr.PSDNAddress, off, err = unpackString(msg, off) + if err != nil { + return rr, off, err + } + return rr, off, err +} + +var typeToUnpack = map[uint16]func(RR_Header, []byte, int) (RR, int, error){ + TypeA: unpackA, + TypeAAAA: unpackAAAA, + TypeAFSDB: unpackAFSDB, + TypeANY: unpackANY, + TypeCAA: unpackCAA, + TypeCDNSKEY: unpackCDNSKEY, + TypeCDS: unpackCDS, + TypeCERT: unpackCERT, + TypeCNAME: unpackCNAME, + TypeDHCID: unpackDHCID, + TypeDLV: unpackDLV, + TypeDNAME: unpackDNAME, + TypeDNSKEY: unpackDNSKEY, + TypeDS: unpackDS, + TypeEID: unpackEID, + TypeEUI48: unpackEUI48, + TypeEUI64: unpackEUI64, + TypeGID: unpackGID, + TypeGPOS: unpackGPOS, + TypeHINFO: unpackHINFO, + TypeHIP: unpackHIP, + TypeKEY: unpackKEY, + TypeKX: unpackKX, + TypeL32: unpackL32, + TypeL64: unpackL64, + TypeLOC: unpackLOC, + TypeLP: unpackLP, + TypeMB: unpackMB, + TypeMD: unpackMD, + TypeMF: unpackMF, + TypeMG: unpackMG, + TypeMINFO: unpackMINFO, + TypeMR: unpackMR, + TypeMX: unpackMX, + TypeNAPTR: unpackNAPTR, + TypeNID: unpackNID, + TypeNIMLOC: unpackNIMLOC, + TypeNINFO: unpackNINFO, + TypeNS: unpackNS, + TypeNSAPPTR: unpackNSAPPTR, + TypeNSEC: unpackNSEC, + TypeNSEC3: unpackNSEC3, + TypeNSEC3PARAM: unpackNSEC3PARAM, + TypeOPENPGPKEY: unpackOPENPGPKEY, + TypeOPT: unpackOPT, + TypePTR: unpackPTR, + TypePX: unpackPX, + TypeRKEY: unpackRKEY, + TypeRP: unpackRP, + TypeRRSIG: unpackRRSIG, + TypeRT: unpackRT, + TypeSIG: unpackSIG, + TypeSOA: unpackSOA, + TypeSPF: unpackSPF, + TypeSRV: unpackSRV, + TypeSSHFP: unpackSSHFP, + TypeTA: unpackTA, + TypeTALINK: unpackTALINK, + TypeTKEY: unpackTKEY, + TypeTLSA: unpackTLSA, + TypeTSIG: unpackTSIG, + TypeTXT: unpackTXT, + TypeUID: unpackUID, + TypeUINFO: unpackUINFO, + TypeURI: unpackURI, + TypeX25: unpackX25, +} diff --git a/vendor/github.com/miekg/dns/ztypes.go b/vendor/github.com/miekg/dns/ztypes.go index 3d0f9aef57..a4ecbb0cc0 100644 --- a/vendor/github.com/miekg/dns/ztypes.go +++ b/vendor/github.com/miekg/dns/ztypes.go @@ -1,5 +1,5 @@ // *** DO NOT MODIFY *** -// AUTOGENERATED BY go generate +// AUTOGENERATED BY go generate from type_generate.go package dns @@ -31,7 +31,6 @@ var TypeToRR = map[uint16]func() RR{ TypeGPOS: func() RR { return new(GPOS) }, TypeHINFO: func() RR { return new(HINFO) }, TypeHIP: func() RR { return new(HIP) }, - TypeIPSECKEY: func() RR { return new(IPSECKEY) }, TypeKEY: func() RR { return new(KEY) }, TypeKX: func() RR { return new(KX) }, TypeL32: func() RR { return new(L32) }, @@ -76,7 +75,6 @@ var TypeToRR = map[uint16]func() RR{ TypeUID: func() RR { return new(UID) }, TypeUINFO: func() RR { return new(UINFO) }, TypeURI: func() RR { return new(URI) }, - TypeWKS: func() RR { return new(WKS) }, TypeX25: func() RR { return new(X25) }, } @@ -105,7 +103,6 @@ var TypeToString = map[uint16]string{ TypeGPOS: "GPOS", TypeHINFO: "HINFO", TypeHIP: "HIP", - TypeIPSECKEY: "IPSECKEY", TypeISDN: "ISDN", TypeIXFR: "IXFR", TypeKEY: "KEY", @@ -158,7 +155,6 @@ var TypeToString = map[uint16]string{ TypeUINFO: "UINFO", TypeUNSPEC: "UNSPEC", TypeURI: "URI", - TypeWKS: "WKS", TypeX25: "X25", TypeNSAPPTR: "NSAP-PTR", } @@ -185,7 +181,6 @@ func (rr *GID) Header() *RR_Header { return &rr.Hdr } func (rr *GPOS) Header() *RR_Header { return &rr.Hdr } func (rr *HINFO) Header() *RR_Header { return &rr.Hdr } func (rr *HIP) Header() *RR_Header { return &rr.Hdr } -func (rr *IPSECKEY) Header() *RR_Header { return &rr.Hdr } func (rr *KEY) Header() *RR_Header { return &rr.Hdr } func (rr *KX) Header() *RR_Header { return &rr.Hdr } func (rr *L32) Header() *RR_Header { return &rr.Hdr } @@ -231,7 +226,6 @@ func (rr *TXT) Header() *RR_Header { return &rr.Hdr } func (rr *UID) Header() *RR_Header { return &rr.Hdr } func (rr *UINFO) Header() *RR_Header { return &rr.Hdr } func (rr *URI) Header() *RR_Header { return &rr.Hdr } -func (rr *WKS) Header() *RR_Header { return &rr.Hdr } func (rr *X25) Header() *RR_Header { return &rr.Hdr } // len() functions @@ -688,9 +682,6 @@ func (rr *HIP) copy() RR { copy(RendezvousServers, rr.RendezvousServers) return &HIP{*rr.Hdr.copyHeader(), rr.HitLength, rr.PublicKeyAlgorithm, rr.PublicKeyLength, rr.Hit, rr.PublicKey, RendezvousServers} } -func (rr *IPSECKEY) copy() RR { - return &IPSECKEY{*rr.Hdr.copyHeader(), rr.Precedence, rr.GatewayType, rr.Algorithm, copyIP(rr.GatewayA), copyIP(rr.GatewayAAAA), rr.GatewayName, rr.PublicKey} -} func (rr *KX) copy() RR { return &KX{*rr.Hdr.copyHeader(), rr.Preference, rr.Exchanger} } @@ -832,11 +823,6 @@ func (rr *UINFO) copy() RR { func (rr *URI) copy() RR { return &URI{*rr.Hdr.copyHeader(), rr.Priority, rr.Weight, rr.Target} } -func (rr *WKS) copy() RR { - BitMap := make([]uint16, len(rr.BitMap)) - copy(BitMap, rr.BitMap) - return &WKS{*rr.Hdr.copyHeader(), copyIP(rr.Address), rr.Protocol, BitMap} -} func (rr *X25) copy() RR { return &X25{*rr.Hdr.copyHeader(), rr.PSDNAddress} } diff --git a/vendor/github.com/pborman/uuid/dce.go b/vendor/github.com/pborman/uuid/dce.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/pborman/uuid/doc.go b/vendor/github.com/pborman/uuid/doc.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/pborman/uuid/node.go b/vendor/github.com/pborman/uuid/node.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/pborman/uuid/time.go b/vendor/github.com/pborman/uuid/time.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/pborman/uuid/uuid.go b/vendor/github.com/pborman/uuid/uuid.go old mode 100644 new mode 100755 diff --git a/vendor/github.com/skynetservices/skydns/server/config.go b/vendor/github.com/skynetservices/skydns/server/config.go index 3e4c6cfb07..b0222a5265 100644 --- a/vendor/github.com/skynetservices/skydns/server/config.go +++ b/vendor/github.com/skynetservices/skydns/server/config.go @@ -39,7 +39,7 @@ type Config struct { RoundRobin bool `json:"round_robin,omitempty"` // Round robin selection of nameservers from among those listed, rather than have all forwarded requests try the first listed server first every time. NSRotate bool `json:"ns_rotate,omitempty"` - // List of ip:port, seperated by commas of recursive nameservers to forward queries to. + // List of ip:port, separated by commas of recursive nameservers to forward queries to. Nameservers []string `json:"nameservers,omitempty"` // Never provide a recursive service. NoRec bool `json:"no_rec,omitempty"` diff --git a/vendor/github.com/skynetservices/skydns/server/forwarding.go b/vendor/github.com/skynetservices/skydns/server/forwarding.go index a3c8cb32db..83470af6ed 100644 --- a/vendor/github.com/skynetservices/skydns/server/forwarding.go +++ b/vendor/github.com/skynetservices/skydns/server/forwarding.go @@ -102,7 +102,7 @@ Redo: r, err := exchangeWithRetry(s.dnsUDPclient, m, s.config.Nameservers[nsid]) if err == nil { if r.Rcode != dns.RcodeSuccess { - return nil, fmt.Errorf("rcode is not equal to success") + return nil, fmt.Errorf("rcode %d is not equal to success", r.Rcode) } // Reset TTLs to rcache TTL to make some of the other code // and the tests not care about TTLs diff --git a/vendor/github.com/skynetservices/skydns/server/server.go b/vendor/github.com/skynetservices/skydns/server/server.go index 883afef997..b5799aa232 100644 --- a/vendor/github.com/skynetservices/skydns/server/server.go +++ b/vendor/github.com/skynetservices/skydns/server/server.go @@ -200,7 +200,7 @@ func (s *server) ServeDNS(w dns.ResponseWriter, req *dns.Msg) { } for zone, ns := range *s.config.stub { - if strings.HasSuffix(name, zone) { + if strings.HasSuffix(name, "." + zone) || name == zone { metrics.ReportRequestCount(req, metrics.Stub) resp := s.ServeDNSStubForward(w, req, ns) @@ -232,7 +232,7 @@ func (s *server) ServeDNS(w dns.ResponseWriter, req *dns.Msg) { return } - if q.Qclass != dns.ClassCHAOS && !strings.HasSuffix(name, s.config.Domain) { + if q.Qclass != dns.ClassCHAOS && !strings.HasSuffix(name, "." +s.config.Domain) && name != s.config.Domain { metrics.ReportRequestCount(req, metrics.Rec) resp := s.ServeDNSForward(w, req) @@ -431,6 +431,7 @@ func (s *server) AddressRecords(q dns.Question, name string, previousRecords []d case ip == nil: // Try to resolve as CNAME if it's not an IP, but only if we don't create loops. if q.Name == dns.Fqdn(serv.Host) { + logf("CNAME loop detected: %q -> %q", q.Name, q.Name) // x CNAME x is a direct loop, don't add those continue } @@ -464,7 +465,7 @@ func (s *server) AddressRecords(q dns.Question, name string, previousRecords []d } m1, e1 := s.Lookup(target, q.Qtype, bufsize, dnssec) if e1 != nil { - logf("incomplete CNAME chain: %s", e1) + logf("incomplete CNAME chain from %q: %s", target, e1) continue } // Len(m1.Answer) > 0 here is well? diff --git a/vendor/github.com/ugorji/go/codec/prebuild.sh b/vendor/github.com/ugorji/go/codec/prebuild.sh old mode 100644 new mode 100755 diff --git a/vendor/github.com/ugorji/go/codec/test.py b/vendor/github.com/ugorji/go/codec/test.py old mode 100644 new mode 100755 diff --git a/vendor/github.com/ugorji/go/codec/tests.sh b/vendor/github.com/ugorji/go/codec/tests.sh old mode 100644 new mode 100755 diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh old mode 100644 new mode 100755 diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh old mode 100644 new mode 100755 diff --git a/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl old mode 100644 new mode 100755 diff --git a/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl b/vendor/golang.org/x/sys/unix/mksyscall_solaris.pl old mode 100644 new mode 100755 diff --git a/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl b/vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl old mode 100644 new mode 100755 diff --git a/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl b/vendor/golang.org/x/sys/unix/mksysnum_darwin.pl old mode 100644 new mode 100755 diff --git a/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl b/vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl old mode 100644 new mode 100755 diff --git a/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl b/vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl old mode 100644 new mode 100755 diff --git a/vendor/golang.org/x/sys/unix/mksysnum_linux.pl b/vendor/golang.org/x/sys/unix/mksysnum_linux.pl old mode 100644 new mode 100755 diff --git a/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl b/vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl old mode 100644 new mode 100755 diff --git a/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl b/vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl old mode 100644 new mode 100755 diff --git a/vendor/google.golang.org/grpc/codegen.sh b/vendor/google.golang.org/grpc/codegen.sh old mode 100644 new mode 100755 diff --git a/vendor/google.golang.org/grpc/coverage.sh b/vendor/google.golang.org/grpc/coverage.sh old mode 100644 new mode 100755 From 7f6d9b3bc68d7ab22aa609b52828698c3301cd5e Mon Sep 17 00:00:00 2001 From: Random Liu Date: Wed, 29 Jun 2016 20:44:16 +0000 Subject: [PATCH 287/339] Add the semver back. --- pkg/kubelet/dockertools/docker_manager.go | 60 +++++++++++++++---- .../dockertools/docker_manager_test.go | 52 ++++++++++++++++ 2 files changed, 101 insertions(+), 11 deletions(-) diff --git a/pkg/kubelet/dockertools/docker_manager.go b/pkg/kubelet/dockertools/docker_manager.go index 28ba651e65..1a8a0c9957 100644 --- a/pkg/kubelet/dockertools/docker_manager.go +++ b/pkg/kubelet/dockertools/docker_manager.go @@ -32,10 +32,11 @@ import ( "sync" "time" + "github.com/coreos/go-semver/semver" dockertypes "github.com/docker/engine-api/types" dockercontainer "github.com/docker/engine-api/types/container" dockerstrslice "github.com/docker/engine-api/types/strslice" - dockerversion "github.com/docker/engine-api/types/versions" + dockerapiversion "github.com/docker/engine-api/types/versions" dockernat "github.com/docker/go-connections/nat" "github.com/golang/glog" cadvisorapi "github.com/google/cadvisor/info/v1" @@ -914,18 +915,52 @@ func getDockerNetworkMode(container *dockertypes.ContainerJSON) string { return "" } -// dockerVersion implementes kubecontainer.Version interface by implementing -// Compare() and String(). It could contain either server version or api version. -type dockerVersion string +// dockerVersion implements kubecontainer.Version interface by implementing +// Compare() and String() (which is implemented by the underlying semver.Version) +// TODO: this code is the same as rktVersion and may make sense to be moved to +// somewhere shared. +type dockerVersion struct { + *semver.Version +} -func (v dockerVersion) String() string { +// newDockerVersion returns a semantically versioned docker version value +func newDockerVersion(version string) (dockerVersion, error) { + sem, err := semver.NewVersion(version) + return dockerVersion{sem}, err +} + +func (r dockerVersion) String() string { + return r.Version.String() +} + +func (r dockerVersion) Compare(other string) (int, error) { + v, err := newDockerVersion(other) + if err != nil { + return -1, err + } + + if r.LessThan(*v.Version) { + return -1, nil + } + if v.Version.LessThan(*r.Version) { + return 1, nil + } + return 0, nil +} + +// apiVersion implements kubecontainer.Version interface by implementing +// Compare() and String(). It uses the compare function of engine-api to +// compare docker apiversions. +type apiVersion string + +func (v apiVersion) String() string { return string(v) } -func (v dockerVersion) Compare(other string) (int, error) { - if dockerversion.LessThan(string(v), other) { +func (v apiVersion) Compare(other string) (int, error) { + if dockerapiversion.LessThan(string(v), other) { return -1, nil - } else if dockerversion.GreaterThan(string(v), other) { + } else if dockerapiversion.GreaterThan(string(v), other) { return 1, nil } return 0, nil @@ -940,8 +975,11 @@ func (dm *DockerManager) Version() (kubecontainer.Version, error) { if err != nil { return nil, fmt.Errorf("docker: failed to get docker version: %v", err) } - - return dockerVersion(v.Version), nil + version, err := newDockerVersion(v.Version) + if err != nil { + return nil, fmt.Errorf("docker: failed to parse docker version %q: %v", v.Version, err) + } + return version, nil } func (dm *DockerManager) APIVersion() (kubecontainer.Version, error) { @@ -950,7 +988,7 @@ func (dm *DockerManager) APIVersion() (kubecontainer.Version, error) { return nil, fmt.Errorf("docker: failed to get docker version: %v", err) } - return dockerVersion(v.APIVersion), nil + return apiVersion(v.APIVersion), nil } // Status returns error if docker daemon is unhealthy, nil otherwise. diff --git a/pkg/kubelet/dockertools/docker_manager_test.go b/pkg/kubelet/dockertools/docker_manager_test.go index 97cad5e566..7274ae9797 100644 --- a/pkg/kubelet/dockertools/docker_manager_test.go +++ b/pkg/kubelet/dockertools/docker_manager_test.go @@ -2061,6 +2061,58 @@ func TestCheckVersionCompatibility(t *testing.T) { } } +func TestNewDockerVersion(t *testing.T) { + cases := []struct { + value string + out string + err bool + }{ + {value: "1", err: true}, + {value: "1.8", err: true}, + {value: "1.8.1", out: "1.8.1"}, + {value: "1.8.1-fc21.other", out: "1.8.1-fc21.other"}, + {value: "1.8.1-beta.12", out: "1.8.1-beta.12"}, + } + for _, test := range cases { + v, err := newDockerVersion(test.value) + switch { + case err != nil && test.err: + continue + case (err != nil) != test.err: + t.Errorf("error for %q: expected %t, got %v", test.value, test.err, err) + continue + } + if v.String() != test.out { + t.Errorf("unexpected parsed version %q for %q", v, test.value) + } + } +} + +func TestDockerVersionComparison(t *testing.T) { + v, err := newDockerVersion("1.10.3") + assert.NoError(t, err) + for i, test := range []struct { + version string + compare int + err bool + }{ + {version: "1.9.2", compare: 1}, + {version: "1.9.2-rc2", compare: 1}, + {version: "1.10.3", compare: 0}, + {version: "1.10.3-rc3", compare: 1}, + {version: "1.10.4", compare: -1}, + {version: "1.10.4-rc1", compare: -1}, + {version: "1.11.1", compare: -1}, + {version: "1.11.1-rc4", compare: -1}, + {version: "invalid", compare: -1, err: true}, + } { + testCase := fmt.Sprintf("test case #%d test version %q", i, test.version) + res, err := v.Compare(test.version) + assert.Equal(t, test.compare, res, testCase) + assert.Equal(t, test.err, err != nil, testCase) + } +} + func TestVersion(t *testing.T) { expectedVersion := "1.8.1" expectedAPIVersion := "1.20" From 4dfff9533b8d97f5a07b7b8d05ac2f2b347254d9 Mon Sep 17 00:00:00 2001 From: Ron Lai Date: Mon, 27 Jun 2016 18:29:20 -0700 Subject: [PATCH 288/339] Update cadvisor dependency --- Godeps/Godeps.json | 160 +++++++++--------- .../google/cadvisor/info/v2/container.go | 3 + .../google/cadvisor/manager/manager.go | 7 +- .../google/cadvisor/version/VERSION | 2 +- 4 files changed, 88 insertions(+), 84 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index cd23ec1760..f06afe07a8 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -927,203 +927,203 @@ }, { "ImportPath": "github.com/google/cadvisor/api", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/cache/memory", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/collector", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/container", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/container/common", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/container/docker", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/container/libcontainer", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/container/raw", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/container/rkt", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/container/systemd", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/devicemapper", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/events", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/fs", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/healthz", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/http", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/http/mux", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/info/v1", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/info/v1/test", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/info/v2", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/machine", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/manager", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher/raw", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/manager/watcher/rkt", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/metrics", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/pages", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/pages/static", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/storage", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/summary", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/utils", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/utils/cloudinfo", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/utils/cpuload", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/utils/cpuload/netlink", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/utils/docker", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/utils/oomparser", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/utils/sysfs", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/utils/sysinfo", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/utils/tail", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/validate", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/cadvisor/version", - "Comment": "v0.23.6", - "Rev": "4dbefc9b671b81257973a33211fb12370c1a526e" + "Comment": "v0.23.2-25-g51574ec", + "Rev": "51574ec04ff12ca5a50f0935625ec02437191a06" }, { "ImportPath": "github.com/google/gofuzz", diff --git a/vendor/github.com/google/cadvisor/info/v2/container.go b/vendor/github.com/google/cadvisor/info/v2/container.go index d300c525f5..42d990ff00 100644 --- a/vendor/github.com/google/cadvisor/info/v2/container.go +++ b/vendor/github.com/google/cadvisor/info/v2/container.go @@ -216,6 +216,9 @@ type FsInfo struct { // Labels associated with this filesystem. Labels []string `json:"labels"` + + // Number of available Inodes. + InodesFree uint64 `json:"inodes_free"` } type RequestOptions struct { diff --git a/vendor/github.com/google/cadvisor/manager/manager.go b/vendor/github.com/google/cadvisor/manager/manager.go index 7cf7d43b14..60bde205e2 100644 --- a/vendor/github.com/google/cadvisor/manager/manager.go +++ b/vendor/github.com/google/cadvisor/manager/manager.go @@ -232,12 +232,12 @@ type manager struct { func (self *manager) Start() error { err := docker.Register(self, self.fsInfo, self.ignoreMetrics) if err != nil { - glog.Errorf("Docker container factory registration failed: %v.", err) + glog.Warningf("Docker container factory registration failed: %v.", err) } err = rkt.Register(self, self.fsInfo, self.ignoreMetrics) if err != nil { - glog.Errorf("Registration of the rkt container factory failed: %v", err) + glog.Warningf("Registration of the rkt container factory failed: %v", err) } else { watcher, err := rktwatcher.NewRktContainerWatcher() if err != nil { @@ -248,7 +248,7 @@ func (self *manager) Start() error { err = systemd.Register(self, self.fsInfo, self.ignoreMetrics) if err != nil { - glog.Errorf("Registration of the systemd container factory failed: %v", err) + glog.Warningf("Registration of the systemd container factory failed: %v", err) } err = raw.Register(self, self.fsInfo, self.ignoreMetrics) @@ -687,6 +687,7 @@ func (self *manager) GetFsInfo(label string) ([]v2.FsInfo, error) { Usage: fs.Usage, Available: fs.Available, Labels: labels, + InodesFree: fs.InodesFree, } fsInfo = append(fsInfo, fi) } diff --git a/vendor/github.com/google/cadvisor/version/VERSION b/vendor/github.com/google/cadvisor/version/VERSION index 40a6dfede5..df47809d31 100644 --- a/vendor/github.com/google/cadvisor/version/VERSION +++ b/vendor/github.com/google/cadvisor/version/VERSION @@ -1 +1 @@ -0.23.4 +0.23.6 From 2d6c632de2f9ac15005c188913f779a81b392c81 Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Wed, 29 Jun 2016 15:02:37 -0700 Subject: [PATCH 289/339] Revert "Revert "Merge pull request #28193 from zmerlynn/pull-ci-elsewhere"" Bring back #28193. We caught a break in https://github.com/kubernetes/test-infra/issues/240 and discovered the previous issue, fixed in https://github.com/kubernetes/test-infra/pull/241 and https://github.com/kubernetes/test-infra/pull/244, so I have a pretty good handle on what was causing the previous bringup issues (and it wasn't #28193). By the time this merges, we'll have good signal on GKE in the `kubernetes-e2e-gke-updown` job. This reverts commit ee1d48033366cfbb2e32fc98af6d37c0789e03c2. --- cluster/common.sh | 15 ++++++++++----- cluster/gce/upgrade.sh | 2 +- docs/devel/getting-builds.md | 6 +++--- hack/get-build.sh | 3 ++- hack/jenkins/e2e-runner.sh | 23 +++++++++++++---------- 5 files changed, 29 insertions(+), 20 deletions(-) diff --git a/cluster/common.sh b/cluster/common.sh index f064da159c..878137ab21 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -292,7 +292,7 @@ function detect-master-from-kubeconfig() { # Sets KUBE_VERSION variable to the proper version number (e.g. "v1.0.6", # "v1.2.0-alpha.1.881+376438b69c7612") or a version' publication of the form -# / (e.g. "release/stable",' "ci/latest-1"). +# / (e.g. "release/stable",' "ci/latest-1"). # # See the docs on getting builds for more information about version # publication. @@ -303,7 +303,12 @@ function detect-master-from-kubeconfig() { # KUBE_VERSION function set_binary_version() { if [[ "${1}" =~ "/" ]]; then - KUBE_VERSION=$(gsutil cat gs://kubernetes-release/${1}.txt) + IFS='/' read -a path <<< "${1}" + if [[ "${path[0]}" == "release" ]]; then + KUBE_VERSION=$(gsutil cat "gs://kubernetes-release/${1}.txt") + else + KUBE_VERSION=$(gsutil cat "gs://kubernetes-release-dev/${1}.txt") + fi else KUBE_VERSION=${1} fi @@ -334,8 +339,8 @@ function tars_from_version() { KUBE_MANIFESTS_TAR_URL="${SERVER_BINARY_TAR_URL/server-linux-amd64/manifests}" KUBE_MANIFESTS_TAR_HASH=$(curl ${KUBE_MANIFESTS_TAR_URL} | sha1sum | awk '{print $1}') elif [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then - SERVER_BINARY_TAR_URL="https://storage.googleapis.com/kubernetes-release/ci/${KUBE_VERSION}/kubernetes-server-linux-amd64.tar.gz" - SALT_TAR_URL="https://storage.googleapis.com/kubernetes-release/ci/${KUBE_VERSION}/kubernetes-salt.tar.gz" + SERVER_BINARY_TAR_URL="https://storage.googleapis.com/kubernetes-release-dev/ci/${KUBE_VERSION}/kubernetes-server-linux-amd64.tar.gz" + SALT_TAR_URL="https://storage.googleapis.com/kubernetes-release-dev/ci/${KUBE_VERSION}/kubernetes-salt.tar.gz" # TODO: Clean this up. KUBE_MANIFESTS_TAR_URL="${SERVER_BINARY_TAR_URL/server-linux-amd64/manifests}" KUBE_MANIFESTS_TAR_HASH=$(curl ${KUBE_MANIFESTS_TAR_URL} | sha1sum | awk '{print $1}') @@ -484,7 +489,7 @@ function build-runtime-config() { if [[ -n ${appends} ]]; then if [[ -n ${RUNTIME_CONFIG} ]]; then RUNTIME_CONFIG="${RUNTIME_CONFIG},${appends}" - else + else RUNTIME_CONFIG="${appends}" fi fi diff --git a/cluster/gce/upgrade.sh b/cluster/gce/upgrade.sh index 5b56a0759c..cb9f8139c7 100755 --- a/cluster/gce/upgrade.sh +++ b/cluster/gce/upgrade.sh @@ -59,7 +59,7 @@ function usage() { release_stable=$(gsutil cat gs://kubernetes-release/release/stable.txt) release_latest=$(gsutil cat gs://kubernetes-release/release/latest.txt) - ci_latest=$(gsutil cat gs://kubernetes-release/ci/latest.txt) + ci_latest=$(gsutil cat gs://kubernetes-release-dev/ci/latest.txt) echo "Right now, versions are as follows:" echo " release/stable: ${0} ${release_stable}" diff --git a/docs/devel/getting-builds.md b/docs/devel/getting-builds.md index bd6143d521..52e9c193f5 100644 --- a/docs/devel/getting-builds.md +++ b/docs/devel/getting-builds.md @@ -59,9 +59,9 @@ Finally, you can just print the latest or stable version: You can also use the gsutil tool to explore the Google Cloud Storage release buckets. Here are some examples: ```sh -gsutil cat gs://kubernetes-release/ci/latest.txt # output the latest ci version number -gsutil cat gs://kubernetes-release/ci/latest-green.txt # output the latest ci version number that passed gce e2e -gsutil ls gs://kubernetes-release/ci/v0.20.0-29-g29a55cc/ # list the contents of a ci release +gsutil cat gs://kubernetes-release-dev/ci/latest.txt # output the latest ci version number +gsutil cat gs://kubernetes-release-dev/ci/latest-green.txt # output the latest ci version number that passed gce e2e +gsutil ls gs://kubernetes-release-dev/ci/v0.20.0-29-g29a55cc/ # list the contents of a ci release gsutil ls gs://kubernetes-release/release # list all official releases and rcs ``` diff --git a/hack/get-build.sh b/hack/get-build.sh index 8771a3a7c5..baff5f4abb 100755 --- a/hack/get-build.sh +++ b/hack/get-build.sh @@ -23,6 +23,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. source "${KUBE_ROOT}/cluster/common.sh" declare -r KUBE_RELEASE_BUCKET_URL="https://storage.googleapis.com/kubernetes-release" +declare -r KUBE_DEV_RELEASE_BUCKET_URL="https://storage.googleapis.com/kubernetes-release-dev" declare -r KUBE_TAR_NAME="kubernetes.tar.gz" usage() { @@ -74,7 +75,7 @@ else if [[ ${KUBE_VERSION} =~ ${KUBE_RELEASE_VERSION_REGEX} ]]; then curl --fail -o "kubernetes-${KUBE_VERSION}.tar.gz" "${KUBE_RELEASE_BUCKET_URL}/release/${KUBE_VERSION}/${KUBE_TAR_NAME}" elif [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then - curl --fail -o "kubernetes-${KUBE_VERSION}.tar.gz" "${KUBE_RELEASE_BUCKET_URL}/ci/${KUBE_VERSION}/${KUBE_TAR_NAME}" + curl --fail -o "kubernetes-${KUBE_VERSION}.tar.gz" "${KUBE_DEV_RELEASE_BUCKET_URL}/ci/${KUBE_VERSION}/${KUBE_TAR_NAME}" else echo "Version doesn't match regexp" >&2 exit 1 diff --git a/hack/jenkins/e2e-runner.sh b/hack/jenkins/e2e-runner.sh index a8583e6b64..c951dfb683 100755 --- a/hack/jenkins/e2e-runner.sh +++ b/hack/jenkins/e2e-runner.sh @@ -22,6 +22,7 @@ set -o pipefail set -o xtrace : ${KUBE_GCS_RELEASE_BUCKET:="kubernetes-release"} +: ${KUBE_GCS_DEV_RELEASE_BUCKET:="kubernetes-release-dev"} function running_in_docker() { grep -q docker /proc/self/cgroup @@ -47,10 +48,15 @@ function fetch_server_version_tars() { function fetch_published_version_tars() { local -r published_version="${1}" IFS='/' read -a varr <<< "${published_version}" - bucket="${varr[0]}" - build_version=$(gsutil cat gs://${KUBE_GCS_RELEASE_BUCKET}/${published_version}.txt) + path="${varr[0]}" + if [[ "${path}" == "release" ]]; then + local -r bucket="${KUBE_GCS_RELEASE_BUCKET}" + else + local -r bucket="${KUBE_GCS_DEV_RELEASE_BUCKET}" + fi + build_version=$(gsutil cat "gs://${bucket}/${published_version}.txt") echo "Using published version $bucket/$build_version (from ${published_version})" - fetch_tars_from_gcs "${bucket}" "${build_version}" + fetch_tars_from_gcs "gs://${bucket}/${path}" "${build_version}" unpack_binaries # Set CLUSTER_API_VERSION for GKE CI export CLUSTER_API_VERSION=$(echo ${build_version} | cut -c 2-) @@ -64,13 +70,10 @@ function clean_binaries() { } function fetch_tars_from_gcs() { - local -r bucket="${1}" + local -r gspath="${1}" local -r build_version="${2}" - echo "Pulling binaries from GCS; using server version ${bucket}/${build_version}." - gsutil -mq cp \ - "gs://${KUBE_GCS_RELEASE_BUCKET}/${bucket}/${build_version}/kubernetes.tar.gz" \ - "gs://${KUBE_GCS_RELEASE_BUCKET}/${bucket}/${build_version}/kubernetes-test.tar.gz" \ - . + echo "Pulling binaries from GCS; using server version ${gspath}/${build_version}." + gsutil -mq cp "${gspath}/${build_version}/kubernetes.tar.gz" "${gspath}/${build_version}/kubernetes-test.tar.gz" . } function unpack_binaries() { @@ -190,7 +193,7 @@ function e2e_test() { if [[ "${E2E_PUBLISH_GREEN_VERSION:-}" == "true" && ${exitcode} == 0 ]]; then # Use plaintext version file packaged with kubernetes.tar.gz echo "Publish version to ci/latest-green.txt: $(cat version)" - gsutil cp ./version gs://kubernetes-release/ci/latest-green.txt + gsutil cp ./version "gs://${KUBE_GCS_DEV_RELEASE_BUCKET}/ci/latest-green.txt" fi } From 4ec2f63e41f838b35986d6b7a3b0d9cc958c231f Mon Sep 17 00:00:00 2001 From: Michael Taufen Date: Tue, 28 Jun 2016 18:51:18 -0700 Subject: [PATCH 290/339] Use slices of items to clean up after tests Fixes #27582 We used to maintain a pointer variable for each process to kill after the tests finish. @lavalamp suggested using a slice instead, which is a much cleaner solution. This implements @lavalamp's suggestion and also extends the idea to tracking directories that need to be removed after the tests finish. This also means that we should no longer check for nil `killCmd`s inside `func (k *killCmd) Kill() error {...}` (see #27582 and #27589). If a nil `killCmd` makes it in there, something is bad elsewhere and we want to see the nil pointer exception immediately. --- test/e2e_node/e2e_service.go | 53 ++++++++++++++---------------------- 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/test/e2e_node/e2e_service.go b/test/e2e_node/e2e_service.go index bb73b67084..e71ff5e3b5 100644 --- a/test/e2e_node/e2e_service.go +++ b/test/e2e_node/e2e_service.go @@ -38,10 +38,10 @@ var serverStartTimeout = flag.Duration("server-start-timeout", time.Second*120, var reportDir = flag.String("report-dir", "", "Path to the directory where the JUnit XML reports should be saved. Default is empty, which doesn't generate these reports.") type e2eService struct { - etcdCmd *killCmd + killCmds []*killCmd + rmDirs []string + etcdDataDir string - apiServerCmd *killCmd - kubeletCmd *killCmd kubeletStaticPodDir string nodeName string logFiles map[string]logFileData @@ -79,19 +79,21 @@ func (es *e2eService) start() error { if err != nil { return err } - es.etcdCmd = cmd + es.killCmds = append(es.killCmds, cmd) + es.rmDirs = append(es.rmDirs, es.etcdDataDir) cmd, err = es.startApiServer() if err != nil { return err } - es.apiServerCmd = cmd + es.killCmds = append(es.killCmds, cmd) cmd, err = es.startKubeletServer() if err != nil { return err } - es.kubeletCmd = cmd + es.killCmds = append(es.killCmds, cmd) + es.rmDirs = append(es.rmDirs, es.kubeletStaticPodDir) return nil } @@ -152,25 +154,15 @@ func isJournaldAvailable() bool { } func (es *e2eService) stop() { - if err := es.stopService(es.kubeletCmd); err != nil { - glog.Errorf("Failed to stop kubelet: %v", err) - } - if es.kubeletStaticPodDir != "" { - err := os.RemoveAll(es.kubeletStaticPodDir) - if err != nil { - glog.Errorf("Failed to delete kubelet static pod directory %s.\n%v", es.kubeletStaticPodDir, err) + for _, k := range es.killCmds { + if err := k.Kill(); err != nil { + glog.Errorf("Failed to stop %v: %v", k.name, err) } } - if err := es.stopService(es.apiServerCmd); err != nil { - glog.Errorf("Failed to stop kube-apiserver: %v", err) - } - if err := es.stopService(es.etcdCmd); err != nil { - glog.Errorf("Failed to stop etcd: %v", err) - } - if es.etcdDataDir != "" { - err := os.RemoveAll(es.etcdDataDir) + for _, d := range es.rmDirs { + err := os.RemoveAll(d) if err != nil { - glog.Errorf("Failed to delete etcd data directory %s.\n%v", es.etcdDataDir, err) + glog.Errorf("Failed to delete directory %s.\n%v", d, err) } } } @@ -304,10 +296,6 @@ func (es *e2eService) startServer(cmd *healthCheckCommand) error { return fmt.Errorf("Timeout waiting for service %s", cmd) } -func (es *e2eService) stopService(cmd *killCmd) error { - return cmd.Kill() -} - // killCmd is a struct to kill a given cmd. The cmd member specifies a command // to find the pid of and attempt to kill. // If the override field is set, that will be used instead to kill the command. @@ -319,19 +307,18 @@ type killCmd struct { } func (k *killCmd) Kill() error { - if k == nil { - glog.V(2).Infof("The killCmd is nil, nothing will be killed") - return nil - } + name := k.name + cmd := k.cmd if k.override != nil { return k.override.Run() } - name := k.name - cmd := k.cmd + if cmd == nil { + return fmt.Errorf("Could not kill %s because both `override` and `cmd` are nil", name) + } - if cmd == nil || cmd.Process == nil { + if cmd.Process == nil { glog.V(2).Infof("%s not running", name) return nil } From 5e0cc2179d9721f988458b18a74e0b92ff29cc97 Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Wed, 29 Jun 2016 11:25:49 -0700 Subject: [PATCH 291/339] node e2e: run kubelet with kubenet --- test/e2e_node/e2e_service.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/e2e_node/e2e_service.go b/test/e2e_node/e2e_service.go index bb73b67084..071d646307 100644 --- a/test/e2e_node/e2e_service.go +++ b/test/e2e_node/e2e_service.go @@ -241,6 +241,9 @@ func (es *e2eService) startKubeletServer() (*killCmd, error) { "--config", es.kubeletStaticPodDir, "--file-check-frequency", "10s", // Check file frequently so tests won't wait too long "--v", LOG_VERBOSITY_LEVEL, "--logtostderr", + "--network-plugin=kubenet", + "--pod-cidr=10.180.0.0/24", // Assign a fixed CIDR to the node because there is no node controller. + "--hairpin-mode=hairpin-veth", ) cmd := exec.Command("sudo", cmdArgs...) hcc := newHealthCheckCommand( From e76b4184c3ed34e7e8fdbebc9c4ba08dc9900086 Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Wed, 29 Jun 2016 11:44:26 -0700 Subject: [PATCH 292/339] node e2e: use updated ubuntu images --- test/e2e_node/jenkins/jenkins-ci.properties | 2 +- test/e2e_node/jenkins/jenkins-pull.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e_node/jenkins/jenkins-ci.properties b/test/e2e_node/jenkins/jenkins-ci.properties index 415ca42ba8..b183ed5980 100644 --- a/test/e2e_node/jenkins/jenkins-ci.properties +++ b/test/e2e_node/jenkins/jenkins-ci.properties @@ -3,7 +3,7 @@ GCE_HOSTS= # To copy an image between projects: # `gcloud compute --project disks create --image=https://www.googleapis.com/compute/v1/projects//global/images/` # `gcloud compute --project images create --source-disk=` -GCE_IMAGES=e2e-node-ubuntu-trusty-docker10-image,e2e-node-ubuntu-trusty-docker9-image,e2e-node-coreos-stable20160622-image,e2e-node-containervm-v20160321-image +GCE_IMAGES=e2e-node-ubuntu-trusty-docker9-v1-image,e2e-node-ubuntu-trusty-docker10-v1-image,e2e-node-coreos-stable20160622-image,e2e-node-containervm-v20160321-image GCE_ZONE=us-central1-f GCE_PROJECT=kubernetes-jenkins GCE_IMAGE_PROJECT=kubernetes-node-e2e-images diff --git a/test/e2e_node/jenkins/jenkins-pull.properties b/test/e2e_node/jenkins/jenkins-pull.properties index 8b5bad859d..7ccb2cd24c 100644 --- a/test/e2e_node/jenkins/jenkins-pull.properties +++ b/test/e2e_node/jenkins/jenkins-pull.properties @@ -3,7 +3,7 @@ GCE_HOSTS= # To copy an image between projects: # `gcloud compute --project disks create --image=https://www.googleapis.com/compute/v1/projects//global/images/` # `gcloud compute --project images create --source-disk=` -GCE_IMAGES=e2e-node-ubuntu-trusty-docker10-image,e2e-node-ubuntu-trusty-docker9-image,e2e-node-coreos-stable20160622-image,e2e-node-containervm-v20160321-image +GCE_IMAGES=e2e-node-ubuntu-trusty-docker9-v1-image,e2e-node-ubuntu-trusty-docker10-v1-image,e2e-node-coreos-stable20160622-image,e2e-node-containervm-v20160321-image GCE_ZONE=us-central1-f GCE_PROJECT=kubernetes-jenkins-pull GCE_IMAGE_PROJECT=kubernetes-node-e2e-images From 00576278b520ee1c1fb5e86d4ba14501956fd633 Mon Sep 17 00:00:00 2001 From: CJ Cullen Date: Wed, 29 Jun 2016 11:29:33 -0700 Subject: [PATCH 293/339] Lock all possible kubecfg files at the beginning of ModifyConfig. --- pkg/client/unversioned/clientcmd/config.go | 85 ++++++++++++++++++---- pkg/client/unversioned/clientcmd/loader.go | 14 ++-- 2 files changed, 77 insertions(+), 22 deletions(-) diff --git a/pkg/client/unversioned/clientcmd/config.go b/pkg/client/unversioned/clientcmd/config.go index 049fc39213..ec5948609f 100644 --- a/pkg/client/unversioned/clientcmd/config.go +++ b/pkg/client/unversioned/clientcmd/config.go @@ -22,6 +22,7 @@ import ( "path" "path/filepath" "reflect" + "sort" "github.com/golang/glog" @@ -153,6 +154,17 @@ func NewDefaultPathOptions() *PathOptions { // that means that this code will only write into a single file. If you want to relativizePaths, you must provide a fully qualified path in any // modified element. func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, relativizePaths bool) error { + possibleSources := configAccess.GetLoadingPrecedence() + // sort the possible kubeconfig files so we always "lock" in the same order + // to avoid deadlock (note: this can fail w/ symlinks, but... come on). + sort.Strings(possibleSources) + for _, filename := range possibleSources { + if err := lockFile(filename); err != nil { + return err + } + defer unlockFile(filename) + } + startingConfig, err := configAccess.GetStartingConfig() if err != nil { return err @@ -186,7 +198,10 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela destinationFile = configAccess.GetDefaultFilename() } - configToWrite := GetConfigFromFileOrDie(destinationFile) + configToWrite, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } t := *cluster configToWrite.Clusters[key] = &t @@ -211,7 +226,10 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela destinationFile = configAccess.GetDefaultFilename() } - configToWrite := GetConfigFromFileOrDie(destinationFile) + configToWrite, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } configToWrite.Contexts[key] = context if err := WriteToFile(*configToWrite, destinationFile); err != nil { @@ -228,7 +246,10 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela destinationFile = configAccess.GetDefaultFilename() } - configToWrite := GetConfigFromFileOrDie(destinationFile) + configToWrite, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } t := *authInfo configToWrite.AuthInfos[key] = &t configToWrite.AuthInfos[key].LocationOfOrigin = destinationFile @@ -251,7 +272,10 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela destinationFile = configAccess.GetDefaultFilename() } - configToWrite := GetConfigFromFileOrDie(destinationFile) + configToWrite, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } delete(configToWrite.Clusters, key) if err := WriteToFile(*configToWrite, destinationFile); err != nil { @@ -267,7 +291,10 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela destinationFile = configAccess.GetDefaultFilename() } - configToWrite := GetConfigFromFileOrDie(destinationFile) + configToWrite, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } delete(configToWrite.Contexts, key) if err := WriteToFile(*configToWrite, destinationFile); err != nil { @@ -283,7 +310,10 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela destinationFile = configAccess.GetDefaultFilename() } - configToWrite := GetConfigFromFileOrDie(destinationFile) + configToWrite, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } delete(configToWrite.AuthInfos, key) if err := WriteToFile(*configToWrite, destinationFile); err != nil { @@ -330,7 +360,10 @@ func writeCurrentContext(configAccess ConfigAccess, newCurrentContext string) er if configAccess.IsExplicitFile() { file := configAccess.GetExplicitFile() - currConfig := GetConfigFromFileOrDie(file) + currConfig, err := getConfigFromFile(file) + if err != nil { + return err + } currConfig.CurrentContext = newCurrentContext if err := WriteToFile(*currConfig, file); err != nil { return err @@ -341,7 +374,10 @@ func writeCurrentContext(configAccess ConfigAccess, newCurrentContext string) er if len(newCurrentContext) > 0 { destinationFile := configAccess.GetDefaultFilename() - config := GetConfigFromFileOrDie(destinationFile) + config, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } config.CurrentContext = newCurrentContext if err := WriteToFile(*config, destinationFile); err != nil { @@ -354,7 +390,10 @@ func writeCurrentContext(configAccess ConfigAccess, newCurrentContext string) er // we're supposed to be clearing the current context. We need to find the first spot in the chain that is setting it and clear it for _, file := range configAccess.GetLoadingPrecedence() { if _, err := os.Stat(file); err == nil { - currConfig := GetConfigFromFileOrDie(file) + currConfig, err := getConfigFromFile(file) + if err != nil { + return err + } if len(currConfig.CurrentContext) > 0 { currConfig.CurrentContext = newCurrentContext @@ -379,7 +418,10 @@ func writePreferences(configAccess ConfigAccess, newPrefs clientcmdapi.Preferenc if configAccess.IsExplicitFile() { file := configAccess.GetExplicitFile() - currConfig := GetConfigFromFileOrDie(file) + currConfig, err := getConfigFromFile(file) + if err != nil { + return err + } currConfig.Preferences = newPrefs if err := WriteToFile(*currConfig, file); err != nil { return err @@ -389,7 +431,10 @@ func writePreferences(configAccess ConfigAccess, newPrefs clientcmdapi.Preferenc } for _, file := range configAccess.GetLoadingPrecedence() { - currConfig := GetConfigFromFileOrDie(file) + currConfig, err := getConfigFromFile(file) + if err != nil { + return err + } if !reflect.DeepEqual(currConfig.Preferences, newPrefs) { currConfig.Preferences = newPrefs @@ -404,15 +449,23 @@ func writePreferences(configAccess ConfigAccess, newPrefs clientcmdapi.Preferenc return errors.New("no config found to write preferences") } -// GetConfigFromFileOrDie tries to read a kubeconfig file and if it can't, it calls exit. One exception, missing files result in empty configs, not an exit -func GetConfigFromFileOrDie(filename string) *clientcmdapi.Config { +// getConfigFromFile tries to read a kubeconfig file and if it can't, returns an error. One exception, missing files result in empty configs, not an error. +func getConfigFromFile(filename string) (*clientcmdapi.Config, error) { config, err := LoadFromFile(filename) if err != nil && !os.IsNotExist(err) { - glog.FatalDepth(1, err) + return nil, err } - if config == nil { - return clientcmdapi.NewConfig() + config = clientcmdapi.NewConfig() + } + return config, nil +} + +// GetConfigFromFileOrDie tries to read a kubeconfig file and if it can't, it calls exit. One exception, missing files result in empty configs, not an exit +func GetConfigFromFileOrDie(filename string) *clientcmdapi.Config { + config, err := getConfigFromFile(filename) + if err != nil { + glog.FatalDepth(1, err) } return config diff --git a/pkg/client/unversioned/clientcmd/loader.go b/pkg/client/unversioned/clientcmd/loader.go index 3d2df1f7da..8988355de6 100644 --- a/pkg/client/unversioned/clientcmd/loader.go +++ b/pkg/client/unversioned/clientcmd/loader.go @@ -382,12 +382,6 @@ func WriteToFile(config clientcmdapi.Config, filename string) error { } } - err = lockFile(filename) - if err != nil { - return err - } - defer unlockFile(filename) - if err := ioutil.WriteFile(filename, content, 0600); err != nil { return err } @@ -397,6 +391,14 @@ func WriteToFile(config clientcmdapi.Config, filename string) error { func lockFile(filename string) error { // TODO: find a way to do this with actual file locks. Will // probably need seperate solution for windows and linux. + + // Make sure the dir exists before we try to create a lock file. + dir := filepath.Dir(filename) + if _, err := os.Stat(dir); os.IsNotExist(err) { + if err = os.MkdirAll(dir, 0755); err != nil { + return err + } + } f, err := os.OpenFile(lockName(filename), os.O_CREATE|os.O_EXCL, 0) if err != nil { return err From 2cce0151673d5583c97aaad0cc1ee8d9271c19d9 Mon Sep 17 00:00:00 2001 From: Garrett Rodrigues Date: Wed, 29 Jun 2016 16:46:44 -0700 Subject: [PATCH 294/339] fixed the typo causing incorrect comparison with cVer and cVer; now checking against sVer --- pkg/client/unversioned/helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/client/unversioned/helper.go b/pkg/client/unversioned/helper.go index 40b42695ff..d28226f505 100644 --- a/pkg/client/unversioned/helper.go +++ b/pkg/client/unversioned/helper.go @@ -143,7 +143,7 @@ func MatchesServerVersion(client *Client, c *restclient.Config) error { return fmt.Errorf("couldn't read version from server: %v\n", err) } // GitVersion includes GitCommit and GitTreeState, but best to be safe? - if cVer.GitVersion != sVer.GitVersion || cVer.GitCommit != sVer.GitCommit || cVer.GitTreeState != cVer.GitTreeState { + if cVer.GitVersion != sVer.GitVersion || cVer.GitCommit != sVer.GitCommit || cVer.GitTreeState != sVer.GitTreeState { return fmt.Errorf("server version (%#v) differs from client version (%#v)!\n", sVer, cVer) } From ef0c9f0c5b8efbba948a0be2c98d9d2e32e0b68c Mon Sep 17 00:00:00 2001 From: David McMahon Date: Thu, 2 Jun 2016 17:25:58 -0700 Subject: [PATCH 295/339] Remove "All rights reserved" from all the headers. --- Godeps/LICENSES | 4 ++-- LICENSE | 2 +- Makefile | 2 +- build/build-image/Dockerfile | 2 +- build/build-image/cross/Dockerfile | 2 +- build/build-image/cross/Makefile | 2 +- build/common.sh | 2 +- build/copy-output.sh | 2 +- build/debian-iptables/Dockerfile | 2 +- build/debian-iptables/Makefile | 2 +- build/json-extractor.py | 2 +- build/kube-dns/Dockerfile | 2 +- build/kube-dns/Makefile | 2 +- build/make-build-image.sh | 2 +- build/make-clean.sh | 2 +- build/make-release-notes.sh | 2 +- build/pause/Dockerfile | 2 +- build/pause/Makefile | 2 +- build/pause/pause.c | 2 +- build/push-ci-build.sh | 2 +- build/push-devel-build.sh | 2 +- build/push-federation-images.sh | 2 +- build/push-official-release.sh | 2 +- build/release.sh | 2 +- build/run.sh | 2 +- build/shell.sh | 2 +- build/util.sh | 2 +- build/versionize-docs.sh | 2 +- cluster/addons/addon-manager/Dockerfile | 2 +- cluster/addons/addon-manager/Makefile | 2 +- cluster/addons/addon-manager/kube-addon-update.sh | 2 +- cluster/addons/addon-manager/kube-addons.sh | 2 +- cluster/addons/fluentd-elasticsearch/es-image/Dockerfile | 2 +- cluster/addons/fluentd-elasticsearch/es-image/Makefile | 2 +- .../es-image/elasticsearch_logging_discovery.go | 2 +- cluster/addons/fluentd-elasticsearch/es-image/run.sh | 2 +- .../addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile | 2 +- .../addons/fluentd-elasticsearch/fluentd-es-image/Makefile | 2 +- cluster/addons/fluentd-elasticsearch/kibana-image/Dockerfile | 2 +- cluster/addons/fluentd-elasticsearch/kibana-image/Makefile | 2 +- cluster/addons/fluentd-elasticsearch/kibana-image/run.sh | 2 +- cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile | 2 +- cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile | 2 +- cluster/addons/python-image/Dockerfile | 2 +- cluster/addons/python-image/Makefile | 2 +- cluster/addons/registry/images/Dockerfile | 2 +- cluster/addons/registry/images/Makefile | 2 +- cluster/addons/registry/images/run_proxy.sh | 2 +- cluster/aws/common/common.sh | 2 +- cluster/aws/config-default.sh | 2 +- cluster/aws/config-test.sh | 2 +- cluster/aws/jessie/util.sh | 2 +- cluster/aws/templates/configure-vm-aws.sh | 2 +- cluster/aws/templates/format-disks.sh | 2 +- cluster/aws/util.sh | 2 +- cluster/aws/wily/util.sh | 2 +- cluster/azure-legacy/config-default.sh | 2 +- cluster/azure-legacy/templates/common.sh | 2 +- cluster/azure-legacy/templates/create-dynamic-salt-files.sh | 2 +- cluster/azure-legacy/templates/create-kubeconfig.sh | 2 +- cluster/azure-legacy/templates/download-release.sh | 2 +- cluster/azure-legacy/templates/salt-master.sh | 2 +- cluster/azure-legacy/templates/salt-minion.sh | 2 +- cluster/azure-legacy/util.sh | 2 +- cluster/azure/config-default.sh | 2 +- cluster/azure/util.sh | 2 +- cluster/centos/build.sh | 2 +- cluster/centos/config-build.sh | 2 +- cluster/centos/config-default.sh | 2 +- cluster/centos/config-test.sh | 2 +- cluster/centos/master/scripts/apiserver.sh | 2 +- cluster/centos/master/scripts/controller-manager.sh | 2 +- cluster/centos/master/scripts/etcd.sh | 2 +- cluster/centos/master/scripts/scheduler.sh | 2 +- cluster/centos/node/bin/mk-docker-opts.sh | 2 +- cluster/centos/node/bin/remove-docker0.sh | 2 +- cluster/centos/node/scripts/docker.sh | 2 +- cluster/centos/node/scripts/flannel.sh | 2 +- cluster/centos/node/scripts/kubelet.sh | 2 +- cluster/centos/node/scripts/proxy.sh | 2 +- cluster/centos/util.sh | 2 +- cluster/common.sh | 2 +- cluster/gce/config-common.sh | 2 +- cluster/gce/config-default.sh | 2 +- cluster/gce/config-test.sh | 2 +- cluster/gce/configure-vm.sh | 2 +- cluster/gce/coreos/configure-kubelet.sh | 2 +- cluster/gce/coreos/configure-node.sh | 2 +- cluster/gce/coreos/helper.sh | 2 +- cluster/gce/debian/helper.sh | 2 +- cluster/gce/delete-stranded-load-balancers.sh | 2 +- cluster/gce/gci/configure-helper.sh | 2 +- cluster/gce/gci/configure.sh | 2 +- cluster/gce/gci/health-monitor.sh | 2 +- cluster/gce/gci/helper.sh | 2 +- cluster/gce/list-resources.sh | 2 +- cluster/gce/trusty/configure-helper.sh | 2 +- cluster/gce/trusty/configure.sh | 2 +- cluster/gce/trusty/helper.sh | 2 +- cluster/gce/upgrade.sh | 2 +- cluster/gce/util.sh | 2 +- cluster/get-kube-local.sh | 2 +- cluster/get-kube.sh | 2 +- cluster/gke/config-common.sh | 2 +- cluster/gke/config-default.sh | 2 +- cluster/gke/config-test.sh | 2 +- cluster/gke/util.sh | 2 +- cluster/images/etcd/Dockerfile | 2 +- cluster/images/etcd/Makefile | 2 +- cluster/images/flannel/Dockerfile | 2 +- cluster/images/flannel/Makefile | 2 +- cluster/images/hyperkube/Dockerfile | 2 +- cluster/images/hyperkube/Makefile | 2 +- cluster/images/hyperkube/copy-addons.sh | 2 +- cluster/images/hyperkube/kube-proxy-ds.yaml | 2 +- cluster/images/hyperkube/setup-files.sh | 2 +- cluster/images/kubelet/Dockerfile | 2 +- cluster/images/kubelet/Makefile | 2 +- cluster/images/kubemark/Dockerfile | 2 +- cluster/images/kubemark/Makefile | 2 +- cluster/images/kubemark/build-kubemark.sh | 2 +- cluster/images/kubemark/kubemark.sh | 2 +- cluster/juju/config-default.sh | 2 +- cluster/juju/config-test.sh | 2 +- cluster/juju/identify-leaders.py | 2 +- cluster/juju/layers/kubernetes/actions/guestbook-example | 2 +- cluster/juju/layers/kubernetes/reactive/k8s.py | 2 +- cluster/juju/prereqs/ubuntu-juju.sh | 2 +- cluster/juju/return-node-ips.py | 2 +- cluster/juju/util.sh | 2 +- cluster/kube-down.sh | 2 +- cluster/kube-push.sh | 2 +- cluster/kube-up.sh | 2 +- cluster/kube-util.sh | 2 +- cluster/kubectl.sh | 2 +- cluster/kubemark/config-default.sh | 2 +- cluster/kubemark/util.sh | 2 +- cluster/lib/logging.sh | 2 +- cluster/lib/util.sh | 2 +- cluster/libvirt-coreos/config-default.sh | 2 +- cluster/libvirt-coreos/config-test.sh | 2 +- cluster/libvirt-coreos/util.sh | 2 +- cluster/local/util.sh | 3 +-- cluster/log-dump.sh | 2 +- cluster/mesos/docker/common/bin/await-file | 2 +- cluster/mesos/docker/common/bin/await-health-check | 2 +- cluster/mesos/docker/common/bin/health-check | 2 +- cluster/mesos/docker/config-default.sh | 2 +- cluster/mesos/docker/config-test.sh | 2 +- cluster/mesos/docker/deploy-addons.sh | 2 +- cluster/mesos/docker/deploy-dns.sh | 2 +- cluster/mesos/docker/deploy-ui.sh | 2 +- cluster/mesos/docker/km/Dockerfile | 2 +- cluster/mesos/docker/km/build.sh | 2 +- cluster/mesos/docker/socat/Dockerfile | 2 +- cluster/mesos/docker/socat/build.sh | 2 +- cluster/mesos/docker/test/Dockerfile | 2 +- cluster/mesos/docker/test/bin/install-etcd.sh | 2 +- cluster/mesos/docker/test/build.sh | 2 +- cluster/mesos/docker/util.sh | 2 +- cluster/openstack-heat/config-default.sh | 2 +- cluster/openstack-heat/config-image.sh | 2 +- cluster/openstack-heat/config-test.sh | 2 +- .../kubernetes-heat/fragments/configure-proxy.sh | 2 +- .../openstack-heat/kubernetes-heat/fragments/hostname-hack.sh | 2 +- .../kubernetes-heat/fragments/provision-network-master.sh | 2 +- .../kubernetes-heat/fragments/provision-network-node.sh | 2 +- cluster/openstack-heat/kubernetes-heat/fragments/run-salt.sh | 2 +- cluster/openstack-heat/openrc-default.sh | 2 +- cluster/openstack-heat/openrc-swift.sh | 2 +- cluster/openstack-heat/util.sh | 2 +- cluster/photon-controller/config-common.sh | 2 +- cluster/photon-controller/config-default.sh | 2 +- cluster/photon-controller/config-test.sh | 2 +- cluster/photon-controller/setup-prereq.sh | 2 +- .../photon-controller/templates/create-dynamic-salt-files.sh | 2 +- cluster/photon-controller/templates/hostname.sh | 2 +- cluster/photon-controller/templates/install-release.sh | 2 +- cluster/photon-controller/templates/salt-master.sh | 2 +- cluster/photon-controller/templates/salt-minion.sh | 2 +- cluster/photon-controller/util.sh | 2 +- cluster/rackspace/authorization.sh | 2 +- cluster/rackspace/config-default.sh | 2 +- cluster/rackspace/kube-up.sh | 2 +- cluster/rackspace/util.sh | 2 +- cluster/saltbase/install.sh | 2 +- cluster/saltbase/salt/docker/docker-healthcheck | 2 +- cluster/saltbase/salt/docker/docker-prestart | 2 +- cluster/saltbase/salt/generate-cert/make-ca-cert.sh | 2 +- cluster/saltbase/salt/generate-cert/make-cert.sh | 2 +- cluster/saltbase/salt/kube-dns/Makefile | 2 +- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base | 2 +- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in | 2 +- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed | 2 +- cluster/saltbase/salt/kube-dns/skydns-svc.yaml.base | 2 +- cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in | 2 +- cluster/saltbase/salt/kube-dns/skydns-svc.yaml.sed | 2 +- .../saltbase/salt/kube-master-addons/kube-master-addons.sh | 2 +- .../saltbase/salt/kube-node-unpacker/kube-node-unpacker.sh | 2 +- cluster/saltbase/salt/salt-helpers/pkg-apt | 2 +- cluster/saltbase/salt/salt-helpers/services | 2 +- cluster/saltbase/salt/supervisor/docker-checker.sh | 2 +- cluster/saltbase/salt/supervisor/kube-addons-checker.sh | 2 +- cluster/saltbase/salt/supervisor/kubelet-checker.sh | 2 +- cluster/saltbase/salt/supervisor/supervisor_watcher.sh | 2 +- cluster/skeleton/util.sh | 2 +- cluster/test-e2e.sh | 2 +- cluster/test-network.sh | 2 +- cluster/test-smoke.sh | 2 +- cluster/ubuntu/config-default.sh | 2 +- cluster/ubuntu/config-test.sh | 2 +- cluster/ubuntu/deployAddons.sh | 2 +- cluster/ubuntu/download-release.sh | 2 +- cluster/ubuntu/reconfDocker.sh | 2 +- cluster/ubuntu/util.sh | 2 +- cluster/update-storage-objects.sh | 2 +- cluster/vagrant/config-default.sh | 2 +- cluster/vagrant/config-test.sh | 2 +- cluster/vagrant/pod-ip-test.sh | 2 +- cluster/vagrant/provision-master.sh | 2 +- cluster/vagrant/provision-network-master.sh | 2 +- cluster/vagrant/provision-network-node.sh | 2 +- cluster/vagrant/provision-node.sh | 2 +- cluster/vagrant/provision-utils.sh | 2 +- cluster/vagrant/util.sh | 2 +- cluster/validate-cluster.sh | 2 +- cluster/vsphere/config-common.sh | 2 +- cluster/vsphere/config-default.sh | 2 +- cluster/vsphere/config-test.sh | 2 +- cluster/vsphere/templates/create-dynamic-salt-files.sh | 2 +- cluster/vsphere/templates/hostname.sh | 2 +- cluster/vsphere/templates/install-release.sh | 2 +- cluster/vsphere/templates/salt-master.sh | 2 +- cluster/vsphere/templates/salt-minion.sh | 2 +- cluster/vsphere/util.sh | 2 +- cmd/gendocs/gen_kubectl_docs.go | 2 +- cmd/genkubedocs/gen_kube_docs.go | 2 +- cmd/genman/gen_kubectl_man.go | 2 +- cmd/genswaggertypedocs/swagger_type_docs.go | 2 +- cmd/genutils/genutils.go | 2 +- cmd/genutils/genutils_test.go | 2 +- cmd/genyaml/gen_kubectl_yaml.go | 2 +- cmd/hyperkube/federation-apiserver.go | 2 +- cmd/hyperkube/federation-controller-manager.go | 2 +- cmd/hyperkube/hyperkube.go | 2 +- cmd/hyperkube/hyperkube_test.go | 2 +- cmd/hyperkube/kube-apiserver.go | 2 +- cmd/hyperkube/kube-controller-manager.go | 2 +- cmd/hyperkube/kube-proxy.go | 2 +- cmd/hyperkube/kube-scheduler.go | 2 +- cmd/hyperkube/kubectl.go | 2 +- cmd/hyperkube/kubelet.go | 2 +- cmd/hyperkube/main.go | 2 +- cmd/hyperkube/server.go | 2 +- cmd/integration/integration.go | 2 +- cmd/kube-apiserver/apiserver.go | 2 +- cmd/kube-apiserver/app/options/options.go | 2 +- cmd/kube-apiserver/app/options/options_test.go | 2 +- cmd/kube-apiserver/app/plugins.go | 2 +- cmd/kube-apiserver/app/server.go | 2 +- cmd/kube-apiserver/app/server_test.go | 2 +- cmd/kube-controller-manager/app/controllermanager.go | 2 +- cmd/kube-controller-manager/app/options/options.go | 2 +- cmd/kube-controller-manager/app/plugins.go | 2 +- cmd/kube-controller-manager/controller-manager.go | 2 +- cmd/kube-dns/app/options/options.go | 2 +- cmd/kube-dns/app/server.go | 2 +- cmd/kube-dns/dns.go | 2 +- cmd/kube-proxy/app/conntrack.go | 2 +- cmd/kube-proxy/app/options/options.go | 2 +- cmd/kube-proxy/app/server.go | 2 +- cmd/kube-proxy/app/server_test.go | 2 +- cmd/kube-proxy/proxy.go | 2 +- cmd/kubectl/app/kubectl.go | 2 +- cmd/kubectl/kubectl.go | 2 +- cmd/kubelet/app/options/options.go | 2 +- cmd/kubelet/app/plugins.go | 2 +- cmd/kubelet/app/server.go | 2 +- cmd/kubelet/app/server_linux.go | 2 +- cmd/kubelet/app/server_test.go | 2 +- cmd/kubelet/app/server_unsupported.go | 2 +- cmd/kubelet/kubelet.go | 2 +- cmd/kubemark/hollow-node.go | 2 +- .../discoverysummarizer/apis/config/v1alpha1/types.go | 2 +- .../discoverysummarizer/discoverysummarizer.go | 2 +- .../discoverysummarizer/discoverysummarizer_test.go | 2 +- cmd/kubernetes-discovery/discoverysummarizer/doc.go | 2 +- cmd/kubernetes-discovery/main.go | 2 +- cmd/libs/go2idl/args/args.go | 2 +- cmd/libs/go2idl/client-gen/args/args.go | 2 +- cmd/libs/go2idl/client-gen/generators/client_generator.go | 2 +- .../client-gen/generators/fake/fake_client_generator.go | 2 +- .../generators/fake/generator_fake_for_clientset.go | 2 +- .../client-gen/generators/fake/generator_fake_for_group.go | 2 +- .../client-gen/generators/fake/generator_fake_for_type.go | 2 +- .../go2idl/client-gen/generators/generator_for_clientset.go | 2 +- .../go2idl/client-gen/generators/generator_for_expansion.go | 2 +- cmd/libs/go2idl/client-gen/generators/generator_for_group.go | 2 +- cmd/libs/go2idl/client-gen/generators/generator_for_type.go | 2 +- .../client-gen/generators/normalization/normalization.go | 2 +- cmd/libs/go2idl/client-gen/main.go | 2 +- cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/doc.go | 2 +- .../client-gen/test_apis/testgroup.k8s.io/install/install.go | 2 +- .../go2idl/client-gen/test_apis/testgroup.k8s.io/register.go | 2 +- .../client-gen/test_apis/testgroup.k8s.io/types.generated.go | 2 +- .../go2idl/client-gen/test_apis/testgroup.k8s.io/types.go | 2 +- .../client-gen/test_apis/testgroup.k8s.io/v1/register.go | 2 +- .../test_apis/testgroup.k8s.io/v1/types.generated.go | 2 +- .../go2idl/client-gen/test_apis/testgroup.k8s.io/v1/types.go | 2 +- .../clientset_generated/test_internalclientset/clientset.go | 2 +- .../test_internalclientset/clientset_test.go | 2 +- .../clientset_generated/test_internalclientset/doc.go | 2 +- .../test_internalclientset/fake/clientset_generated.go | 2 +- .../clientset_generated/test_internalclientset/fake/doc.go | 2 +- .../typed/testgroup.k8s.io/unversioned/doc.go | 2 +- .../typed/testgroup.k8s.io/unversioned/fake/doc.go | 2 +- .../unversioned/fake/fake_testgroup_client.go | 2 +- .../typed/testgroup.k8s.io/unversioned/fake/fake_testtype.go | 2 +- .../unversioned/fake/fake_testtype_expansion.go | 2 +- .../typed/testgroup.k8s.io/unversioned/generated_expansion.go | 2 +- .../typed/testgroup.k8s.io/unversioned/testgroup_client.go | 2 +- .../typed/testgroup.k8s.io/unversioned/testgroup_test.go | 2 +- .../typed/testgroup.k8s.io/unversioned/testtype.go | 2 +- .../typed/testgroup.k8s.io/unversioned/testtype_expansion.go | 2 +- cmd/libs/go2idl/conversion-gen/generators/conversion.go | 2 +- cmd/libs/go2idl/conversion-gen/main.go | 2 +- cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go | 2 +- cmd/libs/go2idl/deepcopy-gen/main.go | 2 +- cmd/libs/go2idl/generator/default_generator.go | 2 +- cmd/libs/go2idl/generator/default_package.go | 2 +- cmd/libs/go2idl/generator/doc.go | 2 +- cmd/libs/go2idl/generator/error_tracker.go | 2 +- cmd/libs/go2idl/generator/execute.go | 2 +- cmd/libs/go2idl/generator/generator.go | 2 +- cmd/libs/go2idl/generator/import_tracker.go | 2 +- cmd/libs/go2idl/generator/snippet_writer.go | 2 +- cmd/libs/go2idl/generator/snippet_writer_test.go | 2 +- cmd/libs/go2idl/go-to-protobuf/build-image/Dockerfile | 2 +- cmd/libs/go2idl/go-to-protobuf/main.go | 2 +- cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go | 2 +- cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go | 2 +- cmd/libs/go2idl/go-to-protobuf/protobuf/import_tracker.go | 2 +- cmd/libs/go2idl/go-to-protobuf/protobuf/namer.go | 2 +- cmd/libs/go2idl/go-to-protobuf/protobuf/package.go | 2 +- cmd/libs/go2idl/go-to-protobuf/protobuf/parser.go | 2 +- cmd/libs/go2idl/go-to-protobuf/protoc-gen-gogo/main.go | 2 +- cmd/libs/go2idl/import-boss/generators/import_restrict.go | 2 +- .../go2idl/import-boss/generators/import_restrict_test.go | 2 +- cmd/libs/go2idl/import-boss/main.go | 2 +- cmd/libs/go2idl/namer/doc.go | 2 +- cmd/libs/go2idl/namer/import_tracker.go | 2 +- cmd/libs/go2idl/namer/namer.go | 2 +- cmd/libs/go2idl/namer/namer_test.go | 2 +- cmd/libs/go2idl/namer/order.go | 2 +- cmd/libs/go2idl/namer/plural_namer.go | 2 +- cmd/libs/go2idl/namer/plural_namer_test.go | 2 +- cmd/libs/go2idl/parser/doc.go | 2 +- cmd/libs/go2idl/parser/parse.go | 2 +- cmd/libs/go2idl/parser/parse_test.go | 2 +- cmd/libs/go2idl/set-gen/generators/sets.go | 2 +- cmd/libs/go2idl/set-gen/main.go | 2 +- cmd/libs/go2idl/types/comments.go | 2 +- cmd/libs/go2idl/types/comments_test.go | 2 +- cmd/libs/go2idl/types/doc.go | 2 +- cmd/libs/go2idl/types/flatten.go | 2 +- cmd/libs/go2idl/types/flatten_test.go | 2 +- cmd/libs/go2idl/types/types.go | 2 +- cmd/libs/go2idl/types/types_test.go | 2 +- cmd/linkcheck/links.go | 2 +- cmd/mungedocs/analytics.go | 2 +- cmd/mungedocs/analytics_test.go | 2 +- cmd/mungedocs/example_syncer.go | 2 +- cmd/mungedocs/example_syncer_test.go | 2 +- cmd/mungedocs/headers.go | 2 +- cmd/mungedocs/headers_test.go | 2 +- cmd/mungedocs/kubectl_dash_f.go | 2 +- cmd/mungedocs/kubectl_dash_f_test.go | 2 +- cmd/mungedocs/links.go | 2 +- cmd/mungedocs/links_test.go | 2 +- cmd/mungedocs/mungedocs.go | 2 +- cmd/mungedocs/preformatted.go | 2 +- cmd/mungedocs/preformatted_test.go | 2 +- cmd/mungedocs/toc.go | 2 +- cmd/mungedocs/toc_test.go | 2 +- cmd/mungedocs/unversioned_warning.go | 2 +- cmd/mungedocs/unversioned_warning_test.go | 2 +- cmd/mungedocs/util.go | 2 +- cmd/mungedocs/util_test.go | 2 +- cmd/mungedocs/whitespace.go | 2 +- cmd/mungedocs/whitespace_test.go | 2 +- contrib/mesos/ci/build-release.sh | 2 +- contrib/mesos/ci/build.sh | 2 +- contrib/mesos/ci/run-with-cluster.sh | 2 +- contrib/mesos/ci/run.sh | 2 +- contrib/mesos/ci/test-conformance.sh | 2 +- contrib/mesos/ci/test-e2e.sh | 2 +- contrib/mesos/ci/test-integration.sh | 2 +- contrib/mesos/ci/test-smoke.sh | 2 +- contrib/mesos/ci/test-unit.sh | 2 +- contrib/mesos/cmd/k8sm-controller-manager/doc.go | 2 +- contrib/mesos/cmd/k8sm-controller-manager/main.go | 2 +- contrib/mesos/cmd/k8sm-executor/doc.go | 2 +- contrib/mesos/cmd/k8sm-executor/main.go | 2 +- contrib/mesos/cmd/k8sm-scheduler/doc.go | 2 +- contrib/mesos/cmd/k8sm-scheduler/main.go | 2 +- contrib/mesos/cmd/km/doc.go | 2 +- contrib/mesos/cmd/km/hyperkube.go | 2 +- contrib/mesos/cmd/km/hyperkube_test.go | 2 +- contrib/mesos/cmd/km/k8sm-controllermanager.go | 2 +- contrib/mesos/cmd/km/k8sm-executor.go | 2 +- contrib/mesos/cmd/km/k8sm-minion.go | 2 +- contrib/mesos/cmd/km/k8sm-scheduler.go | 2 +- contrib/mesos/cmd/km/km.go | 2 +- contrib/mesos/cmd/km/kube-apiserver.go | 2 +- contrib/mesos/cmd/km/kube-proxy.go | 2 +- contrib/mesos/cmd/km/server.go | 2 +- contrib/mesos/pkg/assert/assert.go | 2 +- contrib/mesos/pkg/assert/doc.go | 2 +- contrib/mesos/pkg/backoff/backoff.go | 2 +- contrib/mesos/pkg/backoff/doc.go | 2 +- contrib/mesos/pkg/controllermanager/controllermanager.go | 2 +- contrib/mesos/pkg/controllermanager/doc.go | 2 +- contrib/mesos/pkg/election/doc.go | 2 +- contrib/mesos/pkg/election/etcd_master.go | 2 +- contrib/mesos/pkg/election/etcd_master_test.go | 2 +- contrib/mesos/pkg/election/fake.go | 2 +- contrib/mesos/pkg/election/master.go | 2 +- contrib/mesos/pkg/election/master_test.go | 2 +- contrib/mesos/pkg/executor/apis.go | 2 +- contrib/mesos/pkg/executor/config/config.go | 2 +- contrib/mesos/pkg/executor/config/doc.go | 2 +- contrib/mesos/pkg/executor/doc.go | 2 +- contrib/mesos/pkg/executor/executor.go | 2 +- contrib/mesos/pkg/executor/executor_test.go | 2 +- contrib/mesos/pkg/executor/messages/doc.go | 2 +- contrib/mesos/pkg/executor/messages/messages.go | 2 +- contrib/mesos/pkg/executor/mock_test.go | 2 +- contrib/mesos/pkg/executor/node.go | 2 +- contrib/mesos/pkg/executor/registry.go | 2 +- contrib/mesos/pkg/executor/service/cadvisor.go | 2 +- contrib/mesos/pkg/executor/service/doc.go | 2 +- contrib/mesos/pkg/executor/service/kubelet.go | 2 +- contrib/mesos/pkg/executor/service/podsource/podsource.go | 2 +- contrib/mesos/pkg/executor/service/service.go | 2 +- contrib/mesos/pkg/executor/suicide.go | 2 +- contrib/mesos/pkg/executor/suicide_test.go | 2 +- contrib/mesos/pkg/executor/watcher.go | 2 +- contrib/mesos/pkg/flagutil/cadvisor.go | 2 +- contrib/mesos/pkg/flagutil/cadvisor_linux.go | 2 +- contrib/mesos/pkg/hyperkube/doc.go | 2 +- contrib/mesos/pkg/hyperkube/hyperkube.go | 2 +- contrib/mesos/pkg/hyperkube/types.go | 2 +- contrib/mesos/pkg/minion/config/config.go | 2 +- contrib/mesos/pkg/minion/config/doc.go | 2 +- contrib/mesos/pkg/minion/doc.go | 2 +- contrib/mesos/pkg/minion/mountns_darwin.go | 2 +- contrib/mesos/pkg/minion/mountns_linux.go | 2 +- contrib/mesos/pkg/minion/server.go | 2 +- contrib/mesos/pkg/minion/tasks/doc.go | 2 +- contrib/mesos/pkg/minion/tasks/events.go | 2 +- contrib/mesos/pkg/minion/tasks/task.go | 2 +- contrib/mesos/pkg/minion/tasks/task_linux.go | 2 +- contrib/mesos/pkg/minion/tasks/task_other.go | 2 +- contrib/mesos/pkg/minion/tasks/task_test.go | 2 +- contrib/mesos/pkg/minion/tasks/timer.go | 2 +- contrib/mesos/pkg/node/doc.go | 2 +- contrib/mesos/pkg/node/node.go | 2 +- contrib/mesos/pkg/node/registrator.go | 2 +- contrib/mesos/pkg/node/registrator_test.go | 2 +- contrib/mesos/pkg/node/statusupdater.go | 2 +- contrib/mesos/pkg/node/statusupdater_test.go | 2 +- contrib/mesos/pkg/offers/doc.go | 2 +- contrib/mesos/pkg/offers/metrics/doc.go | 2 +- contrib/mesos/pkg/offers/metrics/metrics.go | 2 +- contrib/mesos/pkg/offers/offers.go | 2 +- contrib/mesos/pkg/offers/offers_test.go | 2 +- contrib/mesos/pkg/podutil/doc.go | 2 +- contrib/mesos/pkg/podutil/filters.go | 2 +- contrib/mesos/pkg/podutil/gzip.go | 2 +- contrib/mesos/pkg/podutil/gzip_test.go | 2 +- contrib/mesos/pkg/podutil/io.go | 2 +- contrib/mesos/pkg/proc/adapter.go | 2 +- contrib/mesos/pkg/proc/doc.go | 2 +- contrib/mesos/pkg/proc/errors.go | 2 +- contrib/mesos/pkg/proc/once.go | 2 +- contrib/mesos/pkg/proc/proc.go | 2 +- contrib/mesos/pkg/proc/proc_test.go | 2 +- contrib/mesos/pkg/proc/state.go | 2 +- contrib/mesos/pkg/proc/types.go | 2 +- contrib/mesos/pkg/profile/doc.go | 2 +- contrib/mesos/pkg/profile/profile.go | 2 +- contrib/mesos/pkg/queue/delay.go | 2 +- contrib/mesos/pkg/queue/delay_test.go | 2 +- contrib/mesos/pkg/queue/doc.go | 2 +- contrib/mesos/pkg/queue/historical.go | 2 +- contrib/mesos/pkg/queue/historical_test.go | 2 +- contrib/mesos/pkg/queue/interface.go | 2 +- contrib/mesos/pkg/queue/policy.go | 2 +- contrib/mesos/pkg/queue/priority.go | 2 +- contrib/mesos/pkg/redirfd/doc.go | 2 +- contrib/mesos/pkg/redirfd/file_descriptor.go | 2 +- contrib/mesos/pkg/redirfd/file_descriptor_test.go | 2 +- contrib/mesos/pkg/redirfd/redirfd_unix.go | 2 +- contrib/mesos/pkg/redirfd/redirfd_windows.go | 2 +- contrib/mesos/pkg/runtime/doc.go | 2 +- contrib/mesos/pkg/runtime/latch.go | 2 +- contrib/mesos/pkg/runtime/latch_test.go | 2 +- contrib/mesos/pkg/runtime/metrics.go | 2 +- contrib/mesos/pkg/runtime/util.go | 2 +- contrib/mesos/pkg/runtime/util_test.go | 2 +- contrib/mesos/pkg/scheduler/components/algorithm/algorithm.go | 2 +- contrib/mesos/pkg/scheduler/components/algorithm/doc.go | 2 +- .../pkg/scheduler/components/algorithm/podschedulers/doc.go | 2 +- .../pkg/scheduler/components/algorithm/podschedulers/fcfs.go | 2 +- .../pkg/scheduler/components/algorithm/podschedulers/types.go | 2 +- contrib/mesos/pkg/scheduler/components/binder/binder.go | 2 +- contrib/mesos/pkg/scheduler/components/binder/doc.go | 2 +- .../mesos/pkg/scheduler/components/controller/controller.go | 2 +- contrib/mesos/pkg/scheduler/components/controller/doc.go | 2 +- contrib/mesos/pkg/scheduler/components/deleter/deleter.go | 2 +- .../mesos/pkg/scheduler/components/deleter/deleter_test.go | 2 +- contrib/mesos/pkg/scheduler/components/deleter/doc.go | 2 +- contrib/mesos/pkg/scheduler/components/doc.go | 2 +- contrib/mesos/pkg/scheduler/components/errorhandler/doc.go | 2 +- .../pkg/scheduler/components/errorhandler/errorhandler.go | 2 +- contrib/mesos/pkg/scheduler/components/framework/doc.go | 2 +- .../mesos/pkg/scheduler/components/framework/driver_mock.go | 2 +- contrib/mesos/pkg/scheduler/components/framework/framework.go | 2 +- .../pkg/scheduler/components/framework/framework_test.go | 2 +- .../scheduler/components/framework/frameworkid/etcd/etcd.go | 2 +- .../scheduler/components/framework/frameworkid/frameworkid.go | 2 +- .../pkg/scheduler/components/framework/frameworkid/zk/zk.go | 2 +- .../mesos/pkg/scheduler/components/framework/slaveregistry.go | 2 +- .../pkg/scheduler/components/framework/slaveregistry_test.go | 2 +- contrib/mesos/pkg/scheduler/components/podreconciler/doc.go | 2 +- .../pkg/scheduler/components/podreconciler/podreconciler.go | 2 +- contrib/mesos/pkg/scheduler/components/podstoreadapter.go | 2 +- contrib/mesos/pkg/scheduler/components/scheduler.go | 2 +- contrib/mesos/pkg/scheduler/components/tasksreconciler/doc.go | 2 +- .../scheduler/components/tasksreconciler/tasksreconciler.go | 2 +- contrib/mesos/pkg/scheduler/config/config.go | 2 +- contrib/mesos/pkg/scheduler/config/config_test.go | 2 +- contrib/mesos/pkg/scheduler/config/doc.go | 2 +- contrib/mesos/pkg/scheduler/constraint/constraint.go | 2 +- contrib/mesos/pkg/scheduler/constraint/constraint_test.go | 2 +- contrib/mesos/pkg/scheduler/constraint/doc.go | 2 +- contrib/mesos/pkg/scheduler/doc.go | 2 +- contrib/mesos/pkg/scheduler/errors/doc.go | 2 +- contrib/mesos/pkg/scheduler/errors/errors.go | 2 +- contrib/mesos/pkg/scheduler/executorinfo/codec.go | 2 +- contrib/mesos/pkg/scheduler/executorinfo/codec_test.go | 2 +- contrib/mesos/pkg/scheduler/executorinfo/doc.go | 2 +- contrib/mesos/pkg/scheduler/executorinfo/id.go | 2 +- contrib/mesos/pkg/scheduler/executorinfo/lru_cache.go | 2 +- contrib/mesos/pkg/scheduler/executorinfo/lru_cache_test.go | 2 +- contrib/mesos/pkg/scheduler/executorinfo/registry.go | 2 +- contrib/mesos/pkg/scheduler/executorinfo/registry_test.go | 2 +- contrib/mesos/pkg/scheduler/ha/doc.go | 2 +- contrib/mesos/pkg/scheduler/ha/election.go | 2 +- contrib/mesos/pkg/scheduler/ha/ha.go | 2 +- contrib/mesos/pkg/scheduler/integration/doc.go | 2 +- contrib/mesos/pkg/scheduler/integration/integration_test.go | 2 +- contrib/mesos/pkg/scheduler/meta/annotations.go | 2 +- contrib/mesos/pkg/scheduler/meta/doc.go | 2 +- contrib/mesos/pkg/scheduler/meta/store.go | 2 +- contrib/mesos/pkg/scheduler/metrics/doc.go | 2 +- contrib/mesos/pkg/scheduler/metrics/metrics.go | 2 +- contrib/mesos/pkg/scheduler/podtask/debug.go | 2 +- contrib/mesos/pkg/scheduler/podtask/doc.go | 2 +- contrib/mesos/pkg/scheduler/podtask/hostport/mapper.go | 2 +- contrib/mesos/pkg/scheduler/podtask/hostport/mapper_test.go | 2 +- contrib/mesos/pkg/scheduler/podtask/leaky.go | 2 +- contrib/mesos/pkg/scheduler/podtask/pod_task.go | 2 +- contrib/mesos/pkg/scheduler/podtask/pod_task_test.go | 2 +- contrib/mesos/pkg/scheduler/podtask/procurement.go | 2 +- contrib/mesos/pkg/scheduler/podtask/procurement_test.go | 2 +- contrib/mesos/pkg/scheduler/podtask/registry.go | 2 +- contrib/mesos/pkg/scheduler/podtask/registry_test.go | 2 +- contrib/mesos/pkg/scheduler/podtask/roles.go | 2 +- contrib/mesos/pkg/scheduler/podtask/roles_test.go | 2 +- contrib/mesos/pkg/scheduler/queuer/doc.go | 2 +- contrib/mesos/pkg/scheduler/queuer/pod.go | 2 +- contrib/mesos/pkg/scheduler/queuer/queuer.go | 2 +- contrib/mesos/pkg/scheduler/resources/doc.go | 2 +- contrib/mesos/pkg/scheduler/resources/resource.go | 2 +- contrib/mesos/pkg/scheduler/resources/resource_test.go | 2 +- contrib/mesos/pkg/scheduler/resources/resources.go | 2 +- contrib/mesos/pkg/scheduler/resources/types.go | 2 +- contrib/mesos/pkg/scheduler/scheduler.go | 2 +- contrib/mesos/pkg/scheduler/scheduler_mock.go | 2 +- contrib/mesos/pkg/scheduler/service/compat_testing.go | 2 +- contrib/mesos/pkg/scheduler/service/compat_unix.go | 2 +- contrib/mesos/pkg/scheduler/service/compat_windows.go | 2 +- contrib/mesos/pkg/scheduler/service/doc.go | 2 +- contrib/mesos/pkg/scheduler/service/publish.go | 2 +- contrib/mesos/pkg/scheduler/service/service.go | 2 +- contrib/mesos/pkg/scheduler/service/service_test.go | 2 +- contrib/mesos/pkg/scheduler/service/validation.go | 2 +- contrib/mesos/pkg/scheduler/service/validation_test.go | 2 +- contrib/mesos/pkg/service/doc.go | 2 +- contrib/mesos/pkg/service/endpoints_controller.go | 2 +- contrib/mesos/pkg/service/endpoints_controller_test.go | 2 +- contrib/mesos/target.sh | 2 +- docs/design/clustering/Dockerfile | 2 +- docs/design/clustering/Makefile | 2 +- .../coreos/azure/expose_guestbook_app_port.sh | 2 +- .../environment-guide/containers/backend/Dockerfile | 2 +- .../environment-guide/containers/backend/backend.go | 2 +- docs/user-guide/environment-guide/containers/show/Dockerfile | 2 +- docs/user-guide/environment-guide/containers/show/show.go | 2 +- docs/user-guide/horizontal-pod-autoscaling/image/Dockerfile | 2 +- docs/user-guide/liveness/image/Dockerfile | 2 +- docs/user-guide/liveness/image/Makefile | 2 +- docs/user-guide/liveness/image/server.go | 2 +- docs/user-guide/logging-demo/Makefile | 2 +- docs/user-guide/update-demo/build-images.sh | 2 +- docs/user-guide/update-demo/images/kitten/Dockerfile | 2 +- docs/user-guide/update-demo/images/nautilus/Dockerfile | 2 +- examples/apiserver/apiserver.go | 2 +- examples/apiserver/apiserver_test.go | 2 +- examples/apiserver/rest/reststorage.go | 2 +- examples/apiserver/server/main.go | 2 +- examples/cassandra/image/Dockerfile | 2 +- examples/cassandra/image/Makefile | 2 +- examples/cassandra/image/run.sh | 2 +- examples/celery-rabbitmq/celery-app-add/Dockerfile | 2 +- examples/celery-rabbitmq/celery-app-add/celery_conf.py | 2 +- examples/celery-rabbitmq/celery-app-add/run.sh | 2 +- examples/celery-rabbitmq/celery-app-add/run_tasks.py | 2 +- examples/celery-rabbitmq/flower/Dockerfile | 2 +- examples/celery-rabbitmq/flower/run_flower.sh | 2 +- examples/cluster-dns/images/backend/Dockerfile | 2 +- examples/cluster-dns/images/backend/Makefile | 2 +- examples/cluster-dns/images/backend/server.py | 2 +- examples/cluster-dns/images/frontend/Dockerfile | 2 +- examples/cluster-dns/images/frontend/Makefile | 2 +- examples/cluster-dns/images/frontend/client.py | 2 +- examples/doc.go | 2 +- examples/examples_test.go | 2 +- examples/explorer/Dockerfile | 2 +- examples/explorer/Makefile | 2 +- examples/explorer/explorer.go | 2 +- examples/flexvolume/lvm | 2 +- examples/guestbook-go/_src/Dockerfile | 2 +- examples/guestbook-go/_src/Makefile | 2 +- examples/guestbook-go/_src/guestbook/Dockerfile | 2 +- examples/guestbook-go/_src/main.go | 2 +- examples/guestbook/php-redis/Dockerfile | 2 +- examples/guestbook/redis-slave/Dockerfile | 2 +- examples/guestbook/redis-slave/run.sh | 2 +- examples/hazelcast/image/Dockerfile | 2 +- examples/https-nginx/Dockerfile | 2 +- examples/https-nginx/Makefile | 2 +- examples/https-nginx/make_secret.go | 2 +- examples/job/work-queue-1/Dockerfile | 2 +- examples/job/work-queue-1/README.md | 2 +- examples/job/work-queue-1/worker.py | 2 +- examples/job/work-queue-2/Dockerfile | 2 +- examples/job/work-queue-2/README.md | 2 +- examples/job/work-queue-2/rediswq.py | 2 +- examples/job/work-queue-2/worker.py | 2 +- examples/k8petstore/build-push-containers.sh | 2 +- examples/k8petstore/docker-machine-dev.sh | 2 +- examples/k8petstore/k8petstore-loadbalancer.sh | 2 +- examples/k8petstore/k8petstore-nodeport.sh | 2 +- examples/k8petstore/k8petstore.sh | 2 +- examples/k8petstore/redis-master/Dockerfile | 2 +- examples/k8petstore/redis-slave/Dockerfile | 2 +- examples/k8petstore/redis-slave/run.sh | 2 +- examples/k8petstore/redis/Dockerfile | 2 +- examples/k8petstore/web-server/Dockerfile | 2 +- examples/k8petstore/web-server/src/main.go | 2 +- examples/k8petstore/web-server/test.sh | 2 +- examples/kubectl-container/Dockerfile | 2 +- examples/kubectl-container/Makefile | 2 +- examples/meteor/dockerbase/Dockerfile | 2 +- examples/mysql-galera/image/Dockerfile | 2 +- examples/mysql-galera/image/docker-entrypoint.sh | 2 +- examples/newrelic/config-to-secret.sh | 2 +- examples/nfs/nfs-data/Dockerfile | 2 +- examples/nfs/nfs-data/run_nfs.sh | 2 +- examples/openshift-origin/cleanup.sh | 2 +- examples/openshift-origin/create.sh | 2 +- examples/phabricator/php-phabricator/Dockerfile | 2 +- examples/phabricator/php-phabricator/run.sh | 2 +- examples/phabricator/setup.sh | 2 +- examples/phabricator/teardown.sh | 2 +- examples/redis/image/Dockerfile | 2 +- examples/redis/image/run.sh | 2 +- examples/rethinkdb/gen-pod.sh | 2 +- examples/rethinkdb/image/Dockerfile | 2 +- examples/rethinkdb/image/run.sh | 2 +- examples/selenium/selenium-test.py | 2 +- examples/sharing-clusters/make_secret.go | 2 +- examples/vitess/configure.sh | 2 +- examples/vitess/env.sh | 2 +- examples/vitess/etcd-down.sh | 2 +- examples/vitess/etcd-up.sh | 2 +- examples/vitess/guestbook-down.sh | 2 +- examples/vitess/guestbook-up.sh | 2 +- examples/vitess/vitess-down.sh | 2 +- examples/vitess/vitess-up.sh | 2 +- examples/vitess/vtctld-down.sh | 2 +- examples/vitess/vtctld-up.sh | 2 +- examples/vitess/vtgate-down.sh | 2 +- examples/vitess/vtgate-up.sh | 2 +- examples/vitess/vttablet-down.sh | 2 +- examples/vitess/vttablet-up.sh | 2 +- federation/apis/core/conversion.go | 2 +- federation/apis/core/deep_copy.go | 2 +- federation/apis/core/install/install.go | 2 +- federation/apis/core/register.go | 2 +- federation/apis/core/v1/conversion.go | 2 +- federation/apis/core/v1/deep_copy.go | 2 +- federation/apis/core/v1/defaults.go | 2 +- federation/apis/core/v1/register.go | 2 +- federation/apis/federation/deep_copy_generated.go | 2 +- federation/apis/federation/install/install.go | 2 +- federation/apis/federation/install/install_test.go | 2 +- federation/apis/federation/register.go | 2 +- federation/apis/federation/types.generated.go | 2 +- federation/apis/federation/types.go | 2 +- federation/apis/federation/v1beta1/conversion.go | 2 +- federation/apis/federation/v1beta1/conversion_generated.go | 2 +- federation/apis/federation/v1beta1/deep_copy_generated.go | 2 +- federation/apis/federation/v1beta1/defaults.go | 2 +- federation/apis/federation/v1beta1/doc.go | 2 +- federation/apis/federation/v1beta1/generated.pb.go | 2 +- federation/apis/federation/v1beta1/generated.proto | 2 +- federation/apis/federation/v1beta1/register.go | 2 +- federation/apis/federation/v1beta1/types.generated.go | 2 +- federation/apis/federation/v1beta1/types.go | 2 +- federation/apis/federation/validation/validation.go | 2 +- federation/apis/federation/validation/validation_test.go | 2 +- federation/client/cache/cluster_cache.go | 2 +- .../federation_internalclientset/clientset.go | 2 +- .../clientset_generated/federation_internalclientset/doc.go | 2 +- .../federation_internalclientset/fake/clientset_generated.go | 2 +- .../federation_internalclientset/fake/doc.go | 2 +- .../federation_internalclientset/import_known_versions.go | 2 +- .../typed/core/unversioned/core_client.go | 2 +- .../typed/core/unversioned/doc.go | 2 +- .../typed/core/unversioned/fake/doc.go | 2 +- .../typed/core/unversioned/fake/fake_core_client.go | 2 +- .../typed/core/unversioned/fake/fake_service.go | 2 +- .../typed/core/unversioned/generated_expansion.go | 2 +- .../typed/core/unversioned/service.go | 2 +- .../typed/federation/unversioned/cluster.go | 2 +- .../typed/federation/unversioned/doc.go | 2 +- .../typed/federation/unversioned/fake/doc.go | 2 +- .../typed/federation/unversioned/fake/fake_cluster.go | 2 +- .../federation/unversioned/fake/fake_federation_client.go | 2 +- .../typed/federation/unversioned/federation_client.go | 2 +- .../typed/federation/unversioned/generated_expansion.go | 2 +- .../clientset_generated/federation_release_1_3/clientset.go | 2 +- .../client/clientset_generated/federation_release_1_3/doc.go | 2 +- .../federation_release_1_3/fake/clientset_generated.go | 2 +- .../clientset_generated/federation_release_1_3/fake/doc.go | 2 +- .../federation_release_1_3/import_known_versions.go | 2 +- .../federation_release_1_3/typed/core/v1/core_client.go | 2 +- .../federation_release_1_3/typed/core/v1/doc.go | 2 +- .../federation_release_1_3/typed/core/v1/fake/doc.go | 2 +- .../typed/core/v1/fake/fake_core_client.go | 2 +- .../federation_release_1_3/typed/core/v1/fake/fake_service.go | 2 +- .../typed/core/v1/generated_expansion.go | 2 +- .../federation_release_1_3/typed/core/v1/service.go | 2 +- .../typed/federation/v1beta1/cluster.go | 2 +- .../federation_release_1_3/typed/federation/v1beta1/doc.go | 2 +- .../typed/federation/v1beta1/fake/doc.go | 2 +- .../typed/federation/v1beta1/fake/fake_cluster.go | 2 +- .../typed/federation/v1beta1/fake/fake_federation_client.go | 2 +- .../typed/federation/v1beta1/federation_client.go | 2 +- .../typed/federation/v1beta1/generated_expansion.go | 2 +- federation/cluster/common.sh | 2 +- federation/cluster/federation-down.sh | 2 +- federation/cluster/federation-up.sh | 2 +- federation/cluster/template.go | 2 +- federation/cmd/federation-apiserver/apiserver.go | 2 +- federation/cmd/federation-apiserver/app/core.go | 2 +- federation/cmd/federation-apiserver/app/federation.go | 2 +- federation/cmd/federation-apiserver/app/plugins.go | 2 +- federation/cmd/federation-apiserver/app/server.go | 2 +- federation/cmd/federation-apiserver/app/server_test.go | 2 +- .../federation-controller-manager/app/controllermanager.go | 2 +- .../cmd/federation-controller-manager/app/options/options.go | 2 +- federation/cmd/federation-controller-manager/app/plugins.go | 2 +- .../cmd/federation-controller-manager/controller-manager.go | 2 +- federation/cmd/genfeddocs/gen_fed_docs.go | 2 +- federation/pkg/dnsprovider/dns.go | 2 +- federation/pkg/dnsprovider/doc.go | 2 +- federation/pkg/dnsprovider/plugins.go | 2 +- federation/pkg/dnsprovider/providers/aws/route53/interface.go | 2 +- federation/pkg/dnsprovider/providers/aws/route53/route53.go | 2 +- .../pkg/dnsprovider/providers/aws/route53/route53_test.go | 2 +- federation/pkg/dnsprovider/providers/aws/route53/rrset.go | 2 +- federation/pkg/dnsprovider/providers/aws/route53/rrsets.go | 2 +- .../pkg/dnsprovider/providers/aws/route53/stubs/route53api.go | 2 +- federation/pkg/dnsprovider/providers/aws/route53/zone.go | 2 +- federation/pkg/dnsprovider/providers/aws/route53/zones.go | 2 +- .../pkg/dnsprovider/providers/google/clouddns/clouddns.go | 2 +- .../dnsprovider/providers/google/clouddns/clouddns_test.go | 2 +- .../pkg/dnsprovider/providers/google/clouddns/interface.go | 2 +- .../dnsprovider/providers/google/clouddns/internal/change.go | 2 +- .../providers/google/clouddns/internal/changes_create_call.go | 2 +- .../providers/google/clouddns/internal/changes_service.go | 2 +- .../providers/google/clouddns/internal/clouddns.go | 2 +- .../google/clouddns/internal/interfaces/interfaces.go | 2 +- .../providers/google/clouddns/internal/managed_zone.go | 2 +- .../google/clouddns/internal/managed_zone_create_call.go | 2 +- .../google/clouddns/internal/managed_zones_delete_call.go | 2 +- .../google/clouddns/internal/managed_zones_get_call.go | 2 +- .../google/clouddns/internal/managed_zones_list_call.go | 2 +- .../google/clouddns/internal/managed_zones_list_response.go | 2 +- .../google/clouddns/internal/managed_zones_service.go | 2 +- .../dnsprovider/providers/google/clouddns/internal/rrset.go | 2 +- .../providers/google/clouddns/internal/rrsets_list_call.go | 2 +- .../google/clouddns/internal/rrsets_list_response.go | 2 +- .../providers/google/clouddns/internal/rrsets_service.go | 2 +- .../dnsprovider/providers/google/clouddns/internal/service.go | 2 +- .../providers/google/clouddns/internal/stubs/change.go | 2 +- .../google/clouddns/internal/stubs/changes_create_call.go | 2 +- .../google/clouddns/internal/stubs/changes_service.go | 2 +- .../providers/google/clouddns/internal/stubs/clouddns.go | 2 +- .../providers/google/clouddns/internal/stubs/managed_zone.go | 2 +- .../clouddns/internal/stubs/managed_zone_create_call.go | 2 +- .../clouddns/internal/stubs/managed_zones_delete_call.go | 2 +- .../google/clouddns/internal/stubs/managed_zones_get_call.go | 2 +- .../google/clouddns/internal/stubs/managed_zones_list_call.go | 2 +- .../clouddns/internal/stubs/managed_zones_list_response.go | 2 +- .../google/clouddns/internal/stubs/managed_zones_service.go | 2 +- .../providers/google/clouddns/internal/stubs/rrset.go | 2 +- .../google/clouddns/internal/stubs/rrsets_list_call.go | 2 +- .../google/clouddns/internal/stubs/rrsets_list_response.go | 2 +- .../google/clouddns/internal/stubs/rrsets_service.go | 2 +- .../providers/google/clouddns/internal/stubs/service.go | 2 +- federation/pkg/dnsprovider/providers/google/clouddns/rrset.go | 2 +- .../pkg/dnsprovider/providers/google/clouddns/rrsets.go | 2 +- federation/pkg/dnsprovider/providers/google/clouddns/zone.go | 2 +- federation/pkg/dnsprovider/providers/google/clouddns/zones.go | 2 +- federation/pkg/dnsprovider/rrstype/rrstype.go | 2 +- .../pkg/federation-controller/cluster/cluster_client.go | 2 +- .../pkg/federation-controller/cluster/clustercontroller.go | 2 +- .../federation-controller/cluster/clustercontroller_test.go | 2 +- federation/pkg/federation-controller/cluster/doc.go | 2 +- federation/pkg/federation-controller/doc.go | 2 +- .../pkg/federation-controller/service/cluster_helper.go | 2 +- federation/pkg/federation-controller/service/dns.go | 2 +- federation/pkg/federation-controller/service/doc.go | 2 +- .../pkg/federation-controller/service/endpoint_helper.go | 2 +- .../pkg/federation-controller/service/endpoint_helper_test.go | 2 +- .../pkg/federation-controller/service/service_helper.go | 2 +- .../pkg/federation-controller/service/service_helper_test.go | 2 +- .../pkg/federation-controller/service/servicecontroller.go | 2 +- .../federation-controller/service/servicecontroller_test.go | 2 +- federation/pkg/federation-controller/util/cluster_util.go | 2 +- federation/registry/cluster/etcd/etcd.go | 2 +- federation/registry/cluster/etcd/etcd_test.go | 2 +- federation/registry/cluster/registry.go | 2 +- federation/registry/cluster/strategy.go | 2 +- federation/registry/cluster/strategy_test.go | 2 +- hack/benchmark-go.sh | 2 +- hack/benchmark-integration.sh | 2 +- hack/boilerplate/boilerplate.Dockerfile.txt | 2 +- hack/boilerplate/boilerplate.Makefile.txt | 2 +- hack/boilerplate/boilerplate.go.txt | 2 +- hack/boilerplate/boilerplate.py | 2 +- hack/boilerplate/boilerplate.py.txt | 2 +- hack/boilerplate/boilerplate.sh.txt | 2 +- hack/build-cross.sh | 2 +- hack/build-go.sh | 2 +- hack/build-ui.sh | 2 +- hack/cherry_pick_pull.sh | 2 +- hack/cmd/teststale/teststale.go | 2 +- hack/cmd/teststale/teststale_test.go | 2 +- hack/dev-build-and-push.sh | 2 +- hack/dev-build-and-up.sh | 2 +- hack/dev-push-hyperkube.sh | 2 +- hack/e2e-internal/build-release.sh | 2 +- hack/e2e-internal/e2e-cluster-size.sh | 2 +- hack/e2e-internal/e2e-down.sh | 2 +- hack/e2e-internal/e2e-push.sh | 2 +- hack/e2e-internal/e2e-status.sh | 2 +- hack/e2e-internal/e2e-up.sh | 2 +- hack/e2e-node-test.sh | 2 +- hack/e2e.go | 2 +- hack/federated-ginkgo-e2e.sh | 2 +- hack/gen-swagger-doc/Dockerfile | 2 +- hack/gen-swagger-doc/gen-swagger-docs.sh | 2 +- hack/generate-docs.sh | 2 +- hack/get-build.sh | 2 +- hack/ginkgo-e2e.sh | 2 +- hack/godep-save.sh | 2 +- hack/grab-profiles.sh | 2 +- hack/install-etcd.sh | 2 +- hack/jenkins/build.sh | 2 +- hack/jenkins/dockerized-e2e-runner.sh | 2 +- hack/jenkins/e2e-runner.sh | 2 +- hack/jenkins/gotest-dockerized.sh | 2 +- hack/jenkins/gotest.sh | 2 +- hack/jenkins/test-dockerized.sh | 2 +- hack/jenkins/test-image/Dockerfile | 2 +- hack/jenkins/test-image/Makefile | 2 +- hack/jenkins/upload-finished.sh | 2 +- hack/jenkins/upload-started.sh | 2 +- hack/jenkins/upload-to-gcs.sh | 2 +- hack/jenkins/verify-dockerized.sh | 2 +- hack/jenkins/verify.sh | 2 +- hack/lib/etcd.sh | 2 +- hack/lib/golang.sh | 2 +- hack/lib/init.sh | 2 +- hack/lib/test.sh | 2 +- hack/lib/util.sh | 2 +- hack/lib/version.sh | 2 +- hack/list-feature-tests.sh | 2 +- hack/local-up-cluster.sh | 2 +- hack/lookup_pull.py | 2 +- hack/test-cmd.sh | 2 +- hack/test-go.sh | 2 +- hack/test-integration.sh | 2 +- hack/test-update-storage-objects.sh | 2 +- hack/update-all.sh | 2 +- hack/update-api-reference-docs.sh | 2 +- hack/update-codecgen.sh | 2 +- hack/update-codegen.sh | 2 +- hack/update-generated-docs.sh | 2 +- hack/update-generated-protobuf-dockerized.sh | 2 +- hack/update-generated-protobuf.sh | 2 +- hack/update-generated-swagger-docs.sh | 2 +- hack/update-godep-licenses.sh | 2 +- hack/update-gofmt.sh | 2 +- hack/update-munge-docs.sh | 2 +- hack/update-swagger-spec.sh | 2 +- hack/verify-all.sh | 2 +- hack/verify-api-reference-docs.sh | 2 +- hack/verify-boilerplate.sh | 2 +- hack/verify-codecgen.sh | 2 +- hack/verify-codegen.sh | 2 +- hack/verify-description.sh | 2 +- hack/verify-flags-underscore.py | 2 +- hack/verify-generated-docs.sh | 2 +- hack/verify-generated-protobuf.sh | 2 +- hack/verify-generated-swagger-docs.sh | 2 +- hack/verify-godep-licenses.sh | 2 +- hack/verify-godeps.sh | 2 +- hack/verify-gofmt.sh | 2 +- hack/verify-govet.sh | 2 +- hack/verify-import-boss.sh | 2 +- hack/verify-linkcheck.sh | 2 +- hack/verify-munge-docs.sh | 2 +- hack/verify-swagger-spec.sh | 2 +- hack/verify-symbols.sh | 2 +- hack/verify-test-images.sh | 2 +- pkg/admission/attributes.go | 2 +- pkg/admission/chain.go | 2 +- pkg/admission/chain_test.go | 2 +- pkg/admission/errors.go | 2 +- pkg/admission/handler.go | 2 +- pkg/admission/interfaces.go | 2 +- pkg/admission/plugins.go | 2 +- pkg/api/annotations/annotations.go | 2 +- pkg/api/annotations/doc.go | 2 +- pkg/api/context.go | 2 +- pkg/api/context_test.go | 2 +- pkg/api/conversion.go | 2 +- pkg/api/conversion_test.go | 2 +- pkg/api/copy_test.go | 2 +- pkg/api/deep_copy_generated.go | 2 +- pkg/api/deep_copy_test.go | 2 +- pkg/api/doc.go | 2 +- pkg/api/endpoints/util.go | 2 +- pkg/api/endpoints/util_test.go | 2 +- pkg/api/errors/doc.go | 2 +- pkg/api/errors/errors.go | 2 +- pkg/api/errors/errors_test.go | 2 +- pkg/api/errors/storage/doc.go | 2 +- pkg/api/errors/storage/storage.go | 2 +- pkg/api/field_constants.go | 2 +- pkg/api/generate.go | 2 +- pkg/api/generate_test.go | 2 +- pkg/api/helpers.go | 2 +- pkg/api/helpers_test.go | 2 +- pkg/api/install/install.go | 2 +- pkg/api/install/install_test.go | 2 +- pkg/api/mapper.go | 2 +- pkg/api/meta.go | 2 +- pkg/api/meta/doc.go | 2 +- pkg/api/meta/errors.go | 2 +- pkg/api/meta/help.go | 2 +- pkg/api/meta/help_test.go | 2 +- pkg/api/meta/interfaces.go | 2 +- pkg/api/meta/meta.go | 2 +- pkg/api/meta/meta_test.go | 2 +- pkg/api/meta/metatypes/types.go | 2 +- pkg/api/meta/multirestmapper.go | 2 +- pkg/api/meta/multirestmapper_test.go | 2 +- pkg/api/meta/priority.go | 2 +- pkg/api/meta/priority_test.go | 2 +- pkg/api/meta/restmapper.go | 2 +- pkg/api/meta/restmapper_test.go | 2 +- pkg/api/meta_test.go | 2 +- pkg/api/pod/util.go | 2 +- pkg/api/pod/util_test.go | 2 +- pkg/api/ref.go | 2 +- pkg/api/ref_test.go | 2 +- pkg/api/register.go | 2 +- pkg/api/requestcontext.go | 2 +- pkg/api/resource/amount.go | 2 +- pkg/api/resource/amount_test.go | 2 +- pkg/api/resource/deep_copy.go | 2 +- pkg/api/resource/generated.pb.go | 2 +- pkg/api/resource/generated.proto | 2 +- pkg/api/resource/math.go | 2 +- pkg/api/resource/math_test.go | 2 +- pkg/api/resource/quantity.go | 2 +- pkg/api/resource/quantity_example_test.go | 2 +- pkg/api/resource/quantity_proto.go | 2 +- pkg/api/resource/quantity_test.go | 2 +- pkg/api/resource/scale_int.go | 2 +- pkg/api/resource/scale_int_test.go | 2 +- pkg/api/resource/suffix.go | 2 +- pkg/api/resource_helpers.go | 2 +- pkg/api/resource_helpers_test.go | 2 +- pkg/api/rest/create.go | 2 +- pkg/api/rest/delete.go | 2 +- pkg/api/rest/doc.go | 2 +- pkg/api/rest/export.go | 2 +- pkg/api/rest/rest.go | 2 +- pkg/api/rest/resttest/resttest.go | 2 +- pkg/api/rest/types.go | 2 +- pkg/api/rest/update.go | 2 +- pkg/api/serialization_proto_test.go | 2 +- pkg/api/serialization_test.go | 2 +- pkg/api/service/annotations.go | 2 +- pkg/api/service/util.go | 2 +- pkg/api/service/util_test.go | 2 +- pkg/api/testapi/testapi.go | 2 +- pkg/api/testapi/testapi_test.go | 2 +- pkg/api/testing/compat/compatibility_tester.go | 2 +- pkg/api/testing/conversion.go | 2 +- pkg/api/testing/fuzzer.go | 2 +- pkg/api/testing/pod_specs.go | 2 +- pkg/api/types.generated.go | 2 +- pkg/api/types.go | 2 +- pkg/api/unversioned/deep_copy_generated.go | 2 +- pkg/api/unversioned/duration.go | 2 +- pkg/api/unversioned/duration_test.go | 2 +- pkg/api/unversioned/generated.pb.go | 2 +- pkg/api/unversioned/generated.proto | 2 +- pkg/api/unversioned/group_version.go | 2 +- pkg/api/unversioned/group_version_test.go | 2 +- pkg/api/unversioned/helpers.go | 2 +- pkg/api/unversioned/helpers_test.go | 2 +- pkg/api/unversioned/meta.go | 2 +- pkg/api/unversioned/register.go | 2 +- pkg/api/unversioned/time.go | 2 +- pkg/api/unversioned/time_proto.go | 2 +- pkg/api/unversioned/time_test.go | 2 +- pkg/api/unversioned/types.go | 2 +- pkg/api/unversioned/types_swagger_doc_generated.go | 2 +- pkg/api/unversioned/validation/validation.go | 2 +- pkg/api/unversioned/validation/validation_test.go | 2 +- pkg/api/unversioned/well_known_labels.go | 2 +- pkg/api/util/group_version.go | 2 +- pkg/api/util/group_version_test.go | 2 +- pkg/api/v1/backward_compatibility_test.go | 2 +- pkg/api/v1/conversion.go | 2 +- pkg/api/v1/conversion_generated.go | 2 +- pkg/api/v1/conversion_test.go | 2 +- pkg/api/v1/deep_copy_generated.go | 2 +- pkg/api/v1/defaults.go | 2 +- pkg/api/v1/defaults_test.go | 2 +- pkg/api/v1/doc.go | 2 +- pkg/api/v1/generated.pb.go | 2 +- pkg/api/v1/generated.proto | 2 +- pkg/api/v1/meta.go | 2 +- pkg/api/v1/register.go | 2 +- pkg/api/v1/types.generated.go | 2 +- pkg/api/v1/types.go | 2 +- pkg/api/v1/types_swagger_doc_generated.go | 2 +- pkg/api/validation/doc.go | 2 +- pkg/api/validation/events.go | 2 +- pkg/api/validation/events_test.go | 2 +- pkg/api/validation/name.go | 2 +- pkg/api/validation/name_test.go | 2 +- pkg/api/validation/schema.go | 2 +- pkg/api/validation/schema_test.go | 2 +- pkg/api/validation/validation.go | 2 +- pkg/api/validation/validation_test.go | 2 +- pkg/apimachinery/doc.go | 2 +- pkg/apimachinery/registered/registered.go | 2 +- pkg/apimachinery/registered/registered_test.go | 2 +- pkg/apimachinery/types.go | 2 +- pkg/apis/abac/latest/latest.go | 2 +- pkg/apis/abac/register.go | 2 +- pkg/apis/abac/types.go | 2 +- pkg/apis/abac/v0/conversion.go | 2 +- pkg/apis/abac/v0/conversion_test.go | 2 +- pkg/apis/abac/v0/register.go | 2 +- pkg/apis/abac/v0/types.go | 2 +- pkg/apis/abac/v1beta1/register.go | 2 +- pkg/apis/abac/v1beta1/types.go | 2 +- pkg/apis/apps/deep_copy_generated.go | 2 +- pkg/apis/apps/install/install.go | 2 +- pkg/apis/apps/register.go | 2 +- pkg/apis/apps/types.generated.go | 2 +- pkg/apis/apps/types.go | 2 +- pkg/apis/apps/v1alpha1/conversion.go | 2 +- pkg/apis/apps/v1alpha1/conversion_generated.go | 2 +- pkg/apis/apps/v1alpha1/deep_copy_generated.go | 2 +- pkg/apis/apps/v1alpha1/defaults.go | 2 +- pkg/apis/apps/v1alpha1/doc.go | 2 +- pkg/apis/apps/v1alpha1/generated.pb.go | 2 +- pkg/apis/apps/v1alpha1/generated.proto | 2 +- pkg/apis/apps/v1alpha1/register.go | 2 +- pkg/apis/apps/v1alpha1/types.generated.go | 2 +- pkg/apis/apps/v1alpha1/types.go | 2 +- pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go | 2 +- pkg/apis/apps/validation/validation.go | 2 +- pkg/apis/apps/validation/validation_test.go | 2 +- pkg/apis/authentication.k8s.io/deep_copy_generated.go | 2 +- pkg/apis/authentication.k8s.io/install/install.go | 2 +- pkg/apis/authentication.k8s.io/register.go | 2 +- pkg/apis/authentication.k8s.io/types.generated.go | 2 +- pkg/apis/authentication.k8s.io/types.go | 2 +- pkg/apis/authentication.k8s.io/v1beta1/conversion.go | 2 +- .../authentication.k8s.io/v1beta1/conversion_generated.go | 2 +- pkg/apis/authentication.k8s.io/v1beta1/deep_copy_generated.go | 2 +- pkg/apis/authentication.k8s.io/v1beta1/defaults.go | 2 +- pkg/apis/authentication.k8s.io/v1beta1/doc.go | 2 +- pkg/apis/authentication.k8s.io/v1beta1/register.go | 2 +- pkg/apis/authentication.k8s.io/v1beta1/types.generated.go | 2 +- pkg/apis/authentication.k8s.io/v1beta1/types.go | 2 +- pkg/apis/authorization/deep_copy_generated.go | 2 +- pkg/apis/authorization/install/install.go | 2 +- pkg/apis/authorization/register.go | 2 +- pkg/apis/authorization/types.generated.go | 2 +- pkg/apis/authorization/types.go | 2 +- pkg/apis/authorization/v1beta1/conversion.go | 2 +- pkg/apis/authorization/v1beta1/conversion_generated.go | 2 +- pkg/apis/authorization/v1beta1/deep_copy_generated.go | 2 +- pkg/apis/authorization/v1beta1/defaults.go | 2 +- pkg/apis/authorization/v1beta1/doc.go | 2 +- pkg/apis/authorization/v1beta1/register.go | 2 +- pkg/apis/authorization/v1beta1/types.generated.go | 2 +- pkg/apis/authorization/v1beta1/types.go | 2 +- pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go | 2 +- pkg/apis/authorization/validation/validation.go | 2 +- pkg/apis/authorization/validation/validation_test.go | 2 +- pkg/apis/autoscaling/deep_copy_generated.go | 2 +- pkg/apis/autoscaling/install/install.go | 2 +- pkg/apis/autoscaling/register.go | 2 +- pkg/apis/autoscaling/types.generated.go | 2 +- pkg/apis/autoscaling/types.go | 2 +- pkg/apis/autoscaling/v1/conversion_generated.go | 2 +- pkg/apis/autoscaling/v1/deep_copy_generated.go | 2 +- pkg/apis/autoscaling/v1/defaults.go | 2 +- pkg/apis/autoscaling/v1/doc.go | 2 +- pkg/apis/autoscaling/v1/generated.pb.go | 2 +- pkg/apis/autoscaling/v1/generated.proto | 2 +- pkg/apis/autoscaling/v1/register.go | 2 +- pkg/apis/autoscaling/v1/types.generated.go | 2 +- pkg/apis/autoscaling/v1/types.go | 2 +- pkg/apis/autoscaling/v1/types_swagger_doc_generated.go | 2 +- pkg/apis/autoscaling/validation/validation.go | 2 +- pkg/apis/autoscaling/validation/validation_test.go | 2 +- pkg/apis/batch/deep_copy_generated.go | 2 +- pkg/apis/batch/install/install.go | 2 +- pkg/apis/batch/register.go | 2 +- pkg/apis/batch/types.generated.go | 2 +- pkg/apis/batch/types.go | 2 +- pkg/apis/batch/v1/conversion.go | 2 +- pkg/apis/batch/v1/conversion_generated.go | 2 +- pkg/apis/batch/v1/deep_copy_generated.go | 2 +- pkg/apis/batch/v1/defaults.go | 2 +- pkg/apis/batch/v1/doc.go | 2 +- pkg/apis/batch/v1/generated.pb.go | 2 +- pkg/apis/batch/v1/generated.proto | 2 +- pkg/apis/batch/v1/register.go | 2 +- pkg/apis/batch/v1/types.generated.go | 2 +- pkg/apis/batch/v1/types.go | 2 +- pkg/apis/batch/v1/types_swagger_doc_generated.go | 2 +- pkg/apis/batch/v2alpha1/conversion.go | 2 +- pkg/apis/batch/v2alpha1/conversion_generated.go | 2 +- pkg/apis/batch/v2alpha1/deep_copy_generated.go | 2 +- pkg/apis/batch/v2alpha1/defaults.go | 2 +- pkg/apis/batch/v2alpha1/doc.go | 2 +- pkg/apis/batch/v2alpha1/generated.pb.go | 2 +- pkg/apis/batch/v2alpha1/generated.proto | 2 +- pkg/apis/batch/v2alpha1/register.go | 2 +- pkg/apis/batch/v2alpha1/types.generated.go | 2 +- pkg/apis/batch/v2alpha1/types.go | 2 +- pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go | 2 +- pkg/apis/batch/validation/validation.go | 2 +- pkg/apis/batch/validation/validation_test.go | 2 +- pkg/apis/certificates/deep_copy_generated.go | 2 +- pkg/apis/certificates/install/install.go | 2 +- pkg/apis/certificates/install/install_test.go | 2 +- pkg/apis/certificates/register.go | 2 +- pkg/apis/certificates/types.generated.go | 2 +- pkg/apis/certificates/types.go | 2 +- pkg/apis/certificates/v1alpha1/conversion.go | 2 +- pkg/apis/certificates/v1alpha1/conversion_generated.go | 2 +- pkg/apis/certificates/v1alpha1/deep_copy_generated.go | 2 +- pkg/apis/certificates/v1alpha1/doc.go | 2 +- pkg/apis/certificates/v1alpha1/generated.pb.go | 2 +- pkg/apis/certificates/v1alpha1/generated.proto | 2 +- pkg/apis/certificates/v1alpha1/register.go | 2 +- pkg/apis/certificates/v1alpha1/types.generated.go | 2 +- pkg/apis/certificates/v1alpha1/types.go | 2 +- pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go | 2 +- pkg/apis/certificates/validation/validation.go | 2 +- pkg/apis/componentconfig/deep_copy_generated.go | 2 +- pkg/apis/componentconfig/helpers.go | 2 +- pkg/apis/componentconfig/helpers_test.go | 2 +- pkg/apis/componentconfig/install/install.go | 2 +- pkg/apis/componentconfig/install/install_test.go | 2 +- pkg/apis/componentconfig/register.go | 2 +- pkg/apis/componentconfig/types.generated.go | 2 +- pkg/apis/componentconfig/types.go | 2 +- pkg/apis/componentconfig/v1alpha1/conversion_generated.go | 2 +- pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go | 2 +- pkg/apis/componentconfig/v1alpha1/defaults.go | 2 +- pkg/apis/componentconfig/v1alpha1/doc.go | 2 +- pkg/apis/componentconfig/v1alpha1/register.go | 2 +- pkg/apis/componentconfig/v1alpha1/types.go | 2 +- pkg/apis/extensions/deep_copy_generated.go | 2 +- pkg/apis/extensions/install/install.go | 2 +- pkg/apis/extensions/install/install_test.go | 2 +- pkg/apis/extensions/register.go | 2 +- pkg/apis/extensions/types.generated.go | 2 +- pkg/apis/extensions/types.go | 2 +- pkg/apis/extensions/v1beta1/conversion.go | 2 +- pkg/apis/extensions/v1beta1/conversion_generated.go | 2 +- pkg/apis/extensions/v1beta1/conversion_test.go | 2 +- pkg/apis/extensions/v1beta1/deep_copy_generated.go | 2 +- pkg/apis/extensions/v1beta1/defaults.go | 2 +- pkg/apis/extensions/v1beta1/defaults_test.go | 2 +- pkg/apis/extensions/v1beta1/doc.go | 2 +- pkg/apis/extensions/v1beta1/generated.pb.go | 2 +- pkg/apis/extensions/v1beta1/generated.proto | 2 +- pkg/apis/extensions/v1beta1/register.go | 2 +- pkg/apis/extensions/v1beta1/types.generated.go | 2 +- pkg/apis/extensions/v1beta1/types.go | 2 +- pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go | 2 +- pkg/apis/extensions/validation/validation.go | 2 +- pkg/apis/extensions/validation/validation_test.go | 2 +- pkg/apis/policy/deep_copy_generated.go | 2 +- pkg/apis/policy/install/install.go | 2 +- pkg/apis/policy/register.go | 2 +- pkg/apis/policy/types.generated.go | 2 +- pkg/apis/policy/types.go | 2 +- pkg/apis/policy/v1alpha1/conversion_generated.go | 2 +- pkg/apis/policy/v1alpha1/deep_copy_generated.go | 2 +- pkg/apis/policy/v1alpha1/doc.go | 2 +- pkg/apis/policy/v1alpha1/generated.pb.go | 2 +- pkg/apis/policy/v1alpha1/generated.proto | 2 +- pkg/apis/policy/v1alpha1/register.go | 2 +- pkg/apis/policy/v1alpha1/types.generated.go | 2 +- pkg/apis/policy/v1alpha1/types.go | 2 +- pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go | 2 +- pkg/apis/policy/validation/validation.go | 2 +- pkg/apis/policy/validation/validation_test.go | 2 +- pkg/apis/rbac/deep_copy_generated.go | 2 +- pkg/apis/rbac/doc.go | 2 +- pkg/apis/rbac/install/install.go | 2 +- pkg/apis/rbac/install/install_test.go | 2 +- pkg/apis/rbac/register.go | 2 +- pkg/apis/rbac/types.go | 2 +- pkg/apis/rbac/v1alpha1/conversion_generated.go | 2 +- pkg/apis/rbac/v1alpha1/deep_copy_generated.go | 2 +- pkg/apis/rbac/v1alpha1/doc.go | 2 +- pkg/apis/rbac/v1alpha1/generated.pb.go | 2 +- pkg/apis/rbac/v1alpha1/generated.proto | 2 +- pkg/apis/rbac/v1alpha1/register.go | 2 +- pkg/apis/rbac/v1alpha1/types.generated.go | 2 +- pkg/apis/rbac/v1alpha1/types.go | 2 +- pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go | 2 +- pkg/apis/rbac/validation/cast.go | 2 +- pkg/apis/rbac/validation/policy_comparator.go | 2 +- pkg/apis/rbac/validation/policy_comparator_test.go | 2 +- pkg/apis/rbac/validation/rulevalidation.go | 2 +- pkg/apis/rbac/validation/rulevalidation_test.go | 2 +- pkg/apis/rbac/validation/validation.go | 2 +- pkg/apis/rbac/validation/validation_test.go | 2 +- pkg/apiserver/api_installer.go | 2 +- pkg/apiserver/api_installer_test.go | 2 +- pkg/apiserver/apiserver.go | 2 +- pkg/apiserver/apiserver_test.go | 2 +- pkg/apiserver/authenticator/authn.go | 2 +- pkg/apiserver/authz.go | 2 +- pkg/apiserver/authz_test.go | 2 +- pkg/apiserver/doc.go | 2 +- pkg/apiserver/errors.go | 2 +- pkg/apiserver/errors_test.go | 2 +- pkg/apiserver/handlers.go | 2 +- pkg/apiserver/handlers_test.go | 2 +- pkg/apiserver/index.go | 2 +- pkg/apiserver/metrics/metrics.go | 2 +- pkg/apiserver/mux_helper.go | 2 +- pkg/apiserver/negotiate.go | 2 +- pkg/apiserver/negotiate_test.go | 2 +- pkg/apiserver/proxy.go | 2 +- pkg/apiserver/proxy_test.go | 2 +- pkg/apiserver/resthandler.go | 2 +- pkg/apiserver/resthandler_test.go | 2 +- pkg/apiserver/testing/types.generated.go | 2 +- pkg/apiserver/testing/types.go | 2 +- pkg/apiserver/validator.go | 2 +- pkg/apiserver/validator_test.go | 2 +- pkg/apiserver/watch.go | 2 +- pkg/apiserver/watch_test.go | 2 +- pkg/auth/authenticator/bearertoken/bearertoken.go | 2 +- pkg/auth/authenticator/bearertoken/bearertoken_test.go | 2 +- pkg/auth/authenticator/interfaces.go | 2 +- pkg/auth/authorizer/abac/abac.go | 2 +- pkg/auth/authorizer/abac/abac_test.go | 2 +- pkg/auth/authorizer/interfaces.go | 2 +- pkg/auth/authorizer/union/union.go | 2 +- pkg/auth/authorizer/union/union_test.go | 2 +- pkg/auth/handlers/handlers.go | 2 +- pkg/auth/handlers/handlers_test.go | 2 +- pkg/auth/user/doc.go | 2 +- pkg/auth/user/user.go | 2 +- pkg/capabilities/capabilities.go | 2 +- pkg/capabilities/doc.go | 2 +- pkg/client/cache/delta_fifo.go | 2 +- pkg/client/cache/delta_fifo_test.go | 2 +- pkg/client/cache/doc.go | 2 +- pkg/client/cache/expiration_cache.go | 2 +- pkg/client/cache/expiration_cache_fakes.go | 2 +- pkg/client/cache/expiration_cache_test.go | 2 +- pkg/client/cache/fake_custom_store.go | 2 +- pkg/client/cache/fifo.go | 2 +- pkg/client/cache/fifo_test.go | 2 +- pkg/client/cache/index.go | 2 +- pkg/client/cache/index_test.go | 2 +- pkg/client/cache/listers.go | 2 +- pkg/client/cache/listers_test.go | 2 +- pkg/client/cache/listwatch.go | 2 +- pkg/client/cache/listwatch_test.go | 2 +- pkg/client/cache/reflector.go | 2 +- pkg/client/cache/reflector_test.go | 2 +- pkg/client/cache/store.go | 2 +- pkg/client/cache/store_test.go | 2 +- pkg/client/cache/thread_safe_store.go | 2 +- pkg/client/cache/undelta_store.go | 2 +- pkg/client/cache/undelta_store_test.go | 2 +- pkg/client/chaosclient/chaosclient.go | 2 +- pkg/client/chaosclient/chaosclient_test.go | 2 +- pkg/client/clientset_generated/internalclientset/clientset.go | 2 +- pkg/client/clientset_generated/internalclientset/doc.go | 2 +- .../internalclientset/fake/clientset_generated.go | 2 +- pkg/client/clientset_generated/internalclientset/fake/doc.go | 2 +- .../internalclientset/import_known_versions.go | 2 +- .../typed/autoscaling/unversioned/autoscaling_client.go | 2 +- .../internalclientset/typed/autoscaling/unversioned/doc.go | 2 +- .../typed/autoscaling/unversioned/fake/doc.go | 2 +- .../autoscaling/unversioned/fake/fake_autoscaling_client.go | 2 +- .../unversioned/fake/fake_horizontalpodautoscaler.go | 2 +- .../typed/autoscaling/unversioned/generated_expansion.go | 2 +- .../typed/autoscaling/unversioned/horizontalpodautoscaler.go | 2 +- .../internalclientset/typed/batch/unversioned/batch_client.go | 2 +- .../internalclientset/typed/batch/unversioned/doc.go | 2 +- .../internalclientset/typed/batch/unversioned/fake/doc.go | 2 +- .../typed/batch/unversioned/fake/fake_batch_client.go | 2 +- .../typed/batch/unversioned/fake/fake_job.go | 2 +- .../typed/batch/unversioned/fake/fake_scheduledjob.go | 2 +- .../typed/batch/unversioned/generated_expansion.go | 2 +- .../internalclientset/typed/batch/unversioned/job.go | 2 +- .../internalclientset/typed/batch/unversioned/scheduledjob.go | 2 +- .../typed/certificates/unversioned/certificates_client.go | 2 +- .../certificates/unversioned/certificatesigningrequest.go | 2 +- .../internalclientset/typed/certificates/unversioned/doc.go | 2 +- .../typed/certificates/unversioned/fake/doc.go | 2 +- .../certificates/unversioned/fake/fake_certificates_client.go | 2 +- .../unversioned/fake/fake_certificatesigningrequest.go | 2 +- .../typed/certificates/unversioned/generated_expansion.go | 2 +- .../typed/core/unversioned/componentstatus.go | 2 +- .../internalclientset/typed/core/unversioned/configmap.go | 2 +- .../internalclientset/typed/core/unversioned/core_client.go | 2 +- .../internalclientset/typed/core/unversioned/doc.go | 2 +- .../internalclientset/typed/core/unversioned/endpoints.go | 2 +- .../internalclientset/typed/core/unversioned/event.go | 2 +- .../typed/core/unversioned/event_expansion.go | 2 +- .../internalclientset/typed/core/unversioned/fake/doc.go | 2 +- .../typed/core/unversioned/fake/fake_componentstatus.go | 2 +- .../typed/core/unversioned/fake/fake_configmap.go | 2 +- .../typed/core/unversioned/fake/fake_core_client.go | 2 +- .../typed/core/unversioned/fake/fake_endpoints.go | 2 +- .../typed/core/unversioned/fake/fake_event.go | 2 +- .../typed/core/unversioned/fake/fake_event_expansion.go | 2 +- .../typed/core/unversioned/fake/fake_limitrange.go | 2 +- .../typed/core/unversioned/fake/fake_namespace.go | 2 +- .../typed/core/unversioned/fake/fake_namespace_expansion.go | 2 +- .../typed/core/unversioned/fake/fake_node.go | 2 +- .../typed/core/unversioned/fake/fake_node_expansion.go | 2 +- .../typed/core/unversioned/fake/fake_persistentvolume.go | 2 +- .../typed/core/unversioned/fake/fake_persistentvolumeclaim.go | 2 +- .../internalclientset/typed/core/unversioned/fake/fake_pod.go | 2 +- .../typed/core/unversioned/fake/fake_pod_expansion.go | 2 +- .../typed/core/unversioned/fake/fake_podtemplate.go | 2 +- .../typed/core/unversioned/fake/fake_replicationcontroller.go | 2 +- .../typed/core/unversioned/fake/fake_resourcequota.go | 2 +- .../typed/core/unversioned/fake/fake_secret.go | 2 +- .../typed/core/unversioned/fake/fake_service.go | 2 +- .../typed/core/unversioned/fake/fake_service_expansion.go | 2 +- .../typed/core/unversioned/fake/fake_serviceaccount.go | 2 +- .../typed/core/unversioned/generated_expansion.go | 2 +- .../internalclientset/typed/core/unversioned/limitrange.go | 2 +- .../internalclientset/typed/core/unversioned/namespace.go | 2 +- .../typed/core/unversioned/namespace_expansion.go | 2 +- .../internalclientset/typed/core/unversioned/node.go | 2 +- .../typed/core/unversioned/node_expansion.go | 2 +- .../typed/core/unversioned/persistentvolume.go | 2 +- .../typed/core/unversioned/persistentvolumeclaim.go | 2 +- .../internalclientset/typed/core/unversioned/pod.go | 2 +- .../internalclientset/typed/core/unversioned/pod_expansion.go | 2 +- .../internalclientset/typed/core/unversioned/podtemplate.go | 2 +- .../typed/core/unversioned/replicationcontroller.go | 2 +- .../internalclientset/typed/core/unversioned/resourcequota.go | 2 +- .../internalclientset/typed/core/unversioned/secret.go | 2 +- .../internalclientset/typed/core/unversioned/service.go | 2 +- .../typed/core/unversioned/service_expansion.go | 2 +- .../typed/core/unversioned/serviceaccount.go | 2 +- .../typed/extensions/unversioned/daemonset.go | 2 +- .../typed/extensions/unversioned/deployment.go | 2 +- .../typed/extensions/unversioned/deployment_expansion.go | 2 +- .../internalclientset/typed/extensions/unversioned/doc.go | 2 +- .../typed/extensions/unversioned/extensions_client.go | 2 +- .../typed/extensions/unversioned/fake/doc.go | 2 +- .../typed/extensions/unversioned/fake/fake_daemonset.go | 2 +- .../typed/extensions/unversioned/fake/fake_deployment.go | 2 +- .../extensions/unversioned/fake/fake_deployment_expansion.go | 2 +- .../extensions/unversioned/fake/fake_extensions_client.go | 2 +- .../typed/extensions/unversioned/fake/fake_ingress.go | 2 +- .../extensions/unversioned/fake/fake_podsecuritypolicy.go | 2 +- .../typed/extensions/unversioned/fake/fake_replicaset.go | 2 +- .../typed/extensions/unversioned/fake/fake_scale.go | 2 +- .../typed/extensions/unversioned/fake/fake_scale_expansion.go | 2 +- .../extensions/unversioned/fake/fake_thirdpartyresource.go | 2 +- .../typed/extensions/unversioned/generated_expansion.go | 2 +- .../internalclientset/typed/extensions/unversioned/ingress.go | 2 +- .../internalclientset/typed/extensions/unversioned/job.go | 2 +- .../typed/extensions/unversioned/podsecuritypolicy.go | 2 +- .../typed/extensions/unversioned/replicaset.go | 2 +- .../internalclientset/typed/extensions/unversioned/scale.go | 2 +- .../typed/extensions/unversioned/scale_expansion.go | 2 +- .../typed/extensions/unversioned/thirdpartyresource.go | 2 +- .../internalclientset/typed/rbac/unversioned/clusterrole.go | 2 +- .../typed/rbac/unversioned/clusterrolebinding.go | 2 +- .../internalclientset/typed/rbac/unversioned/doc.go | 2 +- .../internalclientset/typed/rbac/unversioned/fake/doc.go | 2 +- .../typed/rbac/unversioned/fake/fake_clusterrole.go | 2 +- .../typed/rbac/unversioned/fake/fake_clusterrolebinding.go | 2 +- .../typed/rbac/unversioned/fake/fake_rbac_client.go | 2 +- .../typed/rbac/unversioned/fake/fake_role.go | 2 +- .../typed/rbac/unversioned/fake/fake_rolebinding.go | 2 +- .../typed/rbac/unversioned/generated_expansion.go | 2 +- .../internalclientset/typed/rbac/unversioned/rbac_client.go | 2 +- .../internalclientset/typed/rbac/unversioned/role.go | 2 +- .../internalclientset/typed/rbac/unversioned/rolebinding.go | 2 +- pkg/client/clientset_generated/release_1_2/clientset.go | 2 +- pkg/client/clientset_generated/release_1_2/doc.go | 2 +- .../release_1_2/fake/clientset_generated.go | 2 +- pkg/client/clientset_generated/release_1_2/fake/doc.go | 2 +- .../clientset_generated/release_1_2/import_known_versions.go | 2 +- .../release_1_2/typed/core/v1/componentstatus.go | 2 +- .../release_1_2/typed/core/v1/configmap.go | 2 +- .../release_1_2/typed/core/v1/core_client.go | 2 +- .../clientset_generated/release_1_2/typed/core/v1/doc.go | 2 +- .../release_1_2/typed/core/v1/endpoints.go | 2 +- .../clientset_generated/release_1_2/typed/core/v1/event.go | 2 +- .../release_1_2/typed/core/v1/event_expansion.go | 2 +- .../clientset_generated/release_1_2/typed/core/v1/fake/doc.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_componentstatus.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_configmap.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_core_client.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_endpoints.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_event.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_event_expansion.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_limitrange.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_namespace.go | 2 +- .../typed/core/v1/fake/fake_namespace_expansion.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_node.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_persistentvolume.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_pod.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_pod_expansion.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_podtemplate.go | 2 +- .../typed/core/v1/fake/fake_replicationcontroller.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_resourcequota.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_secret.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_service.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_service_expansion.go | 2 +- .../release_1_2/typed/core/v1/fake/fake_serviceaccount.go | 2 +- .../release_1_2/typed/core/v1/generated_expansion.go | 2 +- .../release_1_2/typed/core/v1/limitrange.go | 2 +- .../release_1_2/typed/core/v1/namespace.go | 2 +- .../release_1_2/typed/core/v1/namespace_expansion.go | 2 +- .../clientset_generated/release_1_2/typed/core/v1/node.go | 2 +- .../release_1_2/typed/core/v1/persistentvolume.go | 2 +- .../clientset_generated/release_1_2/typed/core/v1/pod.go | 2 +- .../release_1_2/typed/core/v1/pod_expansion.go | 2 +- .../release_1_2/typed/core/v1/podtemplate.go | 2 +- .../release_1_2/typed/core/v1/replicationcontroller.go | 2 +- .../release_1_2/typed/core/v1/resourcequota.go | 2 +- .../clientset_generated/release_1_2/typed/core/v1/secret.go | 2 +- .../clientset_generated/release_1_2/typed/core/v1/service.go | 2 +- .../release_1_2/typed/core/v1/service_expansion.go | 2 +- .../release_1_2/typed/core/v1/serviceaccount.go | 2 +- .../release_1_2/typed/extensions/v1beta1/daemonset.go | 2 +- .../release_1_2/typed/extensions/v1beta1/deployment.go | 2 +- .../typed/extensions/v1beta1/deployment_expansion.go | 2 +- .../release_1_2/typed/extensions/v1beta1/doc.go | 2 +- .../release_1_2/typed/extensions/v1beta1/extensions_client.go | 2 +- .../release_1_2/typed/extensions/v1beta1/fake/doc.go | 2 +- .../typed/extensions/v1beta1/fake/fake_daemonset.go | 2 +- .../typed/extensions/v1beta1/fake/fake_deployment.go | 2 +- .../extensions/v1beta1/fake/fake_deployment_expansion.go | 2 +- .../typed/extensions/v1beta1/fake/fake_extensions_client.go | 2 +- .../extensions/v1beta1/fake/fake_horizontalpodautoscaler.go | 2 +- .../release_1_2/typed/extensions/v1beta1/fake/fake_ingress.go | 2 +- .../release_1_2/typed/extensions/v1beta1/fake/fake_job.go | 2 +- .../typed/extensions/v1beta1/fake/fake_replicaset.go | 2 +- .../release_1_2/typed/extensions/v1beta1/fake/fake_scale.go | 2 +- .../typed/extensions/v1beta1/fake/fake_scale_expansion.go | 2 +- .../typed/extensions/v1beta1/fake/fake_thirdpartyresource.go | 2 +- .../typed/extensions/v1beta1/generated_expansion.go | 2 +- .../typed/extensions/v1beta1/horizontalpodautoscaler.go | 2 +- .../release_1_2/typed/extensions/v1beta1/ingress.go | 2 +- .../release_1_2/typed/extensions/v1beta1/job.go | 2 +- .../release_1_2/typed/extensions/v1beta1/replicaset.go | 2 +- .../release_1_2/typed/extensions/v1beta1/scale.go | 2 +- .../release_1_2/typed/extensions/v1beta1/scale_expansion.go | 2 +- .../typed/extensions/v1beta1/thirdpartyresource.go | 2 +- pkg/client/clientset_generated/release_1_3/clientset.go | 2 +- pkg/client/clientset_generated/release_1_3/doc.go | 2 +- .../release_1_3/fake/clientset_generated.go | 2 +- pkg/client/clientset_generated/release_1_3/fake/doc.go | 2 +- .../clientset_generated/release_1_3/import_known_versions.go | 2 +- .../release_1_3/typed/autoscaling/v1/autoscaling_client.go | 2 +- .../release_1_3/typed/autoscaling/v1/doc.go | 2 +- .../release_1_3/typed/autoscaling/v1/fake/doc.go | 2 +- .../typed/autoscaling/v1/fake/fake_autoscaling_client.go | 2 +- .../typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go | 2 +- .../release_1_3/typed/autoscaling/v1/generated_expansion.go | 2 +- .../typed/autoscaling/v1/horizontalpodautoscaler.go | 2 +- .../release_1_3/typed/batch/v1/batch_client.go | 2 +- .../clientset_generated/release_1_3/typed/batch/v1/doc.go | 2 +- .../release_1_3/typed/batch/v1/fake/doc.go | 2 +- .../release_1_3/typed/batch/v1/fake/fake_batch_client.go | 2 +- .../release_1_3/typed/batch/v1/fake/fake_job.go | 2 +- .../release_1_3/typed/batch/v1/generated_expansion.go | 2 +- .../clientset_generated/release_1_3/typed/batch/v1/job.go | 2 +- .../release_1_3/typed/core/v1/componentstatus.go | 2 +- .../release_1_3/typed/core/v1/configmap.go | 2 +- .../release_1_3/typed/core/v1/core_client.go | 2 +- .../clientset_generated/release_1_3/typed/core/v1/doc.go | 2 +- .../release_1_3/typed/core/v1/endpoints.go | 2 +- .../clientset_generated/release_1_3/typed/core/v1/event.go | 2 +- .../release_1_3/typed/core/v1/event_expansion.go | 2 +- .../clientset_generated/release_1_3/typed/core/v1/fake/doc.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_componentstatus.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_configmap.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_core_client.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_endpoints.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_event.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_event_expansion.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_limitrange.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_namespace.go | 2 +- .../typed/core/v1/fake/fake_namespace_expansion.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_node.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_persistentvolume.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_pod.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_pod_expansion.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_podtemplate.go | 2 +- .../typed/core/v1/fake/fake_replicationcontroller.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_resourcequota.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_secret.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_service.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_service_expansion.go | 2 +- .../release_1_3/typed/core/v1/fake/fake_serviceaccount.go | 2 +- .../release_1_3/typed/core/v1/generated_expansion.go | 2 +- .../release_1_3/typed/core/v1/limitrange.go | 2 +- .../release_1_3/typed/core/v1/namespace.go | 2 +- .../release_1_3/typed/core/v1/namespace_expansion.go | 2 +- .../clientset_generated/release_1_3/typed/core/v1/node.go | 2 +- .../release_1_3/typed/core/v1/persistentvolume.go | 2 +- .../clientset_generated/release_1_3/typed/core/v1/pod.go | 2 +- .../release_1_3/typed/core/v1/pod_expansion.go | 2 +- .../release_1_3/typed/core/v1/podtemplate.go | 2 +- .../release_1_3/typed/core/v1/replicationcontroller.go | 2 +- .../release_1_3/typed/core/v1/resourcequota.go | 2 +- .../clientset_generated/release_1_3/typed/core/v1/secret.go | 2 +- .../clientset_generated/release_1_3/typed/core/v1/service.go | 2 +- .../release_1_3/typed/core/v1/service_expansion.go | 2 +- .../release_1_3/typed/core/v1/serviceaccount.go | 2 +- .../release_1_3/typed/extensions/v1beta1/daemonset.go | 2 +- .../release_1_3/typed/extensions/v1beta1/deployment.go | 2 +- .../typed/extensions/v1beta1/deployment_expansion.go | 2 +- .../release_1_3/typed/extensions/v1beta1/doc.go | 2 +- .../release_1_3/typed/extensions/v1beta1/extensions_client.go | 2 +- .../release_1_3/typed/extensions/v1beta1/fake/doc.go | 2 +- .../typed/extensions/v1beta1/fake/fake_daemonset.go | 2 +- .../typed/extensions/v1beta1/fake/fake_deployment.go | 2 +- .../extensions/v1beta1/fake/fake_deployment_expansion.go | 2 +- .../typed/extensions/v1beta1/fake/fake_extensions_client.go | 2 +- .../extensions/v1beta1/fake/fake_horizontalpodautoscaler.go | 2 +- .../release_1_3/typed/extensions/v1beta1/fake/fake_ingress.go | 2 +- .../release_1_3/typed/extensions/v1beta1/fake/fake_job.go | 2 +- .../typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go | 2 +- .../typed/extensions/v1beta1/fake/fake_replicaset.go | 2 +- .../release_1_3/typed/extensions/v1beta1/fake/fake_scale.go | 2 +- .../typed/extensions/v1beta1/fake/fake_scale_expansion.go | 2 +- .../typed/extensions/v1beta1/fake/fake_thirdpartyresource.go | 2 +- .../typed/extensions/v1beta1/generated_expansion.go | 2 +- .../typed/extensions/v1beta1/horizontalpodautoscaler.go | 2 +- .../release_1_3/typed/extensions/v1beta1/ingress.go | 2 +- .../release_1_3/typed/extensions/v1beta1/job.go | 2 +- .../release_1_3/typed/extensions/v1beta1/podsecuritypolicy.go | 2 +- .../release_1_3/typed/extensions/v1beta1/replicaset.go | 2 +- .../release_1_3/typed/extensions/v1beta1/scale.go | 2 +- .../release_1_3/typed/extensions/v1beta1/scale_expansion.go | 2 +- .../typed/extensions/v1beta1/thirdpartyresource.go | 2 +- pkg/client/leaderelection/leaderelection.go | 2 +- pkg/client/leaderelection/leaderelection_test.go | 2 +- pkg/client/metrics/metrics.go | 2 +- pkg/client/record/doc.go | 2 +- pkg/client/record/event.go | 2 +- pkg/client/record/event_test.go | 2 +- pkg/client/record/events_cache.go | 2 +- pkg/client/record/events_cache_test.go | 2 +- pkg/client/record/fake.go | 2 +- pkg/client/restclient/client.go | 2 +- pkg/client/restclient/client_test.go | 2 +- pkg/client/restclient/config.go | 2 +- pkg/client/restclient/config_test.go | 2 +- pkg/client/restclient/plugin.go | 2 +- pkg/client/restclient/plugin_test.go | 2 +- pkg/client/restclient/request.go | 2 +- pkg/client/restclient/request_test.go | 2 +- pkg/client/restclient/transport.go | 2 +- pkg/client/restclient/url_utils.go | 2 +- pkg/client/restclient/url_utils_test.go | 2 +- pkg/client/restclient/urlbackoff.go | 2 +- pkg/client/restclient/urlbackoff_test.go | 2 +- pkg/client/restclient/versions.go | 2 +- pkg/client/testing/core/actions.go | 2 +- pkg/client/testing/core/fake.go | 2 +- pkg/client/testing/core/fake_test.go | 2 +- pkg/client/testing/core/fixture.go | 2 +- pkg/client/transport/cache.go | 2 +- pkg/client/transport/cache_test.go | 2 +- pkg/client/transport/config.go | 2 +- pkg/client/transport/round_trippers.go | 2 +- pkg/client/transport/round_trippers_test.go | 2 +- pkg/client/transport/transport.go | 2 +- pkg/client/transport/transport_test.go | 2 +- pkg/client/typed/discovery/client_test.go | 2 +- pkg/client/typed/discovery/discovery_client.go | 2 +- pkg/client/typed/discovery/fake/discovery.go | 2 +- pkg/client/typed/dynamic/client.go | 2 +- pkg/client/typed/dynamic/client_pool.go | 2 +- pkg/client/typed/dynamic/client_test.go | 2 +- pkg/client/typed/dynamic/dynamic_util.go | 2 +- pkg/client/typed/dynamic/dynamic_util_test.go | 2 +- .../adapters/internalclientset/clientset_adaption.go | 2 +- pkg/client/unversioned/apps.go | 2 +- pkg/client/unversioned/auth/clientauth.go | 2 +- pkg/client/unversioned/auth/clientauth_test.go | 2 +- pkg/client/unversioned/autoscaling.go | 2 +- pkg/client/unversioned/batch.go | 2 +- pkg/client/unversioned/certificates.go | 2 +- pkg/client/unversioned/certificatesigningrequests.go | 2 +- pkg/client/unversioned/client.go | 2 +- pkg/client/unversioned/clientcmd/api/helpers.go | 2 +- pkg/client/unversioned/clientcmd/api/helpers_test.go | 2 +- pkg/client/unversioned/clientcmd/api/latest/latest.go | 2 +- pkg/client/unversioned/clientcmd/api/register.go | 2 +- pkg/client/unversioned/clientcmd/api/types.go | 2 +- pkg/client/unversioned/clientcmd/api/types_test.go | 2 +- pkg/client/unversioned/clientcmd/api/v1/conversion.go | 2 +- pkg/client/unversioned/clientcmd/api/v1/register.go | 2 +- pkg/client/unversioned/clientcmd/api/v1/types.go | 2 +- pkg/client/unversioned/clientcmd/auth_loaders.go | 2 +- pkg/client/unversioned/clientcmd/client_config.go | 2 +- pkg/client/unversioned/clientcmd/client_config_test.go | 2 +- pkg/client/unversioned/clientcmd/config.go | 2 +- pkg/client/unversioned/clientcmd/doc.go | 2 +- pkg/client/unversioned/clientcmd/loader.go | 2 +- pkg/client/unversioned/clientcmd/loader_test.go | 2 +- pkg/client/unversioned/clientcmd/merged_client_builder.go | 2 +- pkg/client/unversioned/clientcmd/overrides.go | 2 +- pkg/client/unversioned/clientcmd/validation.go | 2 +- pkg/client/unversioned/clientcmd/validation_test.go | 2 +- pkg/client/unversioned/clusterrolebindings.go | 2 +- pkg/client/unversioned/clusterroles.go | 2 +- pkg/client/unversioned/componentstatuses.go | 2 +- pkg/client/unversioned/conditions.go | 2 +- pkg/client/unversioned/configmap.go | 2 +- pkg/client/unversioned/containerinfo.go | 2 +- pkg/client/unversioned/containerinfo_test.go | 2 +- pkg/client/unversioned/daemon_sets.go | 2 +- pkg/client/unversioned/daemon_sets_test.go | 2 +- pkg/client/unversioned/deployment.go | 2 +- pkg/client/unversioned/deployment_test.go | 2 +- pkg/client/unversioned/doc.go | 2 +- pkg/client/unversioned/endpoints.go | 2 +- pkg/client/unversioned/endpoints_test.go | 2 +- pkg/client/unversioned/events.go | 2 +- pkg/client/unversioned/events_test.go | 2 +- pkg/client/unversioned/extensions.go | 2 +- pkg/client/unversioned/fake/fake.go | 2 +- pkg/client/unversioned/flags.go | 2 +- pkg/client/unversioned/flags_test.go | 2 +- pkg/client/unversioned/helper.go | 2 +- pkg/client/unversioned/helper_blackbox_test.go | 2 +- pkg/client/unversioned/helper_test.go | 2 +- pkg/client/unversioned/horizontalpodautoscaler.go | 2 +- pkg/client/unversioned/horizontalpodautoscaler_test.go | 2 +- pkg/client/unversioned/import_known_versions.go | 2 +- pkg/client/unversioned/ingress.go | 2 +- pkg/client/unversioned/ingress_test.go | 2 +- pkg/client/unversioned/jobs.go | 2 +- pkg/client/unversioned/jobs_test.go | 2 +- pkg/client/unversioned/limit_ranges.go | 2 +- pkg/client/unversioned/limit_ranges_test.go | 2 +- pkg/client/unversioned/namespaces.go | 2 +- pkg/client/unversioned/namespaces_test.go | 2 +- pkg/client/unversioned/network_policys.go | 2 +- pkg/client/unversioned/nodes.go | 2 +- pkg/client/unversioned/nodes_test.go | 2 +- pkg/client/unversioned/persistentvolume_test.go | 2 +- pkg/client/unversioned/persistentvolumeclaim.go | 2 +- pkg/client/unversioned/persistentvolumeclaim_test.go | 2 +- pkg/client/unversioned/persistentvolumes.go | 2 +- pkg/client/unversioned/pet_sets.go | 2 +- pkg/client/unversioned/pet_sets_test.go | 2 +- pkg/client/unversioned/pod_disruption_budgets.go | 2 +- pkg/client/unversioned/pod_templates.go | 2 +- pkg/client/unversioned/pod_templates_test.go | 2 +- pkg/client/unversioned/pods.go | 2 +- pkg/client/unversioned/pods_test.go | 2 +- pkg/client/unversioned/podsecuritypolicy.go | 2 +- pkg/client/unversioned/podsecuritypolicy_test.go | 2 +- pkg/client/unversioned/policy.go | 2 +- pkg/client/unversioned/portforward/doc.go | 2 +- pkg/client/unversioned/portforward/portforward.go | 2 +- pkg/client/unversioned/portforward/portforward_test.go | 2 +- pkg/client/unversioned/rbac.go | 2 +- pkg/client/unversioned/remotecommand/doc.go | 2 +- pkg/client/unversioned/remotecommand/remotecommand.go | 2 +- pkg/client/unversioned/remotecommand/remotecommand_test.go | 2 +- pkg/client/unversioned/remotecommand/v1.go | 2 +- pkg/client/unversioned/remotecommand/v2.go | 2 +- pkg/client/unversioned/replica_sets.go | 2 +- pkg/client/unversioned/replica_sets_test.go | 2 +- pkg/client/unversioned/replication_controllers.go | 2 +- pkg/client/unversioned/replication_controllers_test.go | 2 +- pkg/client/unversioned/resource_quotas.go | 2 +- pkg/client/unversioned/resource_quotas_test.go | 2 +- pkg/client/unversioned/rolebindings.go | 2 +- pkg/client/unversioned/roles.go | 2 +- pkg/client/unversioned/scale.go | 2 +- pkg/client/unversioned/scheduledjobs.go | 2 +- pkg/client/unversioned/secrets.go | 2 +- pkg/client/unversioned/service_accounts.go | 2 +- pkg/client/unversioned/services.go | 2 +- pkg/client/unversioned/services_test.go | 2 +- pkg/client/unversioned/testclient/actions.go | 2 +- pkg/client/unversioned/testclient/fake_certificates.go | 2 +- pkg/client/unversioned/testclient/fake_clusterrolebindings.go | 2 +- pkg/client/unversioned/testclient/fake_clusterroles.go | 2 +- pkg/client/unversioned/testclient/fake_componentstatuses.go | 2 +- pkg/client/unversioned/testclient/fake_configmaps.go | 2 +- pkg/client/unversioned/testclient/fake_daemon_sets.go | 2 +- pkg/client/unversioned/testclient/fake_deployments.go | 2 +- pkg/client/unversioned/testclient/fake_endpoints.go | 2 +- pkg/client/unversioned/testclient/fake_events.go | 2 +- .../unversioned/testclient/fake_horizontal_pod_autoscalers.go | 2 +- pkg/client/unversioned/testclient/fake_ingress.go | 2 +- pkg/client/unversioned/testclient/fake_jobs.go | 2 +- pkg/client/unversioned/testclient/fake_limit_ranges.go | 2 +- pkg/client/unversioned/testclient/fake_namespaces.go | 2 +- pkg/client/unversioned/testclient/fake_network_policies.go | 2 +- pkg/client/unversioned/testclient/fake_nodes.go | 2 +- .../unversioned/testclient/fake_persistent_volume_claims.go | 2 +- pkg/client/unversioned/testclient/fake_persistent_volumes.go | 2 +- pkg/client/unversioned/testclient/fake_pod_templates.go | 2 +- pkg/client/unversioned/testclient/fake_pods.go | 2 +- pkg/client/unversioned/testclient/fake_podsecuritypolicy.go | 2 +- pkg/client/unversioned/testclient/fake_replica_sets.go | 2 +- .../unversioned/testclient/fake_replication_controllers.go | 2 +- pkg/client/unversioned/testclient/fake_resource_quotas.go | 2 +- pkg/client/unversioned/testclient/fake_rolebindings.go | 2 +- pkg/client/unversioned/testclient/fake_roles.go | 2 +- pkg/client/unversioned/testclient/fake_scales.go | 2 +- pkg/client/unversioned/testclient/fake_scheduledjobs.go | 2 +- pkg/client/unversioned/testclient/fake_secrets.go | 2 +- pkg/client/unversioned/testclient/fake_service_accounts.go | 2 +- pkg/client/unversioned/testclient/fake_services.go | 2 +- pkg/client/unversioned/testclient/fake_test.go | 2 +- pkg/client/unversioned/testclient/fake_thirdpartyresources.go | 2 +- pkg/client/unversioned/testclient/fixture.go | 2 +- pkg/client/unversioned/testclient/simple/simple_testclient.go | 2 +- pkg/client/unversioned/testclient/testclient.go | 2 +- pkg/client/unversioned/testclient/testclient_test.go | 2 +- pkg/client/unversioned/thirdpartyresources.go | 2 +- pkg/client/unversioned/thirdpartyresources_test.go | 2 +- pkg/client/unversioned/util.go | 2 +- pkg/client/unversioned/util_test.go | 2 +- pkg/cloudprovider/cloud.go | 2 +- pkg/cloudprovider/doc.go | 2 +- pkg/cloudprovider/plugins.go | 2 +- pkg/cloudprovider/providers/aws/aws.go | 2 +- pkg/cloudprovider/providers/aws/aws_instancegroups.go | 2 +- pkg/cloudprovider/providers/aws/aws_loadbalancer.go | 2 +- pkg/cloudprovider/providers/aws/aws_routes.go | 2 +- pkg/cloudprovider/providers/aws/aws_test.go | 2 +- pkg/cloudprovider/providers/aws/aws_utils.go | 2 +- pkg/cloudprovider/providers/aws/log_handler.go | 2 +- pkg/cloudprovider/providers/aws/retry_handler.go | 2 +- pkg/cloudprovider/providers/aws/retry_handler_test.go | 2 +- pkg/cloudprovider/providers/aws/sets_ippermissions.go | 2 +- pkg/cloudprovider/providers/fake/doc.go | 2 +- pkg/cloudprovider/providers/fake/fake.go | 2 +- pkg/cloudprovider/providers/gce/doc.go | 2 +- pkg/cloudprovider/providers/gce/gce.go | 2 +- pkg/cloudprovider/providers/gce/gce_test.go | 2 +- pkg/cloudprovider/providers/gce/token_source.go | 2 +- pkg/cloudprovider/providers/mesos/client.go | 2 +- pkg/cloudprovider/providers/mesos/client_test.go | 2 +- pkg/cloudprovider/providers/mesos/config.go | 2 +- pkg/cloudprovider/providers/mesos/config_test.go | 2 +- pkg/cloudprovider/providers/mesos/mesos.go | 2 +- pkg/cloudprovider/providers/mesos/mesos_test.go | 2 +- pkg/cloudprovider/providers/mesos/plugins.go | 2 +- pkg/cloudprovider/providers/openstack/openstack.go | 2 +- .../providers/openstack/openstack_loadbalancer.go | 2 +- pkg/cloudprovider/providers/openstack/openstack_test.go | 2 +- pkg/cloudprovider/providers/ovirt/ovirt.go | 2 +- pkg/cloudprovider/providers/ovirt/ovirt_test.go | 2 +- pkg/cloudprovider/providers/providers.go | 2 +- pkg/cloudprovider/providers/rackspace/rackspace.go | 2 +- pkg/cloudprovider/providers/rackspace/rackspace_test.go | 2 +- pkg/cloudprovider/providers/vsphere/vsphere.go | 2 +- pkg/cloudprovider/providers/vsphere/vsphere_test.go | 2 +- pkg/controller/controller_utils.go | 2 +- pkg/controller/controller_utils_test.go | 2 +- pkg/controller/daemon/controller.go | 2 +- pkg/controller/daemon/controller_test.go | 2 +- pkg/controller/daemon/doc.go | 2 +- pkg/controller/deployment/deployment_controller.go | 2 +- pkg/controller/deployment/deployment_controller_test.go | 2 +- pkg/controller/deployment/util.go | 2 +- pkg/controller/doc.go | 2 +- pkg/controller/endpoint/doc.go | 2 +- pkg/controller/endpoint/endpoints_controller.go | 2 +- pkg/controller/endpoint/endpoints_controller_test.go | 2 +- pkg/controller/framework/controller.go | 2 +- pkg/controller/framework/controller_test.go | 2 +- pkg/controller/framework/doc.go | 2 +- pkg/controller/framework/fake_controller_source.go | 2 +- pkg/controller/framework/fake_controller_source_test.go | 2 +- pkg/controller/framework/informers/factory.go | 2 +- pkg/controller/framework/processor_listener_test.go | 2 +- pkg/controller/framework/shared_informer.go | 2 +- pkg/controller/garbagecollector/garbagecollector.go | 2 +- pkg/controller/garbagecollector/garbagecollector_test.go | 2 +- pkg/controller/job/controller.go | 2 +- pkg/controller/job/controller_test.go | 2 +- pkg/controller/job/doc.go | 2 +- pkg/controller/lookup_cache.go | 2 +- pkg/controller/namespace/doc.go | 2 +- pkg/controller/namespace/namespace_controller.go | 2 +- pkg/controller/namespace/namespace_controller_test.go | 2 +- pkg/controller/namespace/namespace_controller_utils.go | 2 +- pkg/controller/node/cidr_allocator.go | 2 +- pkg/controller/node/cidr_allocator_test.go | 2 +- pkg/controller/node/doc.go | 2 +- pkg/controller/node/nodecontroller.go | 2 +- pkg/controller/node/nodecontroller_test.go | 2 +- pkg/controller/node/rate_limited_queue.go | 2 +- pkg/controller/node/rate_limited_queue_test.go | 2 +- pkg/controller/persistentvolume/binder_test.go | 2 +- pkg/controller/persistentvolume/controller.go | 2 +- pkg/controller/persistentvolume/controller_base.go | 2 +- pkg/controller/persistentvolume/controller_test.go | 2 +- pkg/controller/persistentvolume/delete_test.go | 2 +- pkg/controller/persistentvolume/framework_test.go | 2 +- pkg/controller/persistentvolume/index.go | 2 +- pkg/controller/persistentvolume/index_test.go | 2 +- pkg/controller/persistentvolume/options/options.go | 2 +- pkg/controller/persistentvolume/provision_test.go | 2 +- pkg/controller/persistentvolume/recycle_test.go | 2 +- pkg/controller/persistentvolume/volume_host.go | 2 +- pkg/controller/petset/fakes.go | 2 +- pkg/controller/petset/identity_mappers.go | 2 +- pkg/controller/petset/identity_mappers_test.go | 2 +- pkg/controller/petset/iterator.go | 2 +- pkg/controller/petset/iterator_test.go | 2 +- pkg/controller/petset/pet.go | 2 +- pkg/controller/petset/pet_set.go | 2 +- pkg/controller/petset/pet_set_test.go | 2 +- pkg/controller/petset/pet_set_utils.go | 2 +- pkg/controller/podautoscaler/doc.go | 2 +- pkg/controller/podautoscaler/horizontal.go | 2 +- pkg/controller/podautoscaler/horizontal_test.go | 2 +- pkg/controller/podautoscaler/metrics/metrics_client.go | 2 +- pkg/controller/podautoscaler/metrics/metrics_client_test.go | 2 +- pkg/controller/podgc/doc.go | 2 +- pkg/controller/podgc/gc_controller.go | 2 +- pkg/controller/podgc/gc_controller_test.go | 2 +- pkg/controller/replicaset/doc.go | 2 +- pkg/controller/replicaset/options/options.go | 2 +- pkg/controller/replicaset/replica_set.go | 2 +- pkg/controller/replicaset/replica_set_test.go | 2 +- pkg/controller/replicaset/replica_set_utils.go | 2 +- pkg/controller/replication/doc.go | 2 +- pkg/controller/replication/replication_controller.go | 2 +- pkg/controller/replication/replication_controller_test.go | 2 +- pkg/controller/replication/replication_controller_utils.go | 2 +- pkg/controller/resourcequota/doc.go | 2 +- pkg/controller/resourcequota/replenishment_controller.go | 2 +- pkg/controller/resourcequota/replenishment_controller_test.go | 2 +- pkg/controller/resourcequota/resource_quota_controller.go | 2 +- .../resourcequota/resource_quota_controller_test.go | 2 +- pkg/controller/route/doc.go | 2 +- pkg/controller/route/routecontroller.go | 2 +- pkg/controller/route/routecontroller_test.go | 2 +- pkg/controller/service/doc.go | 2 +- pkg/controller/service/servicecontroller.go | 2 +- pkg/controller/service/servicecontroller_test.go | 2 +- pkg/controller/serviceaccount/doc.go | 2 +- pkg/controller/serviceaccount/serviceaccounts_controller.go | 2 +- .../serviceaccount/serviceaccounts_controller_test.go | 2 +- pkg/controller/serviceaccount/tokengetter.go | 2 +- pkg/controller/serviceaccount/tokens_controller.go | 2 +- pkg/controller/serviceaccount/tokens_controller_test.go | 2 +- pkg/controller/volume/attach_detach_controller.go | 2 +- pkg/controller/volume/attach_detach_controller_test.go | 2 +- pkg/controller/volume/cache/actual_state_of_world.go | 2 +- pkg/controller/volume/cache/actual_state_of_world_test.go | 2 +- pkg/controller/volume/cache/desired_state_of_world.go | 2 +- pkg/controller/volume/cache/desired_state_of_world_test.go | 2 +- .../volume/populator/desired_state_of_world_populator.go | 2 +- pkg/controller/volume/reconciler/reconciler.go | 2 +- pkg/controller/volume/reconciler/reconciler_test.go | 2 +- .../volume/statusupdater/fake_node_status_updater.go | 2 +- pkg/controller/volume/statusupdater/node_status_updater.go | 2 +- pkg/controller/volume/testing/testvolumespec.go | 2 +- pkg/conversion/cloner.go | 2 +- pkg/conversion/converter.go | 2 +- pkg/conversion/converter_test.go | 2 +- pkg/conversion/deep_copy_test.go | 2 +- pkg/conversion/deep_equal.go | 2 +- pkg/conversion/doc.go | 2 +- pkg/conversion/helper.go | 2 +- pkg/conversion/helper_test.go | 2 +- pkg/conversion/queryparams/convert.go | 2 +- pkg/conversion/queryparams/convert_test.go | 2 +- pkg/conversion/queryparams/doc.go | 2 +- pkg/credentialprovider/aws/aws_credentials.go | 2 +- pkg/credentialprovider/aws/aws_credentials_test.go | 2 +- pkg/credentialprovider/config.go | 2 +- pkg/credentialprovider/config_test.go | 2 +- pkg/credentialprovider/doc.go | 2 +- pkg/credentialprovider/gcp/doc.go | 2 +- pkg/credentialprovider/gcp/jwt.go | 2 +- pkg/credentialprovider/gcp/jwt_test.go | 2 +- pkg/credentialprovider/gcp/metadata.go | 2 +- pkg/credentialprovider/gcp/metadata_test.go | 2 +- pkg/credentialprovider/keyring.go | 2 +- pkg/credentialprovider/keyring_test.go | 2 +- pkg/credentialprovider/plugins.go | 2 +- pkg/credentialprovider/provider.go | 2 +- pkg/credentialprovider/provider_test.go | 2 +- pkg/dns/dns.go | 2 +- pkg/dns/dns_test.go | 2 +- pkg/dns/doc.go | 2 +- pkg/dns/treecache.go | 2 +- pkg/fieldpath/doc.go | 2 +- pkg/fieldpath/fieldpath.go | 2 +- pkg/fieldpath/fieldpath_test.go | 2 +- pkg/fields/doc.go | 2 +- pkg/fields/fields.go | 2 +- pkg/fields/fields_test.go | 2 +- pkg/fields/selector.go | 2 +- pkg/fields/selector_test.go | 2 +- pkg/genericapiserver/default_storage_factory_builder.go | 2 +- pkg/genericapiserver/default_storage_factory_builder_test.go | 2 +- pkg/genericapiserver/doc.go | 2 +- pkg/genericapiserver/genericapiserver.go | 2 +- pkg/genericapiserver/genericapiserver_test.go | 2 +- pkg/genericapiserver/options/doc.go | 2 +- pkg/genericapiserver/options/server_run_options.go | 2 +- pkg/genericapiserver/resource_config.go | 2 +- pkg/genericapiserver/resource_config_test.go | 2 +- pkg/genericapiserver/resource_encoding_config.go | 2 +- pkg/genericapiserver/server_run_options_test.go | 2 +- pkg/genericapiserver/storage_factory.go | 2 +- pkg/genericapiserver/storage_factory_test.go | 2 +- pkg/genericapiserver/tunneler.go | 2 +- pkg/genericapiserver/tunneler_test.go | 2 +- pkg/healthz/doc.go | 2 +- pkg/healthz/healthz.go | 2 +- pkg/healthz/healthz_test.go | 2 +- pkg/httplog/doc.go | 2 +- pkg/httplog/log.go | 2 +- pkg/httplog/log_test.go | 2 +- pkg/hyperkube/doc.go | 2 +- pkg/kubectl/apply.go | 2 +- pkg/kubectl/autoscale.go | 2 +- pkg/kubectl/bash_comp_utils.go | 2 +- pkg/kubectl/cmd/annotate.go | 2 +- pkg/kubectl/cmd/annotate_test.go | 2 +- pkg/kubectl/cmd/apiversions.go | 2 +- pkg/kubectl/cmd/apply.go | 2 +- pkg/kubectl/cmd/apply_test.go | 2 +- pkg/kubectl/cmd/attach.go | 2 +- pkg/kubectl/cmd/attach_test.go | 2 +- pkg/kubectl/cmd/autoscale.go | 2 +- pkg/kubectl/cmd/clusterinfo.go | 2 +- pkg/kubectl/cmd/clusterinfo_dump.go | 2 +- pkg/kubectl/cmd/clusterinfo_dump_test.go | 2 +- pkg/kubectl/cmd/cmd.go | 2 +- pkg/kubectl/cmd/cmd_test.go | 2 +- pkg/kubectl/cmd/completion.go | 4 ++-- pkg/kubectl/cmd/config/config.go | 2 +- pkg/kubectl/cmd/config/config_test.go | 2 +- pkg/kubectl/cmd/config/create_authinfo.go | 2 +- pkg/kubectl/cmd/config/create_cluster.go | 2 +- pkg/kubectl/cmd/config/create_context.go | 2 +- pkg/kubectl/cmd/config/current_context.go | 2 +- pkg/kubectl/cmd/config/current_context_test.go | 2 +- pkg/kubectl/cmd/config/navigation_step_parser.go | 2 +- pkg/kubectl/cmd/config/navigation_step_parser_test.go | 2 +- pkg/kubectl/cmd/config/set.go | 2 +- pkg/kubectl/cmd/config/unset.go | 2 +- pkg/kubectl/cmd/config/use_context.go | 2 +- pkg/kubectl/cmd/config/view.go | 2 +- pkg/kubectl/cmd/convert.go | 2 +- pkg/kubectl/cmd/create.go | 2 +- pkg/kubectl/cmd/create_configmap.go | 2 +- pkg/kubectl/cmd/create_configmap_test.go | 2 +- pkg/kubectl/cmd/create_namespace.go | 2 +- pkg/kubectl/cmd/create_namespace_test.go | 2 +- pkg/kubectl/cmd/create_secret.go | 2 +- pkg/kubectl/cmd/create_secret_test.go | 2 +- pkg/kubectl/cmd/create_serviceaccount.go | 2 +- pkg/kubectl/cmd/create_serviceaccount_test.go | 2 +- pkg/kubectl/cmd/create_test.go | 2 +- pkg/kubectl/cmd/delete.go | 2 +- pkg/kubectl/cmd/delete_test.go | 2 +- pkg/kubectl/cmd/describe.go | 2 +- pkg/kubectl/cmd/describe_test.go | 2 +- pkg/kubectl/cmd/drain.go | 2 +- pkg/kubectl/cmd/drain_test.go | 2 +- pkg/kubectl/cmd/edit.go | 2 +- pkg/kubectl/cmd/exec.go | 2 +- pkg/kubectl/cmd/exec_test.go | 2 +- pkg/kubectl/cmd/explain.go | 2 +- pkg/kubectl/cmd/expose.go | 2 +- pkg/kubectl/cmd/expose_test.go | 2 +- pkg/kubectl/cmd/get.go | 2 +- pkg/kubectl/cmd/get_test.go | 2 +- pkg/kubectl/cmd/label.go | 2 +- pkg/kubectl/cmd/label_test.go | 2 +- pkg/kubectl/cmd/logs.go | 2 +- pkg/kubectl/cmd/logs_test.go | 2 +- pkg/kubectl/cmd/namespace.go | 2 +- pkg/kubectl/cmd/patch.go | 2 +- pkg/kubectl/cmd/patch_test.go | 2 +- pkg/kubectl/cmd/portforward.go | 2 +- pkg/kubectl/cmd/portforward_test.go | 2 +- pkg/kubectl/cmd/proxy.go | 2 +- pkg/kubectl/cmd/replace.go | 2 +- pkg/kubectl/cmd/replace_test.go | 2 +- pkg/kubectl/cmd/rollingupdate.go | 2 +- pkg/kubectl/cmd/rollingupdate_test.go | 2 +- pkg/kubectl/cmd/rollout/rollout.go | 2 +- pkg/kubectl/cmd/rollout/rollout_history.go | 2 +- pkg/kubectl/cmd/rollout/rollout_pause.go | 2 +- pkg/kubectl/cmd/rollout/rollout_resume.go | 2 +- pkg/kubectl/cmd/rollout/rollout_status.go | 2 +- pkg/kubectl/cmd/rollout/rollout_undo.go | 2 +- pkg/kubectl/cmd/run.go | 2 +- pkg/kubectl/cmd/run_test.go | 2 +- pkg/kubectl/cmd/scale.go | 2 +- pkg/kubectl/cmd/set/helper.go | 2 +- pkg/kubectl/cmd/set/set.go | 2 +- pkg/kubectl/cmd/set/set_image.go | 2 +- pkg/kubectl/cmd/stop.go | 2 +- pkg/kubectl/cmd/taint.go | 2 +- pkg/kubectl/cmd/taint_test.go | 2 +- pkg/kubectl/cmd/util/clientcache.go | 2 +- pkg/kubectl/cmd/util/editor/editor.go | 2 +- pkg/kubectl/cmd/util/editor/editor_test.go | 2 +- pkg/kubectl/cmd/util/factory.go | 2 +- pkg/kubectl/cmd/util/factory_test.go | 2 +- pkg/kubectl/cmd/util/helpers.go | 2 +- pkg/kubectl/cmd/util/helpers_test.go | 2 +- pkg/kubectl/cmd/util/jsonmerge/jsonmerge.go | 2 +- pkg/kubectl/cmd/util/printing.go | 2 +- pkg/kubectl/cmd/version.go | 2 +- pkg/kubectl/configmap.go | 2 +- pkg/kubectl/configmap_test.go | 2 +- pkg/kubectl/custom_column_printer.go | 2 +- pkg/kubectl/custom_column_printer_test.go | 2 +- pkg/kubectl/describe.go | 2 +- pkg/kubectl/describe_test.go | 2 +- pkg/kubectl/doc.go | 2 +- pkg/kubectl/explain.go | 2 +- pkg/kubectl/generate.go | 2 +- pkg/kubectl/generate_test.go | 2 +- pkg/kubectl/history.go | 2 +- pkg/kubectl/interfaces.go | 2 +- pkg/kubectl/kubectl.go | 2 +- pkg/kubectl/kubectl_test.go | 2 +- pkg/kubectl/namespace.go | 2 +- pkg/kubectl/namespace_test.go | 2 +- pkg/kubectl/proxy_server.go | 2 +- pkg/kubectl/proxy_server_test.go | 2 +- pkg/kubectl/resource/builder.go | 2 +- pkg/kubectl/resource/builder_test.go | 2 +- pkg/kubectl/resource/doc.go | 2 +- pkg/kubectl/resource/helper.go | 2 +- pkg/kubectl/resource/helper_test.go | 2 +- pkg/kubectl/resource/interfaces.go | 2 +- pkg/kubectl/resource/mapper.go | 2 +- pkg/kubectl/resource/result.go | 2 +- pkg/kubectl/resource/selector.go | 2 +- pkg/kubectl/resource/visitor.go | 2 +- pkg/kubectl/resource/visitor_test.go | 2 +- pkg/kubectl/resource_printer.go | 2 +- pkg/kubectl/resource_printer_test.go | 2 +- pkg/kubectl/rollback.go | 2 +- pkg/kubectl/rolling_updater.go | 2 +- pkg/kubectl/rolling_updater_test.go | 2 +- pkg/kubectl/rollout_status.go | 2 +- pkg/kubectl/run.go | 2 +- pkg/kubectl/run_test.go | 2 +- pkg/kubectl/scale.go | 2 +- pkg/kubectl/scale_test.go | 2 +- pkg/kubectl/secret.go | 2 +- pkg/kubectl/secret_for_docker_registry.go | 2 +- pkg/kubectl/secret_for_docker_registry_test.go | 2 +- pkg/kubectl/secret_for_tls.go | 2 +- pkg/kubectl/secret_for_tls_test.go | 2 +- pkg/kubectl/secret_test.go | 2 +- pkg/kubectl/service.go | 2 +- pkg/kubectl/service_test.go | 2 +- pkg/kubectl/serviceaccount.go | 2 +- pkg/kubectl/serviceaccount_test.go | 2 +- pkg/kubectl/sorted_event_list.go | 2 +- pkg/kubectl/sorted_event_list_test.go | 2 +- pkg/kubectl/sorted_resource_name_list.go | 2 +- pkg/kubectl/sorted_resource_name_list_test.go | 2 +- pkg/kubectl/sorting_printer.go | 2 +- pkg/kubectl/sorting_printer_test.go | 2 +- pkg/kubectl/stop.go | 2 +- pkg/kubectl/stop_test.go | 2 +- pkg/kubectl/testing/types.generated.go | 2 +- pkg/kubectl/testing/types.go | 2 +- pkg/kubectl/version.go | 2 +- pkg/kubectl/watchloop.go | 2 +- pkg/kubelet/api/v1alpha1/stats/types.go | 2 +- pkg/kubelet/cadvisor/cadvisor_linux.go | 2 +- pkg/kubelet/cadvisor/cadvisor_unsupported.go | 2 +- pkg/kubelet/cadvisor/doc.go | 2 +- pkg/kubelet/cadvisor/testing/cadvisor_fake.go | 2 +- pkg/kubelet/cadvisor/testing/cadvisor_mock.go | 2 +- pkg/kubelet/cadvisor/types.go | 2 +- pkg/kubelet/cadvisor/util.go | 2 +- pkg/kubelet/client/kubelet_client.go | 2 +- pkg/kubelet/client/kubelet_client_test.go | 2 +- pkg/kubelet/cm/cgroup_manager_linux.go | 2 +- pkg/kubelet/cm/cgroup_manager_unsupported.go | 2 +- pkg/kubelet/cm/container_manager.go | 2 +- pkg/kubelet/cm/container_manager_linux.go | 2 +- pkg/kubelet/cm/container_manager_linux_test.go | 2 +- pkg/kubelet/cm/container_manager_stub.go | 2 +- pkg/kubelet/cm/container_manager_unsupported.go | 2 +- pkg/kubelet/cm/container_manager_unsupported_test.go | 2 +- pkg/kubelet/cm/helpers_linux.go | 2 +- pkg/kubelet/cm/types.go | 2 +- pkg/kubelet/config/apiserver.go | 2 +- pkg/kubelet/config/apiserver_test.go | 2 +- pkg/kubelet/config/common.go | 2 +- pkg/kubelet/config/common_test.go | 2 +- pkg/kubelet/config/config.go | 2 +- pkg/kubelet/config/config_test.go | 2 +- pkg/kubelet/config/doc.go | 2 +- pkg/kubelet/config/file.go | 2 +- pkg/kubelet/config/file_test.go | 2 +- pkg/kubelet/config/http.go | 2 +- pkg/kubelet/config/http_test.go | 2 +- pkg/kubelet/config/sources.go | 2 +- pkg/kubelet/container/cache.go | 2 +- pkg/kubelet/container/cache_test.go | 2 +- pkg/kubelet/container/container_gc.go | 2 +- pkg/kubelet/container/container_reference_manager.go | 2 +- pkg/kubelet/container/event.go | 2 +- pkg/kubelet/container/helpers.go | 2 +- pkg/kubelet/container/helpers_test.go | 2 +- pkg/kubelet/container/image_puller.go | 2 +- pkg/kubelet/container/image_puller_test.go | 2 +- pkg/kubelet/container/os.go | 2 +- pkg/kubelet/container/pty_linux.go | 2 +- pkg/kubelet/container/pty_unsupported.go | 2 +- pkg/kubelet/container/ref.go | 2 +- pkg/kubelet/container/ref_test.go | 2 +- pkg/kubelet/container/runtime.go | 2 +- pkg/kubelet/container/runtime_cache.go | 2 +- pkg/kubelet/container/runtime_cache_fake.go | 2 +- pkg/kubelet/container/runtime_cache_test.go | 2 +- pkg/kubelet/container/serialized_image_puller.go | 2 +- pkg/kubelet/container/serialized_image_puller_test.go | 2 +- pkg/kubelet/container/sync_result.go | 2 +- pkg/kubelet/container/sync_result_test.go | 2 +- pkg/kubelet/container/testing/fake_cache.go | 2 +- pkg/kubelet/container/testing/fake_runtime.go | 2 +- pkg/kubelet/container/testing/os.go | 2 +- pkg/kubelet/container/testing/runtime_mock.go | 2 +- pkg/kubelet/container_bridge.go | 2 +- pkg/kubelet/custommetrics/custom_metrics.go | 2 +- pkg/kubelet/custommetrics/custom_metrics_test.go | 2 +- pkg/kubelet/disk_manager.go | 2 +- pkg/kubelet/disk_manager_test.go | 2 +- pkg/kubelet/doc.go | 2 +- pkg/kubelet/dockertools/container_gc.go | 2 +- pkg/kubelet/dockertools/container_gc_test.go | 2 +- pkg/kubelet/dockertools/convert.go | 2 +- pkg/kubelet/dockertools/convert_test.go | 2 +- pkg/kubelet/dockertools/docker.go | 2 +- pkg/kubelet/dockertools/docker_manager.go | 2 +- pkg/kubelet/dockertools/docker_manager_test.go | 2 +- pkg/kubelet/dockertools/docker_test.go | 2 +- pkg/kubelet/dockertools/exec.go | 2 +- pkg/kubelet/dockertools/fake_docker_client.go | 2 +- pkg/kubelet/dockertools/fake_manager.go | 2 +- pkg/kubelet/dockertools/images.go | 2 +- pkg/kubelet/dockertools/images_test.go | 2 +- pkg/kubelet/dockertools/instrumented_docker.go | 2 +- pkg/kubelet/dockertools/kube_docker_client.go | 2 +- pkg/kubelet/dockertools/labels.go | 2 +- pkg/kubelet/dockertools/labels_test.go | 2 +- pkg/kubelet/envvars/doc.go | 2 +- pkg/kubelet/envvars/envvars.go | 2 +- pkg/kubelet/envvars/envvars_test.go | 2 +- pkg/kubelet/eviction/doc.go | 2 +- pkg/kubelet/eviction/eviction_manager.go | 2 +- pkg/kubelet/eviction/eviction_manager_test.go | 2 +- pkg/kubelet/eviction/helpers.go | 2 +- pkg/kubelet/eviction/helpers_test.go | 2 +- pkg/kubelet/eviction/types.go | 2 +- pkg/kubelet/flannel_helper.go | 2 +- pkg/kubelet/image_manager.go | 2 +- pkg/kubelet/image_manager_test.go | 2 +- pkg/kubelet/kubelet.go | 2 +- pkg/kubelet/kubelet_cadvisor.go | 2 +- pkg/kubelet/kubelet_cadvisor_test.go | 2 +- pkg/kubelet/kubelet_getters.go | 2 +- pkg/kubelet/kubelet_getters_test.go | 2 +- pkg/kubelet/kubelet_resources.go | 2 +- pkg/kubelet/kubelet_resources_test.go | 2 +- pkg/kubelet/kubelet_test.go | 2 +- pkg/kubelet/kubelet_volumes.go | 2 +- pkg/kubelet/leaky/leaky.go | 2 +- pkg/kubelet/lifecycle/doc.go | 2 +- pkg/kubelet/lifecycle/fake_handler_runner.go | 2 +- pkg/kubelet/lifecycle/handlers.go | 2 +- pkg/kubelet/lifecycle/handlers_test.go | 2 +- pkg/kubelet/lifecycle/interfaces.go | 2 +- pkg/kubelet/metrics/metrics.go | 2 +- pkg/kubelet/network/cni/cni.go | 2 +- pkg/kubelet/network/cni/cni_test.go | 2 +- pkg/kubelet/network/cni/testing/mock_cni.go | 2 +- pkg/kubelet/network/exec/exec.go | 2 +- pkg/kubelet/network/exec/exec_test.go | 2 +- pkg/kubelet/network/exec/exec_unix.go | 2 +- pkg/kubelet/network/exec/exec_unsupported.go | 2 +- pkg/kubelet/network/hairpin/hairpin.go | 2 +- pkg/kubelet/network/hairpin/hairpin_test.go | 2 +- pkg/kubelet/network/hostport/fake_iptables.go | 2 +- pkg/kubelet/network/hostport/hostport.go | 2 +- pkg/kubelet/network/hostport/hostport_test.go | 2 +- pkg/kubelet/network/hostport/testing/fake.go | 2 +- pkg/kubelet/network/kubenet/kubenet_linux.go | 2 +- pkg/kubelet/network/kubenet/kubenet_linux_test.go | 2 +- pkg/kubelet/network/kubenet/kubenet_unsupported.go | 2 +- pkg/kubelet/network/mock_network/network_plugins.go | 2 +- pkg/kubelet/network/network.go | 2 +- pkg/kubelet/network/plugins.go | 2 +- pkg/kubelet/network/plugins_test.go | 2 +- pkg/kubelet/network/testing/fake_host.go | 2 +- pkg/kubelet/networks.go | 2 +- pkg/kubelet/oom_watcher.go | 2 +- pkg/kubelet/oom_watcher_test.go | 2 +- pkg/kubelet/pleg/doc.go | 2 +- pkg/kubelet/pleg/generic.go | 2 +- pkg/kubelet/pleg/generic_test.go | 2 +- pkg/kubelet/pleg/pleg.go | 2 +- pkg/kubelet/pod/mirror_client.go | 2 +- pkg/kubelet/pod/mirror_client_test.go | 2 +- pkg/kubelet/pod/pod_manager.go | 2 +- pkg/kubelet/pod/pod_manager_test.go | 2 +- pkg/kubelet/pod/testing/fake_mirror_client.go | 2 +- pkg/kubelet/pod_workers.go | 2 +- pkg/kubelet/pod_workers_test.go | 2 +- pkg/kubelet/prober/common_test.go | 2 +- pkg/kubelet/prober/prober.go | 2 +- pkg/kubelet/prober/prober_manager.go | 2 +- pkg/kubelet/prober/prober_manager_test.go | 2 +- pkg/kubelet/prober/prober_test.go | 2 +- pkg/kubelet/prober/results/results_manager.go | 2 +- pkg/kubelet/prober/results/results_manager_test.go | 2 +- pkg/kubelet/prober/testing/fake_manager.go | 2 +- pkg/kubelet/prober/worker.go | 2 +- pkg/kubelet/prober/worker_test.go | 2 +- pkg/kubelet/qos/doc.go | 2 +- pkg/kubelet/qos/policy.go | 2 +- pkg/kubelet/qos/policy_test.go | 2 +- pkg/kubelet/qos/qos.go | 2 +- pkg/kubelet/qos/qos_test.go | 2 +- pkg/kubelet/qos/types.go | 2 +- pkg/kubelet/reason_cache.go | 2 +- pkg/kubelet/reason_cache_test.go | 2 +- pkg/kubelet/rkt/cap.go | 2 +- pkg/kubelet/rkt/config.go | 2 +- pkg/kubelet/rkt/container_id.go | 2 +- pkg/kubelet/rkt/doc.go | 2 +- pkg/kubelet/rkt/fake_rkt_interface_test.go | 2 +- pkg/kubelet/rkt/image.go | 2 +- pkg/kubelet/rkt/log.go | 2 +- pkg/kubelet/rkt/mock_os/mockfileinfo.go | 2 +- pkg/kubelet/rkt/rkt.go | 2 +- pkg/kubelet/rkt/rkt_test.go | 2 +- pkg/kubelet/rkt/systemd.go | 2 +- pkg/kubelet/rkt/version.go | 2 +- pkg/kubelet/root_context_linux.go | 2 +- pkg/kubelet/root_context_unsupported.go | 2 +- pkg/kubelet/runonce.go | 2 +- pkg/kubelet/runonce_test.go | 2 +- pkg/kubelet/runtime.go | 2 +- pkg/kubelet/server/auth.go | 2 +- pkg/kubelet/server/doc.go | 2 +- pkg/kubelet/server/portforward/constants.go | 2 +- pkg/kubelet/server/remotecommand/attach.go | 2 +- pkg/kubelet/server/remotecommand/contants.go | 2 +- pkg/kubelet/server/remotecommand/doc.go | 2 +- pkg/kubelet/server/remotecommand/exec.go | 2 +- pkg/kubelet/server/remotecommand/httpstream.go | 2 +- pkg/kubelet/server/remotecommand/websocket.go | 2 +- pkg/kubelet/server/server.go | 2 +- pkg/kubelet/server/server_test.go | 2 +- pkg/kubelet/server/stats/doc.go | 2 +- pkg/kubelet/server/stats/fs_resource_analyzer.go | 2 +- pkg/kubelet/server/stats/handler.go | 2 +- pkg/kubelet/server/stats/mocks_test.go | 2 +- pkg/kubelet/server/stats/resource_analyzer.go | 2 +- pkg/kubelet/server/stats/summary.go | 2 +- pkg/kubelet/server/stats/summary_test.go | 2 +- pkg/kubelet/server/stats/volume_stat_calculator.go | 2 +- pkg/kubelet/status/generate.go | 2 +- pkg/kubelet/status/generate_test.go | 2 +- pkg/kubelet/status/status_manager.go | 2 +- pkg/kubelet/status/status_manager_test.go | 2 +- pkg/kubelet/types/constants.go | 2 +- pkg/kubelet/types/doc.go | 2 +- pkg/kubelet/types/labels.go | 2 +- pkg/kubelet/types/pod_update.go | 2 +- pkg/kubelet/types/pod_update_test.go | 2 +- pkg/kubelet/types/types.go | 2 +- pkg/kubelet/types/types_test.go | 2 +- pkg/kubelet/util.go | 2 +- pkg/kubelet/util/cache/object_cache.go | 2 +- pkg/kubelet/util/cache/object_cache_test.go | 2 +- pkg/kubelet/util/doc.go | 2 +- pkg/kubelet/util/format/pod.go | 2 +- pkg/kubelet/util/format/resources.go | 2 +- pkg/kubelet/util/format/resources_test.go | 2 +- pkg/kubelet/util/ioutils/ioutils.go | 2 +- pkg/kubelet/util/queue/work_queue.go | 2 +- pkg/kubelet/util/queue/work_queue_test.go | 2 +- pkg/kubelet/volume/cache/actual_state_of_world.go | 2 +- pkg/kubelet/volume/cache/actual_state_of_world_test.go | 2 +- pkg/kubelet/volume/cache/desired_state_of_world.go | 2 +- pkg/kubelet/volume/cache/desired_state_of_world_test.go | 2 +- .../volume/populator/desired_state_of_world_populator.go | 2 +- pkg/kubelet/volume/reconciler/reconciler.go | 2 +- pkg/kubelet/volume/reconciler/reconciler_test.go | 2 +- pkg/kubelet/volume/volume_manager.go | 2 +- pkg/kubelet/volume_host.go | 2 +- pkg/kubemark/hollow_kubelet.go | 2 +- pkg/kubemark/hollow_proxy.go | 2 +- pkg/labels/doc.go | 2 +- pkg/labels/labels.go | 2 +- pkg/labels/labels_test.go | 2 +- pkg/labels/selector.go | 2 +- pkg/labels/selector_test.go | 2 +- pkg/master/controller.go | 2 +- pkg/master/controller_test.go | 2 +- pkg/master/doc.go | 2 +- pkg/master/import_known_versions.go | 2 +- pkg/master/master.go | 2 +- pkg/master/master_test.go | 2 +- pkg/master/ports/doc.go | 2 +- pkg/master/ports/ports.go | 2 +- pkg/master/thirdparty_controller.go | 2 +- pkg/master/thirdparty_controller_test.go | 2 +- pkg/metrics/api_server_metrics.go | 2 +- pkg/metrics/controller_manager_metrics.go | 2 +- pkg/metrics/generic_metrics.go | 2 +- pkg/metrics/kubelet_metrics.go | 2 +- pkg/metrics/metrics_grabber.go | 2 +- pkg/metrics/scheduler_metrics.go | 2 +- pkg/probe/doc.go | 2 +- pkg/probe/exec/exec.go | 2 +- pkg/probe/exec/exec_test.go | 2 +- pkg/probe/http/http.go | 2 +- pkg/probe/http/http_test.go | 2 +- pkg/probe/probe.go | 2 +- pkg/probe/tcp/tcp.go | 2 +- pkg/probe/tcp/tcp_test.go | 2 +- pkg/proxy/config/api.go | 2 +- pkg/proxy/config/api_test.go | 2 +- pkg/proxy/config/config.go | 2 +- pkg/proxy/config/config_test.go | 2 +- pkg/proxy/config/doc.go | 2 +- pkg/proxy/doc.go | 2 +- pkg/proxy/iptables/proxier.go | 2 +- pkg/proxy/iptables/proxier_test.go | 2 +- pkg/proxy/types.go | 2 +- pkg/proxy/userspace/loadbalancer.go | 2 +- pkg/proxy/userspace/port_allocator.go | 2 +- pkg/proxy/userspace/port_allocator_test.go | 2 +- pkg/proxy/userspace/proxier.go | 2 +- pkg/proxy/userspace/proxier_test.go | 2 +- pkg/proxy/userspace/proxysocket.go | 2 +- pkg/proxy/userspace/rlimit.go | 2 +- pkg/proxy/userspace/rlimit_windows.go | 2 +- pkg/proxy/userspace/roundrobin.go | 2 +- pkg/proxy/userspace/roundrobin_test.go | 2 +- pkg/proxy/userspace/udp_server.go | 2 +- pkg/quota/evaluator/core/configmap.go | 2 +- pkg/quota/evaluator/core/doc.go | 2 +- pkg/quota/evaluator/core/persistent_volume_claims.go | 2 +- pkg/quota/evaluator/core/pods.go | 2 +- pkg/quota/evaluator/core/registry.go | 2 +- pkg/quota/evaluator/core/replication_controllers.go | 2 +- pkg/quota/evaluator/core/resource_quotas.go | 2 +- pkg/quota/evaluator/core/secrets.go | 2 +- pkg/quota/evaluator/core/services.go | 2 +- pkg/quota/evaluator/core/services_test.go | 2 +- pkg/quota/generic/evaluator.go | 2 +- pkg/quota/generic/registry.go | 2 +- pkg/quota/install/registry.go | 2 +- pkg/quota/interfaces.go | 2 +- pkg/quota/resources.go | 2 +- pkg/quota/resources_test.go | 2 +- pkg/registry/cachesize/cachesize.go | 2 +- pkg/registry/certificates/doc.go | 2 +- pkg/registry/certificates/etcd/etcd.go | 2 +- pkg/registry/certificates/registry.go | 2 +- pkg/registry/certificates/strategy.go | 2 +- pkg/registry/clusterrole/doc.go | 2 +- pkg/registry/clusterrole/etcd/etcd.go | 2 +- pkg/registry/clusterrole/policybased/storage.go | 2 +- pkg/registry/clusterrole/registry.go | 2 +- pkg/registry/clusterrole/strategy.go | 2 +- pkg/registry/clusterrolebinding/doc.go | 2 +- pkg/registry/clusterrolebinding/etcd/etcd.go | 2 +- pkg/registry/clusterrolebinding/policybased/storage.go | 2 +- pkg/registry/clusterrolebinding/registry.go | 2 +- pkg/registry/clusterrolebinding/strategy.go | 2 +- pkg/registry/componentstatus/doc.go | 2 +- pkg/registry/componentstatus/rest.go | 2 +- pkg/registry/componentstatus/rest_test.go | 2 +- pkg/registry/configmap/doc.go | 2 +- pkg/registry/configmap/etcd/etcd.go | 2 +- pkg/registry/configmap/etcd/etcd_test.go | 2 +- pkg/registry/configmap/registry.go | 2 +- pkg/registry/configmap/strategy.go | 2 +- pkg/registry/configmap/strategy_test.go | 2 +- pkg/registry/controller/doc.go | 2 +- pkg/registry/controller/etcd/etcd.go | 2 +- pkg/registry/controller/etcd/etcd_test.go | 2 +- pkg/registry/controller/registry.go | 2 +- pkg/registry/controller/strategy.go | 2 +- pkg/registry/controller/strategy_test.go | 2 +- pkg/registry/daemonset/doc.go | 2 +- pkg/registry/daemonset/etcd/etcd.go | 2 +- pkg/registry/daemonset/etcd/etcd_test.go | 2 +- pkg/registry/daemonset/strategy.go | 2 +- pkg/registry/daemonset/strategy_test.go | 2 +- pkg/registry/deployment/doc.go | 2 +- pkg/registry/deployment/etcd/etcd.go | 2 +- pkg/registry/deployment/etcd/etcd_test.go | 2 +- pkg/registry/deployment/registry.go | 2 +- pkg/registry/deployment/strategy.go | 2 +- pkg/registry/deployment/strategy_test.go | 2 +- pkg/registry/doc.go | 2 +- pkg/registry/endpoint/doc.go | 2 +- pkg/registry/endpoint/etcd/etcd.go | 2 +- pkg/registry/endpoint/etcd/etcd_test.go | 2 +- pkg/registry/endpoint/registry.go | 2 +- pkg/registry/endpoint/strategy.go | 2 +- pkg/registry/endpoint/strategy_test.go | 2 +- pkg/registry/event/doc.go | 2 +- pkg/registry/event/etcd/etcd.go | 2 +- pkg/registry/event/etcd/etcd_test.go | 2 +- pkg/registry/event/strategy.go | 2 +- pkg/registry/event/strategy_test.go | 2 +- pkg/registry/experimental/controller/etcd/etcd.go | 2 +- pkg/registry/experimental/controller/etcd/etcd_test.go | 2 +- pkg/registry/generic/doc.go | 2 +- pkg/registry/generic/matcher.go | 2 +- pkg/registry/generic/matcher_test.go | 2 +- pkg/registry/generic/options.go | 2 +- pkg/registry/generic/registry/doc.go | 2 +- pkg/registry/generic/registry/storage_factory.go | 2 +- pkg/registry/generic/registry/store.go | 2 +- pkg/registry/generic/registry/store_test.go | 2 +- pkg/registry/generic/rest/doc.go | 2 +- pkg/registry/generic/rest/proxy.go | 2 +- pkg/registry/generic/rest/proxy_test.go | 2 +- pkg/registry/generic/rest/response_checker.go | 2 +- pkg/registry/generic/rest/response_checker_test.go | 2 +- pkg/registry/generic/rest/streamer.go | 2 +- pkg/registry/generic/rest/streamer_test.go | 2 +- pkg/registry/generic/storage_decorator.go | 2 +- pkg/registry/horizontalpodautoscaler/doc.go | 2 +- pkg/registry/horizontalpodautoscaler/etcd/etcd.go | 2 +- pkg/registry/horizontalpodautoscaler/etcd/etcd_test.go | 2 +- pkg/registry/horizontalpodautoscaler/strategy.go | 2 +- pkg/registry/horizontalpodautoscaler/strategy_test.go | 2 +- pkg/registry/ingress/doc.go | 2 +- pkg/registry/ingress/etcd/etcd.go | 2 +- pkg/registry/ingress/etcd/etcd_test.go | 2 +- pkg/registry/ingress/strategy.go | 2 +- pkg/registry/ingress/strategy_test.go | 2 +- pkg/registry/job/doc.go | 2 +- pkg/registry/job/etcd/etcd.go | 2 +- pkg/registry/job/etcd/etcd_test.go | 2 +- pkg/registry/job/strategy.go | 2 +- pkg/registry/job/strategy_test.go | 2 +- pkg/registry/limitrange/doc.go | 2 +- pkg/registry/limitrange/etcd/etcd.go | 2 +- pkg/registry/limitrange/etcd/etcd_test.go | 2 +- pkg/registry/limitrange/strategy.go | 2 +- pkg/registry/limitrange/strategy_test.go | 2 +- pkg/registry/namespace/doc.go | 2 +- pkg/registry/namespace/etcd/etcd.go | 2 +- pkg/registry/namespace/etcd/etcd_test.go | 2 +- pkg/registry/namespace/registry.go | 2 +- pkg/registry/namespace/strategy.go | 2 +- pkg/registry/namespace/strategy_test.go | 2 +- pkg/registry/networkpolicy/doc.go | 2 +- pkg/registry/networkpolicy/etcd/etcd.go | 2 +- pkg/registry/networkpolicy/etcd/etcd_test.go | 2 +- pkg/registry/networkpolicy/strategy.go | 2 +- pkg/registry/networkpolicy/strategy_test.go | 2 +- pkg/registry/node/doc.go | 2 +- pkg/registry/node/etcd/etcd.go | 2 +- pkg/registry/node/etcd/etcd_test.go | 2 +- pkg/registry/node/registry.go | 2 +- pkg/registry/node/rest/proxy.go | 2 +- pkg/registry/node/strategy.go | 2 +- pkg/registry/node/strategy_test.go | 2 +- pkg/registry/persistentvolume/doc.go | 2 +- pkg/registry/persistentvolume/etcd/etcd.go | 2 +- pkg/registry/persistentvolume/etcd/etcd_test.go | 2 +- pkg/registry/persistentvolume/strategy.go | 2 +- pkg/registry/persistentvolume/strategy_test.go | 2 +- pkg/registry/persistentvolumeclaim/doc.go | 2 +- pkg/registry/persistentvolumeclaim/etcd/etcd.go | 2 +- pkg/registry/persistentvolumeclaim/etcd/etcd_test.go | 2 +- pkg/registry/persistentvolumeclaim/strategy.go | 2 +- pkg/registry/persistentvolumeclaim/strategy_test.go | 2 +- pkg/registry/petset/doc.go | 2 +- pkg/registry/petset/etcd/etcd.go | 2 +- pkg/registry/petset/etcd/etcd_test.go | 2 +- pkg/registry/petset/strategy.go | 2 +- pkg/registry/petset/strategy_test.go | 2 +- pkg/registry/pod/doc.go | 2 +- pkg/registry/pod/etcd/etcd.go | 2 +- pkg/registry/pod/etcd/etcd_test.go | 2 +- pkg/registry/pod/rest/log.go | 2 +- pkg/registry/pod/rest/log_test.go | 2 +- pkg/registry/pod/rest/subresources.go | 2 +- pkg/registry/pod/strategy.go | 2 +- pkg/registry/pod/strategy_test.go | 2 +- pkg/registry/poddisruptionbudget/doc.go | 2 +- pkg/registry/poddisruptionbudget/etcd/etcd.go | 2 +- pkg/registry/poddisruptionbudget/etcd/etcd_test.go | 2 +- pkg/registry/poddisruptionbudget/strategy.go | 2 +- pkg/registry/poddisruptionbudget/strategy_test.go | 2 +- pkg/registry/podsecuritypolicy/doc.go | 2 +- pkg/registry/podsecuritypolicy/etcd/etcd.go | 2 +- pkg/registry/podsecuritypolicy/etcd/etcd_test.go | 2 +- pkg/registry/podsecuritypolicy/strategy.go | 2 +- pkg/registry/podtemplate/doc.go | 2 +- pkg/registry/podtemplate/etcd/etcd.go | 2 +- pkg/registry/podtemplate/etcd/etcd_test.go | 2 +- pkg/registry/podtemplate/strategy.go | 2 +- pkg/registry/podtemplate/strategy_test.go | 2 +- pkg/registry/registrytest/doc.go | 2 +- pkg/registry/registrytest/endpoint.go | 2 +- pkg/registry/registrytest/etcd.go | 2 +- pkg/registry/registrytest/node.go | 2 +- pkg/registry/registrytest/service.go | 2 +- pkg/registry/replicaset/doc.go | 2 +- pkg/registry/replicaset/etcd/etcd.go | 2 +- pkg/registry/replicaset/etcd/etcd_test.go | 2 +- pkg/registry/replicaset/registry.go | 2 +- pkg/registry/replicaset/strategy.go | 2 +- pkg/registry/replicaset/strategy_test.go | 2 +- pkg/registry/resourcequota/doc.go | 2 +- pkg/registry/resourcequota/etcd/etcd.go | 2 +- pkg/registry/resourcequota/etcd/etcd_test.go | 2 +- pkg/registry/resourcequota/strategy.go | 2 +- pkg/registry/resourcequota/strategy_test.go | 2 +- pkg/registry/role/doc.go | 2 +- pkg/registry/role/etcd/etcd.go | 2 +- pkg/registry/role/policybased/storage.go | 2 +- pkg/registry/role/registry.go | 2 +- pkg/registry/role/strategy.go | 2 +- pkg/registry/rolebinding/doc.go | 2 +- pkg/registry/rolebinding/etcd/etcd.go | 2 +- pkg/registry/rolebinding/policybased/storage.go | 2 +- pkg/registry/rolebinding/registry.go | 2 +- pkg/registry/rolebinding/strategy.go | 2 +- pkg/registry/scheduledjob/doc.go | 2 +- pkg/registry/scheduledjob/etcd/etcd.go | 2 +- pkg/registry/scheduledjob/strategy.go | 2 +- pkg/registry/scheduledjob/strategy_test.go | 2 +- pkg/registry/secret/doc.go | 2 +- pkg/registry/secret/etcd/etcd.go | 2 +- pkg/registry/secret/etcd/etcd_test.go | 2 +- pkg/registry/secret/registry.go | 2 +- pkg/registry/secret/strategy.go | 2 +- pkg/registry/secret/strategy_test.go | 2 +- pkg/registry/service/allocator/bitmap.go | 2 +- pkg/registry/service/allocator/bitmap_test.go | 2 +- pkg/registry/service/allocator/etcd/etcd.go | 2 +- pkg/registry/service/allocator/etcd/etcd_test.go | 2 +- pkg/registry/service/allocator/interfaces.go | 2 +- pkg/registry/service/allocator/utils.go | 2 +- pkg/registry/service/allocator/utils_test.go | 2 +- pkg/registry/service/doc.go | 2 +- pkg/registry/service/etcd/etcd.go | 2 +- pkg/registry/service/etcd/etcd_test.go | 2 +- pkg/registry/service/ipallocator/allocator.go | 2 +- pkg/registry/service/ipallocator/allocator_test.go | 2 +- pkg/registry/service/ipallocator/controller/repair.go | 2 +- pkg/registry/service/ipallocator/controller/repair_test.go | 2 +- pkg/registry/service/ipallocator/etcd/etcd.go | 2 +- pkg/registry/service/ipallocator/etcd/etcd_test.go | 2 +- pkg/registry/service/portallocator/allocator.go | 2 +- pkg/registry/service/portallocator/allocator_test.go | 2 +- pkg/registry/service/portallocator/controller/repair.go | 2 +- pkg/registry/service/portallocator/operation.go | 2 +- pkg/registry/service/proxy.go | 2 +- pkg/registry/service/registry.go | 2 +- pkg/registry/service/rest.go | 2 +- pkg/registry/service/rest_test.go | 2 +- pkg/registry/service/strategy.go | 2 +- pkg/registry/service/strategy_test.go | 2 +- pkg/registry/serviceaccount/doc.go | 2 +- pkg/registry/serviceaccount/etcd/etcd.go | 2 +- pkg/registry/serviceaccount/etcd/etcd_test.go | 2 +- pkg/registry/serviceaccount/registry.go | 2 +- pkg/registry/serviceaccount/strategy.go | 2 +- pkg/registry/serviceaccount/strategy_test.go | 2 +- pkg/registry/thirdpartyresource/doc.go | 2 +- pkg/registry/thirdpartyresource/etcd/etcd.go | 2 +- pkg/registry/thirdpartyresource/etcd/etcd_test.go | 2 +- pkg/registry/thirdpartyresource/strategy.go | 2 +- pkg/registry/thirdpartyresource/strategy_test.go | 2 +- pkg/registry/thirdpartyresourcedata/codec.go | 2 +- pkg/registry/thirdpartyresourcedata/codec_test.go | 2 +- pkg/registry/thirdpartyresourcedata/doc.go | 2 +- pkg/registry/thirdpartyresourcedata/etcd/etcd.go | 2 +- pkg/registry/thirdpartyresourcedata/etcd/etcd_test.go | 2 +- pkg/registry/thirdpartyresourcedata/registry.go | 2 +- pkg/registry/thirdpartyresourcedata/strategy.go | 2 +- pkg/registry/thirdpartyresourcedata/strategy_test.go | 2 +- pkg/registry/thirdpartyresourcedata/util.go | 2 +- pkg/registry/thirdpartyresourcedata/util_test.go | 2 +- pkg/runtime/codec.go | 2 +- pkg/runtime/codec_check.go | 2 +- pkg/runtime/conversion.go | 2 +- pkg/runtime/conversion_test.go | 2 +- pkg/runtime/deep_copy_generated.go | 2 +- pkg/runtime/doc.go | 2 +- pkg/runtime/embedded.go | 2 +- pkg/runtime/embedded_test.go | 2 +- pkg/runtime/error.go | 2 +- pkg/runtime/extension.go | 2 +- pkg/runtime/extension_test.go | 2 +- pkg/runtime/generated.pb.go | 2 +- pkg/runtime/generated.proto | 2 +- pkg/runtime/helper.go | 2 +- pkg/runtime/helper_test.go | 2 +- pkg/runtime/interfaces.go | 2 +- pkg/runtime/register.go | 2 +- pkg/runtime/scheme.go | 2 +- pkg/runtime/scheme_test.go | 2 +- pkg/runtime/serializer/codec_factory.go | 2 +- pkg/runtime/serializer/codec_test.go | 2 +- pkg/runtime/serializer/json/json.go | 2 +- pkg/runtime/serializer/json/json_test.go | 2 +- pkg/runtime/serializer/json/meta.go | 2 +- pkg/runtime/serializer/json/meta_test.go | 2 +- pkg/runtime/serializer/negotiated_codec.go | 2 +- pkg/runtime/serializer/protobuf/doc.go | 2 +- pkg/runtime/serializer/protobuf/protobuf.go | 2 +- pkg/runtime/serializer/protobuf/protobuf_test.go | 2 +- pkg/runtime/serializer/protobuf_extension.go | 2 +- pkg/runtime/serializer/recognizer/recognizer.go | 2 +- pkg/runtime/serializer/recognizer/recognizer_test.go | 2 +- pkg/runtime/serializer/streaming/streaming.go | 2 +- pkg/runtime/serializer/streaming/streaming_test.go | 2 +- pkg/runtime/serializer/versioning/versioning.go | 2 +- pkg/runtime/serializer/versioning/versioning_test.go | 2 +- pkg/runtime/serializer/yaml/yaml.go | 2 +- pkg/runtime/swagger_doc_generator.go | 2 +- pkg/runtime/swagger_doc_generator_test.go | 2 +- pkg/runtime/types.go | 2 +- pkg/runtime/types_proto.go | 2 +- pkg/runtime/unstructured.go | 2 +- pkg/runtime/unstructured_test.go | 2 +- pkg/runtime/unversioned_test.go | 2 +- pkg/security/doc.go | 2 +- pkg/security/podsecuritypolicy/capabilities/mustrunas.go | 2 +- pkg/security/podsecuritypolicy/capabilities/mustrunas_test.go | 2 +- pkg/security/podsecuritypolicy/capabilities/types.go | 2 +- pkg/security/podsecuritypolicy/factory.go | 2 +- pkg/security/podsecuritypolicy/group/mustrunas.go | 2 +- pkg/security/podsecuritypolicy/group/mustrunas_test.go | 2 +- pkg/security/podsecuritypolicy/group/runasany.go | 2 +- pkg/security/podsecuritypolicy/group/runasany_test.go | 2 +- pkg/security/podsecuritypolicy/group/types.go | 2 +- pkg/security/podsecuritypolicy/provider.go | 2 +- pkg/security/podsecuritypolicy/provider_test.go | 2 +- pkg/security/podsecuritypolicy/selinux/mustrunas.go | 2 +- pkg/security/podsecuritypolicy/selinux/mustrunas_test.go | 2 +- pkg/security/podsecuritypolicy/selinux/runasany.go | 2 +- pkg/security/podsecuritypolicy/selinux/runasany_test.go | 2 +- pkg/security/podsecuritypolicy/selinux/types.go | 2 +- pkg/security/podsecuritypolicy/types.go | 2 +- pkg/security/podsecuritypolicy/user/mustrunas.go | 2 +- pkg/security/podsecuritypolicy/user/mustrunas_test.go | 2 +- pkg/security/podsecuritypolicy/user/nonroot.go | 2 +- pkg/security/podsecuritypolicy/user/nonroot_test.go | 2 +- pkg/security/podsecuritypolicy/user/runasany.go | 2 +- pkg/security/podsecuritypolicy/user/runasany_test.go | 2 +- pkg/security/podsecuritypolicy/user/types.go | 2 +- pkg/security/podsecuritypolicy/util/util.go | 2 +- pkg/security/podsecuritypolicy/util/util_test.go | 2 +- pkg/securitycontext/doc.go | 2 +- pkg/securitycontext/fake.go | 2 +- pkg/securitycontext/provider.go | 2 +- pkg/securitycontext/provider_test.go | 2 +- pkg/securitycontext/types.go | 2 +- pkg/securitycontext/util.go | 2 +- pkg/securitycontext/util_test.go | 2 +- pkg/serviceaccount/jwt.go | 2 +- pkg/serviceaccount/jwt_test.go | 2 +- pkg/serviceaccount/util.go | 2 +- pkg/serviceaccount/util_test.go | 2 +- pkg/ssh/ssh.go | 2 +- pkg/ssh/ssh_test.go | 2 +- pkg/storage/cacher.go | 2 +- pkg/storage/cacher_test.go | 2 +- pkg/storage/doc.go | 2 +- pkg/storage/errors.go | 2 +- pkg/storage/etcd/api_object_versioner.go | 2 +- pkg/storage/etcd/api_object_versioner_test.go | 2 +- pkg/storage/etcd/doc.go | 2 +- pkg/storage/etcd/etcd_helper.go | 2 +- pkg/storage/etcd/etcd_helper_test.go | 2 +- pkg/storage/etcd/etcd_watcher.go | 2 +- pkg/storage/etcd/etcd_watcher_test.go | 2 +- pkg/storage/etcd/etcdtest/doc.go | 2 +- pkg/storage/etcd/etcdtest/etcdtest.go | 2 +- pkg/storage/etcd/metrics/metrics.go | 2 +- pkg/storage/etcd/testing/certificates.go | 2 +- pkg/storage/etcd/testing/utils.go | 2 +- pkg/storage/etcd/util/doc.go | 2 +- pkg/storage/etcd/util/etcd_util.go | 2 +- pkg/storage/etcd/util/etcd_util_test.go | 2 +- pkg/storage/etcd3/compact.go | 2 +- pkg/storage/etcd3/compact_test.go | 2 +- pkg/storage/etcd3/event.go | 2 +- pkg/storage/etcd3/store.go | 2 +- pkg/storage/etcd3/store_test.go | 2 +- pkg/storage/etcd3/watcher.go | 2 +- pkg/storage/etcd3/watcher_test.go | 2 +- pkg/storage/interfaces.go | 2 +- pkg/storage/storagebackend/config.go | 2 +- pkg/storage/storagebackend/factory/etcd2.go | 2 +- pkg/storage/storagebackend/factory/etcd3.go | 2 +- pkg/storage/storagebackend/factory/factory.go | 2 +- pkg/storage/testing/types.generated.go | 2 +- pkg/storage/testing/types.go | 2 +- pkg/storage/testing/utils.go | 2 +- pkg/storage/util.go | 2 +- pkg/storage/util_test.go | 2 +- pkg/storage/watch_cache.go | 2 +- pkg/storage/watch_cache_test.go | 2 +- pkg/types/doc.go | 2 +- pkg/types/namespacedname.go | 2 +- pkg/types/uid.go | 2 +- pkg/types/unix_user_id.go | 2 +- pkg/ui/data/swagger/datafile.go | 2 +- pkg/ui/doc.go | 2 +- pkg/ui/installsupport.go | 2 +- pkg/util/bandwidth/doc.go | 2 +- pkg/util/bandwidth/fake_shaper.go | 2 +- pkg/util/bandwidth/interfaces.go | 2 +- pkg/util/bandwidth/linux.go | 2 +- pkg/util/bandwidth/linux_test.go | 2 +- pkg/util/bandwidth/unsupported.go | 2 +- pkg/util/bandwidth/utils.go | 2 +- pkg/util/cache/cache.go | 2 +- pkg/util/cache/cache_test.go | 2 +- pkg/util/cache/lruexpirecache.go | 2 +- pkg/util/cache/lruexpirecache_test.go | 2 +- pkg/util/certificates/csr.go | 2 +- pkg/util/chmod/chmod.go | 2 +- pkg/util/chmod/doc.go | 2 +- pkg/util/chown/chown.go | 2 +- pkg/util/chown/doc.go | 2 +- pkg/util/clock.go | 2 +- pkg/util/clock_test.go | 2 +- pkg/util/codeinspector/codeinspector.go | 2 +- pkg/util/config/config.go | 2 +- pkg/util/config/config_test.go | 2 +- pkg/util/config/configuration_map.go | 2 +- pkg/util/config/doc.go | 2 +- pkg/util/configz/configz.go | 2 +- pkg/util/configz/configz_test.go | 2 +- pkg/util/crlf/crlf.go | 2 +- pkg/util/crypto/crypto.go | 2 +- pkg/util/dbus/dbus.go | 2 +- pkg/util/dbus/dbus_test.go | 2 +- pkg/util/dbus/doc.go | 2 +- pkg/util/dbus/fake_dbus.go | 2 +- pkg/util/deployment/deployment.go | 2 +- pkg/util/deployment/deployment_test.go | 2 +- pkg/util/diff/diff.go | 2 +- pkg/util/diff/diff_test.go | 2 +- pkg/util/doc.go | 2 +- pkg/util/env/env.go | 2 +- pkg/util/env/env_test.go | 2 +- pkg/util/errors/doc.go | 2 +- pkg/util/errors/errors.go | 2 +- pkg/util/errors/errors_test.go | 2 +- pkg/util/exec/doc.go | 2 +- pkg/util/exec/exec.go | 2 +- pkg/util/exec/exec_test.go | 2 +- pkg/util/exec/fake_exec.go | 2 +- pkg/util/flag/flags.go | 2 +- pkg/util/flag/tristate.go | 2 +- pkg/util/flock/flock_other.go | 2 +- pkg/util/flock/flock_unix.go | 2 +- pkg/util/flowcontrol/backoff.go | 2 +- pkg/util/flowcontrol/backoff_test.go | 2 +- pkg/util/flowcontrol/throttle.go | 2 +- pkg/util/flowcontrol/throttle_test.go | 2 +- pkg/util/flushwriter/doc.go | 2 +- pkg/util/flushwriter/writer.go | 2 +- pkg/util/flushwriter/writer_test.go | 2 +- pkg/util/framer/framer.go | 2 +- pkg/util/framer/framer_test.go | 2 +- pkg/util/goroutinemap/goroutinemap.go | 2 +- pkg/util/goroutinemap/goroutinemap_test.go | 2 +- pkg/util/hash/hash.go | 2 +- pkg/util/hash/hash_test.go | 2 +- pkg/util/homedir/homedir.go | 2 +- pkg/util/httpstream/doc.go | 2 +- pkg/util/httpstream/httpstream.go | 2 +- pkg/util/httpstream/httpstream_test.go | 2 +- pkg/util/httpstream/spdy/connection.go | 2 +- pkg/util/httpstream/spdy/connection_test.go | 2 +- pkg/util/httpstream/spdy/roundtripper.go | 2 +- pkg/util/httpstream/spdy/roundtripper_test.go | 2 +- pkg/util/httpstream/spdy/upgrade.go | 2 +- pkg/util/httpstream/spdy/upgrade_test.go | 2 +- pkg/util/integer/integer.go | 2 +- pkg/util/integer/integer_test.go | 2 +- pkg/util/interrupt/interrupt.go | 2 +- pkg/util/intstr/deep_copy_generated.go | 2 +- pkg/util/intstr/generated.pb.go | 2 +- pkg/util/intstr/generated.proto | 2 +- pkg/util/intstr/intstr.go | 2 +- pkg/util/intstr/intstr_test.go | 2 +- pkg/util/io/io.go | 2 +- pkg/util/io/io_test.go | 2 +- pkg/util/io/writer.go | 2 +- pkg/util/iptables/doc.go | 2 +- pkg/util/iptables/iptables.go | 2 +- pkg/util/iptables/iptables_test.go | 2 +- pkg/util/iptables/save_restore.go | 2 +- pkg/util/iptables/testing/fake.go | 2 +- pkg/util/json/json.go | 2 +- pkg/util/json/json_test.go | 2 +- pkg/util/jsonpath/doc.go | 2 +- pkg/util/jsonpath/jsonpath.go | 2 +- pkg/util/jsonpath/jsonpath_test.go | 2 +- pkg/util/jsonpath/node.go | 2 +- pkg/util/jsonpath/parser.go | 2 +- pkg/util/jsonpath/parser_test.go | 2 +- pkg/util/keymutex/keymutex.go | 2 +- pkg/util/keymutex/keymutex_test.go | 2 +- pkg/util/labels/doc.go | 2 +- pkg/util/labels/labels.go | 2 +- pkg/util/labels/labels_test.go | 2 +- pkg/util/limitwriter/doc.go | 2 +- pkg/util/limitwriter/limitwriter.go | 2 +- pkg/util/line_delimiter.go | 2 +- pkg/util/line_delimiter_test.go | 2 +- pkg/util/logs.go | 2 +- pkg/util/metrics/util.go | 2 +- pkg/util/mount/doc.go | 2 +- pkg/util/mount/fake.go | 2 +- pkg/util/mount/mount.go | 2 +- pkg/util/mount/mount_linux.go | 2 +- pkg/util/mount/mount_linux_test.go | 2 +- pkg/util/mount/mount_unsupported.go | 2 +- pkg/util/mount/nsenter_mount.go | 2 +- pkg/util/mount/nsenter_mount_unsupported.go | 2 +- pkg/util/mount/safe_format_and_mount_test.go | 2 +- pkg/util/net/http.go | 2 +- pkg/util/net/http_test.go | 2 +- pkg/util/net/interface.go | 2 +- pkg/util/net/interface_test.go | 2 +- pkg/util/net/port_range.go | 2 +- pkg/util/net/port_range_test.go | 2 +- pkg/util/net/port_split.go | 2 +- pkg/util/net/port_split_test.go | 2 +- pkg/util/net/sets/ipnet.go | 2 +- pkg/util/net/sets/ipnet_test.go | 2 +- pkg/util/net/util.go | 2 +- pkg/util/net/util_test.go | 2 +- pkg/util/node/node.go | 2 +- pkg/util/oom/doc.go | 2 +- pkg/util/oom/oom.go | 2 +- pkg/util/oom/oom_fake.go | 2 +- pkg/util/oom/oom_linux.go | 2 +- pkg/util/oom/oom_linux_test.go | 2 +- pkg/util/oom/oom_unsupported.go | 2 +- pkg/util/parsers/parsers.go | 2 +- pkg/util/parsers/parsers_test.go | 2 +- pkg/util/pod/doc.go | 2 +- pkg/util/pod/pod.go | 2 +- pkg/util/procfs/doc.go | 2 +- pkg/util/procfs/procfs.go | 2 +- pkg/util/procfs/procfs_fake.go | 2 +- pkg/util/procfs/procfs_interface.go | 2 +- pkg/util/procfs/procfs_test.go | 2 +- pkg/util/proxy/dial.go | 2 +- pkg/util/proxy/doc.go | 2 +- pkg/util/proxy/transport.go | 2 +- pkg/util/proxy/transport_test.go | 2 +- pkg/util/rand/rand.go | 2 +- pkg/util/rand/rand_test.go | 2 +- pkg/util/replicaset/replicaset.go | 2 +- pkg/util/resource_container_linux.go | 2 +- pkg/util/resource_container_unsupported.go | 2 +- pkg/util/runner.go | 2 +- pkg/util/runner_test.go | 2 +- pkg/util/runtime/runtime.go | 2 +- pkg/util/runtime/runtime_test.go | 2 +- pkg/util/selinux/doc.go | 2 +- pkg/util/selinux/selinux.go | 2 +- pkg/util/selinux/selinux_linux.go | 2 +- pkg/util/selinux/selinux_unsupported.go | 2 +- pkg/util/sets/byte.go | 2 +- pkg/util/sets/doc.go | 2 +- pkg/util/sets/empty.go | 2 +- pkg/util/sets/int.go | 2 +- pkg/util/sets/int64.go | 2 +- pkg/util/sets/set_test.go | 2 +- pkg/util/sets/string.go | 2 +- pkg/util/sets/types/types.go | 2 +- pkg/util/slice/slice.go | 2 +- pkg/util/slice/slice_test.go | 2 +- pkg/util/strategicpatch/patch.go | 2 +- pkg/util/strategicpatch/patch_test.go | 2 +- pkg/util/string_flag.go | 2 +- pkg/util/strings/escape.go | 2 +- pkg/util/strings/strings.go | 2 +- pkg/util/strings/strings_test.go | 2 +- pkg/util/sysctl/sysctl.go | 2 +- pkg/util/system/system_utils.go | 2 +- pkg/util/template.go | 2 +- pkg/util/template_test.go | 2 +- pkg/util/term/term.go | 2 +- pkg/util/testing/fake_handler.go | 2 +- pkg/util/testing/fake_handler_test.go | 2 +- pkg/util/testing/tmpdir.go | 2 +- pkg/util/threading/deadlock-detector.go | 2 +- pkg/util/threading/deadlock-detector_test.go | 2 +- pkg/util/trace.go | 2 +- pkg/util/umask.go | 2 +- pkg/util/umask_windows.go | 2 +- pkg/util/util.go | 2 +- pkg/util/util_test.go | 2 +- pkg/util/uuid.go | 2 +- pkg/util/validation/field/errors.go | 2 +- pkg/util/validation/field/errors_test.go | 2 +- pkg/util/validation/field/path.go | 2 +- pkg/util/validation/field/path_test.go | 2 +- pkg/util/validation/validation.go | 2 +- pkg/util/validation/validation_test.go | 2 +- pkg/util/wait/doc.go | 2 +- pkg/util/wait/wait.go | 2 +- pkg/util/wait/wait_test.go | 2 +- pkg/util/workqueue/default_rate_limiters.go | 2 +- pkg/util/workqueue/default_rate_limiters_test.go | 2 +- pkg/util/workqueue/delaying_queue.go | 2 +- pkg/util/workqueue/delaying_queue_test.go | 2 +- pkg/util/workqueue/doc.go | 2 +- pkg/util/workqueue/parallelizer.go | 2 +- pkg/util/workqueue/queue.go | 2 +- pkg/util/workqueue/queue_test.go | 2 +- pkg/util/workqueue/rate_limitting_queue.go | 2 +- pkg/util/workqueue/rate_limitting_queue_test.go | 2 +- pkg/util/wsstream/conn.go | 2 +- pkg/util/wsstream/conn_test.go | 2 +- pkg/util/wsstream/doc.go | 2 +- pkg/util/wsstream/stream.go | 2 +- pkg/util/wsstream/stream_test.go | 2 +- pkg/util/yaml/decoder.go | 2 +- pkg/util/yaml/decoder_test.go | 2 +- pkg/version/base.go | 2 +- pkg/version/doc.go | 2 +- pkg/version/semver.go | 2 +- pkg/version/semver_test.go | 2 +- pkg/version/verflag/verflag.go | 2 +- pkg/version/version.go | 2 +- pkg/volume/aws_ebs/attacher.go | 2 +- pkg/volume/aws_ebs/attacher_test.go | 2 +- pkg/volume/aws_ebs/aws_ebs.go | 2 +- pkg/volume/aws_ebs/aws_ebs_test.go | 2 +- pkg/volume/aws_ebs/aws_util.go | 2 +- pkg/volume/aws_ebs/doc.go | 2 +- pkg/volume/azure_file/azure_file.go | 2 +- pkg/volume/azure_file/azure_file_test.go | 2 +- pkg/volume/azure_file/azure_util.go | 2 +- pkg/volume/azure_file/doc.go | 2 +- pkg/volume/cephfs/cephfs.go | 2 +- pkg/volume/cephfs/cephfs_test.go | 2 +- pkg/volume/cephfs/doc.go | 2 +- pkg/volume/cinder/attacher.go | 2 +- pkg/volume/cinder/attacher_test.go | 2 +- pkg/volume/cinder/cinder.go | 2 +- pkg/volume/cinder/cinder_test.go | 2 +- pkg/volume/cinder/cinder_util.go | 2 +- pkg/volume/cinder/doc.go | 2 +- pkg/volume/configmap/configmap.go | 2 +- pkg/volume/configmap/configmap_test.go | 2 +- pkg/volume/configmap/doc.go | 2 +- pkg/volume/doc.go | 2 +- pkg/volume/downwardapi/downwardapi.go | 2 +- pkg/volume/downwardapi/downwardapi_test.go | 2 +- pkg/volume/empty_dir/doc.go | 2 +- pkg/volume/empty_dir/empty_dir.go | 2 +- pkg/volume/empty_dir/empty_dir_linux.go | 2 +- pkg/volume/empty_dir/empty_dir_test.go | 2 +- pkg/volume/empty_dir/empty_dir_unsupported.go | 2 +- pkg/volume/fc/disk_manager.go | 2 +- pkg/volume/fc/doc.go | 2 +- pkg/volume/fc/fc.go | 2 +- pkg/volume/fc/fc_test.go | 2 +- pkg/volume/fc/fc_util.go | 2 +- pkg/volume/fc/fc_util_test.go | 2 +- pkg/volume/flexvolume/flexvolume.go | 2 +- pkg/volume/flexvolume/flexvolume_test.go | 2 +- pkg/volume/flexvolume/flexvolume_util.go | 2 +- pkg/volume/flocker/doc.go | 2 +- pkg/volume/flocker/plugin.go | 2 +- pkg/volume/flocker/plugin_test.go | 2 +- pkg/volume/gce_pd/attacher.go | 2 +- pkg/volume/gce_pd/attacher_test.go | 2 +- pkg/volume/gce_pd/doc.go | 2 +- pkg/volume/gce_pd/gce_pd.go | 2 +- pkg/volume/gce_pd/gce_pd_test.go | 2 +- pkg/volume/gce_pd/gce_util.go | 2 +- pkg/volume/git_repo/doc.go | 2 +- pkg/volume/git_repo/git_repo.go | 2 +- pkg/volume/git_repo/git_repo_test.go | 2 +- pkg/volume/glusterfs/doc.go | 2 +- pkg/volume/glusterfs/glusterfs.go | 2 +- pkg/volume/glusterfs/glusterfs_test.go | 2 +- pkg/volume/glusterfs/glusterfs_util.go | 2 +- pkg/volume/host_path/doc.go | 2 +- pkg/volume/host_path/host_path.go | 2 +- pkg/volume/host_path/host_path_test.go | 2 +- pkg/volume/iscsi/disk_manager.go | 2 +- pkg/volume/iscsi/doc.go | 2 +- pkg/volume/iscsi/iscsi.go | 2 +- pkg/volume/iscsi/iscsi_test.go | 2 +- pkg/volume/iscsi/iscsi_util.go | 2 +- pkg/volume/iscsi/iscsi_util_test.go | 2 +- pkg/volume/metrics_cached.go | 2 +- pkg/volume/metrics_du.go | 2 +- pkg/volume/metrics_du_test.go | 2 +- pkg/volume/metrics_nil.go | 2 +- pkg/volume/metrics_nil_test.go | 2 +- pkg/volume/metrics_statfs.go | 2 +- pkg/volume/nfs/doc.go | 2 +- pkg/volume/nfs/nfs.go | 2 +- pkg/volume/nfs/nfs_test.go | 2 +- pkg/volume/plugins.go | 2 +- pkg/volume/plugins_test.go | 2 +- pkg/volume/rbd/disk_manager.go | 2 +- pkg/volume/rbd/doc.go | 2 +- pkg/volume/rbd/rbd.go | 2 +- pkg/volume/rbd/rbd_test.go | 2 +- pkg/volume/rbd/rbd_util.go | 2 +- pkg/volume/secret/doc.go | 2 +- pkg/volume/secret/secret.go | 2 +- pkg/volume/secret/secret_test.go | 2 +- pkg/volume/testing/mock_volume.go | 2 +- pkg/volume/testing/testing.go | 2 +- pkg/volume/util.go | 2 +- pkg/volume/util/atomic_writer.go | 2 +- pkg/volume/util/atomic_writer_test.go | 2 +- pkg/volume/util/device_util.go | 2 +- pkg/volume/util/device_util_linux.go | 2 +- pkg/volume/util/device_util_linux_test.go | 2 +- pkg/volume/util/device_util_unsupported.go | 2 +- pkg/volume/util/doc.go | 2 +- pkg/volume/util/fs.go | 2 +- pkg/volume/util/fs_unsupported.go | 2 +- pkg/volume/util/io_util.go | 2 +- pkg/volume/util/operationexecutor/operation_executor.go | 2 +- pkg/volume/util/types/types.go | 2 +- pkg/volume/util/util.go | 2 +- pkg/volume/util/volumehelper/volumehelper.go | 2 +- pkg/volume/util_test.go | 2 +- pkg/volume/volume.go | 2 +- pkg/volume/volume_linux.go | 2 +- pkg/volume/volume_unsupported.go | 2 +- pkg/volume/vsphere_volume/vsphere_volume.go | 2 +- pkg/volume/vsphere_volume/vsphere_volume_test.go | 2 +- pkg/volume/vsphere_volume/vsphere_volume_util.go | 2 +- pkg/watch/doc.go | 2 +- pkg/watch/filter.go | 2 +- pkg/watch/filter_test.go | 2 +- pkg/watch/json/doc.go | 2 +- pkg/watch/json/types.go | 2 +- pkg/watch/mux.go | 2 +- pkg/watch/mux_test.go | 2 +- pkg/watch/streamwatcher.go | 2 +- pkg/watch/streamwatcher_test.go | 2 +- pkg/watch/until.go | 2 +- pkg/watch/until_test.go | 2 +- pkg/watch/versioned/decoder.go | 2 +- pkg/watch/versioned/decoder_test.go | 2 +- pkg/watch/versioned/encoder.go | 2 +- pkg/watch/versioned/encoder_test.go | 2 +- pkg/watch/versioned/generated.pb.go | 2 +- pkg/watch/versioned/generated.proto | 2 +- pkg/watch/versioned/register.go | 2 +- pkg/watch/versioned/types.go | 2 +- pkg/watch/watch.go | 2 +- pkg/watch/watch_test.go | 2 +- plugin/cmd/kube-scheduler/app/options/options.go | 2 +- plugin/cmd/kube-scheduler/app/server.go | 2 +- plugin/cmd/kube-scheduler/scheduler.go | 2 +- plugin/pkg/admission/admit/admission.go | 2 +- plugin/pkg/admission/admit/admission_test.go | 2 +- plugin/pkg/admission/alwayspullimages/admission.go | 2 +- plugin/pkg/admission/alwayspullimages/admission_test.go | 2 +- plugin/pkg/admission/antiaffinity/admission.go | 2 +- plugin/pkg/admission/antiaffinity/admission_test.go | 2 +- plugin/pkg/admission/antiaffinity/doc.go | 2 +- plugin/pkg/admission/deny/admission.go | 2 +- plugin/pkg/admission/deny/admission_test.go | 2 +- plugin/pkg/admission/exec/admission.go | 2 +- plugin/pkg/admission/exec/admission_test.go | 2 +- plugin/pkg/admission/initialresources/admission.go | 2 +- plugin/pkg/admission/initialresources/admission_test.go | 2 +- plugin/pkg/admission/initialresources/data_source.go | 2 +- plugin/pkg/admission/initialresources/gcm.go | 2 +- plugin/pkg/admission/initialresources/hawkular.go | 2 +- plugin/pkg/admission/initialresources/hawkular_test.go | 2 +- plugin/pkg/admission/initialresources/influxdb.go | 2 +- plugin/pkg/admission/limitranger/admission.go | 2 +- plugin/pkg/admission/limitranger/admission_test.go | 2 +- plugin/pkg/admission/limitranger/interfaces.go | 2 +- plugin/pkg/admission/namespace/autoprovision/admission.go | 2 +- .../pkg/admission/namespace/autoprovision/admission_test.go | 2 +- plugin/pkg/admission/namespace/exists/admission.go | 2 +- plugin/pkg/admission/namespace/exists/admission_test.go | 2 +- plugin/pkg/admission/namespace/lifecycle/admission.go | 2 +- plugin/pkg/admission/namespace/lifecycle/admission_test.go | 2 +- plugin/pkg/admission/persistentvolume/label/admission.go | 2 +- plugin/pkg/admission/persistentvolume/label/admission_test.go | 2 +- plugin/pkg/admission/persistentvolume/label/doc.go | 2 +- plugin/pkg/admission/resourcequota/admission.go | 2 +- plugin/pkg/admission/resourcequota/admission_test.go | 2 +- plugin/pkg/admission/resourcequota/controller.go | 2 +- plugin/pkg/admission/resourcequota/doc.go | 2 +- plugin/pkg/admission/resourcequota/resource_access.go | 2 +- plugin/pkg/admission/security/doc.go | 2 +- plugin/pkg/admission/security/podsecuritypolicy/admission.go | 2 +- .../admission/security/podsecuritypolicy/admission_test.go | 2 +- plugin/pkg/admission/securitycontext/scdeny/admission.go | 2 +- plugin/pkg/admission/securitycontext/scdeny/admission_test.go | 2 +- plugin/pkg/admission/serviceaccount/admission.go | 2 +- plugin/pkg/admission/serviceaccount/admission_test.go | 2 +- plugin/pkg/admission/serviceaccount/doc.go | 2 +- plugin/pkg/auth/authenticator/doc.go | 2 +- plugin/pkg/auth/authenticator/password/allow/allow.go | 2 +- plugin/pkg/auth/authenticator/password/allow/allow_test.go | 2 +- plugin/pkg/auth/authenticator/password/doc.go | 2 +- plugin/pkg/auth/authenticator/password/keystone/doc.go | 2 +- plugin/pkg/auth/authenticator/password/keystone/keystone.go | 2 +- .../auth/authenticator/password/passwordfile/passwordfile.go | 2 +- .../authenticator/password/passwordfile/passwordfile_test.go | 2 +- plugin/pkg/auth/authenticator/request/basicauth/basicauth.go | 2 +- .../auth/authenticator/request/basicauth/basicauth_test.go | 2 +- plugin/pkg/auth/authenticator/request/union/union.go | 2 +- plugin/pkg/auth/authenticator/request/union/unionauth_test.go | 2 +- plugin/pkg/auth/authenticator/request/x509/doc.go | 2 +- plugin/pkg/auth/authenticator/request/x509/x509.go | 2 +- plugin/pkg/auth/authenticator/request/x509/x509_test.go | 2 +- plugin/pkg/auth/authenticator/token/oidc/oidc.go | 2 +- plugin/pkg/auth/authenticator/token/oidc/oidc_test.go | 2 +- plugin/pkg/auth/authenticator/token/oidc/testing/provider.go | 2 +- plugin/pkg/auth/authenticator/token/tokenfile/tokenfile.go | 2 +- .../pkg/auth/authenticator/token/tokenfile/tokenfile_test.go | 2 +- plugin/pkg/auth/authenticator/token/tokentest/tokentest.go | 2 +- plugin/pkg/auth/authenticator/token/webhook/certs_test.go | 2 +- plugin/pkg/auth/authenticator/token/webhook/webhook.go | 2 +- plugin/pkg/auth/authenticator/token/webhook/webhook_test.go | 2 +- plugin/pkg/auth/authorizer/doc.go | 2 +- plugin/pkg/auth/authorizer/rbac/rbac.go | 2 +- plugin/pkg/auth/authorizer/rbac/rbac_test.go | 2 +- plugin/pkg/auth/authorizer/webhook/certs_test.go | 2 +- plugin/pkg/auth/authorizer/webhook/gencerts.sh | 4 ++-- plugin/pkg/auth/authorizer/webhook/webhook.go | 2 +- plugin/pkg/auth/authorizer/webhook/webhook_test.go | 2 +- plugin/pkg/auth/doc.go | 2 +- plugin/pkg/client/auth/gcp/gcp.go | 2 +- plugin/pkg/client/auth/oidc/oidc.go | 2 +- plugin/pkg/client/auth/oidc/oidc_test.go | 2 +- plugin/pkg/client/auth/plugins.go | 2 +- plugin/pkg/scheduler/algorithm/doc.go | 2 +- plugin/pkg/scheduler/algorithm/listers.go | 2 +- plugin/pkg/scheduler/algorithm/predicates/error.go | 2 +- plugin/pkg/scheduler/algorithm/predicates/predicates.go | 2 +- plugin/pkg/scheduler/algorithm/predicates/predicates_test.go | 2 +- .../pkg/scheduler/algorithm/priorities/interpod_affinity.go | 2 +- .../scheduler/algorithm/priorities/interpod_affinity_test.go | 2 +- plugin/pkg/scheduler/algorithm/priorities/node_affinity.go | 2 +- .../pkg/scheduler/algorithm/priorities/node_affinity_test.go | 2 +- plugin/pkg/scheduler/algorithm/priorities/priorities.go | 2 +- plugin/pkg/scheduler/algorithm/priorities/priorities_test.go | 2 +- .../pkg/scheduler/algorithm/priorities/selector_spreading.go | 2 +- .../scheduler/algorithm/priorities/selector_spreading_test.go | 2 +- plugin/pkg/scheduler/algorithm/priorities/taint_toleration.go | 2 +- .../scheduler/algorithm/priorities/taint_toleration_test.go | 2 +- plugin/pkg/scheduler/algorithm/priorities/util/non_zero.go | 2 +- plugin/pkg/scheduler/algorithm/scheduler_interface.go | 2 +- plugin/pkg/scheduler/algorithm/scheduler_interface_test.go | 2 +- plugin/pkg/scheduler/algorithm/types.go | 2 +- .../algorithmprovider/defaults/compatibility_test.go | 2 +- plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go | 2 +- plugin/pkg/scheduler/algorithmprovider/plugins.go | 2 +- plugin/pkg/scheduler/algorithmprovider/plugins_test.go | 2 +- plugin/pkg/scheduler/api/latest/latest.go | 2 +- plugin/pkg/scheduler/api/register.go | 2 +- plugin/pkg/scheduler/api/types.go | 2 +- plugin/pkg/scheduler/api/v1/register.go | 2 +- plugin/pkg/scheduler/api/v1/types.go | 2 +- plugin/pkg/scheduler/api/validation/validation.go | 2 +- plugin/pkg/scheduler/api/validation/validation_test.go | 2 +- plugin/pkg/scheduler/extender.go | 2 +- plugin/pkg/scheduler/extender_test.go | 2 +- plugin/pkg/scheduler/factory/factory.go | 2 +- plugin/pkg/scheduler/factory/factory_test.go | 2 +- plugin/pkg/scheduler/factory/plugins.go | 2 +- plugin/pkg/scheduler/factory/plugins_test.go | 2 +- plugin/pkg/scheduler/generic_scheduler.go | 2 +- plugin/pkg/scheduler/generic_scheduler_test.go | 2 +- plugin/pkg/scheduler/metrics/metrics.go | 2 +- plugin/pkg/scheduler/scheduler.go | 2 +- plugin/pkg/scheduler/scheduler_test.go | 2 +- plugin/pkg/scheduler/schedulercache/cache.go | 2 +- plugin/pkg/scheduler/schedulercache/cache_test.go | 2 +- plugin/pkg/scheduler/schedulercache/interface.go | 2 +- plugin/pkg/scheduler/schedulercache/node_info.go | 2 +- plugin/pkg/scheduler/schedulercache/util.go | 2 +- plugin/pkg/scheduler/testing/fake_cache.go | 2 +- plugin/pkg/scheduler/testing/pods_to_cache.go | 2 +- plugin/pkg/webhook/webhook.go | 2 +- release/build-official-release.sh | 2 +- release/cut-official-release.sh | 2 +- test/component/scheduler/perf/scheduler_bench_test.go | 2 +- test/component/scheduler/perf/scheduler_test.go | 2 +- test/component/scheduler/perf/test-performance.sh | 2 +- test/component/scheduler/perf/util.go | 2 +- test/e2e/addon_update.go | 2 +- test/e2e/autoscaling_utils.go | 2 +- test/e2e/batch_v1_jobs.go | 2 +- test/e2e/cadvisor.go | 2 +- test/e2e/chaosmonkey/chaosmonkey.go | 2 +- test/e2e/chaosmonkey/chaosmonkey_test.go | 2 +- test/e2e/cleanup/cleanup.go | 2 +- test/e2e/cluster_size_autoscaling.go | 2 +- test/e2e/cluster_upgrade.go | 2 +- test/e2e/configmap.go | 2 +- test/e2e/container_probe.go | 2 +- test/e2e/daemon_restart.go | 2 +- test/e2e/daemon_set.go | 2 +- test/e2e/dashboard.go | 2 +- test/e2e/density.go | 2 +- test/e2e/deployment.go | 2 +- test/e2e/dns.go | 2 +- test/e2e/docker_containers.go | 2 +- test/e2e/downward_api.go | 2 +- test/e2e/downwardapi_volume.go | 2 +- test/e2e/e2e.go | 2 +- test/e2e/e2e_test.go | 2 +- test/e2e/empty_dir.go | 2 +- test/e2e/empty_dir_wrapper.go | 2 +- test/e2e/es_cluster_logging.go | 2 +- test/e2e/etcd_failure.go | 2 +- test/e2e/events.go | 2 +- test/e2e/example_cluster_dns.go | 2 +- test/e2e/example_k8petstore.go | 2 +- test/e2e/examples.go | 2 +- test/e2e/expansion.go | 2 +- test/e2e/federated-service.go | 2 +- test/e2e/federation-apiserver.go | 2 +- test/e2e/federation-util.go | 2 +- test/e2e/framework/cleanup.go | 2 +- test/e2e/framework/federation_util.go | 2 +- test/e2e/framework/framework.go | 2 +- test/e2e/framework/gobindata_util.go | 2 +- test/e2e/framework/kubelet_stats.go | 2 +- test/e2e/framework/log_size_monitoring.go | 2 +- test/e2e/framework/metrics_util.go | 2 +- test/e2e/framework/nodes_util.go | 2 +- test/e2e/framework/perf_util.go | 2 +- test/e2e/framework/pods.go | 2 +- test/e2e/framework/prompush.go | 2 +- test/e2e/framework/resource_usage_gatherer.go | 2 +- test/e2e/framework/test_context.go | 2 +- test/e2e/framework/util.go | 2 +- test/e2e/generated_clientset.go | 2 +- test/e2e/gke_local_ssd.go | 2 +- test/e2e/gke_node_pools.go | 2 +- test/e2e/google_compute.go | 2 +- test/e2e/horizontal_pod_autoscaling.go | 2 +- test/e2e/host_path.go | 2 +- test/e2e/ingress.go | 2 +- test/e2e/ingress_utils.go | 2 +- test/e2e/initial_resources.go | 2 +- test/e2e/job.go | 2 +- test/e2e/kibana_logging.go | 2 +- test/e2e/kubectl.go | 2 +- test/e2e/kubelet.go | 2 +- test/e2e/kubelet_etc_hosts.go | 2 +- test/e2e/kubelet_perf.go | 2 +- test/e2e/kubeproxy.go | 2 +- test/e2e/limit_range.go | 2 +- test/e2e/load.go | 2 +- test/e2e/mesos.go | 2 +- test/e2e/metrics_grabber_test.go | 2 +- test/e2e/monitoring.go | 2 +- test/e2e/namespace.go | 2 +- test/e2e/networking.go | 2 +- test/e2e/networking_perf.go | 2 +- test/e2e/node_problem_detector.go | 2 +- test/e2e/nodeoutofdisk.go | 2 +- test/e2e/pd.go | 2 +- test/e2e/perftype/perftype.go | 2 +- test/e2e/persistent_volumes.go | 2 +- test/e2e/petset.go | 2 +- test/e2e/pod_gc.go | 2 +- test/e2e/pods.go | 2 +- test/e2e/portforward.go | 2 +- test/e2e/pre_stop.go | 2 +- test/e2e/privileged.go | 2 +- test/e2e/proxy.go | 2 +- test/e2e/rc.go | 2 +- test/e2e/reboot.go | 2 +- test/e2e/replica_set.go | 2 +- test/e2e/resize_nodes.go | 2 +- test/e2e/resource_quota.go | 2 +- test/e2e/restart.go | 2 +- test/e2e/scheduler_predicates.go | 2 +- test/e2e/secrets.go | 2 +- test/e2e/security_context.go | 2 +- test/e2e/service.go | 2 +- test/e2e/service_accounts.go | 2 +- test/e2e/service_latency.go | 2 +- test/e2e/serviceloadbalancers.go | 2 +- test/e2e/ssh.go | 2 +- test/e2e/third-party.go | 2 +- test/e2e/ubernetes_lite.go | 2 +- test/e2e/util_iperf.go | 2 +- test/e2e/volume_provisioning.go | 2 +- test/e2e/volumes.go | 2 +- test/e2e_node/configmap.go | 2 +- test/e2e_node/container.go | 2 +- test/e2e_node/container_list.go | 2 +- test/e2e_node/container_manager_test.go | 2 +- test/e2e_node/doc.go | 2 +- test/e2e_node/downward_api_test.go | 2 +- test/e2e_node/e2e_build.go | 2 +- test/e2e_node/e2e_node_suite_test.go | 2 +- test/e2e_node/e2e_remote.go | 2 +- test/e2e_node/e2e_service.go | 2 +- test/e2e_node/environment/conformance.go | 2 +- test/e2e_node/environment/setup_host.sh | 2 +- test/e2e_node/exec_util.go | 2 +- test/e2e_node/image.go | 2 +- test/e2e_node/image_conformance_test.go | 2 +- test/e2e_node/jenkins/copy-e2e-image.sh | 2 +- test/e2e_node/jenkins/e2e-node-jenkins.sh | 2 +- test/e2e_node/kubelet_test.go | 2 +- test/e2e_node/mirror_pod_test.go | 2 +- test/e2e_node/privileged_test.go | 2 +- test/e2e_node/runner/run_e2e.go | 2 +- test/e2e_node/runtime_conformance_test.go | 2 +- test/e2e_node/util.go | 2 +- test/images/clusterapi-tester/Dockerfile | 2 +- test/images/clusterapi-tester/Makefile | 2 +- test/images/clusterapi-tester/main.go | 2 +- test/images/dnsutils/Dockerfile | 2 +- test/images/dnsutils/Makefile | 2 +- test/images/entrypoint-tester/Dockerfile | 2 +- test/images/entrypoint-tester/Makefile | 2 +- test/images/entrypoint-tester/ep.go | 2 +- test/images/fakegitserver/Dockerfile | 2 +- test/images/fakegitserver/Makefile | 2 +- test/images/fakegitserver/gitserver.go | 2 +- test/images/fakegitserver/prepare.sh | 2 +- test/images/goproxy/Dockerfile | 2 +- test/images/goproxy/Makefile | 2 +- test/images/goproxy/goproxy.go | 2 +- test/images/hostexec/Dockerfile | 2 +- test/images/hostexec/Makefile | 2 +- test/images/iperf/Dockerfile | 2 +- test/images/iperf/Makefile | 2 +- test/images/jessie-dnsutils/Dockerfile | 2 +- test/images/jessie-dnsutils/Makefile | 2 +- test/images/mount-tester-user/Dockerfile | 2 +- test/images/mount-tester-user/Makefile | 2 +- test/images/mount-tester/Dockerfile | 2 +- test/images/mount-tester/Makefile | 2 +- test/images/mount-tester/mt.go | 2 +- test/images/n-way-http/Dockerfile | 2 +- test/images/n-way-http/Makefile | 2 +- test/images/n-way-http/server.go | 2 +- test/images/netexec/Dockerfile | 2 +- test/images/netexec/Makefile | 2 +- test/images/netexec/netexec.go | 2 +- test/images/network-tester/Dockerfile | 2 +- test/images/network-tester/Makefile | 2 +- test/images/network-tester/webserver.go | 2 +- test/images/pets/redis/Dockerfile | 2 +- test/images/pets/redis/Makefile | 2 +- test/images/pets/redis/install.sh | 2 +- test/images/pets/redis/on-start.sh | 2 +- test/images/pets/zookeeper/Dockerfile | 2 +- test/images/pets/zookeeper/Makefile | 2 +- test/images/pets/zookeeper/install.sh | 2 +- test/images/pets/zookeeper/on-start.sh | 2 +- test/images/port-forward-tester/Dockerfile | 2 +- test/images/port-forward-tester/Makefile | 2 +- test/images/port-forward-tester/portforwardtester.go | 2 +- test/images/porter/Dockerfile | 2 +- test/images/porter/Makefile | 2 +- test/images/porter/porter.go | 2 +- test/images/resource-consumer/Dockerfile | 2 +- test/images/resource-consumer/Makefile | 2 +- test/images/resource-consumer/common/common.go | 2 +- test/images/resource-consumer/consume-cpu/consume_cpu.go | 2 +- test/images/resource-consumer/controller/Dockerfile | 2 +- test/images/resource-consumer/controller/controller.go | 2 +- test/images/resource-consumer/resource_consumer.go | 2 +- test/images/resource-consumer/resource_consumer_handler.go | 2 +- test/images/resource-consumer/utils.go | 2 +- test/images/serve_hostname/Dockerfile | 2 +- test/images/serve_hostname/Makefile | 2 +- test/images/serve_hostname/serve_hostname.go | 2 +- test/images/volumes-tester/ceph/Dockerfile | 2 +- test/images/volumes-tester/ceph/Makefile | 2 +- test/images/volumes-tester/ceph/init.sh | 2 +- test/images/volumes-tester/ceph/install.sh | 2 +- test/images/volumes-tester/gluster/Dockerfile | 2 +- test/images/volumes-tester/gluster/Makefile | 2 +- test/images/volumes-tester/gluster/run_gluster.sh | 2 +- test/images/volumes-tester/iscsi/Dockerfile | 2 +- test/images/volumes-tester/iscsi/Makefile | 2 +- test/images/volumes-tester/iscsi/create_block.sh | 2 +- test/images/volumes-tester/iscsi/run_iscsid.sh | 2 +- test/images/volumes-tester/nfs/Dockerfile | 2 +- test/images/volumes-tester/nfs/Makefile | 2 +- test/images/volumes-tester/nfs/run_nfs.sh | 2 +- test/images/volumes-tester/rbd/Dockerfile | 2 +- test/images/volumes-tester/rbd/Makefile | 2 +- test/images/volumes-tester/rbd/bootstrap.sh | 2 +- test/images/volumes-tester/rbd/ceph.conf.sh | 2 +- test/images/volumes-tester/rbd/create_block.sh | 2 +- test/images/volumes-tester/rbd/mon.sh | 2 +- test/images/volumes-tester/rbd/osd.sh | 2 +- test/integration/auth_test.go | 2 +- test/integration/client_test.go | 2 +- test/integration/configmap_test.go | 2 +- test/integration/doc.go | 2 +- test/integration/dynamic_client_test.go | 2 +- test/integration/etcd_tools_test.go | 2 +- test/integration/extender_test.go | 2 +- test/integration/framework/etcd_utils.go | 2 +- test/integration/framework/master_utils.go | 2 +- test/integration/framework/serializer.go | 2 +- test/integration/garbage_collector_test.go | 2 +- test/integration/kubectl_test.go | 2 +- test/integration/master_benchmark_test.go | 2 +- test/integration/master_test.go | 2 +- test/integration/metrics_test.go | 2 +- test/integration/openshift_test.go | 2 +- test/integration/persistent_volumes_test.go | 2 +- test/integration/pods_test.go | 2 +- test/integration/quota_test.go | 2 +- test/integration/rbac_test.go | 2 +- test/integration/scheduler_test.go | 2 +- test/integration/secret_test.go | 2 +- test/integration/service_account_test.go | 2 +- test/integration/utils.go | 2 +- test/kubemark/common.sh | 2 +- test/kubemark/configure-kubectl.sh | 2 +- test/kubemark/get-real-pod-for-hollow-node.sh | 2 +- test/kubemark/run-e2e-tests.sh | 2 +- test/kubemark/start-kubemark-master.sh | 2 +- test/kubemark/start-kubemark.sh | 2 +- test/kubemark/stop-kubemark.sh | 2 +- test/soak/cauldron/Dockerfile | 2 +- test/soak/cauldron/Makefile | 2 +- test/soak/cauldron/cauldron.go | 2 +- test/soak/serve_hostnames/Makefile | 2 +- test/soak/serve_hostnames/serve_hostnames.go | 2 +- test/utils/tmpdir.go | 2 +- 3553 files changed, 3556 insertions(+), 3557 deletions(-) diff --git a/Godeps/LICENSES b/Godeps/LICENSES index 7a658ec42a..1ce4ce21e9 100644 --- a/Godeps/LICENSES +++ b/Godeps/LICENSES @@ -190,7 +190,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2014 The Kubernetes Authors All rights reserved. + Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -204,7 +204,7 @@ See the License for the specific language governing permissions and limitations under the License. -= LICENSE d6177d11bbe618cf4ac8a63a16d30f83 - += LICENSE ad09685d909e7a9f763d2bb62d4bd6fb - ================================================================================ ================================================================================ diff --git a/LICENSE b/LICENSE index 6b4d837a44..00b2401109 100644 --- a/LICENSE +++ b/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2014 The Kubernetes Authors All rights reserved. + Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Makefile b/Makefile index 6628dc6aeb..c791e7ad28 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/build-image/Dockerfile b/build/build-image/Dockerfile index 6e64835772..2adbd5ae1c 100644 --- a/build/build-image/Dockerfile +++ b/build/build-image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/build-image/cross/Dockerfile b/build/build-image/cross/Dockerfile index 3746337302..dd8d8054b8 100644 --- a/build/build-image/cross/Dockerfile +++ b/build/build-image/cross/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/build-image/cross/Makefile b/build/build-image/cross/Makefile index bbf4c90486..9578e27ee3 100644 --- a/build/build-image/cross/Makefile +++ b/build/build-image/cross/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/common.sh b/build/common.sh index 5627b0d7a7..465941e7e4 100755 --- a/build/common.sh +++ b/build/common.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/copy-output.sh b/build/copy-output.sh index 11a062e6dc..97acc456c9 100755 --- a/build/copy-output.sh +++ b/build/copy-output.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/debian-iptables/Dockerfile b/build/debian-iptables/Dockerfile index 2d5c9d8c47..7c1c4d8864 100644 --- a/build/debian-iptables/Dockerfile +++ b/build/debian-iptables/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/debian-iptables/Makefile b/build/debian-iptables/Makefile index 79e1deccf0..8be9b5b00b 100644 --- a/build/debian-iptables/Makefile +++ b/build/debian-iptables/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/json-extractor.py b/build/json-extractor.py index 67b4f7a9df..dfc0422859 100755 --- a/build/json-extractor.py +++ b/build/json-extractor.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/kube-dns/Dockerfile b/build/kube-dns/Dockerfile index 6e72d95a75..0ce83504c5 100644 --- a/build/kube-dns/Dockerfile +++ b/build/kube-dns/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/kube-dns/Makefile b/build/kube-dns/Makefile index 0ea431cb2d..57391b1835 100644 --- a/build/kube-dns/Makefile +++ b/build/kube-dns/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/make-build-image.sh b/build/make-build-image.sh index 5a6e1b2a99..cc92ae1e7a 100755 --- a/build/make-build-image.sh +++ b/build/make-build-image.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/make-clean.sh b/build/make-clean.sh index ad4595ab61..5fcfd07562 100755 --- a/build/make-clean.sh +++ b/build/make-clean.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/make-release-notes.sh b/build/make-release-notes.sh index 4337959077..23355579d0 100755 --- a/build/make-release-notes.sh +++ b/build/make-release-notes.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/pause/Dockerfile b/build/pause/Dockerfile index b565b631f7..09f713292b 100644 --- a/build/pause/Dockerfile +++ b/build/pause/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/pause/Makefile b/build/pause/Makefile index e4ca218e29..0471838ed0 100644 --- a/build/pause/Makefile +++ b/build/pause/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/pause/pause.c b/build/pause/pause.c index 375a38a26e..ffbceb69fb 100644 --- a/build/pause/pause.c +++ b/build/pause/pause.c @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/build/push-ci-build.sh b/build/push-ci-build.sh index 4e131ad60e..10892982f6 100755 --- a/build/push-ci-build.sh +++ b/build/push-ci-build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/push-devel-build.sh b/build/push-devel-build.sh index 849c7f452a..ebb5c5235a 100755 --- a/build/push-devel-build.sh +++ b/build/push-devel-build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/push-federation-images.sh b/build/push-federation-images.sh index 6c44cec6d8..3ebf7d4dce 100755 --- a/build/push-federation-images.sh +++ b/build/push-federation-images.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/push-official-release.sh b/build/push-official-release.sh index d73d4ab3a5..f3b9199373 100755 --- a/build/push-official-release.sh +++ b/build/push-official-release.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/release.sh b/build/release.sh index def030c7d4..b5d99e4553 100755 --- a/build/release.sh +++ b/build/release.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/run.sh b/build/run.sh index 4f1c1bca3e..af6e92dfa3 100755 --- a/build/run.sh +++ b/build/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/shell.sh b/build/shell.sh index 58893d42db..071b7be4d7 100755 --- a/build/shell.sh +++ b/build/shell.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/util.sh b/build/util.sh index aa360225a8..d03048c346 100644 --- a/build/util.sh +++ b/build/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/build/versionize-docs.sh b/build/versionize-docs.sh index f987afc858..221ebe6107 100755 --- a/build/versionize-docs.sh +++ b/build/versionize-docs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/addon-manager/Dockerfile b/cluster/addons/addon-manager/Dockerfile index c33994394e..f6b9cf0d6e 100644 --- a/cluster/addons/addon-manager/Dockerfile +++ b/cluster/addons/addon-manager/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/addon-manager/Makefile b/cluster/addons/addon-manager/Makefile index 254bf48565..5e02f36418 100644 --- a/cluster/addons/addon-manager/Makefile +++ b/cluster/addons/addon-manager/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/addon-manager/kube-addon-update.sh b/cluster/addons/addon-manager/kube-addon-update.sh index efb3b6d7b2..fca7ec230f 100755 --- a/cluster/addons/addon-manager/kube-addon-update.sh +++ b/cluster/addons/addon-manager/kube-addon-update.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/addon-manager/kube-addons.sh b/cluster/addons/addon-manager/kube-addons.sh index 211b0aa163..f62a192512 100755 --- a/cluster/addons/addon-manager/kube-addons.sh +++ b/cluster/addons/addon-manager/kube-addons.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/fluentd-elasticsearch/es-image/Dockerfile b/cluster/addons/fluentd-elasticsearch/es-image/Dockerfile index 8d98d45ac3..460155a072 100644 --- a/cluster/addons/fluentd-elasticsearch/es-image/Dockerfile +++ b/cluster/addons/fluentd-elasticsearch/es-image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/fluentd-elasticsearch/es-image/Makefile b/cluster/addons/fluentd-elasticsearch/es-image/Makefile index ffb0a1befe..40961f4291 100755 --- a/cluster/addons/fluentd-elasticsearch/es-image/Makefile +++ b/cluster/addons/fluentd-elasticsearch/es-image/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go b/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go index f2221112f8..702cb12307 100644 --- a/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go +++ b/cluster/addons/fluentd-elasticsearch/es-image/elasticsearch_logging_discovery.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cluster/addons/fluentd-elasticsearch/es-image/run.sh b/cluster/addons/fluentd-elasticsearch/es-image/run.sh index 67ff30009a..307b534234 100755 --- a/cluster/addons/fluentd-elasticsearch/es-image/run.sh +++ b/cluster/addons/fluentd-elasticsearch/es-image/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile b/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile index cf91f95d6c..61ea81cc7c 100644 --- a/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile +++ b/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile b/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile index 9b2a3fc491..dd78b15b34 100644 --- a/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile +++ b/cluster/addons/fluentd-elasticsearch/fluentd-es-image/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/fluentd-elasticsearch/kibana-image/Dockerfile b/cluster/addons/fluentd-elasticsearch/kibana-image/Dockerfile index 50d0a2c4db..81587e1089 100644 --- a/cluster/addons/fluentd-elasticsearch/kibana-image/Dockerfile +++ b/cluster/addons/fluentd-elasticsearch/kibana-image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile b/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile index 55bcfe5fc4..4033faa861 100755 --- a/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile +++ b/cluster/addons/fluentd-elasticsearch/kibana-image/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/fluentd-elasticsearch/kibana-image/run.sh b/cluster/addons/fluentd-elasticsearch/kibana-image/run.sh index 181b835d60..a2db75a01c 100755 --- a/cluster/addons/fluentd-elasticsearch/kibana-image/run.sh +++ b/cluster/addons/fluentd-elasticsearch/kibana-image/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile index 6d74ff28f1..da88f90d52 100644 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile +++ b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile index 755139838b..d7f1cb0152 100644 --- a/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile +++ b/cluster/addons/fluentd-gcp/fluentd-gcp-image/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/python-image/Dockerfile b/cluster/addons/python-image/Dockerfile index 6a93e589de..5205aeb37d 100644 --- a/cluster/addons/python-image/Dockerfile +++ b/cluster/addons/python-image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/python-image/Makefile b/cluster/addons/python-image/Makefile index 0f378363d8..c47ed861ba 100644 --- a/cluster/addons/python-image/Makefile +++ b/cluster/addons/python-image/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/registry/images/Dockerfile b/cluster/addons/registry/images/Dockerfile index 176b2baf67..7a5b762036 100644 --- a/cluster/addons/registry/images/Dockerfile +++ b/cluster/addons/registry/images/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/registry/images/Makefile b/cluster/addons/registry/images/Makefile index a81c29e8d0..0166870cbb 100644 --- a/cluster/addons/registry/images/Makefile +++ b/cluster/addons/registry/images/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/addons/registry/images/run_proxy.sh b/cluster/addons/registry/images/run_proxy.sh index ad52ae8702..9d0b604090 100644 --- a/cluster/addons/registry/images/run_proxy.sh +++ b/cluster/addons/registry/images/run_proxy.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/aws/common/common.sh b/cluster/aws/common/common.sh index 4d138751e6..62b466fd3e 100644 --- a/cluster/aws/common/common.sh +++ b/cluster/aws/common/common.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/aws/config-default.sh b/cluster/aws/config-default.sh index ebe1e7b739..4ff88d6393 100644 --- a/cluster/aws/config-default.sh +++ b/cluster/aws/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/aws/config-test.sh b/cluster/aws/config-test.sh index 6c55f7edd6..df073cf996 100755 --- a/cluster/aws/config-test.sh +++ b/cluster/aws/config-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/aws/jessie/util.sh b/cluster/aws/jessie/util.sh index e1091c8ef9..73f750f060 100644 --- a/cluster/aws/jessie/util.sh +++ b/cluster/aws/jessie/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/aws/templates/configure-vm-aws.sh b/cluster/aws/templates/configure-vm-aws.sh index f24e551ccf..343a030de8 100755 --- a/cluster/aws/templates/configure-vm-aws.sh +++ b/cluster/aws/templates/configure-vm-aws.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/aws/templates/format-disks.sh b/cluster/aws/templates/format-disks.sh index be0ddc2151..0ac29d2f9f 100644 --- a/cluster/aws/templates/format-disks.sh +++ b/cluster/aws/templates/format-disks.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/aws/util.sh b/cluster/aws/util.sh index 2aa53e71cb..747121bd9b 100755 --- a/cluster/aws/util.sh +++ b/cluster/aws/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/aws/wily/util.sh b/cluster/aws/wily/util.sh index ff194040fd..377192cd31 100644 --- a/cluster/aws/wily/util.sh +++ b/cluster/aws/wily/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/azure-legacy/config-default.sh b/cluster/azure-legacy/config-default.sh index 988b636ff5..53b14ef401 100644 --- a/cluster/azure-legacy/config-default.sh +++ b/cluster/azure-legacy/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/azure-legacy/templates/common.sh b/cluster/azure-legacy/templates/common.sh index da6de499b1..bd8dc66a93 100644 --- a/cluster/azure-legacy/templates/common.sh +++ b/cluster/azure-legacy/templates/common.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/azure-legacy/templates/create-dynamic-salt-files.sh b/cluster/azure-legacy/templates/create-dynamic-salt-files.sh index d946fa1957..633f66a657 100644 --- a/cluster/azure-legacy/templates/create-dynamic-salt-files.sh +++ b/cluster/azure-legacy/templates/create-dynamic-salt-files.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/azure-legacy/templates/create-kubeconfig.sh b/cluster/azure-legacy/templates/create-kubeconfig.sh index dec14472fa..b0dc08b60d 100644 --- a/cluster/azure-legacy/templates/create-kubeconfig.sh +++ b/cluster/azure-legacy/templates/create-kubeconfig.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/azure-legacy/templates/download-release.sh b/cluster/azure-legacy/templates/download-release.sh index 463c5b862c..ba2b47a3fe 100644 --- a/cluster/azure-legacy/templates/download-release.sh +++ b/cluster/azure-legacy/templates/download-release.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/azure-legacy/templates/salt-master.sh b/cluster/azure-legacy/templates/salt-master.sh index b939fe007b..0743bc94c7 100644 --- a/cluster/azure-legacy/templates/salt-master.sh +++ b/cluster/azure-legacy/templates/salt-master.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/azure-legacy/templates/salt-minion.sh b/cluster/azure-legacy/templates/salt-minion.sh index 98112f9930..a7ceee3f3d 100644 --- a/cluster/azure-legacy/templates/salt-minion.sh +++ b/cluster/azure-legacy/templates/salt-minion.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/azure-legacy/util.sh b/cluster/azure-legacy/util.sh index 6fd3ad5e5e..010dde4d4e 100644 --- a/cluster/azure-legacy/util.sh +++ b/cluster/azure-legacy/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/azure/config-default.sh b/cluster/azure/config-default.sh index ecdd55b7d2..9222627a34 100644 --- a/cluster/azure/config-default.sh +++ b/cluster/azure/config-default.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/azure/util.sh b/cluster/azure/util.sh index 9874528dc2..462f68b9e7 100644 --- a/cluster/azure/util.sh +++ b/cluster/azure/util.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/build.sh b/cluster/centos/build.sh index 55a675fad0..9777cdc294 100755 --- a/cluster/centos/build.sh +++ b/cluster/centos/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/config-build.sh b/cluster/centos/config-build.sh index c7a1434fce..d46a25ff65 100755 --- a/cluster/centos/config-build.sh +++ b/cluster/centos/config-build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/config-default.sh b/cluster/centos/config-default.sh index 7a2e2dee94..30120398b0 100755 --- a/cluster/centos/config-default.sh +++ b/cluster/centos/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/config-test.sh b/cluster/centos/config-test.sh index 1484159678..5a0b917c57 100644 --- a/cluster/centos/config-test.sh +++ b/cluster/centos/config-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/master/scripts/apiserver.sh b/cluster/centos/master/scripts/apiserver.sh index 6041e40029..70d0d4e923 100755 --- a/cluster/centos/master/scripts/apiserver.sh +++ b/cluster/centos/master/scripts/apiserver.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/master/scripts/controller-manager.sh b/cluster/centos/master/scripts/controller-manager.sh index 159e48c606..7f4f19241f 100755 --- a/cluster/centos/master/scripts/controller-manager.sh +++ b/cluster/centos/master/scripts/controller-manager.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/master/scripts/etcd.sh b/cluster/centos/master/scripts/etcd.sh index 31c458538d..dc9ae41d8a 100755 --- a/cluster/centos/master/scripts/etcd.sh +++ b/cluster/centos/master/scripts/etcd.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/master/scripts/scheduler.sh b/cluster/centos/master/scripts/scheduler.sh index 42f5612584..a329f36757 100755 --- a/cluster/centos/master/scripts/scheduler.sh +++ b/cluster/centos/master/scripts/scheduler.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/node/bin/mk-docker-opts.sh b/cluster/centos/node/bin/mk-docker-opts.sh index f3c50531bd..041d977583 100755 --- a/cluster/centos/node/bin/mk-docker-opts.sh +++ b/cluster/centos/node/bin/mk-docker-opts.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/node/bin/remove-docker0.sh b/cluster/centos/node/bin/remove-docker0.sh index 31a90c50c7..04b8d824c6 100755 --- a/cluster/centos/node/bin/remove-docker0.sh +++ b/cluster/centos/node/bin/remove-docker0.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/node/scripts/docker.sh b/cluster/centos/node/scripts/docker.sh index 1073e1fc31..839d29bc70 100755 --- a/cluster/centos/node/scripts/docker.sh +++ b/cluster/centos/node/scripts/docker.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/node/scripts/flannel.sh b/cluster/centos/node/scripts/flannel.sh index 1c88eb5187..386512c571 100755 --- a/cluster/centos/node/scripts/flannel.sh +++ b/cluster/centos/node/scripts/flannel.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/node/scripts/kubelet.sh b/cluster/centos/node/scripts/kubelet.sh index ed344e1fc3..ec67f54d0f 100755 --- a/cluster/centos/node/scripts/kubelet.sh +++ b/cluster/centos/node/scripts/kubelet.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/node/scripts/proxy.sh b/cluster/centos/node/scripts/proxy.sh index ee25f18aeb..a03236aa13 100755 --- a/cluster/centos/node/scripts/proxy.sh +++ b/cluster/centos/node/scripts/proxy.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/centos/util.sh b/cluster/centos/util.sh index 1ae9feff62..56ef18d236 100755 --- a/cluster/centos/util.sh +++ b/cluster/centos/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/common.sh b/cluster/common.sh index f064da159c..f650550e83 100755 --- a/cluster/common.sh +++ b/cluster/common.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/config-common.sh b/cluster/gce/config-common.sh index fba173efca..438e219274 100644 --- a/cluster/gce/config-common.sh +++ b/cluster/gce/config-common.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/config-default.sh b/cluster/gce/config-default.sh index 3d6c755486..7b87fed17d 100755 --- a/cluster/gce/config-default.sh +++ b/cluster/gce/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/config-test.sh b/cluster/gce/config-test.sh index 3dabbee160..2ad8374647 100755 --- a/cluster/gce/config-test.sh +++ b/cluster/gce/config-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/configure-vm.sh b/cluster/gce/configure-vm.sh index 0409c43f52..7cef0f9d19 100755 --- a/cluster/gce/configure-vm.sh +++ b/cluster/gce/configure-vm.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/coreos/configure-kubelet.sh b/cluster/gce/coreos/configure-kubelet.sh index bc5ad667ed..4395e909b3 100755 --- a/cluster/gce/coreos/configure-kubelet.sh +++ b/cluster/gce/coreos/configure-kubelet.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/coreos/configure-node.sh b/cluster/gce/coreos/configure-node.sh index fac1e9d1dd..93d94f092d 100755 --- a/cluster/gce/coreos/configure-node.sh +++ b/cluster/gce/coreos/configure-node.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/coreos/helper.sh b/cluster/gce/coreos/helper.sh index 6e0fa89b29..8202748de1 100755 --- a/cluster/gce/coreos/helper.sh +++ b/cluster/gce/coreos/helper.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/debian/helper.sh b/cluster/gce/debian/helper.sh index b0b10a1d17..759561188d 100755 --- a/cluster/gce/debian/helper.sh +++ b/cluster/gce/debian/helper.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/delete-stranded-load-balancers.sh b/cluster/gce/delete-stranded-load-balancers.sh index 63e9427372..be28ef52ab 100755 --- a/cluster/gce/delete-stranded-load-balancers.sh +++ b/cluster/gce/delete-stranded-load-balancers.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index 23cde1db91..57caeaec2a 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/gci/configure.sh b/cluster/gce/gci/configure.sh index 36184f5b2f..8e1f154595 100644 --- a/cluster/gce/gci/configure.sh +++ b/cluster/gce/gci/configure.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/gci/health-monitor.sh b/cluster/gce/gci/health-monitor.sh index 3318a89752..4d50e4ee8d 100644 --- a/cluster/gce/gci/health-monitor.sh +++ b/cluster/gce/gci/health-monitor.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/gci/helper.sh b/cluster/gce/gci/helper.sh index 8d653512e8..144c23faad 100755 --- a/cluster/gce/gci/helper.sh +++ b/cluster/gce/gci/helper.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/list-resources.sh b/cluster/gce/list-resources.sh index 4ee86158a1..8e2204b03b 100755 --- a/cluster/gce/list-resources.sh +++ b/cluster/gce/list-resources.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/trusty/configure-helper.sh b/cluster/gce/trusty/configure-helper.sh index e2fb5d3e2a..b4251a844f 100644 --- a/cluster/gce/trusty/configure-helper.sh +++ b/cluster/gce/trusty/configure-helper.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/trusty/configure.sh b/cluster/gce/trusty/configure.sh index c89513a3f7..d301e919db 100644 --- a/cluster/gce/trusty/configure.sh +++ b/cluster/gce/trusty/configure.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/trusty/helper.sh b/cluster/gce/trusty/helper.sh index 451c3c64fd..6a1a76edcf 100755 --- a/cluster/gce/trusty/helper.sh +++ b/cluster/gce/trusty/helper.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/upgrade.sh b/cluster/gce/upgrade.sh index 5b56a0759c..1211f9ef77 100755 --- a/cluster/gce/upgrade.sh +++ b/cluster/gce/upgrade.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gce/util.sh b/cluster/gce/util.sh index d8ff03a769..f81c33cc72 100755 --- a/cluster/gce/util.sh +++ b/cluster/gce/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/get-kube-local.sh b/cluster/get-kube-local.sh index 10062db51c..2332003329 100755 --- a/cluster/get-kube-local.sh +++ b/cluster/get-kube-local.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/get-kube.sh b/cluster/get-kube.sh index d08d1b1e29..364a9fb8ef 100755 --- a/cluster/get-kube.sh +++ b/cluster/get-kube.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gke/config-common.sh b/cluster/gke/config-common.sh index 9850542611..f64b2f5801 100644 --- a/cluster/gke/config-common.sh +++ b/cluster/gke/config-common.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gke/config-default.sh b/cluster/gke/config-default.sh index 5d5df61a8f..03aa6f66e1 100644 --- a/cluster/gke/config-default.sh +++ b/cluster/gke/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gke/config-test.sh b/cluster/gke/config-test.sh index f32a163ac9..c22f44d3f4 100644 --- a/cluster/gke/config-test.sh +++ b/cluster/gke/config-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/gke/util.sh b/cluster/gke/util.sh index e0f57f49c2..4626384889 100755 --- a/cluster/gke/util.sh +++ b/cluster/gke/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/etcd/Dockerfile b/cluster/images/etcd/Dockerfile index e4fd3054af..6199aef862 100644 --- a/cluster/images/etcd/Dockerfile +++ b/cluster/images/etcd/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/etcd/Makefile b/cluster/images/etcd/Makefile index edb3350264..06311e110d 100644 --- a/cluster/images/etcd/Makefile +++ b/cluster/images/etcd/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/flannel/Dockerfile b/cluster/images/flannel/Dockerfile index 9f75907983..57998fd421 100644 --- a/cluster/images/flannel/Dockerfile +++ b/cluster/images/flannel/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/flannel/Makefile b/cluster/images/flannel/Makefile index bcf93acaf1..970d0a9b12 100644 --- a/cluster/images/flannel/Makefile +++ b/cluster/images/flannel/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/hyperkube/Dockerfile b/cluster/images/hyperkube/Dockerfile index 64e8d1ef73..ed47f7d37d 100644 --- a/cluster/images/hyperkube/Dockerfile +++ b/cluster/images/hyperkube/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/hyperkube/Makefile b/cluster/images/hyperkube/Makefile index 643edef6b2..1ab21a436d 100644 --- a/cluster/images/hyperkube/Makefile +++ b/cluster/images/hyperkube/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/hyperkube/copy-addons.sh b/cluster/images/hyperkube/copy-addons.sh index 499f04d768..16e7a7dd5c 100755 --- a/cluster/images/hyperkube/copy-addons.sh +++ b/cluster/images/hyperkube/copy-addons.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/hyperkube/kube-proxy-ds.yaml b/cluster/images/hyperkube/kube-proxy-ds.yaml index a81504c77e..c0ccb0b8c5 100644 --- a/cluster/images/hyperkube/kube-proxy-ds.yaml +++ b/cluster/images/hyperkube/kube-proxy-ds.yaml @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/hyperkube/setup-files.sh b/cluster/images/hyperkube/setup-files.sh index 395ab7bb7f..4a1d881513 100644 --- a/cluster/images/hyperkube/setup-files.sh +++ b/cluster/images/hyperkube/setup-files.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/kubelet/Dockerfile b/cluster/images/kubelet/Dockerfile index dbcbb3991d..17be2bd649 100644 --- a/cluster/images/kubelet/Dockerfile +++ b/cluster/images/kubelet/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/kubelet/Makefile b/cluster/images/kubelet/Makefile index af71cac47a..90c81f6dee 100644 --- a/cluster/images/kubelet/Makefile +++ b/cluster/images/kubelet/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/kubemark/Dockerfile b/cluster/images/kubemark/Dockerfile index 653f129004..f4bcfa577c 100644 --- a/cluster/images/kubemark/Dockerfile +++ b/cluster/images/kubemark/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/kubemark/Makefile b/cluster/images/kubemark/Makefile index 26246e8302..afc011729f 100644 --- a/cluster/images/kubemark/Makefile +++ b/cluster/images/kubemark/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/kubemark/build-kubemark.sh b/cluster/images/kubemark/build-kubemark.sh index 1bf92ed7c1..2365960c2c 100755 --- a/cluster/images/kubemark/build-kubemark.sh +++ b/cluster/images/kubemark/build-kubemark.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/images/kubemark/kubemark.sh b/cluster/images/kubemark/kubemark.sh index e8adfefa44..9e9f22e00a 100644 --- a/cluster/images/kubemark/kubemark.sh +++ b/cluster/images/kubemark/kubemark.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/juju/config-default.sh b/cluster/juju/config-default.sh index 0bdc6180b6..4a509985ed 100644 --- a/cluster/juju/config-default.sh +++ b/cluster/juju/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/juju/config-test.sh b/cluster/juju/config-test.sh index 7bda9c8cbc..8068845478 100644 --- a/cluster/juju/config-test.sh +++ b/cluster/juju/config-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/juju/identify-leaders.py b/cluster/juju/identify-leaders.py index 6d6244b751..0dd9eff1af 100755 --- a/cluster/juju/identify-leaders.py +++ b/cluster/juju/identify-leaders.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/juju/layers/kubernetes/actions/guestbook-example b/cluster/juju/layers/kubernetes/actions/guestbook-example index b2af79a435..6ab5404a20 100755 --- a/cluster/juju/layers/kubernetes/actions/guestbook-example +++ b/cluster/juju/layers/kubernetes/actions/guestbook-example @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/juju/layers/kubernetes/reactive/k8s.py b/cluster/juju/layers/kubernetes/reactive/k8s.py index cad4b00ae8..6356edb1df 100644 --- a/cluster/juju/layers/kubernetes/reactive/k8s.py +++ b/cluster/juju/layers/kubernetes/reactive/k8s.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/juju/prereqs/ubuntu-juju.sh b/cluster/juju/prereqs/ubuntu-juju.sh index a0921eb391..0264442e00 100644 --- a/cluster/juju/prereqs/ubuntu-juju.sh +++ b/cluster/juju/prereqs/ubuntu-juju.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/juju/return-node-ips.py b/cluster/juju/return-node-ips.py index 4e5e39c8a9..7d7125582d 100755 --- a/cluster/juju/return-node-ips.py +++ b/cluster/juju/return-node-ips.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/juju/util.sh b/cluster/juju/util.sh index fb6fa95428..0e707d4258 100755 --- a/cluster/juju/util.sh +++ b/cluster/juju/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/kube-down.sh b/cluster/kube-down.sh index 5ac53c9b95..42f4a31baf 100755 --- a/cluster/kube-down.sh +++ b/cluster/kube-down.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/kube-push.sh b/cluster/kube-push.sh index e2a13e54c8..dd7d2039ff 100755 --- a/cluster/kube-push.sh +++ b/cluster/kube-push.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/kube-up.sh b/cluster/kube-up.sh index 12862d5f1d..6515741921 100755 --- a/cluster/kube-up.sh +++ b/cluster/kube-up.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/kube-util.sh b/cluster/kube-util.sh index facdc70efc..c6cb58fc81 100644 --- a/cluster/kube-util.sh +++ b/cluster/kube-util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/kubectl.sh b/cluster/kubectl.sh index be64892286..a8758412ab 100755 --- a/cluster/kubectl.sh +++ b/cluster/kubectl.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/kubemark/config-default.sh b/cluster/kubemark/config-default.sh index f2e26494ac..7affd528a7 100644 --- a/cluster/kubemark/config-default.sh +++ b/cluster/kubemark/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/kubemark/util.sh b/cluster/kubemark/util.sh index bdb21c0270..a252c5cfcd 100644 --- a/cluster/kubemark/util.sh +++ b/cluster/kubemark/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/lib/logging.sh b/cluster/lib/logging.sh index 6bcebaa920..6b8f0577c2 100644 --- a/cluster/lib/logging.sh +++ b/cluster/lib/logging.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/lib/util.sh b/cluster/lib/util.sh index b6bd78acdb..7082fb7ce2 100644 --- a/cluster/lib/util.sh +++ b/cluster/lib/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/libvirt-coreos/config-default.sh b/cluster/libvirt-coreos/config-default.sh index d26ff7e316..294f9d7833 100644 --- a/cluster/libvirt-coreos/config-default.sh +++ b/cluster/libvirt-coreos/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/libvirt-coreos/config-test.sh b/cluster/libvirt-coreos/config-test.sh index 57b8d8095f..af3633c1be 100644 --- a/cluster/libvirt-coreos/config-test.sh +++ b/cluster/libvirt-coreos/config-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/libvirt-coreos/util.sh b/cluster/libvirt-coreos/util.sh index 35ac900c66..129c82ec99 100644 --- a/cluster/libvirt-coreos/util.sh +++ b/cluster/libvirt-coreos/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/local/util.sh b/cluster/local/util.sh index d804f87c15..8473e1a5e0 100755 --- a/cluster/local/util.sh +++ b/cluster/local/util.sh @@ -1,6 +1,5 @@ #!/bin/bash - -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/log-dump.sh b/cluster/log-dump.sh index 585f22ccd3..7a4720c9a0 100755 --- a/cluster/log-dump.sh +++ b/cluster/log-dump.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/common/bin/await-file b/cluster/mesos/docker/common/bin/await-file index d0997c39cd..11b906cf94 100755 --- a/cluster/mesos/docker/common/bin/await-file +++ b/cluster/mesos/docker/common/bin/await-file @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/common/bin/await-health-check b/cluster/mesos/docker/common/bin/await-health-check index 7aa813ea1e..5e0504e5a9 100755 --- a/cluster/mesos/docker/common/bin/await-health-check +++ b/cluster/mesos/docker/common/bin/await-health-check @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/common/bin/health-check b/cluster/mesos/docker/common/bin/health-check index 3b90c0a92b..aee95f3192 100755 --- a/cluster/mesos/docker/common/bin/health-check +++ b/cluster/mesos/docker/common/bin/health-check @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/config-default.sh b/cluster/mesos/docker/config-default.sh index 45f45f9a54..5dcfa2feb7 100755 --- a/cluster/mesos/docker/config-default.sh +++ b/cluster/mesos/docker/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/config-test.sh b/cluster/mesos/docker/config-test.sh index 13ab3994f7..0706e171b1 100644 --- a/cluster/mesos/docker/config-test.sh +++ b/cluster/mesos/docker/config-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/deploy-addons.sh b/cluster/mesos/docker/deploy-addons.sh index 6ab378b89a..488e835576 100755 --- a/cluster/mesos/docker/deploy-addons.sh +++ b/cluster/mesos/docker/deploy-addons.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/deploy-dns.sh b/cluster/mesos/docker/deploy-dns.sh index f9aff16538..d1b99f0fec 100755 --- a/cluster/mesos/docker/deploy-dns.sh +++ b/cluster/mesos/docker/deploy-dns.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/deploy-ui.sh b/cluster/mesos/docker/deploy-ui.sh index bdbb928567..0c51f782f3 100755 --- a/cluster/mesos/docker/deploy-ui.sh +++ b/cluster/mesos/docker/deploy-ui.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/km/Dockerfile b/cluster/mesos/docker/km/Dockerfile index af0f2f2273..57f334979f 100644 --- a/cluster/mesos/docker/km/Dockerfile +++ b/cluster/mesos/docker/km/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/km/build.sh b/cluster/mesos/docker/km/build.sh index f372514267..3339d2d9d2 100755 --- a/cluster/mesos/docker/km/build.sh +++ b/cluster/mesos/docker/km/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/socat/Dockerfile b/cluster/mesos/docker/socat/Dockerfile index 4ef2fc0275..d5bf541d3c 100644 --- a/cluster/mesos/docker/socat/Dockerfile +++ b/cluster/mesos/docker/socat/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/socat/build.sh b/cluster/mesos/docker/socat/build.sh index f001d31cc3..04ba93e55c 100755 --- a/cluster/mesos/docker/socat/build.sh +++ b/cluster/mesos/docker/socat/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/test/Dockerfile b/cluster/mesos/docker/test/Dockerfile index c04d53c253..0900edc3e1 100644 --- a/cluster/mesos/docker/test/Dockerfile +++ b/cluster/mesos/docker/test/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/test/bin/install-etcd.sh b/cluster/mesos/docker/test/bin/install-etcd.sh index 857b52688f..7792a53185 100755 --- a/cluster/mesos/docker/test/bin/install-etcd.sh +++ b/cluster/mesos/docker/test/bin/install-etcd.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/test/build.sh b/cluster/mesos/docker/test/build.sh index 5ec3c61e1a..441ae1a65d 100755 --- a/cluster/mesos/docker/test/build.sh +++ b/cluster/mesos/docker/test/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/mesos/docker/util.sh b/cluster/mesos/docker/util.sh index 27b9a53ea0..c470492f68 100644 --- a/cluster/mesos/docker/util.sh +++ b/cluster/mesos/docker/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/openstack-heat/config-default.sh b/cluster/openstack-heat/config-default.sh index 6c4947f86c..9d0ad22b8b 100644 --- a/cluster/openstack-heat/config-default.sh +++ b/cluster/openstack-heat/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/openstack-heat/config-image.sh b/cluster/openstack-heat/config-image.sh index b5acd84299..0e397146aa 100644 --- a/cluster/openstack-heat/config-image.sh +++ b/cluster/openstack-heat/config-image.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/openstack-heat/config-test.sh b/cluster/openstack-heat/config-test.sh index 0787d55e7b..afeec36dfb 100644 --- a/cluster/openstack-heat/config-test.sh +++ b/cluster/openstack-heat/config-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/openstack-heat/kubernetes-heat/fragments/configure-proxy.sh b/cluster/openstack-heat/kubernetes-heat/fragments/configure-proxy.sh index 3b4ddcc3e3..2aa4df7cf9 100644 --- a/cluster/openstack-heat/kubernetes-heat/fragments/configure-proxy.sh +++ b/cluster/openstack-heat/kubernetes-heat/fragments/configure-proxy.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/openstack-heat/kubernetes-heat/fragments/hostname-hack.sh b/cluster/openstack-heat/kubernetes-heat/fragments/hostname-hack.sh index d29d5c8cd3..6703474968 100644 --- a/cluster/openstack-heat/kubernetes-heat/fragments/hostname-hack.sh +++ b/cluster/openstack-heat/kubernetes-heat/fragments/hostname-hack.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/openstack-heat/kubernetes-heat/fragments/provision-network-master.sh b/cluster/openstack-heat/kubernetes-heat/fragments/provision-network-master.sh index 901734e827..895575a8cc 100644 --- a/cluster/openstack-heat/kubernetes-heat/fragments/provision-network-master.sh +++ b/cluster/openstack-heat/kubernetes-heat/fragments/provision-network-master.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/openstack-heat/kubernetes-heat/fragments/provision-network-node.sh b/cluster/openstack-heat/kubernetes-heat/fragments/provision-network-node.sh index 7fd78598e2..eff3fb7b69 100644 --- a/cluster/openstack-heat/kubernetes-heat/fragments/provision-network-node.sh +++ b/cluster/openstack-heat/kubernetes-heat/fragments/provision-network-node.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/openstack-heat/kubernetes-heat/fragments/run-salt.sh b/cluster/openstack-heat/kubernetes-heat/fragments/run-salt.sh index e879c0384a..82ace6f358 100644 --- a/cluster/openstack-heat/kubernetes-heat/fragments/run-salt.sh +++ b/cluster/openstack-heat/kubernetes-heat/fragments/run-salt.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/openstack-heat/openrc-default.sh b/cluster/openstack-heat/openrc-default.sh index 2583d5c2cd..77a95f9e28 100644 --- a/cluster/openstack-heat/openrc-default.sh +++ b/cluster/openstack-heat/openrc-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/openstack-heat/openrc-swift.sh b/cluster/openstack-heat/openrc-swift.sh index 8ba761f0d1..74c2178b32 100644 --- a/cluster/openstack-heat/openrc-swift.sh +++ b/cluster/openstack-heat/openrc-swift.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/openstack-heat/util.sh b/cluster/openstack-heat/util.sh index 4da025e937..e355bef9e3 100644 --- a/cluster/openstack-heat/util.sh +++ b/cluster/openstack-heat/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/photon-controller/config-common.sh b/cluster/photon-controller/config-common.sh index 6f4d65e4c7..412eb26ba2 100644 --- a/cluster/photon-controller/config-common.sh +++ b/cluster/photon-controller/config-common.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/photon-controller/config-default.sh b/cluster/photon-controller/config-default.sh index 4117eac33e..2cdf17afc9 100755 --- a/cluster/photon-controller/config-default.sh +++ b/cluster/photon-controller/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/photon-controller/config-test.sh b/cluster/photon-controller/config-test.sh index 04b79d3aa3..87e68d72f7 100755 --- a/cluster/photon-controller/config-test.sh +++ b/cluster/photon-controller/config-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/photon-controller/setup-prereq.sh b/cluster/photon-controller/setup-prereq.sh index 2c8ac9cfba..7212081327 100755 --- a/cluster/photon-controller/setup-prereq.sh +++ b/cluster/photon-controller/setup-prereq.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/photon-controller/templates/create-dynamic-salt-files.sh b/cluster/photon-controller/templates/create-dynamic-salt-files.sh index 4a7c3be701..048dc13b32 100755 --- a/cluster/photon-controller/templates/create-dynamic-salt-files.sh +++ b/cluster/photon-controller/templates/create-dynamic-salt-files.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/photon-controller/templates/hostname.sh b/cluster/photon-controller/templates/hostname.sh index 32ec5606c8..ae7f4d0f4e 100755 --- a/cluster/photon-controller/templates/hostname.sh +++ b/cluster/photon-controller/templates/hostname.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/photon-controller/templates/install-release.sh b/cluster/photon-controller/templates/install-release.sh index 8d4229f015..34206a35aa 100755 --- a/cluster/photon-controller/templates/install-release.sh +++ b/cluster/photon-controller/templates/install-release.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/photon-controller/templates/salt-master.sh b/cluster/photon-controller/templates/salt-master.sh index 567ddf5076..c1f65f8423 100755 --- a/cluster/photon-controller/templates/salt-master.sh +++ b/cluster/photon-controller/templates/salt-master.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/photon-controller/templates/salt-minion.sh b/cluster/photon-controller/templates/salt-minion.sh index 599f246fff..314e5e726d 100755 --- a/cluster/photon-controller/templates/salt-minion.sh +++ b/cluster/photon-controller/templates/salt-minion.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/photon-controller/util.sh b/cluster/photon-controller/util.sh index a1e6db3d26..6473a4e36e 100755 --- a/cluster/photon-controller/util.sh +++ b/cluster/photon-controller/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/rackspace/authorization.sh b/cluster/rackspace/authorization.sh index 6527abd304..e8cf863644 100644 --- a/cluster/rackspace/authorization.sh +++ b/cluster/rackspace/authorization.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/rackspace/config-default.sh b/cluster/rackspace/config-default.sh index e383ebc972..079e62161e 100755 --- a/cluster/rackspace/config-default.sh +++ b/cluster/rackspace/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/rackspace/kube-up.sh b/cluster/rackspace/kube-up.sh index 8cb0ed7b7b..b191f42aee 100755 --- a/cluster/rackspace/kube-up.sh +++ b/cluster/rackspace/kube-up.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/rackspace/util.sh b/cluster/rackspace/util.sh index cf7357d900..ac3cff2bdf 100755 --- a/cluster/rackspace/util.sh +++ b/cluster/rackspace/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/install.sh b/cluster/saltbase/install.sh index b01841274c..fdf6c634d1 100755 --- a/cluster/saltbase/install.sh +++ b/cluster/saltbase/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/docker/docker-healthcheck b/cluster/saltbase/salt/docker/docker-healthcheck index 9167567bb0..2ff3b8942b 100755 --- a/cluster/saltbase/salt/docker/docker-healthcheck +++ b/cluster/saltbase/salt/docker/docker-healthcheck @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/docker/docker-prestart b/cluster/saltbase/salt/docker/docker-prestart index ea23d6d723..0ac5796777 100755 --- a/cluster/saltbase/salt/docker/docker-prestart +++ b/cluster/saltbase/salt/docker/docker-prestart @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/generate-cert/make-ca-cert.sh b/cluster/saltbase/salt/generate-cert/make-ca-cert.sh index 8dd1e2484c..ac227a2c08 100755 --- a/cluster/saltbase/salt/generate-cert/make-ca-cert.sh +++ b/cluster/saltbase/salt/generate-cert/make-ca-cert.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/generate-cert/make-cert.sh b/cluster/saltbase/salt/generate-cert/make-cert.sh index 914ed1fd28..ec17d11c28 100755 --- a/cluster/saltbase/salt/generate-cert/make-cert.sh +++ b/cluster/saltbase/salt/generate-cert/make-cert.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/kube-dns/Makefile b/cluster/saltbase/salt/kube-dns/Makefile index caa812194d..a2644c7ad7 100644 --- a/cluster/saltbase/salt/kube-dns/Makefile +++ b/cluster/saltbase/salt/kube-dns/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base index 1adb7dd628..86fab80c8e 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in index 5e847a5447..b230b48067 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed index ac1c3a829b..29129e4f46 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.base b/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.base index 6170fc53d9..5c9f06f726 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.base +++ b/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.base @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in b/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in index f8d64440d5..12a0f89a32 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in +++ b/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.in @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.sed b/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.sed index 837d72b8f8..1e5d14d20a 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.sed +++ b/cluster/saltbase/salt/kube-dns/skydns-svc.yaml.sed @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/kube-master-addons/kube-master-addons.sh b/cluster/saltbase/salt/kube-master-addons/kube-master-addons.sh index cde513a9c6..a4502bd65a 100755 --- a/cluster/saltbase/salt/kube-master-addons/kube-master-addons.sh +++ b/cluster/saltbase/salt/kube-master-addons/kube-master-addons.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/kube-node-unpacker/kube-node-unpacker.sh b/cluster/saltbase/salt/kube-node-unpacker/kube-node-unpacker.sh index 18e10957c2..d1124b6113 100755 --- a/cluster/saltbase/salt/kube-node-unpacker/kube-node-unpacker.sh +++ b/cluster/saltbase/salt/kube-node-unpacker/kube-node-unpacker.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/salt-helpers/pkg-apt b/cluster/saltbase/salt/salt-helpers/pkg-apt index 803d301458..2bb3ea666e 100644 --- a/cluster/saltbase/salt/salt-helpers/pkg-apt +++ b/cluster/saltbase/salt/salt-helpers/pkg-apt @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/salt-helpers/services b/cluster/saltbase/salt/salt-helpers/services index bc8db58f32..c935f673c5 100644 --- a/cluster/saltbase/salt/salt-helpers/services +++ b/cluster/saltbase/salt/salt-helpers/services @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/supervisor/docker-checker.sh b/cluster/saltbase/salt/supervisor/docker-checker.sh index 37653b5f6d..4d3992d53b 100755 --- a/cluster/saltbase/salt/supervisor/docker-checker.sh +++ b/cluster/saltbase/salt/supervisor/docker-checker.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/supervisor/kube-addons-checker.sh b/cluster/saltbase/salt/supervisor/kube-addons-checker.sh index d97497368d..3bd664f155 100644 --- a/cluster/saltbase/salt/supervisor/kube-addons-checker.sh +++ b/cluster/saltbase/salt/supervisor/kube-addons-checker.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/supervisor/kubelet-checker.sh b/cluster/saltbase/salt/supervisor/kubelet-checker.sh index 1a83c11ea4..7ee171f3eb 100755 --- a/cluster/saltbase/salt/supervisor/kubelet-checker.sh +++ b/cluster/saltbase/salt/supervisor/kubelet-checker.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/saltbase/salt/supervisor/supervisor_watcher.sh b/cluster/saltbase/salt/supervisor/supervisor_watcher.sh index da214527c9..acc0f9e05b 100644 --- a/cluster/saltbase/salt/supervisor/supervisor_watcher.sh +++ b/cluster/saltbase/salt/supervisor/supervisor_watcher.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/skeleton/util.sh b/cluster/skeleton/util.sh index 9387ceb3cc..d5ec247fa3 100644 --- a/cluster/skeleton/util.sh +++ b/cluster/skeleton/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/test-e2e.sh b/cluster/test-e2e.sh index af29b291f0..4b33ffca7b 100755 --- a/cluster/test-e2e.sh +++ b/cluster/test-e2e.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/test-network.sh b/cluster/test-network.sh index c3c1961b3f..37f54ba030 100755 --- a/cluster/test-network.sh +++ b/cluster/test-network.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/test-smoke.sh b/cluster/test-smoke.sh index 2535bb3b20..11edd18540 100755 --- a/cluster/test-smoke.sh +++ b/cluster/test-smoke.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/ubuntu/config-default.sh b/cluster/ubuntu/config-default.sh index 6b55042e2b..31273e40ea 100755 --- a/cluster/ubuntu/config-default.sh +++ b/cluster/ubuntu/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/ubuntu/config-test.sh b/cluster/ubuntu/config-test.sh index 0da5a7ac0c..2b40bc57b5 100644 --- a/cluster/ubuntu/config-test.sh +++ b/cluster/ubuntu/config-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/ubuntu/deployAddons.sh b/cluster/ubuntu/deployAddons.sh index 568dbe96dc..591b576e03 100755 --- a/cluster/ubuntu/deployAddons.sh +++ b/cluster/ubuntu/deployAddons.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/ubuntu/download-release.sh b/cluster/ubuntu/download-release.sh index 9136dc90dc..5444129885 100755 --- a/cluster/ubuntu/download-release.sh +++ b/cluster/ubuntu/download-release.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/ubuntu/reconfDocker.sh b/cluster/ubuntu/reconfDocker.sh index 6022710898..a05e3d2d13 100755 --- a/cluster/ubuntu/reconfDocker.sh +++ b/cluster/ubuntu/reconfDocker.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/ubuntu/util.sh b/cluster/ubuntu/util.sh index b4939b2501..549d42905f 100755 --- a/cluster/ubuntu/util.sh +++ b/cluster/ubuntu/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/update-storage-objects.sh b/cluster/update-storage-objects.sh index a1839e88ee..7ad1d344bc 100755 --- a/cluster/update-storage-objects.sh +++ b/cluster/update-storage-objects.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vagrant/config-default.sh b/cluster/vagrant/config-default.sh index 3dc2ea1e42..7731fc822e 100755 --- a/cluster/vagrant/config-default.sh +++ b/cluster/vagrant/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vagrant/config-test.sh b/cluster/vagrant/config-test.sh index e9919743ff..876e26ae4f 100644 --- a/cluster/vagrant/config-test.sh +++ b/cluster/vagrant/config-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vagrant/pod-ip-test.sh b/cluster/vagrant/pod-ip-test.sh index a22f9c3416..83ed59b3c8 100755 --- a/cluster/vagrant/pod-ip-test.sh +++ b/cluster/vagrant/pod-ip-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vagrant/provision-master.sh b/cluster/vagrant/provision-master.sh index 1362332e27..8edd8c3c95 100755 --- a/cluster/vagrant/provision-master.sh +++ b/cluster/vagrant/provision-master.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vagrant/provision-network-master.sh b/cluster/vagrant/provision-network-master.sh index 7725c229e7..14280cba07 100644 --- a/cluster/vagrant/provision-network-master.sh +++ b/cluster/vagrant/provision-network-master.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vagrant/provision-network-node.sh b/cluster/vagrant/provision-network-node.sh index c4a354ce91..c8fd42252e 100644 --- a/cluster/vagrant/provision-network-node.sh +++ b/cluster/vagrant/provision-network-node.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vagrant/provision-node.sh b/cluster/vagrant/provision-node.sh index 4893424edc..8d43a63cad 100755 --- a/cluster/vagrant/provision-node.sh +++ b/cluster/vagrant/provision-node.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vagrant/provision-utils.sh b/cluster/vagrant/provision-utils.sh index e486af9326..e75672d807 100755 --- a/cluster/vagrant/provision-utils.sh +++ b/cluster/vagrant/provision-utils.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vagrant/util.sh b/cluster/vagrant/util.sh index 48a7d21b41..d503e6c6dc 100755 --- a/cluster/vagrant/util.sh +++ b/cluster/vagrant/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/validate-cluster.sh b/cluster/validate-cluster.sh index bedc103678..c10d614846 100755 --- a/cluster/validate-cluster.sh +++ b/cluster/validate-cluster.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vsphere/config-common.sh b/cluster/vsphere/config-common.sh index 6e90885a66..acd44f0906 100644 --- a/cluster/vsphere/config-common.sh +++ b/cluster/vsphere/config-common.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vsphere/config-default.sh b/cluster/vsphere/config-default.sh index 260730c917..e646dfa500 100755 --- a/cluster/vsphere/config-default.sh +++ b/cluster/vsphere/config-default.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vsphere/config-test.sh b/cluster/vsphere/config-test.sh index fb4c493c11..e1379d1181 100755 --- a/cluster/vsphere/config-test.sh +++ b/cluster/vsphere/config-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vsphere/templates/create-dynamic-salt-files.sh b/cluster/vsphere/templates/create-dynamic-salt-files.sh index 0d2e9252a6..70242ea240 100755 --- a/cluster/vsphere/templates/create-dynamic-salt-files.sh +++ b/cluster/vsphere/templates/create-dynamic-salt-files.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vsphere/templates/hostname.sh b/cluster/vsphere/templates/hostname.sh index 32ec5606c8..ae7f4d0f4e 100755 --- a/cluster/vsphere/templates/hostname.sh +++ b/cluster/vsphere/templates/hostname.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vsphere/templates/install-release.sh b/cluster/vsphere/templates/install-release.sh index 8d4229f015..34206a35aa 100755 --- a/cluster/vsphere/templates/install-release.sh +++ b/cluster/vsphere/templates/install-release.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vsphere/templates/salt-master.sh b/cluster/vsphere/templates/salt-master.sh index f009cd0c8c..7591bada9d 100755 --- a/cluster/vsphere/templates/salt-master.sh +++ b/cluster/vsphere/templates/salt-master.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vsphere/templates/salt-minion.sh b/cluster/vsphere/templates/salt-minion.sh index 57265f0eec..4ba1a4f275 100755 --- a/cluster/vsphere/templates/salt-minion.sh +++ b/cluster/vsphere/templates/salt-minion.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cluster/vsphere/util.sh b/cluster/vsphere/util.sh index 925684045c..e32379670c 100755 --- a/cluster/vsphere/util.sh +++ b/cluster/vsphere/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmd/gendocs/gen_kubectl_docs.go b/cmd/gendocs/gen_kubectl_docs.go index d30e7efa04..39c1d8f39d 100644 --- a/cmd/gendocs/gen_kubectl_docs.go +++ b/cmd/gendocs/gen_kubectl_docs.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/genkubedocs/gen_kube_docs.go b/cmd/genkubedocs/gen_kube_docs.go index 6a631af205..0cdd763c66 100644 --- a/cmd/genkubedocs/gen_kube_docs.go +++ b/cmd/genkubedocs/gen_kube_docs.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/genman/gen_kubectl_man.go b/cmd/genman/gen_kubectl_man.go index 2aa3a3a624..a0ddffd7e8 100644 --- a/cmd/genman/gen_kubectl_man.go +++ b/cmd/genman/gen_kubectl_man.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/genswaggertypedocs/swagger_type_docs.go b/cmd/genswaggertypedocs/swagger_type_docs.go index d88781d8e7..2725250b1a 100644 --- a/cmd/genswaggertypedocs/swagger_type_docs.go +++ b/cmd/genswaggertypedocs/swagger_type_docs.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/genutils/genutils.go b/cmd/genutils/genutils.go index bdd8491c13..309d6ec48f 100644 --- a/cmd/genutils/genutils.go +++ b/cmd/genutils/genutils.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/genutils/genutils_test.go b/cmd/genutils/genutils_test.go index 168333038f..65630aa7e7 100644 --- a/cmd/genutils/genutils_test.go +++ b/cmd/genutils/genutils_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/genyaml/gen_kubectl_yaml.go b/cmd/genyaml/gen_kubectl_yaml.go index 48ab0d8f43..fdd84b6ce9 100644 --- a/cmd/genyaml/gen_kubectl_yaml.go +++ b/cmd/genyaml/gen_kubectl_yaml.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/hyperkube/federation-apiserver.go b/cmd/hyperkube/federation-apiserver.go index 6093dc529e..d658380091 100644 --- a/cmd/hyperkube/federation-apiserver.go +++ b/cmd/hyperkube/federation-apiserver.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/hyperkube/federation-controller-manager.go b/cmd/hyperkube/federation-controller-manager.go index d7a2af1f40..e445f87747 100644 --- a/cmd/hyperkube/federation-controller-manager.go +++ b/cmd/hyperkube/federation-controller-manager.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/hyperkube/hyperkube.go b/cmd/hyperkube/hyperkube.go index ba47aea41c..8b98d9f6c7 100644 --- a/cmd/hyperkube/hyperkube.go +++ b/cmd/hyperkube/hyperkube.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/hyperkube/hyperkube_test.go b/cmd/hyperkube/hyperkube_test.go index bb2f6b4801..3a86433197 100644 --- a/cmd/hyperkube/hyperkube_test.go +++ b/cmd/hyperkube/hyperkube_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/hyperkube/kube-apiserver.go b/cmd/hyperkube/kube-apiserver.go index 42da6db066..bffcc0ce75 100644 --- a/cmd/hyperkube/kube-apiserver.go +++ b/cmd/hyperkube/kube-apiserver.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/hyperkube/kube-controller-manager.go b/cmd/hyperkube/kube-controller-manager.go index 57d4856a6a..76f1a793be 100644 --- a/cmd/hyperkube/kube-controller-manager.go +++ b/cmd/hyperkube/kube-controller-manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/hyperkube/kube-proxy.go b/cmd/hyperkube/kube-proxy.go index 5b5231dd3e..7fe790644f 100644 --- a/cmd/hyperkube/kube-proxy.go +++ b/cmd/hyperkube/kube-proxy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/hyperkube/kube-scheduler.go b/cmd/hyperkube/kube-scheduler.go index 799038da3d..385fcc8d8c 100644 --- a/cmd/hyperkube/kube-scheduler.go +++ b/cmd/hyperkube/kube-scheduler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/hyperkube/kubectl.go b/cmd/hyperkube/kubectl.go index 424a472f0f..068b2781e0 100644 --- a/cmd/hyperkube/kubectl.go +++ b/cmd/hyperkube/kubectl.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/hyperkube/kubelet.go b/cmd/hyperkube/kubelet.go index 0c2f616156..f63734e618 100644 --- a/cmd/hyperkube/kubelet.go +++ b/cmd/hyperkube/kubelet.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/hyperkube/main.go b/cmd/hyperkube/main.go index 460d011fd2..9eff6f7254 100644 --- a/cmd/hyperkube/main.go +++ b/cmd/hyperkube/main.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/hyperkube/server.go b/cmd/hyperkube/server.go index 75899ca98a..6ac1661b6c 100644 --- a/cmd/hyperkube/server.go +++ b/cmd/hyperkube/server.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/integration/integration.go b/cmd/integration/integration.go index ff016a0aa9..ef8d524e3c 100644 --- a/cmd/integration/integration.go +++ b/cmd/integration/integration.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-apiserver/apiserver.go b/cmd/kube-apiserver/apiserver.go index c63ec99c35..646486d16a 100644 --- a/cmd/kube-apiserver/apiserver.go +++ b/cmd/kube-apiserver/apiserver.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-apiserver/app/options/options.go b/cmd/kube-apiserver/app/options/options.go index 4cf8e0555c..b9ac99c784 100644 --- a/cmd/kube-apiserver/app/options/options.go +++ b/cmd/kube-apiserver/app/options/options.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-apiserver/app/options/options_test.go b/cmd/kube-apiserver/app/options/options_test.go index c2f0114114..4cb47c3edf 100644 --- a/cmd/kube-apiserver/app/options/options_test.go +++ b/cmd/kube-apiserver/app/options/options_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-apiserver/app/plugins.go b/cmd/kube-apiserver/app/plugins.go index e8ccd0efbf..ef4dda786a 100644 --- a/cmd/kube-apiserver/app/plugins.go +++ b/cmd/kube-apiserver/app/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-apiserver/app/server.go b/cmd/kube-apiserver/app/server.go index e479146be1..251ebb2438 100644 --- a/cmd/kube-apiserver/app/server.go +++ b/cmd/kube-apiserver/app/server.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-apiserver/app/server_test.go b/cmd/kube-apiserver/app/server_test.go index ce71671b12..6335fe7cc2 100644 --- a/cmd/kube-apiserver/app/server_test.go +++ b/cmd/kube-apiserver/app/server_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index 1353f2b293..58c9a069b2 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-controller-manager/app/options/options.go b/cmd/kube-controller-manager/app/options/options.go index 5944a5b639..8450f87e47 100644 --- a/cmd/kube-controller-manager/app/options/options.go +++ b/cmd/kube-controller-manager/app/options/options.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-controller-manager/app/plugins.go b/cmd/kube-controller-manager/app/plugins.go index 6b11dd3822..8ea23ecca2 100644 --- a/cmd/kube-controller-manager/app/plugins.go +++ b/cmd/kube-controller-manager/app/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-controller-manager/controller-manager.go b/cmd/kube-controller-manager/controller-manager.go index 0968be61c7..6c1bc72daa 100644 --- a/cmd/kube-controller-manager/controller-manager.go +++ b/cmd/kube-controller-manager/controller-manager.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-dns/app/options/options.go b/cmd/kube-dns/app/options/options.go index 3bf6fb03b8..a5689952f2 100644 --- a/cmd/kube-dns/app/options/options.go +++ b/cmd/kube-dns/app/options/options.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-dns/app/server.go b/cmd/kube-dns/app/server.go index 11c76f6ce9..19e765e087 100644 --- a/cmd/kube-dns/app/server.go +++ b/cmd/kube-dns/app/server.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-dns/dns.go b/cmd/kube-dns/dns.go index 2e08a00293..7d7a35c1ea 100644 --- a/cmd/kube-dns/dns.go +++ b/cmd/kube-dns/dns.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-proxy/app/conntrack.go b/cmd/kube-proxy/app/conntrack.go index 95b8e14888..b7323033e1 100644 --- a/cmd/kube-proxy/app/conntrack.go +++ b/cmd/kube-proxy/app/conntrack.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-proxy/app/options/options.go b/cmd/kube-proxy/app/options/options.go index 5bb1a69782..a6c3a79f4c 100644 --- a/cmd/kube-proxy/app/options/options.go +++ b/cmd/kube-proxy/app/options/options.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-proxy/app/server.go b/cmd/kube-proxy/app/server.go index f0d71ef232..dc5d4df000 100644 --- a/cmd/kube-proxy/app/server.go +++ b/cmd/kube-proxy/app/server.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-proxy/app/server_test.go b/cmd/kube-proxy/app/server_test.go index 21562f2832..c50a0cc610 100644 --- a/cmd/kube-proxy/app/server_test.go +++ b/cmd/kube-proxy/app/server_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kube-proxy/proxy.go b/cmd/kube-proxy/proxy.go index b2c5b5dfff..0137bb32e4 100644 --- a/cmd/kube-proxy/proxy.go +++ b/cmd/kube-proxy/proxy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubectl/app/kubectl.go b/cmd/kubectl/app/kubectl.go index e7beaf6443..27cbfd83b5 100644 --- a/cmd/kubectl/app/kubectl.go +++ b/cmd/kubectl/app/kubectl.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubectl/kubectl.go b/cmd/kubectl/kubectl.go index 4d6bc866da..cc7b11207c 100644 --- a/cmd/kubectl/kubectl.go +++ b/cmd/kubectl/kubectl.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index d0001923ae..10f7e607bc 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubelet/app/plugins.go b/cmd/kubelet/app/plugins.go index 76736350e4..f904ffa582 100644 --- a/cmd/kubelet/app/plugins.go +++ b/cmd/kubelet/app/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index a106e37f0a..6ff4508363 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubelet/app/server_linux.go b/cmd/kubelet/app/server_linux.go index a687f6f8da..ceab334c0b 100644 --- a/cmd/kubelet/app/server_linux.go +++ b/cmd/kubelet/app/server_linux.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubelet/app/server_test.go b/cmd/kubelet/app/server_test.go index ff130b24b0..6c93750c7e 100644 --- a/cmd/kubelet/app/server_test.go +++ b/cmd/kubelet/app/server_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubelet/app/server_unsupported.go b/cmd/kubelet/app/server_unsupported.go index 8647b8b68b..fd42a8ddd7 100644 --- a/cmd/kubelet/app/server_unsupported.go +++ b/cmd/kubelet/app/server_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubelet/kubelet.go b/cmd/kubelet/kubelet.go index fdc5c53811..aa2356cfe5 100644 --- a/cmd/kubelet/kubelet.go +++ b/cmd/kubelet/kubelet.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubemark/hollow-node.go b/cmd/kubemark/hollow-node.go index a8221768e4..b5ca17d967 100644 --- a/cmd/kubemark/hollow-node.go +++ b/cmd/kubemark/hollow-node.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubernetes-discovery/discoverysummarizer/apis/config/v1alpha1/types.go b/cmd/kubernetes-discovery/discoverysummarizer/apis/config/v1alpha1/types.go index 0d9b93bf54..5451369d6f 100644 --- a/cmd/kubernetes-discovery/discoverysummarizer/apis/config/v1alpha1/types.go +++ b/cmd/kubernetes-discovery/discoverysummarizer/apis/config/v1alpha1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubernetes-discovery/discoverysummarizer/discoverysummarizer.go b/cmd/kubernetes-discovery/discoverysummarizer/discoverysummarizer.go index 3dd9364dcd..2bb88c9910 100644 --- a/cmd/kubernetes-discovery/discoverysummarizer/discoverysummarizer.go +++ b/cmd/kubernetes-discovery/discoverysummarizer/discoverysummarizer.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubernetes-discovery/discoverysummarizer/discoverysummarizer_test.go b/cmd/kubernetes-discovery/discoverysummarizer/discoverysummarizer_test.go index 0f2e97154b..19c7a9560d 100644 --- a/cmd/kubernetes-discovery/discoverysummarizer/discoverysummarizer_test.go +++ b/cmd/kubernetes-discovery/discoverysummarizer/discoverysummarizer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubernetes-discovery/discoverysummarizer/doc.go b/cmd/kubernetes-discovery/discoverysummarizer/doc.go index ed947a0770..1253e049c1 100644 --- a/cmd/kubernetes-discovery/discoverysummarizer/doc.go +++ b/cmd/kubernetes-discovery/discoverysummarizer/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/kubernetes-discovery/main.go b/cmd/kubernetes-discovery/main.go index 11d4590f1a..ea11d094d2 100644 --- a/cmd/kubernetes-discovery/main.go +++ b/cmd/kubernetes-discovery/main.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/args/args.go b/cmd/libs/go2idl/args/args.go index 8538497532..9c47ca5a22 100644 --- a/cmd/libs/go2idl/args/args.go +++ b/cmd/libs/go2idl/args/args.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/args/args.go b/cmd/libs/go2idl/client-gen/args/args.go index 1e7099e49e..24608af497 100644 --- a/cmd/libs/go2idl/client-gen/args/args.go +++ b/cmd/libs/go2idl/client-gen/args/args.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/generators/client_generator.go b/cmd/libs/go2idl/client-gen/generators/client_generator.go index b3527973e1..81eef6256b 100644 --- a/cmd/libs/go2idl/client-gen/generators/client_generator.go +++ b/cmd/libs/go2idl/client-gen/generators/client_generator.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/generators/fake/fake_client_generator.go b/cmd/libs/go2idl/client-gen/generators/fake/fake_client_generator.go index 1c25a298c3..76d1f26c52 100644 --- a/cmd/libs/go2idl/client-gen/generators/fake/fake_client_generator.go +++ b/cmd/libs/go2idl/client-gen/generators/fake/fake_client_generator.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_clientset.go b/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_clientset.go index e7606a7244..6ecdca6a74 100644 --- a/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_clientset.go +++ b/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_group.go b/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_group.go index 88f2d64ec3..0790046d15 100644 --- a/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_group.go +++ b/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_group.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_type.go b/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_type.go index 943e70088d..b341653ce1 100644 --- a/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_type.go +++ b/cmd/libs/go2idl/client-gen/generators/fake/generator_fake_for_type.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go b/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go index 17ce06fb73..df20c4d325 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go +++ b/cmd/libs/go2idl/client-gen/generators/generator_for_clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/generators/generator_for_expansion.go b/cmd/libs/go2idl/client-gen/generators/generator_for_expansion.go index d3c980a5ad..20753b5bb8 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator_for_expansion.go +++ b/cmd/libs/go2idl/client-gen/generators/generator_for_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/generators/generator_for_group.go b/cmd/libs/go2idl/client-gen/generators/generator_for_group.go index 7ae31d9faf..b4c1e5eabd 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator_for_group.go +++ b/cmd/libs/go2idl/client-gen/generators/generator_for_group.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/generators/generator_for_type.go b/cmd/libs/go2idl/client-gen/generators/generator_for_type.go index a59c2ce9db..056556eb8c 100644 --- a/cmd/libs/go2idl/client-gen/generators/generator_for_type.go +++ b/cmd/libs/go2idl/client-gen/generators/generator_for_type.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/generators/normalization/normalization.go b/cmd/libs/go2idl/client-gen/generators/normalization/normalization.go index 51d4e7a2b8..7946c624d4 100644 --- a/cmd/libs/go2idl/client-gen/generators/normalization/normalization.go +++ b/cmd/libs/go2idl/client-gen/generators/normalization/normalization.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/main.go b/cmd/libs/go2idl/client-gen/main.go index 2634d14142..6be11f68ed 100644 --- a/cmd/libs/go2idl/client-gen/main.go +++ b/cmd/libs/go2idl/client-gen/main.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/doc.go b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/doc.go index 1902048be9..cab47b2c64 100644 --- a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/doc.go +++ b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/install/install.go b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/install/install.go index d81633aab5..018377980e 100644 --- a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/install/install.go +++ b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/register.go b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/register.go index efecd5ba2b..94f3914f56 100644 --- a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/register.go +++ b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/types.generated.go b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/types.generated.go index 1c50287c75..b684b19d5a 100644 --- a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/types.generated.go +++ b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/types.go b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/types.go index c7221d4c01..899361d9a3 100644 --- a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/types.go +++ b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1/register.go b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1/register.go index cee3c12e99..88e175eef6 100644 --- a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1/register.go +++ b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1/types.generated.go b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1/types.generated.go index 0220db83dd..cf3cfbb9c2 100644 --- a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1/types.generated.go +++ b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1/types.go b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1/types.go index f6073f46e3..d27caf2703 100644 --- a/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1/types.go +++ b/cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/v1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go index e165337b0b..acc632a62d 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset_test.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset_test.go index 42b4f0bac2..becc13b03d 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset_test.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/clientset_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/doc.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/doc.go index 8169d672b4..cc376a37ac 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/doc.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/fake/clientset_generated.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/fake/clientset_generated.go index 5468dc563b..e8f28aa9fd 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/fake/clientset_generated.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/fake/doc.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/fake/doc.go index 8f18be02a6..1ee71c98b5 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/fake/doc.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/doc.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/doc.go index 24ae79d223..fa31a07643 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/doc.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/doc.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/doc.go index 30080cb0a6..6fff5206af 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/doc.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testgroup_client.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testgroup_client.go index 774f75d673..29fd8d1918 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testgroup_client.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testgroup_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testtype.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testtype.go index 604603e770..848b482679 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testtype.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testtype_expansion.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testtype_expansion.go index 691dd51001..08effda7d1 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testtype_expansion.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/fake/fake_testtype_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/generated_expansion.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/generated_expansion.go index 0d5e357c40..6cdbfc5bcd 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/generated_expansion.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testgroup_client.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testgroup_client.go index f870a64d88..3f7c4e2499 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testgroup_client.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testgroup_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testgroup_test.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testgroup_test.go index e53102b485..9b09fef43b 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testgroup_test.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testgroup_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testtype.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testtype.go index 2b9283efa1..ab3e02ad55 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testtype.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testtype_expansion.go b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testtype_expansion.go index 5e6f57cd2a..5991c0a617 100644 --- a/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testtype_expansion.go +++ b/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup.k8s.io/unversioned/testtype_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/conversion-gen/generators/conversion.go b/cmd/libs/go2idl/conversion-gen/generators/conversion.go index f295afe687..8eec1171d8 100644 --- a/cmd/libs/go2idl/conversion-gen/generators/conversion.go +++ b/cmd/libs/go2idl/conversion-gen/generators/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/conversion-gen/main.go b/cmd/libs/go2idl/conversion-gen/main.go index e64e40c8bc..5b2dae836f 100644 --- a/cmd/libs/go2idl/conversion-gen/main.go +++ b/cmd/libs/go2idl/conversion-gen/main.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go b/cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go index fc233376c4..c757d3ccbc 100644 --- a/cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go +++ b/cmd/libs/go2idl/deepcopy-gen/generators/deepcopy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/deepcopy-gen/main.go b/cmd/libs/go2idl/deepcopy-gen/main.go index c38c5624f3..2b84f95fab 100644 --- a/cmd/libs/go2idl/deepcopy-gen/main.go +++ b/cmd/libs/go2idl/deepcopy-gen/main.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/generator/default_generator.go b/cmd/libs/go2idl/generator/default_generator.go index 0a4845cce0..44329c7bec 100644 --- a/cmd/libs/go2idl/generator/default_generator.go +++ b/cmd/libs/go2idl/generator/default_generator.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/generator/default_package.go b/cmd/libs/go2idl/generator/default_package.go index 2e6d29b5a8..ce72e9fd92 100644 --- a/cmd/libs/go2idl/generator/default_package.go +++ b/cmd/libs/go2idl/generator/default_package.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/generator/doc.go b/cmd/libs/go2idl/generator/doc.go index 8aba4817ff..d912a1a9f4 100644 --- a/cmd/libs/go2idl/generator/doc.go +++ b/cmd/libs/go2idl/generator/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/generator/error_tracker.go b/cmd/libs/go2idl/generator/error_tracker.go index 2ee907420b..964dae37ba 100644 --- a/cmd/libs/go2idl/generator/error_tracker.go +++ b/cmd/libs/go2idl/generator/error_tracker.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/generator/execute.go b/cmd/libs/go2idl/generator/execute.go index 3c03221c4e..5dc4908f8a 100644 --- a/cmd/libs/go2idl/generator/execute.go +++ b/cmd/libs/go2idl/generator/execute.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/generator/generator.go b/cmd/libs/go2idl/generator/generator.go index a9a7bbd8b5..c0b44cddea 100644 --- a/cmd/libs/go2idl/generator/generator.go +++ b/cmd/libs/go2idl/generator/generator.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/generator/import_tracker.go b/cmd/libs/go2idl/generator/import_tracker.go index 5a2c0a3eb2..74ba484a71 100644 --- a/cmd/libs/go2idl/generator/import_tracker.go +++ b/cmd/libs/go2idl/generator/import_tracker.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/generator/snippet_writer.go b/cmd/libs/go2idl/generator/snippet_writer.go index 31952ec6c0..f1cbac01c9 100644 --- a/cmd/libs/go2idl/generator/snippet_writer.go +++ b/cmd/libs/go2idl/generator/snippet_writer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/generator/snippet_writer_test.go b/cmd/libs/go2idl/generator/snippet_writer_test.go index 3d557c7e56..70ca703c83 100644 --- a/cmd/libs/go2idl/generator/snippet_writer_test.go +++ b/cmd/libs/go2idl/generator/snippet_writer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/go-to-protobuf/build-image/Dockerfile b/cmd/libs/go2idl/go-to-protobuf/build-image/Dockerfile index 9925c21784..ae7c6fc43d 100644 --- a/cmd/libs/go2idl/go-to-protobuf/build-image/Dockerfile +++ b/cmd/libs/go2idl/go-to-protobuf/build-image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/go-to-protobuf/main.go b/cmd/libs/go2idl/go-to-protobuf/main.go index b6fac17ad4..66a0107882 100644 --- a/cmd/libs/go2idl/go-to-protobuf/main.go +++ b/cmd/libs/go2idl/go-to-protobuf/main.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go index 9362244dab..c9cd631693 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/cmd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go index 739a6ef70f..3bfa47f915 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/generator.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/import_tracker.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/import_tracker.go index e7b40d2120..91024aa3bd 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/import_tracker.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/import_tracker.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/namer.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/namer.go index 8da08af4cd..02a2bfe724 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/namer.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/namer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/package.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/package.go index 742487e191..486728d311 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/package.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/package.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/go-to-protobuf/protobuf/parser.go b/cmd/libs/go2idl/go-to-protobuf/protobuf/parser.go index 4fef53ff93..d5d1ae9f05 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protobuf/parser.go +++ b/cmd/libs/go2idl/go-to-protobuf/protobuf/parser.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/go-to-protobuf/protoc-gen-gogo/main.go b/cmd/libs/go2idl/go-to-protobuf/protoc-gen-gogo/main.go index df56c8a68c..6e5051dce1 100644 --- a/cmd/libs/go2idl/go-to-protobuf/protoc-gen-gogo/main.go +++ b/cmd/libs/go2idl/go-to-protobuf/protoc-gen-gogo/main.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/import-boss/generators/import_restrict.go b/cmd/libs/go2idl/import-boss/generators/import_restrict.go index 365418b479..c76538fdf5 100644 --- a/cmd/libs/go2idl/import-boss/generators/import_restrict.go +++ b/cmd/libs/go2idl/import-boss/generators/import_restrict.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/import-boss/generators/import_restrict_test.go b/cmd/libs/go2idl/import-boss/generators/import_restrict_test.go index a70cc38160..0d21024ed5 100644 --- a/cmd/libs/go2idl/import-boss/generators/import_restrict_test.go +++ b/cmd/libs/go2idl/import-boss/generators/import_restrict_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/import-boss/main.go b/cmd/libs/go2idl/import-boss/main.go index 5efc2d9bdb..3f2fcf2ab4 100644 --- a/cmd/libs/go2idl/import-boss/main.go +++ b/cmd/libs/go2idl/import-boss/main.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/namer/doc.go b/cmd/libs/go2idl/namer/doc.go index 2282c65a0d..00467a9db7 100644 --- a/cmd/libs/go2idl/namer/doc.go +++ b/cmd/libs/go2idl/namer/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/namer/import_tracker.go b/cmd/libs/go2idl/namer/import_tracker.go index 5763d89378..b62080b3e5 100644 --- a/cmd/libs/go2idl/namer/import_tracker.go +++ b/cmd/libs/go2idl/namer/import_tracker.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/namer/namer.go b/cmd/libs/go2idl/namer/namer.go index 1c304ba9fd..c24ade05b0 100644 --- a/cmd/libs/go2idl/namer/namer.go +++ b/cmd/libs/go2idl/namer/namer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/namer/namer_test.go b/cmd/libs/go2idl/namer/namer_test.go index 3bb042c765..909f6abdc4 100644 --- a/cmd/libs/go2idl/namer/namer_test.go +++ b/cmd/libs/go2idl/namer/namer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/namer/order.go b/cmd/libs/go2idl/namer/order.go index 860b866a65..a0c5328e40 100644 --- a/cmd/libs/go2idl/namer/order.go +++ b/cmd/libs/go2idl/namer/order.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/namer/plural_namer.go b/cmd/libs/go2idl/namer/plural_namer.go index 6348a01464..0d13ba567c 100644 --- a/cmd/libs/go2idl/namer/plural_namer.go +++ b/cmd/libs/go2idl/namer/plural_namer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/namer/plural_namer_test.go b/cmd/libs/go2idl/namer/plural_namer_test.go index 3715ff47ac..e01e4d8d1c 100644 --- a/cmd/libs/go2idl/namer/plural_namer_test.go +++ b/cmd/libs/go2idl/namer/plural_namer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/parser/doc.go b/cmd/libs/go2idl/parser/doc.go index a82398b80e..1c9d05c97f 100644 --- a/cmd/libs/go2idl/parser/doc.go +++ b/cmd/libs/go2idl/parser/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/parser/parse.go b/cmd/libs/go2idl/parser/parse.go index 4aeedb7e6d..8e7acbf4f9 100644 --- a/cmd/libs/go2idl/parser/parse.go +++ b/cmd/libs/go2idl/parser/parse.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/parser/parse_test.go b/cmd/libs/go2idl/parser/parse_test.go index 83194b9cc1..50e0f14017 100644 --- a/cmd/libs/go2idl/parser/parse_test.go +++ b/cmd/libs/go2idl/parser/parse_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/set-gen/generators/sets.go b/cmd/libs/go2idl/set-gen/generators/sets.go index c22ee20980..c20e13a70a 100644 --- a/cmd/libs/go2idl/set-gen/generators/sets.go +++ b/cmd/libs/go2idl/set-gen/generators/sets.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/set-gen/main.go b/cmd/libs/go2idl/set-gen/main.go index 41ff07eae2..bd8cae26a9 100644 --- a/cmd/libs/go2idl/set-gen/main.go +++ b/cmd/libs/go2idl/set-gen/main.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/types/comments.go b/cmd/libs/go2idl/types/comments.go index 71d3063a09..40187ae622 100644 --- a/cmd/libs/go2idl/types/comments.go +++ b/cmd/libs/go2idl/types/comments.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/types/comments_test.go b/cmd/libs/go2idl/types/comments_test.go index 622d23bd99..154dcafdf4 100644 --- a/cmd/libs/go2idl/types/comments_test.go +++ b/cmd/libs/go2idl/types/comments_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/types/doc.go b/cmd/libs/go2idl/types/doc.go index 9dd9c5efcc..b5ce9cbec0 100644 --- a/cmd/libs/go2idl/types/doc.go +++ b/cmd/libs/go2idl/types/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/types/flatten.go b/cmd/libs/go2idl/types/flatten.go index a4f72bfabd..585014e8ba 100644 --- a/cmd/libs/go2idl/types/flatten.go +++ b/cmd/libs/go2idl/types/flatten.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/types/flatten_test.go b/cmd/libs/go2idl/types/flatten_test.go index fcfa77059e..9da34e5616 100644 --- a/cmd/libs/go2idl/types/flatten_test.go +++ b/cmd/libs/go2idl/types/flatten_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/types/types.go b/cmd/libs/go2idl/types/types.go index 8cfae13adc..7f25db1521 100644 --- a/cmd/libs/go2idl/types/types.go +++ b/cmd/libs/go2idl/types/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/libs/go2idl/types/types_test.go b/cmd/libs/go2idl/types/types_test.go index 9ed83aa49f..ff6b69cb31 100644 --- a/cmd/libs/go2idl/types/types_test.go +++ b/cmd/libs/go2idl/types/types_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/linkcheck/links.go b/cmd/linkcheck/links.go index 099277ca6d..92e60d5198 100644 --- a/cmd/linkcheck/links.go +++ b/cmd/linkcheck/links.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/analytics.go b/cmd/mungedocs/analytics.go index 311f134c63..a7eaefa080 100644 --- a/cmd/mungedocs/analytics.go +++ b/cmd/mungedocs/analytics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/analytics_test.go b/cmd/mungedocs/analytics_test.go index 37db797170..b97feef86e 100644 --- a/cmd/mungedocs/analytics_test.go +++ b/cmd/mungedocs/analytics_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/example_syncer.go b/cmd/mungedocs/example_syncer.go index 3e275d49d6..c15255be43 100644 --- a/cmd/mungedocs/example_syncer.go +++ b/cmd/mungedocs/example_syncer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/example_syncer_test.go b/cmd/mungedocs/example_syncer_test.go index 9b53a6d0f7..4c25053504 100644 --- a/cmd/mungedocs/example_syncer_test.go +++ b/cmd/mungedocs/example_syncer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/headers.go b/cmd/mungedocs/headers.go index 6876a51478..e23ae7536e 100644 --- a/cmd/mungedocs/headers.go +++ b/cmd/mungedocs/headers.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/headers_test.go b/cmd/mungedocs/headers_test.go index a73355beb5..d30c9b32a1 100644 --- a/cmd/mungedocs/headers_test.go +++ b/cmd/mungedocs/headers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/kubectl_dash_f.go b/cmd/mungedocs/kubectl_dash_f.go index f4b144acb9..2dae48cc85 100644 --- a/cmd/mungedocs/kubectl_dash_f.go +++ b/cmd/mungedocs/kubectl_dash_f.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/kubectl_dash_f_test.go b/cmd/mungedocs/kubectl_dash_f_test.go index b6b0c243a8..6f18fd547a 100644 --- a/cmd/mungedocs/kubectl_dash_f_test.go +++ b/cmd/mungedocs/kubectl_dash_f_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/links.go b/cmd/mungedocs/links.go index 754c9edf6e..c05cdfa187 100644 --- a/cmd/mungedocs/links.go +++ b/cmd/mungedocs/links.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/links_test.go b/cmd/mungedocs/links_test.go index 84137d6708..83663ebab4 100644 --- a/cmd/mungedocs/links_test.go +++ b/cmd/mungedocs/links_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/mungedocs.go b/cmd/mungedocs/mungedocs.go index a62b2e0e6f..9f51d4593f 100644 --- a/cmd/mungedocs/mungedocs.go +++ b/cmd/mungedocs/mungedocs.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/preformatted.go b/cmd/mungedocs/preformatted.go index 42dba178a6..582ba981a1 100644 --- a/cmd/mungedocs/preformatted.go +++ b/cmd/mungedocs/preformatted.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/preformatted_test.go b/cmd/mungedocs/preformatted_test.go index 1df8f8059e..718e002976 100644 --- a/cmd/mungedocs/preformatted_test.go +++ b/cmd/mungedocs/preformatted_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/toc.go b/cmd/mungedocs/toc.go index 8a244eaf0c..291d688358 100644 --- a/cmd/mungedocs/toc.go +++ b/cmd/mungedocs/toc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/toc_test.go b/cmd/mungedocs/toc_test.go index 7b5ddf9b81..5d7e27cdcd 100644 --- a/cmd/mungedocs/toc_test.go +++ b/cmd/mungedocs/toc_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/unversioned_warning.go b/cmd/mungedocs/unversioned_warning.go index 9ec8ce7ecb..a89e96f5c8 100644 --- a/cmd/mungedocs/unversioned_warning.go +++ b/cmd/mungedocs/unversioned_warning.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/unversioned_warning_test.go b/cmd/mungedocs/unversioned_warning_test.go index 5314645dfd..08adc2cf97 100644 --- a/cmd/mungedocs/unversioned_warning_test.go +++ b/cmd/mungedocs/unversioned_warning_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/util.go b/cmd/mungedocs/util.go index 01ac20a5d3..c25e1d1976 100644 --- a/cmd/mungedocs/util.go +++ b/cmd/mungedocs/util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/util_test.go b/cmd/mungedocs/util_test.go index ce66d54ff6..989ee8757e 100644 --- a/cmd/mungedocs/util_test.go +++ b/cmd/mungedocs/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/whitespace.go b/cmd/mungedocs/whitespace.go index ea3d764a21..37a1b1d16b 100644 --- a/cmd/mungedocs/whitespace.go +++ b/cmd/mungedocs/whitespace.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/mungedocs/whitespace_test.go b/cmd/mungedocs/whitespace_test.go index 3b3570fbfa..f98a0018c6 100644 --- a/cmd/mungedocs/whitespace_test.go +++ b/cmd/mungedocs/whitespace_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/ci/build-release.sh b/contrib/mesos/ci/build-release.sh index baa675f1a7..e12cb7e056 100755 --- a/contrib/mesos/ci/build-release.sh +++ b/contrib/mesos/ci/build-release.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contrib/mesos/ci/build.sh b/contrib/mesos/ci/build.sh index 1155a0b402..399ba03acf 100755 --- a/contrib/mesos/ci/build.sh +++ b/contrib/mesos/ci/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contrib/mesos/ci/run-with-cluster.sh b/contrib/mesos/ci/run-with-cluster.sh index 719fe50252..ebeb1cff82 100755 --- a/contrib/mesos/ci/run-with-cluster.sh +++ b/contrib/mesos/ci/run-with-cluster.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contrib/mesos/ci/run.sh b/contrib/mesos/ci/run.sh index 9673d28480..c92ee3b67d 100755 --- a/contrib/mesos/ci/run.sh +++ b/contrib/mesos/ci/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contrib/mesos/ci/test-conformance.sh b/contrib/mesos/ci/test-conformance.sh index 5f9bbb5508..cef300375f 100755 --- a/contrib/mesos/ci/test-conformance.sh +++ b/contrib/mesos/ci/test-conformance.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contrib/mesos/ci/test-e2e.sh b/contrib/mesos/ci/test-e2e.sh index d796a8816d..6345b379a6 100755 --- a/contrib/mesos/ci/test-e2e.sh +++ b/contrib/mesos/ci/test-e2e.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contrib/mesos/ci/test-integration.sh b/contrib/mesos/ci/test-integration.sh index f9beaf1146..f356d30c72 100755 --- a/contrib/mesos/ci/test-integration.sh +++ b/contrib/mesos/ci/test-integration.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contrib/mesos/ci/test-smoke.sh b/contrib/mesos/ci/test-smoke.sh index 79ba47390c..6c18b36de9 100755 --- a/contrib/mesos/ci/test-smoke.sh +++ b/contrib/mesos/ci/test-smoke.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contrib/mesos/ci/test-unit.sh b/contrib/mesos/ci/test-unit.sh index 943026bfb4..52670850ef 100755 --- a/contrib/mesos/ci/test-unit.sh +++ b/contrib/mesos/ci/test-unit.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/k8sm-controller-manager/doc.go b/contrib/mesos/cmd/k8sm-controller-manager/doc.go index aa8507a3a6..9a63f702c1 100644 --- a/contrib/mesos/cmd/k8sm-controller-manager/doc.go +++ b/contrib/mesos/cmd/k8sm-controller-manager/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/k8sm-controller-manager/main.go b/contrib/mesos/cmd/k8sm-controller-manager/main.go index f5581c7207..5437382320 100644 --- a/contrib/mesos/cmd/k8sm-controller-manager/main.go +++ b/contrib/mesos/cmd/k8sm-controller-manager/main.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/k8sm-executor/doc.go b/contrib/mesos/cmd/k8sm-executor/doc.go index 2a2041eb6f..02f3f517dc 100644 --- a/contrib/mesos/cmd/k8sm-executor/doc.go +++ b/contrib/mesos/cmd/k8sm-executor/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/k8sm-executor/main.go b/contrib/mesos/cmd/k8sm-executor/main.go index 604c702365..ed1a206ab9 100644 --- a/contrib/mesos/cmd/k8sm-executor/main.go +++ b/contrib/mesos/cmd/k8sm-executor/main.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/k8sm-scheduler/doc.go b/contrib/mesos/cmd/k8sm-scheduler/doc.go index 68e44de0b5..6e5aa514a7 100644 --- a/contrib/mesos/cmd/k8sm-scheduler/doc.go +++ b/contrib/mesos/cmd/k8sm-scheduler/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/k8sm-scheduler/main.go b/contrib/mesos/cmd/k8sm-scheduler/main.go index eed1a20a8c..15bbc3218c 100644 --- a/contrib/mesos/cmd/k8sm-scheduler/main.go +++ b/contrib/mesos/cmd/k8sm-scheduler/main.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/km/doc.go b/contrib/mesos/cmd/km/doc.go index a46a0f8e80..4c5ecaafd3 100644 --- a/contrib/mesos/cmd/km/doc.go +++ b/contrib/mesos/cmd/km/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/km/hyperkube.go b/contrib/mesos/cmd/km/hyperkube.go index abce229b9e..771d69899c 100644 --- a/contrib/mesos/cmd/km/hyperkube.go +++ b/contrib/mesos/cmd/km/hyperkube.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/km/hyperkube_test.go b/contrib/mesos/cmd/km/hyperkube_test.go index 74739710c4..e06f931d56 100644 --- a/contrib/mesos/cmd/km/hyperkube_test.go +++ b/contrib/mesos/cmd/km/hyperkube_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/km/k8sm-controllermanager.go b/contrib/mesos/cmd/km/k8sm-controllermanager.go index 43f72a4e30..2b7fb207fa 100644 --- a/contrib/mesos/cmd/km/k8sm-controllermanager.go +++ b/contrib/mesos/cmd/km/k8sm-controllermanager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/km/k8sm-executor.go b/contrib/mesos/cmd/km/k8sm-executor.go index bde04e44cb..69a6a52c19 100644 --- a/contrib/mesos/cmd/km/k8sm-executor.go +++ b/contrib/mesos/cmd/km/k8sm-executor.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/km/k8sm-minion.go b/contrib/mesos/cmd/km/k8sm-minion.go index 67968dd536..d921469e0f 100644 --- a/contrib/mesos/cmd/km/k8sm-minion.go +++ b/contrib/mesos/cmd/km/k8sm-minion.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/km/k8sm-scheduler.go b/contrib/mesos/cmd/km/k8sm-scheduler.go index 3904668f4d..7b0100fc07 100644 --- a/contrib/mesos/cmd/km/k8sm-scheduler.go +++ b/contrib/mesos/cmd/km/k8sm-scheduler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/km/km.go b/contrib/mesos/cmd/km/km.go index fea332f48b..eb3d4435ad 100644 --- a/contrib/mesos/cmd/km/km.go +++ b/contrib/mesos/cmd/km/km.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/km/kube-apiserver.go b/contrib/mesos/cmd/km/kube-apiserver.go index cf0fb90c0e..59c1ba81fc 100644 --- a/contrib/mesos/cmd/km/kube-apiserver.go +++ b/contrib/mesos/cmd/km/kube-apiserver.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/km/kube-proxy.go b/contrib/mesos/cmd/km/kube-proxy.go index fe13923198..7550d989c5 100644 --- a/contrib/mesos/cmd/km/kube-proxy.go +++ b/contrib/mesos/cmd/km/kube-proxy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/cmd/km/server.go b/contrib/mesos/cmd/km/server.go index a4033926e1..e4dddae050 100644 --- a/contrib/mesos/cmd/km/server.go +++ b/contrib/mesos/cmd/km/server.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/assert/assert.go b/contrib/mesos/pkg/assert/assert.go index dd71646539..47497d35c3 100644 --- a/contrib/mesos/pkg/assert/assert.go +++ b/contrib/mesos/pkg/assert/assert.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/assert/doc.go b/contrib/mesos/pkg/assert/doc.go index 3fb556cecc..c8399b85ba 100644 --- a/contrib/mesos/pkg/assert/doc.go +++ b/contrib/mesos/pkg/assert/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/backoff/backoff.go b/contrib/mesos/pkg/backoff/backoff.go index f2b12b2602..eb5b239ee2 100644 --- a/contrib/mesos/pkg/backoff/backoff.go +++ b/contrib/mesos/pkg/backoff/backoff.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/backoff/doc.go b/contrib/mesos/pkg/backoff/doc.go index 1bd98a2617..7f5e69401f 100644 --- a/contrib/mesos/pkg/backoff/doc.go +++ b/contrib/mesos/pkg/backoff/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/controllermanager/controllermanager.go b/contrib/mesos/pkg/controllermanager/controllermanager.go index ca9dc076a4..f52bfd88ad 100644 --- a/contrib/mesos/pkg/controllermanager/controllermanager.go +++ b/contrib/mesos/pkg/controllermanager/controllermanager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/controllermanager/doc.go b/contrib/mesos/pkg/controllermanager/doc.go index 63c28eed89..f756f9a24d 100644 --- a/contrib/mesos/pkg/controllermanager/doc.go +++ b/contrib/mesos/pkg/controllermanager/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/election/doc.go b/contrib/mesos/pkg/election/doc.go index 35bbe4e142..3e3d09b6de 100644 --- a/contrib/mesos/pkg/election/doc.go +++ b/contrib/mesos/pkg/election/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/election/etcd_master.go b/contrib/mesos/pkg/election/etcd_master.go index 92fa08ea23..59d9faf979 100644 --- a/contrib/mesos/pkg/election/etcd_master.go +++ b/contrib/mesos/pkg/election/etcd_master.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/election/etcd_master_test.go b/contrib/mesos/pkg/election/etcd_master_test.go index c74a8d173a..1b06d9a413 100644 --- a/contrib/mesos/pkg/election/etcd_master_test.go +++ b/contrib/mesos/pkg/election/etcd_master_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/election/fake.go b/contrib/mesos/pkg/election/fake.go index 1540354d56..ba7eb62c62 100644 --- a/contrib/mesos/pkg/election/fake.go +++ b/contrib/mesos/pkg/election/fake.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/election/master.go b/contrib/mesos/pkg/election/master.go index a7ef790930..74a2df1293 100644 --- a/contrib/mesos/pkg/election/master.go +++ b/contrib/mesos/pkg/election/master.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/election/master_test.go b/contrib/mesos/pkg/election/master_test.go index b1e44b7b70..5b65256026 100644 --- a/contrib/mesos/pkg/election/master_test.go +++ b/contrib/mesos/pkg/election/master_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/apis.go b/contrib/mesos/pkg/executor/apis.go index d596e1d872..aa657aa0df 100644 --- a/contrib/mesos/pkg/executor/apis.go +++ b/contrib/mesos/pkg/executor/apis.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/config/config.go b/contrib/mesos/pkg/executor/config/config.go index 55af9fe97f..1489d2106d 100644 --- a/contrib/mesos/pkg/executor/config/config.go +++ b/contrib/mesos/pkg/executor/config/config.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/config/doc.go b/contrib/mesos/pkg/executor/config/doc.go index 7a44f3e7b5..7c75f34b4e 100644 --- a/contrib/mesos/pkg/executor/config/doc.go +++ b/contrib/mesos/pkg/executor/config/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/doc.go b/contrib/mesos/pkg/executor/doc.go index 5ac5e9d8f8..2e6a92aabf 100644 --- a/contrib/mesos/pkg/executor/doc.go +++ b/contrib/mesos/pkg/executor/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/executor.go b/contrib/mesos/pkg/executor/executor.go index e9a834cdf1..6bfea1cc56 100644 --- a/contrib/mesos/pkg/executor/executor.go +++ b/contrib/mesos/pkg/executor/executor.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/executor_test.go b/contrib/mesos/pkg/executor/executor_test.go index 519904072e..33ebfd3485 100644 --- a/contrib/mesos/pkg/executor/executor_test.go +++ b/contrib/mesos/pkg/executor/executor_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/messages/doc.go b/contrib/mesos/pkg/executor/messages/doc.go index ac09f189b5..8e5a4fcefb 100644 --- a/contrib/mesos/pkg/executor/messages/doc.go +++ b/contrib/mesos/pkg/executor/messages/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/messages/messages.go b/contrib/mesos/pkg/executor/messages/messages.go index dca1aa015b..1fd48e5798 100644 --- a/contrib/mesos/pkg/executor/messages/messages.go +++ b/contrib/mesos/pkg/executor/messages/messages.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/mock_test.go b/contrib/mesos/pkg/executor/mock_test.go index 1aec5ade13..7462d638dd 100644 --- a/contrib/mesos/pkg/executor/mock_test.go +++ b/contrib/mesos/pkg/executor/mock_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/node.go b/contrib/mesos/pkg/executor/node.go index 5468504240..d2a26d3f75 100644 --- a/contrib/mesos/pkg/executor/node.go +++ b/contrib/mesos/pkg/executor/node.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/registry.go b/contrib/mesos/pkg/executor/registry.go index f8139dfce1..16bdce3f39 100644 --- a/contrib/mesos/pkg/executor/registry.go +++ b/contrib/mesos/pkg/executor/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/service/cadvisor.go b/contrib/mesos/pkg/executor/service/cadvisor.go index 85a2a492c4..5487e461d9 100644 --- a/contrib/mesos/pkg/executor/service/cadvisor.go +++ b/contrib/mesos/pkg/executor/service/cadvisor.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/service/doc.go b/contrib/mesos/pkg/executor/service/doc.go index f915ee4239..66f35811a7 100644 --- a/contrib/mesos/pkg/executor/service/doc.go +++ b/contrib/mesos/pkg/executor/service/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/service/kubelet.go b/contrib/mesos/pkg/executor/service/kubelet.go index f4525294c5..fd3004b264 100644 --- a/contrib/mesos/pkg/executor/service/kubelet.go +++ b/contrib/mesos/pkg/executor/service/kubelet.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/service/podsource/podsource.go b/contrib/mesos/pkg/executor/service/podsource/podsource.go index 3d0c5388fc..8a2d93f72e 100644 --- a/contrib/mesos/pkg/executor/service/podsource/podsource.go +++ b/contrib/mesos/pkg/executor/service/podsource/podsource.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/service/service.go b/contrib/mesos/pkg/executor/service/service.go index 03c2612c8a..af59ba2947 100644 --- a/contrib/mesos/pkg/executor/service/service.go +++ b/contrib/mesos/pkg/executor/service/service.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/suicide.go b/contrib/mesos/pkg/executor/suicide.go index 40b597fd1c..febb6e67e6 100644 --- a/contrib/mesos/pkg/executor/suicide.go +++ b/contrib/mesos/pkg/executor/suicide.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/suicide_test.go b/contrib/mesos/pkg/executor/suicide_test.go index 55ad5ccb0c..f080a562d0 100644 --- a/contrib/mesos/pkg/executor/suicide_test.go +++ b/contrib/mesos/pkg/executor/suicide_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/executor/watcher.go b/contrib/mesos/pkg/executor/watcher.go index b164214618..2116c4a53a 100644 --- a/contrib/mesos/pkg/executor/watcher.go +++ b/contrib/mesos/pkg/executor/watcher.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/flagutil/cadvisor.go b/contrib/mesos/pkg/flagutil/cadvisor.go index 2290f5e3f8..423e4e401d 100644 --- a/contrib/mesos/pkg/flagutil/cadvisor.go +++ b/contrib/mesos/pkg/flagutil/cadvisor.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/flagutil/cadvisor_linux.go b/contrib/mesos/pkg/flagutil/cadvisor_linux.go index 69b2785284..bf9d8ebe30 100644 --- a/contrib/mesos/pkg/flagutil/cadvisor_linux.go +++ b/contrib/mesos/pkg/flagutil/cadvisor_linux.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/hyperkube/doc.go b/contrib/mesos/pkg/hyperkube/doc.go index c20e34402b..64150355d1 100644 --- a/contrib/mesos/pkg/hyperkube/doc.go +++ b/contrib/mesos/pkg/hyperkube/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/hyperkube/hyperkube.go b/contrib/mesos/pkg/hyperkube/hyperkube.go index 200020a506..72791525ad 100644 --- a/contrib/mesos/pkg/hyperkube/hyperkube.go +++ b/contrib/mesos/pkg/hyperkube/hyperkube.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/hyperkube/types.go b/contrib/mesos/pkg/hyperkube/types.go index e255f893f4..637f18b834 100644 --- a/contrib/mesos/pkg/hyperkube/types.go +++ b/contrib/mesos/pkg/hyperkube/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/config/config.go b/contrib/mesos/pkg/minion/config/config.go index 58cd5d9946..a4e99ae4c6 100644 --- a/contrib/mesos/pkg/minion/config/config.go +++ b/contrib/mesos/pkg/minion/config/config.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/config/doc.go b/contrib/mesos/pkg/minion/config/doc.go index 96f244c0dd..519e7e73df 100644 --- a/contrib/mesos/pkg/minion/config/doc.go +++ b/contrib/mesos/pkg/minion/config/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/doc.go b/contrib/mesos/pkg/minion/doc.go index 11253ede76..df902eda1a 100644 --- a/contrib/mesos/pkg/minion/doc.go +++ b/contrib/mesos/pkg/minion/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/mountns_darwin.go b/contrib/mesos/pkg/minion/mountns_darwin.go index aa41ed8792..27ec29c4fc 100644 --- a/contrib/mesos/pkg/minion/mountns_darwin.go +++ b/contrib/mesos/pkg/minion/mountns_darwin.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/mountns_linux.go b/contrib/mesos/pkg/minion/mountns_linux.go index cad4976d25..0f1804c377 100644 --- a/contrib/mesos/pkg/minion/mountns_linux.go +++ b/contrib/mesos/pkg/minion/mountns_linux.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/server.go b/contrib/mesos/pkg/minion/server.go index c30f0765f1..591e8463fe 100644 --- a/contrib/mesos/pkg/minion/server.go +++ b/contrib/mesos/pkg/minion/server.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/tasks/doc.go b/contrib/mesos/pkg/minion/tasks/doc.go index 51ad8ac5ed..4e0ab9e6fb 100644 --- a/contrib/mesos/pkg/minion/tasks/doc.go +++ b/contrib/mesos/pkg/minion/tasks/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/tasks/events.go b/contrib/mesos/pkg/minion/tasks/events.go index aff85af01f..3aa6095f11 100644 --- a/contrib/mesos/pkg/minion/tasks/events.go +++ b/contrib/mesos/pkg/minion/tasks/events.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/tasks/task.go b/contrib/mesos/pkg/minion/tasks/task.go index 4650684a76..7a4bcddc8d 100644 --- a/contrib/mesos/pkg/minion/tasks/task.go +++ b/contrib/mesos/pkg/minion/tasks/task.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/tasks/task_linux.go b/contrib/mesos/pkg/minion/tasks/task_linux.go index a570f85370..715cf47ec4 100644 --- a/contrib/mesos/pkg/minion/tasks/task_linux.go +++ b/contrib/mesos/pkg/minion/tasks/task_linux.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/tasks/task_other.go b/contrib/mesos/pkg/minion/tasks/task_other.go index a83c28a853..24a0f946c0 100644 --- a/contrib/mesos/pkg/minion/tasks/task_other.go +++ b/contrib/mesos/pkg/minion/tasks/task_other.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/tasks/task_test.go b/contrib/mesos/pkg/minion/tasks/task_test.go index 0df577444f..8b62bb5dbe 100644 --- a/contrib/mesos/pkg/minion/tasks/task_test.go +++ b/contrib/mesos/pkg/minion/tasks/task_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/minion/tasks/timer.go b/contrib/mesos/pkg/minion/tasks/timer.go index 78595763a1..efa7ff1ae1 100644 --- a/contrib/mesos/pkg/minion/tasks/timer.go +++ b/contrib/mesos/pkg/minion/tasks/timer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/node/doc.go b/contrib/mesos/pkg/node/doc.go index 45b77f5961..7ace17e446 100644 --- a/contrib/mesos/pkg/node/doc.go +++ b/contrib/mesos/pkg/node/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/node/node.go b/contrib/mesos/pkg/node/node.go index 0b726fc804..ce41434b31 100644 --- a/contrib/mesos/pkg/node/node.go +++ b/contrib/mesos/pkg/node/node.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/node/registrator.go b/contrib/mesos/pkg/node/registrator.go index e890c12ec9..6dd912586c 100644 --- a/contrib/mesos/pkg/node/registrator.go +++ b/contrib/mesos/pkg/node/registrator.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/node/registrator_test.go b/contrib/mesos/pkg/node/registrator_test.go index 0810d4b536..f2242c2694 100644 --- a/contrib/mesos/pkg/node/registrator_test.go +++ b/contrib/mesos/pkg/node/registrator_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/node/statusupdater.go b/contrib/mesos/pkg/node/statusupdater.go index 8a87711e29..277a9d27e8 100644 --- a/contrib/mesos/pkg/node/statusupdater.go +++ b/contrib/mesos/pkg/node/statusupdater.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/node/statusupdater_test.go b/contrib/mesos/pkg/node/statusupdater_test.go index c8a4a36f57..a160c8ff9a 100644 --- a/contrib/mesos/pkg/node/statusupdater_test.go +++ b/contrib/mesos/pkg/node/statusupdater_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/offers/doc.go b/contrib/mesos/pkg/offers/doc.go index 03a76f3a3c..bc8130ea17 100644 --- a/contrib/mesos/pkg/offers/doc.go +++ b/contrib/mesos/pkg/offers/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/offers/metrics/doc.go b/contrib/mesos/pkg/offers/metrics/doc.go index 9660dff774..074d2b5f42 100644 --- a/contrib/mesos/pkg/offers/metrics/doc.go +++ b/contrib/mesos/pkg/offers/metrics/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/offers/metrics/metrics.go b/contrib/mesos/pkg/offers/metrics/metrics.go index dbebf2f42e..7af5089b95 100644 --- a/contrib/mesos/pkg/offers/metrics/metrics.go +++ b/contrib/mesos/pkg/offers/metrics/metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/offers/offers.go b/contrib/mesos/pkg/offers/offers.go index c30a433221..89aa48fa46 100644 --- a/contrib/mesos/pkg/offers/offers.go +++ b/contrib/mesos/pkg/offers/offers.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/offers/offers_test.go b/contrib/mesos/pkg/offers/offers_test.go index e82712bed6..1094fb6336 100644 --- a/contrib/mesos/pkg/offers/offers_test.go +++ b/contrib/mesos/pkg/offers/offers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/podutil/doc.go b/contrib/mesos/pkg/podutil/doc.go index 89086ecf46..05cd32288a 100644 --- a/contrib/mesos/pkg/podutil/doc.go +++ b/contrib/mesos/pkg/podutil/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/podutil/filters.go b/contrib/mesos/pkg/podutil/filters.go index e44e2d169b..3e0c2e7f24 100644 --- a/contrib/mesos/pkg/podutil/filters.go +++ b/contrib/mesos/pkg/podutil/filters.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/podutil/gzip.go b/contrib/mesos/pkg/podutil/gzip.go index ba0f1cd1b7..e9ae716225 100644 --- a/contrib/mesos/pkg/podutil/gzip.go +++ b/contrib/mesos/pkg/podutil/gzip.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/podutil/gzip_test.go b/contrib/mesos/pkg/podutil/gzip_test.go index 9affd8e54c..dcfe64d6ee 100644 --- a/contrib/mesos/pkg/podutil/gzip_test.go +++ b/contrib/mesos/pkg/podutil/gzip_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/podutil/io.go b/contrib/mesos/pkg/podutil/io.go index 4eb563a2f9..cdf274525f 100644 --- a/contrib/mesos/pkg/podutil/io.go +++ b/contrib/mesos/pkg/podutil/io.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/proc/adapter.go b/contrib/mesos/pkg/proc/adapter.go index e08853ed31..36f98b0008 100644 --- a/contrib/mesos/pkg/proc/adapter.go +++ b/contrib/mesos/pkg/proc/adapter.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/proc/doc.go b/contrib/mesos/pkg/proc/doc.go index ec3b4e0f80..a11b8f8c82 100644 --- a/contrib/mesos/pkg/proc/doc.go +++ b/contrib/mesos/pkg/proc/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/proc/errors.go b/contrib/mesos/pkg/proc/errors.go index 229b71b501..fdc0bd4642 100644 --- a/contrib/mesos/pkg/proc/errors.go +++ b/contrib/mesos/pkg/proc/errors.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/proc/once.go b/contrib/mesos/pkg/proc/once.go index 8bf5c1a0bb..37865fe910 100644 --- a/contrib/mesos/pkg/proc/once.go +++ b/contrib/mesos/pkg/proc/once.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/proc/proc.go b/contrib/mesos/pkg/proc/proc.go index a7a827755c..383f1f4f8b 100644 --- a/contrib/mesos/pkg/proc/proc.go +++ b/contrib/mesos/pkg/proc/proc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/proc/proc_test.go b/contrib/mesos/pkg/proc/proc_test.go index 2548e27e65..e4d8581356 100644 --- a/contrib/mesos/pkg/proc/proc_test.go +++ b/contrib/mesos/pkg/proc/proc_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/proc/state.go b/contrib/mesos/pkg/proc/state.go index f35a2ea838..a316c55021 100644 --- a/contrib/mesos/pkg/proc/state.go +++ b/contrib/mesos/pkg/proc/state.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/proc/types.go b/contrib/mesos/pkg/proc/types.go index 27492f1c8a..21ec4ff08a 100644 --- a/contrib/mesos/pkg/proc/types.go +++ b/contrib/mesos/pkg/proc/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/profile/doc.go b/contrib/mesos/pkg/profile/doc.go index 041a3c914d..e5ef6e4452 100644 --- a/contrib/mesos/pkg/profile/doc.go +++ b/contrib/mesos/pkg/profile/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/profile/profile.go b/contrib/mesos/pkg/profile/profile.go index a24fe8a07a..0864665606 100644 --- a/contrib/mesos/pkg/profile/profile.go +++ b/contrib/mesos/pkg/profile/profile.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/queue/delay.go b/contrib/mesos/pkg/queue/delay.go index 3609dd1f91..7adbc37a1e 100644 --- a/contrib/mesos/pkg/queue/delay.go +++ b/contrib/mesos/pkg/queue/delay.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/queue/delay_test.go b/contrib/mesos/pkg/queue/delay_test.go index 4d192bdc12..4e08bf94a0 100644 --- a/contrib/mesos/pkg/queue/delay_test.go +++ b/contrib/mesos/pkg/queue/delay_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/queue/doc.go b/contrib/mesos/pkg/queue/doc.go index c35bd971bc..898d65b313 100644 --- a/contrib/mesos/pkg/queue/doc.go +++ b/contrib/mesos/pkg/queue/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/queue/historical.go b/contrib/mesos/pkg/queue/historical.go index edd9419d53..f378aa2d9b 100644 --- a/contrib/mesos/pkg/queue/historical.go +++ b/contrib/mesos/pkg/queue/historical.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/queue/historical_test.go b/contrib/mesos/pkg/queue/historical_test.go index 094502bdec..181e681556 100644 --- a/contrib/mesos/pkg/queue/historical_test.go +++ b/contrib/mesos/pkg/queue/historical_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/queue/interface.go b/contrib/mesos/pkg/queue/interface.go index 0cba9522a3..27b317e824 100644 --- a/contrib/mesos/pkg/queue/interface.go +++ b/contrib/mesos/pkg/queue/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/queue/policy.go b/contrib/mesos/pkg/queue/policy.go index 5798aec927..7930666cab 100644 --- a/contrib/mesos/pkg/queue/policy.go +++ b/contrib/mesos/pkg/queue/policy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/queue/priority.go b/contrib/mesos/pkg/queue/priority.go index f2ccb8b735..5d291234f2 100644 --- a/contrib/mesos/pkg/queue/priority.go +++ b/contrib/mesos/pkg/queue/priority.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/redirfd/doc.go b/contrib/mesos/pkg/redirfd/doc.go index 1092ad941d..7158341dc5 100644 --- a/contrib/mesos/pkg/redirfd/doc.go +++ b/contrib/mesos/pkg/redirfd/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/redirfd/file_descriptor.go b/contrib/mesos/pkg/redirfd/file_descriptor.go index 2c717e15c9..ef7e955369 100644 --- a/contrib/mesos/pkg/redirfd/file_descriptor.go +++ b/contrib/mesos/pkg/redirfd/file_descriptor.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/redirfd/file_descriptor_test.go b/contrib/mesos/pkg/redirfd/file_descriptor_test.go index 787f229445..754202b05e 100644 --- a/contrib/mesos/pkg/redirfd/file_descriptor_test.go +++ b/contrib/mesos/pkg/redirfd/file_descriptor_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/redirfd/redirfd_unix.go b/contrib/mesos/pkg/redirfd/redirfd_unix.go index 4a535b74bf..c39bb1ad6c 100644 --- a/contrib/mesos/pkg/redirfd/redirfd_unix.go +++ b/contrib/mesos/pkg/redirfd/redirfd_unix.go @@ -1,7 +1,7 @@ // +build !windows /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/redirfd/redirfd_windows.go b/contrib/mesos/pkg/redirfd/redirfd_windows.go index 609d158d2d..8c6bb53fba 100644 --- a/contrib/mesos/pkg/redirfd/redirfd_windows.go +++ b/contrib/mesos/pkg/redirfd/redirfd_windows.go @@ -1,7 +1,7 @@ // +build windows /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/runtime/doc.go b/contrib/mesos/pkg/runtime/doc.go index 7acc851bb9..89ba07be02 100644 --- a/contrib/mesos/pkg/runtime/doc.go +++ b/contrib/mesos/pkg/runtime/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/runtime/latch.go b/contrib/mesos/pkg/runtime/latch.go index 93514ae46c..08a1d56836 100644 --- a/contrib/mesos/pkg/runtime/latch.go +++ b/contrib/mesos/pkg/runtime/latch.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/runtime/latch_test.go b/contrib/mesos/pkg/runtime/latch_test.go index 5bb4600f02..d9f7adec0a 100644 --- a/contrib/mesos/pkg/runtime/latch_test.go +++ b/contrib/mesos/pkg/runtime/latch_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/runtime/metrics.go b/contrib/mesos/pkg/runtime/metrics.go index 139c373b79..e0ceb02e8b 100644 --- a/contrib/mesos/pkg/runtime/metrics.go +++ b/contrib/mesos/pkg/runtime/metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/runtime/util.go b/contrib/mesos/pkg/runtime/util.go index 64e79206ac..b401a24490 100644 --- a/contrib/mesos/pkg/runtime/util.go +++ b/contrib/mesos/pkg/runtime/util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/runtime/util_test.go b/contrib/mesos/pkg/runtime/util_test.go index cfadb7f59b..177accf4dc 100644 --- a/contrib/mesos/pkg/runtime/util_test.go +++ b/contrib/mesos/pkg/runtime/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/algorithm/algorithm.go b/contrib/mesos/pkg/scheduler/components/algorithm/algorithm.go index 7fe8adaa5e..cb60fdd0cb 100644 --- a/contrib/mesos/pkg/scheduler/components/algorithm/algorithm.go +++ b/contrib/mesos/pkg/scheduler/components/algorithm/algorithm.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/algorithm/doc.go b/contrib/mesos/pkg/scheduler/components/algorithm/doc.go index 35c01e966b..1607a6bad9 100644 --- a/contrib/mesos/pkg/scheduler/components/algorithm/doc.go +++ b/contrib/mesos/pkg/scheduler/components/algorithm/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers/doc.go b/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers/doc.go index 06d72fbd5f..080d3cd4d9 100644 --- a/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers/doc.go +++ b/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers/fcfs.go b/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers/fcfs.go index 951bfd0bfe..7fea90a1e1 100644 --- a/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers/fcfs.go +++ b/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers/fcfs.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers/types.go b/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers/types.go index 990e55051d..b03bd3cbb4 100644 --- a/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers/types.go +++ b/contrib/mesos/pkg/scheduler/components/algorithm/podschedulers/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/binder/binder.go b/contrib/mesos/pkg/scheduler/components/binder/binder.go index 7dc9366939..35dcc3d52c 100644 --- a/contrib/mesos/pkg/scheduler/components/binder/binder.go +++ b/contrib/mesos/pkg/scheduler/components/binder/binder.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/binder/doc.go b/contrib/mesos/pkg/scheduler/components/binder/doc.go index 59c1ace100..39d0670c29 100644 --- a/contrib/mesos/pkg/scheduler/components/binder/doc.go +++ b/contrib/mesos/pkg/scheduler/components/binder/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/controller/controller.go b/contrib/mesos/pkg/scheduler/components/controller/controller.go index 1ff2a9237b..0b871e5587 100644 --- a/contrib/mesos/pkg/scheduler/components/controller/controller.go +++ b/contrib/mesos/pkg/scheduler/components/controller/controller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/controller/doc.go b/contrib/mesos/pkg/scheduler/components/controller/doc.go index 8176a4e75d..a9313fb87a 100644 --- a/contrib/mesos/pkg/scheduler/components/controller/doc.go +++ b/contrib/mesos/pkg/scheduler/components/controller/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/deleter/deleter.go b/contrib/mesos/pkg/scheduler/components/deleter/deleter.go index 2ce14ea3c2..e8b509cce1 100644 --- a/contrib/mesos/pkg/scheduler/components/deleter/deleter.go +++ b/contrib/mesos/pkg/scheduler/components/deleter/deleter.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/deleter/deleter_test.go b/contrib/mesos/pkg/scheduler/components/deleter/deleter_test.go index 3c00630793..4663adcf59 100644 --- a/contrib/mesos/pkg/scheduler/components/deleter/deleter_test.go +++ b/contrib/mesos/pkg/scheduler/components/deleter/deleter_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/deleter/doc.go b/contrib/mesos/pkg/scheduler/components/deleter/doc.go index 43a0b1d15e..d9c667f953 100644 --- a/contrib/mesos/pkg/scheduler/components/deleter/doc.go +++ b/contrib/mesos/pkg/scheduler/components/deleter/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/doc.go b/contrib/mesos/pkg/scheduler/components/doc.go index 31cedaf60c..397e7df926 100644 --- a/contrib/mesos/pkg/scheduler/components/doc.go +++ b/contrib/mesos/pkg/scheduler/components/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/errorhandler/doc.go b/contrib/mesos/pkg/scheduler/components/errorhandler/doc.go index ed78b7fc9c..acb8a6e318 100644 --- a/contrib/mesos/pkg/scheduler/components/errorhandler/doc.go +++ b/contrib/mesos/pkg/scheduler/components/errorhandler/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/errorhandler/errorhandler.go b/contrib/mesos/pkg/scheduler/components/errorhandler/errorhandler.go index af0eaca1b0..eabd74b91c 100644 --- a/contrib/mesos/pkg/scheduler/components/errorhandler/errorhandler.go +++ b/contrib/mesos/pkg/scheduler/components/errorhandler/errorhandler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/framework/doc.go b/contrib/mesos/pkg/scheduler/components/framework/doc.go index 5d7ae60202..5a1d0b077e 100644 --- a/contrib/mesos/pkg/scheduler/components/framework/doc.go +++ b/contrib/mesos/pkg/scheduler/components/framework/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/framework/driver_mock.go b/contrib/mesos/pkg/scheduler/components/framework/driver_mock.go index 98dc1b13dd..cf6da1a91c 100644 --- a/contrib/mesos/pkg/scheduler/components/framework/driver_mock.go +++ b/contrib/mesos/pkg/scheduler/components/framework/driver_mock.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/framework/framework.go b/contrib/mesos/pkg/scheduler/components/framework/framework.go index ffa94b8bca..38c161abd2 100644 --- a/contrib/mesos/pkg/scheduler/components/framework/framework.go +++ b/contrib/mesos/pkg/scheduler/components/framework/framework.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/framework/framework_test.go b/contrib/mesos/pkg/scheduler/components/framework/framework_test.go index ef12ac81e0..0a7ffa989a 100644 --- a/contrib/mesos/pkg/scheduler/components/framework/framework_test.go +++ b/contrib/mesos/pkg/scheduler/components/framework/framework_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/framework/frameworkid/etcd/etcd.go b/contrib/mesos/pkg/scheduler/components/framework/frameworkid/etcd/etcd.go index c6e09f754e..6846f29421 100644 --- a/contrib/mesos/pkg/scheduler/components/framework/frameworkid/etcd/etcd.go +++ b/contrib/mesos/pkg/scheduler/components/framework/frameworkid/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/framework/frameworkid/frameworkid.go b/contrib/mesos/pkg/scheduler/components/framework/frameworkid/frameworkid.go index f7803c8951..9cccc37251 100644 --- a/contrib/mesos/pkg/scheduler/components/framework/frameworkid/frameworkid.go +++ b/contrib/mesos/pkg/scheduler/components/framework/frameworkid/frameworkid.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/framework/frameworkid/zk/zk.go b/contrib/mesos/pkg/scheduler/components/framework/frameworkid/zk/zk.go index f37862691a..485f76e2ff 100644 --- a/contrib/mesos/pkg/scheduler/components/framework/frameworkid/zk/zk.go +++ b/contrib/mesos/pkg/scheduler/components/framework/frameworkid/zk/zk.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/framework/slaveregistry.go b/contrib/mesos/pkg/scheduler/components/framework/slaveregistry.go index 91514b5fb5..821ca88059 100644 --- a/contrib/mesos/pkg/scheduler/components/framework/slaveregistry.go +++ b/contrib/mesos/pkg/scheduler/components/framework/slaveregistry.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/framework/slaveregistry_test.go b/contrib/mesos/pkg/scheduler/components/framework/slaveregistry_test.go index 750c58bf17..457bef19bb 100644 --- a/contrib/mesos/pkg/scheduler/components/framework/slaveregistry_test.go +++ b/contrib/mesos/pkg/scheduler/components/framework/slaveregistry_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/podreconciler/doc.go b/contrib/mesos/pkg/scheduler/components/podreconciler/doc.go index c4b8119a12..e0ded3bcb3 100644 --- a/contrib/mesos/pkg/scheduler/components/podreconciler/doc.go +++ b/contrib/mesos/pkg/scheduler/components/podreconciler/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/podreconciler/podreconciler.go b/contrib/mesos/pkg/scheduler/components/podreconciler/podreconciler.go index c4a8327972..72bd78a183 100644 --- a/contrib/mesos/pkg/scheduler/components/podreconciler/podreconciler.go +++ b/contrib/mesos/pkg/scheduler/components/podreconciler/podreconciler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/podstoreadapter.go b/contrib/mesos/pkg/scheduler/components/podstoreadapter.go index 36e661028f..58a8991064 100644 --- a/contrib/mesos/pkg/scheduler/components/podstoreadapter.go +++ b/contrib/mesos/pkg/scheduler/components/podstoreadapter.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/scheduler.go b/contrib/mesos/pkg/scheduler/components/scheduler.go index 30e6769c8a..1689497abf 100644 --- a/contrib/mesos/pkg/scheduler/components/scheduler.go +++ b/contrib/mesos/pkg/scheduler/components/scheduler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/tasksreconciler/doc.go b/contrib/mesos/pkg/scheduler/components/tasksreconciler/doc.go index 4a24918a6c..80992a9740 100644 --- a/contrib/mesos/pkg/scheduler/components/tasksreconciler/doc.go +++ b/contrib/mesos/pkg/scheduler/components/tasksreconciler/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/components/tasksreconciler/tasksreconciler.go b/contrib/mesos/pkg/scheduler/components/tasksreconciler/tasksreconciler.go index 3ba4fe6fc6..eb3a672783 100644 --- a/contrib/mesos/pkg/scheduler/components/tasksreconciler/tasksreconciler.go +++ b/contrib/mesos/pkg/scheduler/components/tasksreconciler/tasksreconciler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/config/config.go b/contrib/mesos/pkg/scheduler/config/config.go index 563e61e3db..9d1681a810 100644 --- a/contrib/mesos/pkg/scheduler/config/config.go +++ b/contrib/mesos/pkg/scheduler/config/config.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/config/config_test.go b/contrib/mesos/pkg/scheduler/config/config_test.go index d4cc9b26cc..fe56ea1301 100644 --- a/contrib/mesos/pkg/scheduler/config/config_test.go +++ b/contrib/mesos/pkg/scheduler/config/config_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/config/doc.go b/contrib/mesos/pkg/scheduler/config/doc.go index 7ce9a982e9..100d3365a3 100644 --- a/contrib/mesos/pkg/scheduler/config/doc.go +++ b/contrib/mesos/pkg/scheduler/config/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/constraint/constraint.go b/contrib/mesos/pkg/scheduler/constraint/constraint.go index a2a90b3c37..074979320a 100644 --- a/contrib/mesos/pkg/scheduler/constraint/constraint.go +++ b/contrib/mesos/pkg/scheduler/constraint/constraint.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/constraint/constraint_test.go b/contrib/mesos/pkg/scheduler/constraint/constraint_test.go index 2869e2d210..c06f32426c 100644 --- a/contrib/mesos/pkg/scheduler/constraint/constraint_test.go +++ b/contrib/mesos/pkg/scheduler/constraint/constraint_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/constraint/doc.go b/contrib/mesos/pkg/scheduler/constraint/doc.go index c21082848b..729a1404b4 100644 --- a/contrib/mesos/pkg/scheduler/constraint/doc.go +++ b/contrib/mesos/pkg/scheduler/constraint/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/doc.go b/contrib/mesos/pkg/scheduler/doc.go index 1fc5d2a162..22f75684f2 100644 --- a/contrib/mesos/pkg/scheduler/doc.go +++ b/contrib/mesos/pkg/scheduler/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/errors/doc.go b/contrib/mesos/pkg/scheduler/errors/doc.go index 14a6aab835..760647f91c 100644 --- a/contrib/mesos/pkg/scheduler/errors/doc.go +++ b/contrib/mesos/pkg/scheduler/errors/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/errors/errors.go b/contrib/mesos/pkg/scheduler/errors/errors.go index a6649840e8..346473b310 100644 --- a/contrib/mesos/pkg/scheduler/errors/errors.go +++ b/contrib/mesos/pkg/scheduler/errors/errors.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/executorinfo/codec.go b/contrib/mesos/pkg/scheduler/executorinfo/codec.go index 9bff406ed7..3c21501529 100644 --- a/contrib/mesos/pkg/scheduler/executorinfo/codec.go +++ b/contrib/mesos/pkg/scheduler/executorinfo/codec.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/executorinfo/codec_test.go b/contrib/mesos/pkg/scheduler/executorinfo/codec_test.go index 07dff3578c..f49715b05a 100644 --- a/contrib/mesos/pkg/scheduler/executorinfo/codec_test.go +++ b/contrib/mesos/pkg/scheduler/executorinfo/codec_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/executorinfo/doc.go b/contrib/mesos/pkg/scheduler/executorinfo/doc.go index af99b434e1..8c248e344e 100644 --- a/contrib/mesos/pkg/scheduler/executorinfo/doc.go +++ b/contrib/mesos/pkg/scheduler/executorinfo/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/executorinfo/id.go b/contrib/mesos/pkg/scheduler/executorinfo/id.go index af457f5e33..392c11d2e6 100644 --- a/contrib/mesos/pkg/scheduler/executorinfo/id.go +++ b/contrib/mesos/pkg/scheduler/executorinfo/id.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/executorinfo/lru_cache.go b/contrib/mesos/pkg/scheduler/executorinfo/lru_cache.go index 57e20a07d9..deb444c189 100644 --- a/contrib/mesos/pkg/scheduler/executorinfo/lru_cache.go +++ b/contrib/mesos/pkg/scheduler/executorinfo/lru_cache.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/executorinfo/lru_cache_test.go b/contrib/mesos/pkg/scheduler/executorinfo/lru_cache_test.go index 6f2073eb5d..30b050be1f 100644 --- a/contrib/mesos/pkg/scheduler/executorinfo/lru_cache_test.go +++ b/contrib/mesos/pkg/scheduler/executorinfo/lru_cache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/executorinfo/registry.go b/contrib/mesos/pkg/scheduler/executorinfo/registry.go index 012c0159d1..8a5dd3d8e7 100644 --- a/contrib/mesos/pkg/scheduler/executorinfo/registry.go +++ b/contrib/mesos/pkg/scheduler/executorinfo/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/executorinfo/registry_test.go b/contrib/mesos/pkg/scheduler/executorinfo/registry_test.go index 99d14d0211..0316f1a3b6 100644 --- a/contrib/mesos/pkg/scheduler/executorinfo/registry_test.go +++ b/contrib/mesos/pkg/scheduler/executorinfo/registry_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/ha/doc.go b/contrib/mesos/pkg/scheduler/ha/doc.go index 4e6fc0beda..1b7b62aad5 100644 --- a/contrib/mesos/pkg/scheduler/ha/doc.go +++ b/contrib/mesos/pkg/scheduler/ha/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/ha/election.go b/contrib/mesos/pkg/scheduler/ha/election.go index b2b8be7a5a..1a044dc9c5 100644 --- a/contrib/mesos/pkg/scheduler/ha/election.go +++ b/contrib/mesos/pkg/scheduler/ha/election.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/ha/ha.go b/contrib/mesos/pkg/scheduler/ha/ha.go index eb44c34a79..6c7863f43e 100644 --- a/contrib/mesos/pkg/scheduler/ha/ha.go +++ b/contrib/mesos/pkg/scheduler/ha/ha.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/integration/doc.go b/contrib/mesos/pkg/scheduler/integration/doc.go index d124ae9f6d..d45259af4b 100644 --- a/contrib/mesos/pkg/scheduler/integration/doc.go +++ b/contrib/mesos/pkg/scheduler/integration/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/integration/integration_test.go b/contrib/mesos/pkg/scheduler/integration/integration_test.go index cd99680a6f..4e2a49c6be 100644 --- a/contrib/mesos/pkg/scheduler/integration/integration_test.go +++ b/contrib/mesos/pkg/scheduler/integration/integration_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/meta/annotations.go b/contrib/mesos/pkg/scheduler/meta/annotations.go index 7d051e7a67..66e2e45a83 100644 --- a/contrib/mesos/pkg/scheduler/meta/annotations.go +++ b/contrib/mesos/pkg/scheduler/meta/annotations.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/meta/doc.go b/contrib/mesos/pkg/scheduler/meta/doc.go index e9d834c94c..d8082743a5 100644 --- a/contrib/mesos/pkg/scheduler/meta/doc.go +++ b/contrib/mesos/pkg/scheduler/meta/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/meta/store.go b/contrib/mesos/pkg/scheduler/meta/store.go index 82545edb44..d2d83be094 100644 --- a/contrib/mesos/pkg/scheduler/meta/store.go +++ b/contrib/mesos/pkg/scheduler/meta/store.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/metrics/doc.go b/contrib/mesos/pkg/scheduler/metrics/doc.go index 861c0205c6..7315f010a0 100644 --- a/contrib/mesos/pkg/scheduler/metrics/doc.go +++ b/contrib/mesos/pkg/scheduler/metrics/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/metrics/metrics.go b/contrib/mesos/pkg/scheduler/metrics/metrics.go index 5bdb6f0019..d3f54072a8 100644 --- a/contrib/mesos/pkg/scheduler/metrics/metrics.go +++ b/contrib/mesos/pkg/scheduler/metrics/metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/debug.go b/contrib/mesos/pkg/scheduler/podtask/debug.go index 72d1a6b788..93b9fd2ff5 100644 --- a/contrib/mesos/pkg/scheduler/podtask/debug.go +++ b/contrib/mesos/pkg/scheduler/podtask/debug.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/doc.go b/contrib/mesos/pkg/scheduler/podtask/doc.go index 7c36ae5116..2f0ee8de96 100644 --- a/contrib/mesos/pkg/scheduler/podtask/doc.go +++ b/contrib/mesos/pkg/scheduler/podtask/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/hostport/mapper.go b/contrib/mesos/pkg/scheduler/podtask/hostport/mapper.go index 5484aff361..5a0efbb33e 100644 --- a/contrib/mesos/pkg/scheduler/podtask/hostport/mapper.go +++ b/contrib/mesos/pkg/scheduler/podtask/hostport/mapper.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/hostport/mapper_test.go b/contrib/mesos/pkg/scheduler/podtask/hostport/mapper_test.go index ef153fdffa..9d1214fba2 100644 --- a/contrib/mesos/pkg/scheduler/podtask/hostport/mapper_test.go +++ b/contrib/mesos/pkg/scheduler/podtask/hostport/mapper_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/leaky.go b/contrib/mesos/pkg/scheduler/podtask/leaky.go index 7e0a432d18..ec973e854c 100644 --- a/contrib/mesos/pkg/scheduler/podtask/leaky.go +++ b/contrib/mesos/pkg/scheduler/podtask/leaky.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/pod_task.go b/contrib/mesos/pkg/scheduler/podtask/pod_task.go index 362169b9d7..24bb8aa73d 100644 --- a/contrib/mesos/pkg/scheduler/podtask/pod_task.go +++ b/contrib/mesos/pkg/scheduler/podtask/pod_task.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/pod_task_test.go b/contrib/mesos/pkg/scheduler/podtask/pod_task_test.go index 1d3806d8eb..56112d2990 100644 --- a/contrib/mesos/pkg/scheduler/podtask/pod_task_test.go +++ b/contrib/mesos/pkg/scheduler/podtask/pod_task_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/procurement.go b/contrib/mesos/pkg/scheduler/podtask/procurement.go index c5d61cdbef..76aea0c022 100644 --- a/contrib/mesos/pkg/scheduler/podtask/procurement.go +++ b/contrib/mesos/pkg/scheduler/podtask/procurement.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/procurement_test.go b/contrib/mesos/pkg/scheduler/podtask/procurement_test.go index cb01f23e4d..da54dce6a0 100644 --- a/contrib/mesos/pkg/scheduler/podtask/procurement_test.go +++ b/contrib/mesos/pkg/scheduler/podtask/procurement_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/registry.go b/contrib/mesos/pkg/scheduler/podtask/registry.go index 80991cce44..d739b2b731 100644 --- a/contrib/mesos/pkg/scheduler/podtask/registry.go +++ b/contrib/mesos/pkg/scheduler/podtask/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/registry_test.go b/contrib/mesos/pkg/scheduler/podtask/registry_test.go index d670a9318a..84efa1505f 100644 --- a/contrib/mesos/pkg/scheduler/podtask/registry_test.go +++ b/contrib/mesos/pkg/scheduler/podtask/registry_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/roles.go b/contrib/mesos/pkg/scheduler/podtask/roles.go index 04673d30ea..61b8348e3a 100644 --- a/contrib/mesos/pkg/scheduler/podtask/roles.go +++ b/contrib/mesos/pkg/scheduler/podtask/roles.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/podtask/roles_test.go b/contrib/mesos/pkg/scheduler/podtask/roles_test.go index 39904006e4..c46f1add14 100644 --- a/contrib/mesos/pkg/scheduler/podtask/roles_test.go +++ b/contrib/mesos/pkg/scheduler/podtask/roles_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/queuer/doc.go b/contrib/mesos/pkg/scheduler/queuer/doc.go index 85183fda21..15fb20ccf5 100644 --- a/contrib/mesos/pkg/scheduler/queuer/doc.go +++ b/contrib/mesos/pkg/scheduler/queuer/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/queuer/pod.go b/contrib/mesos/pkg/scheduler/queuer/pod.go index 43715f399d..664654f6d3 100644 --- a/contrib/mesos/pkg/scheduler/queuer/pod.go +++ b/contrib/mesos/pkg/scheduler/queuer/pod.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/queuer/queuer.go b/contrib/mesos/pkg/scheduler/queuer/queuer.go index f23620a198..724d2cafb8 100644 --- a/contrib/mesos/pkg/scheduler/queuer/queuer.go +++ b/contrib/mesos/pkg/scheduler/queuer/queuer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/resources/doc.go b/contrib/mesos/pkg/scheduler/resources/doc.go index 8ef318d2dd..df91010411 100644 --- a/contrib/mesos/pkg/scheduler/resources/doc.go +++ b/contrib/mesos/pkg/scheduler/resources/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/resources/resource.go b/contrib/mesos/pkg/scheduler/resources/resource.go index 660b4a69f7..c2d930d8cf 100644 --- a/contrib/mesos/pkg/scheduler/resources/resource.go +++ b/contrib/mesos/pkg/scheduler/resources/resource.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/resources/resource_test.go b/contrib/mesos/pkg/scheduler/resources/resource_test.go index 5260790f33..3c7780907c 100644 --- a/contrib/mesos/pkg/scheduler/resources/resource_test.go +++ b/contrib/mesos/pkg/scheduler/resources/resource_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/resources/resources.go b/contrib/mesos/pkg/scheduler/resources/resources.go index 96cfe74cc8..b5da64c737 100644 --- a/contrib/mesos/pkg/scheduler/resources/resources.go +++ b/contrib/mesos/pkg/scheduler/resources/resources.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/resources/types.go b/contrib/mesos/pkg/scheduler/resources/types.go index 743853d805..b0fc043904 100644 --- a/contrib/mesos/pkg/scheduler/resources/types.go +++ b/contrib/mesos/pkg/scheduler/resources/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/scheduler.go b/contrib/mesos/pkg/scheduler/scheduler.go index eadc03edfd..e8d82f0b08 100644 --- a/contrib/mesos/pkg/scheduler/scheduler.go +++ b/contrib/mesos/pkg/scheduler/scheduler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/scheduler_mock.go b/contrib/mesos/pkg/scheduler/scheduler_mock.go index f4ffcf3787..ebff007be5 100644 --- a/contrib/mesos/pkg/scheduler/scheduler_mock.go +++ b/contrib/mesos/pkg/scheduler/scheduler_mock.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/service/compat_testing.go b/contrib/mesos/pkg/scheduler/service/compat_testing.go index 8e7ba2bb03..005a17a713 100644 --- a/contrib/mesos/pkg/scheduler/service/compat_testing.go +++ b/contrib/mesos/pkg/scheduler/service/compat_testing.go @@ -1,7 +1,7 @@ // +build unit_test /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/service/compat_unix.go b/contrib/mesos/pkg/scheduler/service/compat_unix.go index 90d3bdeff1..f14abd73eb 100644 --- a/contrib/mesos/pkg/scheduler/service/compat_unix.go +++ b/contrib/mesos/pkg/scheduler/service/compat_unix.go @@ -2,7 +2,7 @@ // +build !unit_test /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/service/compat_windows.go b/contrib/mesos/pkg/scheduler/service/compat_windows.go index 5ce9a5d7ed..de151c6917 100644 --- a/contrib/mesos/pkg/scheduler/service/compat_windows.go +++ b/contrib/mesos/pkg/scheduler/service/compat_windows.go @@ -2,7 +2,7 @@ // +build !unit_test /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/service/doc.go b/contrib/mesos/pkg/scheduler/service/doc.go index 61ffbcecff..21a8e69602 100644 --- a/contrib/mesos/pkg/scheduler/service/doc.go +++ b/contrib/mesos/pkg/scheduler/service/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/service/publish.go b/contrib/mesos/pkg/scheduler/service/publish.go index e3c4206028..cc0a67f6a1 100644 --- a/contrib/mesos/pkg/scheduler/service/publish.go +++ b/contrib/mesos/pkg/scheduler/service/publish.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/service/service.go b/contrib/mesos/pkg/scheduler/service/service.go index 347a7ac6c3..cf9ae90bdf 100644 --- a/contrib/mesos/pkg/scheduler/service/service.go +++ b/contrib/mesos/pkg/scheduler/service/service.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/service/service_test.go b/contrib/mesos/pkg/scheduler/service/service_test.go index ee4353ed05..78d7b8fcb5 100644 --- a/contrib/mesos/pkg/scheduler/service/service_test.go +++ b/contrib/mesos/pkg/scheduler/service/service_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/service/validation.go b/contrib/mesos/pkg/scheduler/service/validation.go index b411fb9b8f..7f3adf5d8b 100644 --- a/contrib/mesos/pkg/scheduler/service/validation.go +++ b/contrib/mesos/pkg/scheduler/service/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/scheduler/service/validation_test.go b/contrib/mesos/pkg/scheduler/service/validation_test.go index 5de45cb64c..43c485a92a 100644 --- a/contrib/mesos/pkg/scheduler/service/validation_test.go +++ b/contrib/mesos/pkg/scheduler/service/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/service/doc.go b/contrib/mesos/pkg/service/doc.go index 04b35a7e48..6de20a474a 100644 --- a/contrib/mesos/pkg/service/doc.go +++ b/contrib/mesos/pkg/service/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/service/endpoints_controller.go b/contrib/mesos/pkg/service/endpoints_controller.go index 5b2649291a..199e0051a7 100644 --- a/contrib/mesos/pkg/service/endpoints_controller.go +++ b/contrib/mesos/pkg/service/endpoints_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/pkg/service/endpoints_controller_test.go b/contrib/mesos/pkg/service/endpoints_controller_test.go index b0537cee3d..c20c7c091c 100644 --- a/contrib/mesos/pkg/service/endpoints_controller_test.go +++ b/contrib/mesos/pkg/service/endpoints_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/contrib/mesos/target.sh b/contrib/mesos/target.sh index 02f0ad0a3b..a51a7ccc39 100644 --- a/contrib/mesos/target.sh +++ b/contrib/mesos/target.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/design/clustering/Dockerfile b/docs/design/clustering/Dockerfile index 60d258c452..e7abc753f0 100644 --- a/docs/design/clustering/Dockerfile +++ b/docs/design/clustering/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/design/clustering/Makefile b/docs/design/clustering/Makefile index b1743cf49b..945a5f0b1b 100644 --- a/docs/design/clustering/Makefile +++ b/docs/design/clustering/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/getting-started-guides/coreos/azure/expose_guestbook_app_port.sh b/docs/getting-started-guides/coreos/azure/expose_guestbook_app_port.sh index 65dfaf5d3a..a1181d8cb8 100755 --- a/docs/getting-started-guides/coreos/azure/expose_guestbook_app_port.sh +++ b/docs/getting-started-guides/coreos/azure/expose_guestbook_app_port.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/user-guide/environment-guide/containers/backend/Dockerfile b/docs/user-guide/environment-guide/containers/backend/Dockerfile index a0fe23c389..2876fa2372 100644 --- a/docs/user-guide/environment-guide/containers/backend/Dockerfile +++ b/docs/user-guide/environment-guide/containers/backend/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/user-guide/environment-guide/containers/backend/backend.go b/docs/user-guide/environment-guide/containers/backend/backend.go index b4edf75ff5..2c828f5649 100644 --- a/docs/user-guide/environment-guide/containers/backend/backend.go +++ b/docs/user-guide/environment-guide/containers/backend/backend.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/docs/user-guide/environment-guide/containers/show/Dockerfile b/docs/user-guide/environment-guide/containers/show/Dockerfile index a0fe23c389..2876fa2372 100644 --- a/docs/user-guide/environment-guide/containers/show/Dockerfile +++ b/docs/user-guide/environment-guide/containers/show/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/user-guide/environment-guide/containers/show/show.go b/docs/user-guide/environment-guide/containers/show/show.go index 9a2cfc639d..30f8ee165a 100644 --- a/docs/user-guide/environment-guide/containers/show/show.go +++ b/docs/user-guide/environment-guide/containers/show/show.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/docs/user-guide/horizontal-pod-autoscaling/image/Dockerfile b/docs/user-guide/horizontal-pod-autoscaling/image/Dockerfile index 1a93ea2ddc..47dfc63abf 100644 --- a/docs/user-guide/horizontal-pod-autoscaling/image/Dockerfile +++ b/docs/user-guide/horizontal-pod-autoscaling/image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/user-guide/liveness/image/Dockerfile b/docs/user-guide/liveness/image/Dockerfile index 2c5481c63e..7dc460bad7 100644 --- a/docs/user-guide/liveness/image/Dockerfile +++ b/docs/user-guide/liveness/image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/user-guide/liveness/image/Makefile b/docs/user-guide/liveness/image/Makefile index f29214f350..835199e2eb 100644 --- a/docs/user-guide/liveness/image/Makefile +++ b/docs/user-guide/liveness/image/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/user-guide/liveness/image/server.go b/docs/user-guide/liveness/image/server.go index 26c337e767..889d277656 100644 --- a/docs/user-guide/liveness/image/server.go +++ b/docs/user-guide/liveness/image/server.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/docs/user-guide/logging-demo/Makefile b/docs/user-guide/logging-demo/Makefile index 0df0a18d2e..2cb2dece5d 100644 --- a/docs/user-guide/logging-demo/Makefile +++ b/docs/user-guide/logging-demo/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/user-guide/update-demo/build-images.sh b/docs/user-guide/update-demo/build-images.sh index 63c0fe9298..778e2fe067 100755 --- a/docs/user-guide/update-demo/build-images.sh +++ b/docs/user-guide/update-demo/build-images.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/user-guide/update-demo/images/kitten/Dockerfile b/docs/user-guide/update-demo/images/kitten/Dockerfile index aef0de58c6..caa516e2ca 100644 --- a/docs/user-guide/update-demo/images/kitten/Dockerfile +++ b/docs/user-guide/update-demo/images/kitten/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/docs/user-guide/update-demo/images/nautilus/Dockerfile b/docs/user-guide/update-demo/images/nautilus/Dockerfile index 16280b8215..be61ad4a0e 100644 --- a/docs/user-guide/update-demo/images/nautilus/Dockerfile +++ b/docs/user-guide/update-demo/images/nautilus/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/apiserver/apiserver.go b/examples/apiserver/apiserver.go index e2c527d363..bc3e5ad231 100644 --- a/examples/apiserver/apiserver.go +++ b/examples/apiserver/apiserver.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/examples/apiserver/apiserver_test.go b/examples/apiserver/apiserver_test.go index 73ace78a54..c9627ceaee 100644 --- a/examples/apiserver/apiserver_test.go +++ b/examples/apiserver/apiserver_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/examples/apiserver/rest/reststorage.go b/examples/apiserver/rest/reststorage.go index 271f51bcc6..4a4b9ef2b7 100644 --- a/examples/apiserver/rest/reststorage.go +++ b/examples/apiserver/rest/reststorage.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/examples/apiserver/server/main.go b/examples/apiserver/server/main.go index d0bdeef1d5..dbed6e043c 100644 --- a/examples/apiserver/server/main.go +++ b/examples/apiserver/server/main.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/examples/cassandra/image/Dockerfile b/examples/cassandra/image/Dockerfile index 635cb8c699..72c1874307 100644 --- a/examples/cassandra/image/Dockerfile +++ b/examples/cassandra/image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/cassandra/image/Makefile b/examples/cassandra/image/Makefile index 1275826a89..2330c16a4e 100644 --- a/examples/cassandra/image/Makefile +++ b/examples/cassandra/image/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/cassandra/image/run.sh b/examples/cassandra/image/run.sh index 8db3c2ddbc..7d8b53991f 100644 --- a/examples/cassandra/image/run.sh +++ b/examples/cassandra/image/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/celery-rabbitmq/celery-app-add/Dockerfile b/examples/celery-rabbitmq/celery-app-add/Dockerfile index 13a6437a81..81155c9585 100644 --- a/examples/celery-rabbitmq/celery-app-add/Dockerfile +++ b/examples/celery-rabbitmq/celery-app-add/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/celery-rabbitmq/celery-app-add/celery_conf.py b/examples/celery-rabbitmq/celery-app-add/celery_conf.py index 237028cae3..cab08186a3 100644 --- a/examples/celery-rabbitmq/celery-app-add/celery_conf.py +++ b/examples/celery-rabbitmq/celery-app-add/celery_conf.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/celery-rabbitmq/celery-app-add/run.sh b/examples/celery-rabbitmq/celery-app-add/run.sh index 9f1c5435b3..a2f8eaf2cb 100644 --- a/examples/celery-rabbitmq/celery-app-add/run.sh +++ b/examples/celery-rabbitmq/celery-app-add/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/celery-rabbitmq/celery-app-add/run_tasks.py b/examples/celery-rabbitmq/celery-app-add/run_tasks.py index e07afc5010..2e7ab6859a 100644 --- a/examples/celery-rabbitmq/celery-app-add/run_tasks.py +++ b/examples/celery-rabbitmq/celery-app-add/run_tasks.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/celery-rabbitmq/flower/Dockerfile b/examples/celery-rabbitmq/flower/Dockerfile index cf70be419d..b5c661db43 100644 --- a/examples/celery-rabbitmq/flower/Dockerfile +++ b/examples/celery-rabbitmq/flower/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/celery-rabbitmq/flower/run_flower.sh b/examples/celery-rabbitmq/flower/run_flower.sh index ce20727c96..052f77bf83 100644 --- a/examples/celery-rabbitmq/flower/run_flower.sh +++ b/examples/celery-rabbitmq/flower/run_flower.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/cluster-dns/images/backend/Dockerfile b/examples/cluster-dns/images/backend/Dockerfile index dd1597001f..c2a4e7cf6c 100644 --- a/examples/cluster-dns/images/backend/Dockerfile +++ b/examples/cluster-dns/images/backend/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/cluster-dns/images/backend/Makefile b/examples/cluster-dns/images/backend/Makefile index 91d8c3dd07..b029931ba4 100644 --- a/examples/cluster-dns/images/backend/Makefile +++ b/examples/cluster-dns/images/backend/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/cluster-dns/images/backend/server.py b/examples/cluster-dns/images/backend/server.py index fdb8edfac6..5dcfb93b98 100644 --- a/examples/cluster-dns/images/backend/server.py +++ b/examples/cluster-dns/images/backend/server.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/cluster-dns/images/frontend/Dockerfile b/examples/cluster-dns/images/frontend/Dockerfile index ba5bc06516..56da6eb715 100644 --- a/examples/cluster-dns/images/frontend/Dockerfile +++ b/examples/cluster-dns/images/frontend/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/cluster-dns/images/frontend/Makefile b/examples/cluster-dns/images/frontend/Makefile index a198c6da6a..5bd4443ab9 100644 --- a/examples/cluster-dns/images/frontend/Makefile +++ b/examples/cluster-dns/images/frontend/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/cluster-dns/images/frontend/client.py b/examples/cluster-dns/images/frontend/client.py index cbb2764493..1a56df5043 100644 --- a/examples/cluster-dns/images/frontend/client.py +++ b/examples/cluster-dns/images/frontend/client.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/doc.go b/examples/doc.go index d976f88e65..06a770bdf6 100644 --- a/examples/doc.go +++ b/examples/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/examples/examples_test.go b/examples/examples_test.go index 0c345793e8..21feace4f1 100644 --- a/examples/examples_test.go +++ b/examples/examples_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/examples/explorer/Dockerfile b/examples/explorer/Dockerfile index 8bf0ec065c..ba76a04631 100644 --- a/examples/explorer/Dockerfile +++ b/examples/explorer/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/explorer/Makefile b/examples/explorer/Makefile index b7dda57129..36f7494fe3 100644 --- a/examples/explorer/Makefile +++ b/examples/explorer/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/explorer/explorer.go b/examples/explorer/explorer.go index e10dfc925c..cdba95f546 100644 --- a/examples/explorer/explorer.go +++ b/examples/explorer/explorer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/examples/flexvolume/lvm b/examples/flexvolume/lvm index bb73f47f40..0ffea3a142 100755 --- a/examples/flexvolume/lvm +++ b/examples/flexvolume/lvm @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/guestbook-go/_src/Dockerfile b/examples/guestbook-go/_src/Dockerfile index b1bb5ea0ef..50d481c9c3 100644 --- a/examples/guestbook-go/_src/Dockerfile +++ b/examples/guestbook-go/_src/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/guestbook-go/_src/Makefile b/examples/guestbook-go/_src/Makefile index 9c89fbcd95..e5db478ab0 100644 --- a/examples/guestbook-go/_src/Makefile +++ b/examples/guestbook-go/_src/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/guestbook-go/_src/guestbook/Dockerfile b/examples/guestbook-go/_src/guestbook/Dockerfile index 5012dbb563..263b0e688d 100644 --- a/examples/guestbook-go/_src/guestbook/Dockerfile +++ b/examples/guestbook-go/_src/guestbook/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/guestbook-go/_src/main.go b/examples/guestbook-go/_src/main.go index e87c04ea2f..c6e8cf187e 100644 --- a/examples/guestbook-go/_src/main.go +++ b/examples/guestbook-go/_src/main.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/examples/guestbook/php-redis/Dockerfile b/examples/guestbook/php-redis/Dockerfile index 97510969cc..e6f5a2f847 100644 --- a/examples/guestbook/php-redis/Dockerfile +++ b/examples/guestbook/php-redis/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/guestbook/redis-slave/Dockerfile b/examples/guestbook/redis-slave/Dockerfile index 1d097b57ac..e90b225884 100644 --- a/examples/guestbook/redis-slave/Dockerfile +++ b/examples/guestbook/redis-slave/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/guestbook/redis-slave/run.sh b/examples/guestbook/redis-slave/run.sh index 9f79ccef17..d9037d48c4 100755 --- a/examples/guestbook/redis-slave/run.sh +++ b/examples/guestbook/redis-slave/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/hazelcast/image/Dockerfile b/examples/hazelcast/image/Dockerfile index 3a26f29e69..d930c2f3df 100644 --- a/examples/hazelcast/image/Dockerfile +++ b/examples/hazelcast/image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/https-nginx/Dockerfile b/examples/https-nginx/Dockerfile index cf61b7c989..6ea973bdce 100644 --- a/examples/https-nginx/Dockerfile +++ b/examples/https-nginx/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/https-nginx/Makefile b/examples/https-nginx/Makefile index 9f29cb5a93..04d0e1c163 100644 --- a/examples/https-nginx/Makefile +++ b/examples/https-nginx/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/https-nginx/make_secret.go b/examples/https-nginx/make_secret.go index ae3947fcaa..1d1d4e1438 100644 --- a/examples/https-nginx/make_secret.go +++ b/examples/https-nginx/make_secret.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/examples/job/work-queue-1/Dockerfile b/examples/job/work-queue-1/Dockerfile index aea1ee70ff..62fd72a7b8 100644 --- a/examples/job/work-queue-1/Dockerfile +++ b/examples/job/work-queue-1/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/job/work-queue-1/README.md b/examples/job/work-queue-1/README.md index 0e09034080..480787fa99 100644 --- a/examples/job/work-queue-1/README.md +++ b/examples/job/work-queue-1/README.md @@ -204,7 +204,7 @@ example program: ``` #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/job/work-queue-1/worker.py b/examples/job/work-queue-1/worker.py index 22e52a8585..c7902bbbe0 100755 --- a/examples/job/work-queue-1/worker.py +++ b/examples/job/work-queue-1/worker.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/job/work-queue-2/Dockerfile b/examples/job/work-queue-2/Dockerfile index 5246f0735e..5381d83e54 100644 --- a/examples/job/work-queue-2/Dockerfile +++ b/examples/job/work-queue-2/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/job/work-queue-2/README.md b/examples/job/work-queue-2/README.md index b32677440e..d2d723342a 100644 --- a/examples/job/work-queue-2/README.md +++ b/examples/job/work-queue-2/README.md @@ -141,7 +141,7 @@ client library to get work. Here it is: ``` #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/job/work-queue-2/rediswq.py b/examples/job/work-queue-2/rediswq.py index 7135a903c7..4223e31009 100644 --- a/examples/job/work-queue-2/rediswq.py +++ b/examples/job/work-queue-2/rediswq.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/job/work-queue-2/worker.py b/examples/job/work-queue-2/worker.py index 6bf2abc5f2..941d1adb20 100755 --- a/examples/job/work-queue-2/worker.py +++ b/examples/job/work-queue-2/worker.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/k8petstore/build-push-containers.sh b/examples/k8petstore/build-push-containers.sh index 80338c3434..4cf385b7f5 100755 --- a/examples/k8petstore/build-push-containers.sh +++ b/examples/k8petstore/build-push-containers.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/k8petstore/docker-machine-dev.sh b/examples/k8petstore/docker-machine-dev.sh index ebe728e381..0ad18b8c5e 100755 --- a/examples/k8petstore/docker-machine-dev.sh +++ b/examples/k8petstore/docker-machine-dev.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/k8petstore/k8petstore-loadbalancer.sh b/examples/k8petstore/k8petstore-loadbalancer.sh index 0bd55b0106..dccfc8c583 100755 --- a/examples/k8petstore/k8petstore-loadbalancer.sh +++ b/examples/k8petstore/k8petstore-loadbalancer.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/k8petstore/k8petstore-nodeport.sh b/examples/k8petstore/k8petstore-nodeport.sh index 2a3c73f0f9..e7442f9fe6 100755 --- a/examples/k8petstore/k8petstore-nodeport.sh +++ b/examples/k8petstore/k8petstore-nodeport.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/k8petstore/k8petstore.sh b/examples/k8petstore/k8petstore.sh index 759ba05e4a..60eea24d9a 100755 --- a/examples/k8petstore/k8petstore.sh +++ b/examples/k8petstore/k8petstore.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/k8petstore/redis-master/Dockerfile b/examples/k8petstore/redis-master/Dockerfile index 9467d5a3dd..a3f7f9bc90 100644 --- a/examples/k8petstore/redis-master/Dockerfile +++ b/examples/k8petstore/redis-master/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/k8petstore/redis-slave/Dockerfile b/examples/k8petstore/redis-slave/Dockerfile index f35885e9d1..481102d740 100644 --- a/examples/k8petstore/redis-slave/Dockerfile +++ b/examples/k8petstore/redis-slave/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/k8petstore/redis-slave/run.sh b/examples/k8petstore/redis-slave/run.sh index d42c8f261f..8a4bb57cad 100755 --- a/examples/k8petstore/redis-slave/run.sh +++ b/examples/k8petstore/redis-slave/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/k8petstore/redis/Dockerfile b/examples/k8petstore/redis/Dockerfile index 4261913d81..f230afad20 100644 --- a/examples/k8petstore/redis/Dockerfile +++ b/examples/k8petstore/redis/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/k8petstore/web-server/Dockerfile b/examples/k8petstore/web-server/Dockerfile index c85b58dd98..92768bff3d 100644 --- a/examples/k8petstore/web-server/Dockerfile +++ b/examples/k8petstore/web-server/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/k8petstore/web-server/src/main.go b/examples/k8petstore/web-server/src/main.go index 3c9bafd6a2..a0c2e0f6d8 100644 --- a/examples/k8petstore/web-server/src/main.go +++ b/examples/k8petstore/web-server/src/main.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/examples/k8petstore/web-server/test.sh b/examples/k8petstore/web-server/test.sh index 7b8b0eacd1..cf1427bd41 100644 --- a/examples/k8petstore/web-server/test.sh +++ b/examples/k8petstore/web-server/test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/kubectl-container/Dockerfile b/examples/kubectl-container/Dockerfile index d4ab65f6c4..53876edd9c 100644 --- a/examples/kubectl-container/Dockerfile +++ b/examples/kubectl-container/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/kubectl-container/Makefile b/examples/kubectl-container/Makefile index 1f2fbed3cc..a414e4a598 100644 --- a/examples/kubectl-container/Makefile +++ b/examples/kubectl-container/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/meteor/dockerbase/Dockerfile b/examples/meteor/dockerbase/Dockerfile index 53d5bbfa97..1e573e141a 100644 --- a/examples/meteor/dockerbase/Dockerfile +++ b/examples/meteor/dockerbase/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/mysql-galera/image/Dockerfile b/examples/mysql-galera/image/Dockerfile index ed7d45683c..6fa6ecb7b3 100644 --- a/examples/mysql-galera/image/Dockerfile +++ b/examples/mysql-galera/image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/mysql-galera/image/docker-entrypoint.sh b/examples/mysql-galera/image/docker-entrypoint.sh index 58657303b3..50185562f7 100755 --- a/examples/mysql-galera/image/docker-entrypoint.sh +++ b/examples/mysql-galera/image/docker-entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/newrelic/config-to-secret.sh b/examples/newrelic/config-to-secret.sh index 70e02a35cd..520c71990b 100755 --- a/examples/newrelic/config-to-secret.sh +++ b/examples/newrelic/config-to-secret.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/nfs/nfs-data/Dockerfile b/examples/nfs/nfs-data/Dockerfile index 6a9c689120..c1450dcb59 100644 --- a/examples/nfs/nfs-data/Dockerfile +++ b/examples/nfs/nfs-data/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/nfs/nfs-data/run_nfs.sh b/examples/nfs/nfs-data/run_nfs.sh index 1714d35259..fa7b165c01 100755 --- a/examples/nfs/nfs-data/run_nfs.sh +++ b/examples/nfs/nfs-data/run_nfs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/openshift-origin/cleanup.sh b/examples/openshift-origin/cleanup.sh index 0891e6f1bf..a2c931571b 100755 --- a/examples/openshift-origin/cleanup.sh +++ b/examples/openshift-origin/cleanup.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/openshift-origin/create.sh b/examples/openshift-origin/create.sh index f7b4e04c99..717df61b7f 100755 --- a/examples/openshift-origin/create.sh +++ b/examples/openshift-origin/create.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/phabricator/php-phabricator/Dockerfile b/examples/phabricator/php-phabricator/Dockerfile index 42eba6fdb7..f39b9421af 100644 --- a/examples/phabricator/php-phabricator/Dockerfile +++ b/examples/phabricator/php-phabricator/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/phabricator/php-phabricator/run.sh b/examples/phabricator/php-phabricator/run.sh index abbfff611b..1f2b8387f4 100755 --- a/examples/phabricator/php-phabricator/run.sh +++ b/examples/phabricator/php-phabricator/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/phabricator/setup.sh b/examples/phabricator/setup.sh index d6adbf01e2..678973c812 100755 --- a/examples/phabricator/setup.sh +++ b/examples/phabricator/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/phabricator/teardown.sh b/examples/phabricator/teardown.sh index 40c21357db..266313912b 100755 --- a/examples/phabricator/teardown.sh +++ b/examples/phabricator/teardown.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/redis/image/Dockerfile b/examples/redis/image/Dockerfile index 7bf2bb2500..2247af5307 100644 --- a/examples/redis/image/Dockerfile +++ b/examples/redis/image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/redis/image/run.sh b/examples/redis/image/run.sh index 2002669f98..2808c082b9 100755 --- a/examples/redis/image/run.sh +++ b/examples/redis/image/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/rethinkdb/gen-pod.sh b/examples/rethinkdb/gen-pod.sh index 55678cce10..90a44f2300 100755 --- a/examples/rethinkdb/gen-pod.sh +++ b/examples/rethinkdb/gen-pod.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/rethinkdb/image/Dockerfile b/examples/rethinkdb/image/Dockerfile index 8c60c28a29..9815f5f223 100644 --- a/examples/rethinkdb/image/Dockerfile +++ b/examples/rethinkdb/image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/rethinkdb/image/run.sh b/examples/rethinkdb/image/run.sh index eee55a3a93..607eb59edc 100644 --- a/examples/rethinkdb/image/run.sh +++ b/examples/rethinkdb/image/run.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/selenium/selenium-test.py b/examples/selenium/selenium-test.py index d7ab803589..80d598a3b1 100644 --- a/examples/selenium/selenium-test.py +++ b/examples/selenium/selenium-test.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/sharing-clusters/make_secret.go b/examples/sharing-clusters/make_secret.go index 20b35b513d..25456d5f11 100644 --- a/examples/sharing-clusters/make_secret.go +++ b/examples/sharing-clusters/make_secret.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/examples/vitess/configure.sh b/examples/vitess/configure.sh index 6391b0db3d..7166c7fbb9 100755 --- a/examples/vitess/configure.sh +++ b/examples/vitess/configure.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/env.sh b/examples/vitess/env.sh index efb276a0c1..49b06c8007 100644 --- a/examples/vitess/env.sh +++ b/examples/vitess/env.sh @@ -1,4 +1,4 @@ -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/etcd-down.sh b/examples/vitess/etcd-down.sh index 4286533315..1f3ca258cb 100755 --- a/examples/vitess/etcd-down.sh +++ b/examples/vitess/etcd-down.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/etcd-up.sh b/examples/vitess/etcd-up.sh index 9a3c6b6e71..b97e369007 100755 --- a/examples/vitess/etcd-up.sh +++ b/examples/vitess/etcd-up.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/guestbook-down.sh b/examples/vitess/guestbook-down.sh index 99d4d656f7..bac48ed321 100755 --- a/examples/vitess/guestbook-down.sh +++ b/examples/vitess/guestbook-down.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/guestbook-up.sh b/examples/vitess/guestbook-up.sh index 1e21e01b0d..b3afe9f059 100755 --- a/examples/vitess/guestbook-up.sh +++ b/examples/vitess/guestbook-up.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/vitess-down.sh b/examples/vitess/vitess-down.sh index fbda4a1a89..dc3884a35d 100755 --- a/examples/vitess/vitess-down.sh +++ b/examples/vitess/vitess-down.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/vitess-up.sh b/examples/vitess/vitess-up.sh index b38d7567dc..4add4ee7e1 100755 --- a/examples/vitess/vitess-up.sh +++ b/examples/vitess/vitess-up.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/vtctld-down.sh b/examples/vitess/vtctld-down.sh index 72e05b8be7..d5a0dfb186 100755 --- a/examples/vitess/vtctld-down.sh +++ b/examples/vitess/vtctld-down.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/vtctld-up.sh b/examples/vitess/vtctld-up.sh index dd2a63b70d..257b2d7730 100755 --- a/examples/vitess/vtctld-up.sh +++ b/examples/vitess/vtctld-up.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/vtgate-down.sh b/examples/vitess/vtgate-down.sh index 404b258f35..cf72e840b4 100755 --- a/examples/vitess/vtgate-down.sh +++ b/examples/vitess/vtgate-down.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/vtgate-up.sh b/examples/vitess/vtgate-up.sh index 556aa35f02..b7e327cc60 100755 --- a/examples/vitess/vtgate-up.sh +++ b/examples/vitess/vtgate-up.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/vttablet-down.sh b/examples/vitess/vttablet-down.sh index af739f277c..0683f1f7de 100755 --- a/examples/vitess/vttablet-down.sh +++ b/examples/vitess/vttablet-down.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/examples/vitess/vttablet-up.sh b/examples/vitess/vttablet-up.sh index 98556c27c8..231b7589bc 100755 --- a/examples/vitess/vttablet-up.sh +++ b/examples/vitess/vttablet-up.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/federation/apis/core/conversion.go b/federation/apis/core/conversion.go index d6aba9dbc6..925fba54f2 100644 --- a/federation/apis/core/conversion.go +++ b/federation/apis/core/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/core/deep_copy.go b/federation/apis/core/deep_copy.go index 931523f198..d83bffc81d 100644 --- a/federation/apis/core/deep_copy.go +++ b/federation/apis/core/deep_copy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/core/install/install.go b/federation/apis/core/install/install.go index 5659821109..bae57dd131 100644 --- a/federation/apis/core/install/install.go +++ b/federation/apis/core/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/core/register.go b/federation/apis/core/register.go index b0c6e0ac0f..c045520af8 100644 --- a/federation/apis/core/register.go +++ b/federation/apis/core/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/core/v1/conversion.go b/federation/apis/core/v1/conversion.go index f7864f4313..1e73e668f5 100644 --- a/federation/apis/core/v1/conversion.go +++ b/federation/apis/core/v1/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/core/v1/deep_copy.go b/federation/apis/core/v1/deep_copy.go index 1320c5803f..23f8592c86 100644 --- a/federation/apis/core/v1/deep_copy.go +++ b/federation/apis/core/v1/deep_copy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/core/v1/defaults.go b/federation/apis/core/v1/defaults.go index 5e03961883..2ce41474eb 100644 --- a/federation/apis/core/v1/defaults.go +++ b/federation/apis/core/v1/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/core/v1/register.go b/federation/apis/core/v1/register.go index b20c7659a5..0a3d87bb9a 100644 --- a/federation/apis/core/v1/register.go +++ b/federation/apis/core/v1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/deep_copy_generated.go b/federation/apis/federation/deep_copy_generated.go index 0b03ff9b3a..79c1130840 100644 --- a/federation/apis/federation/deep_copy_generated.go +++ b/federation/apis/federation/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/install/install.go b/federation/apis/federation/install/install.go index a1dc24cab5..cedafe03ab 100644 --- a/federation/apis/federation/install/install.go +++ b/federation/apis/federation/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/install/install_test.go b/federation/apis/federation/install/install_test.go index cf38c169a7..a105703adc 100644 --- a/federation/apis/federation/install/install_test.go +++ b/federation/apis/federation/install/install_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/register.go b/federation/apis/federation/register.go index 2cc7f1f0e2..ce906cb42a 100644 --- a/federation/apis/federation/register.go +++ b/federation/apis/federation/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/types.generated.go b/federation/apis/federation/types.generated.go index 95ebc5994b..af5e512e37 100644 --- a/federation/apis/federation/types.generated.go +++ b/federation/apis/federation/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/types.go b/federation/apis/federation/types.go index 10a9d8beee..c80603fd6b 100644 --- a/federation/apis/federation/types.go +++ b/federation/apis/federation/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/v1beta1/conversion.go b/federation/apis/federation/v1beta1/conversion.go index f8d396e86d..f7ca2372aa 100644 --- a/federation/apis/federation/v1beta1/conversion.go +++ b/federation/apis/federation/v1beta1/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/v1beta1/conversion_generated.go b/federation/apis/federation/v1beta1/conversion_generated.go index 5877d00828..fa582e3a6c 100644 --- a/federation/apis/federation/v1beta1/conversion_generated.go +++ b/federation/apis/federation/v1beta1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/v1beta1/deep_copy_generated.go b/federation/apis/federation/v1beta1/deep_copy_generated.go index 0d53b4a6a9..ccbed1c4ee 100644 --- a/federation/apis/federation/v1beta1/deep_copy_generated.go +++ b/federation/apis/federation/v1beta1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/v1beta1/defaults.go b/federation/apis/federation/v1beta1/defaults.go index b096ce2fda..54aef235ef 100644 --- a/federation/apis/federation/v1beta1/defaults.go +++ b/federation/apis/federation/v1beta1/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/v1beta1/doc.go b/federation/apis/federation/v1beta1/doc.go index cfdb87c53d..ac2fd00ba9 100644 --- a/federation/apis/federation/v1beta1/doc.go +++ b/federation/apis/federation/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/v1beta1/generated.pb.go b/federation/apis/federation/v1beta1/generated.pb.go index e9193b6089..c9c4341eb6 100644 --- a/federation/apis/federation/v1beta1/generated.pb.go +++ b/federation/apis/federation/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/v1beta1/generated.proto b/federation/apis/federation/v1beta1/generated.proto index 811f40f434..d14f69e7fd 100644 --- a/federation/apis/federation/v1beta1/generated.proto +++ b/federation/apis/federation/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/v1beta1/register.go b/federation/apis/federation/v1beta1/register.go index 46dc3f10b7..7d7195ca1c 100644 --- a/federation/apis/federation/v1beta1/register.go +++ b/federation/apis/federation/v1beta1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/v1beta1/types.generated.go b/federation/apis/federation/v1beta1/types.generated.go index e4d7246f24..c959446e2a 100644 --- a/federation/apis/federation/v1beta1/types.generated.go +++ b/federation/apis/federation/v1beta1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/v1beta1/types.go b/federation/apis/federation/v1beta1/types.go index f15988e2f8..42a0766739 100644 --- a/federation/apis/federation/v1beta1/types.go +++ b/federation/apis/federation/v1beta1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/validation/validation.go b/federation/apis/federation/validation/validation.go index f7cac2e264..81a8351942 100644 --- a/federation/apis/federation/validation/validation.go +++ b/federation/apis/federation/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/apis/federation/validation/validation_test.go b/federation/apis/federation/validation/validation_test.go index 87a6b92e47..04c12cfe4c 100644 --- a/federation/apis/federation/validation/validation_test.go +++ b/federation/apis/federation/validation/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/cache/cluster_cache.go b/federation/client/cache/cluster_cache.go index 593919c4da..5a15b9f5ae 100644 --- a/federation/client/cache/cluster_cache.go +++ b/federation/client/cache/cluster_cache.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/clientset.go b/federation/client/clientset_generated/federation_internalclientset/clientset.go index f8163ef835..8741b73b48 100644 --- a/federation/client/clientset_generated/federation_internalclientset/clientset.go +++ b/federation/client/clientset_generated/federation_internalclientset/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/doc.go b/federation/client/clientset_generated/federation_internalclientset/doc.go index 40d4acceae..96610bb059 100644 --- a/federation/client/clientset_generated/federation_internalclientset/doc.go +++ b/federation/client/clientset_generated/federation_internalclientset/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/fake/clientset_generated.go b/federation/client/clientset_generated/federation_internalclientset/fake/clientset_generated.go index 57f5719242..d81d0bb368 100644 --- a/federation/client/clientset_generated/federation_internalclientset/fake/clientset_generated.go +++ b/federation/client/clientset_generated/federation_internalclientset/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/fake/doc.go b/federation/client/clientset_generated/federation_internalclientset/fake/doc.go index febc307fa2..9885b195db 100644 --- a/federation/client/clientset_generated/federation_internalclientset/fake/doc.go +++ b/federation/client/clientset_generated/federation_internalclientset/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/import_known_versions.go b/federation/client/clientset_generated/federation_internalclientset/import_known_versions.go index af8c2e7436..aa7329b391 100644 --- a/federation/client/clientset_generated/federation_internalclientset/import_known_versions.go +++ b/federation/client/clientset_generated/federation_internalclientset/import_known_versions.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/core_client.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/core_client.go index d308d0fe1e..487d36ddb9 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/core_client.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/core_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/doc.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/doc.go index 30cff08b94..7899881b16 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/doc.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/doc.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/doc.go index c2d08c5923..eccbd6e12c 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/doc.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/fake_core_client.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/fake_core_client.go index 1e28cd26c9..03d520df32 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/fake_core_client.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/fake_core_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/fake_service.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/fake_service.go index a926435989..770c798606 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/fake_service.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/fake/fake_service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/generated_expansion.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/generated_expansion.go index 65df6665a9..9838bf1bb6 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/generated_expansion.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/service.go b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/service.go index e1f6c75a49..1d7b071e85 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/service.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned/service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/cluster.go b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/cluster.go index a631e5962b..cdeb36143f 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/cluster.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/cluster.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/doc.go b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/doc.go index 30cff08b94..7899881b16 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/doc.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/doc.go b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/doc.go index c2d08c5923..eccbd6e12c 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/doc.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/fake_cluster.go b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/fake_cluster.go index 53fd32d18e..7fb79ae37f 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/fake_cluster.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/fake_cluster.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/fake_federation_client.go b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/fake_federation_client.go index f829ab0eca..3c8d85dfd9 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/fake_federation_client.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/fake/fake_federation_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/federation_client.go b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/federation_client.go index be2a8a153c..8994331543 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/federation_client.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/federation_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/generated_expansion.go b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/generated_expansion.go index 8888bf9bd4..13903a4cd7 100644 --- a/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/generated_expansion.go +++ b/federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/clientset.go b/federation/client/clientset_generated/federation_release_1_3/clientset.go index 6f7087e1a3..c4c3202340 100644 --- a/federation/client/clientset_generated/federation_release_1_3/clientset.go +++ b/federation/client/clientset_generated/federation_release_1_3/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/doc.go b/federation/client/clientset_generated/federation_release_1_3/doc.go index a8e764c63d..3144022350 100644 --- a/federation/client/clientset_generated/federation_release_1_3/doc.go +++ b/federation/client/clientset_generated/federation_release_1_3/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/fake/clientset_generated.go b/federation/client/clientset_generated/federation_release_1_3/fake/clientset_generated.go index 5dff08c069..c5bb857c8a 100644 --- a/federation/client/clientset_generated/federation_release_1_3/fake/clientset_generated.go +++ b/federation/client/clientset_generated/federation_release_1_3/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/fake/doc.go b/federation/client/clientset_generated/federation_release_1_3/fake/doc.go index 31950d235f..70d4cc4da4 100644 --- a/federation/client/clientset_generated/federation_release_1_3/fake/doc.go +++ b/federation/client/clientset_generated/federation_release_1_3/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/import_known_versions.go b/federation/client/clientset_generated/federation_release_1_3/import_known_versions.go index a977647aa0..8f771947e6 100644 --- a/federation/client/clientset_generated/federation_release_1_3/import_known_versions.go +++ b/federation/client/clientset_generated/federation_release_1_3/import_known_versions.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/core_client.go b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/core_client.go index 19593ab679..fe3db94194 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/core_client.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/core_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/doc.go b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/doc.go index d07e71e3a4..cd17626fb8 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/doc.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/doc.go b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/doc.go index 0b5fe9d5df..0fe7d81cb4 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/doc.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/fake_core_client.go b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/fake_core_client.go index cffa8da7eb..c7bd5ef903 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/fake_core_client.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/fake_core_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/fake_service.go b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/fake_service.go index cbc358e6a3..5f235c5d49 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/fake_service.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/fake/fake_service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/generated_expansion.go b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/generated_expansion.go index 2928a83ed3..a480d589e8 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/generated_expansion.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/service.go b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/service.go index ca533d1f2f..5c3bf4223c 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/service.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/core/v1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/cluster.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/cluster.go index 19012ff8e3..b67137e3f2 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/cluster.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/cluster.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/doc.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/doc.go index cbca5a3cf8..8952b757b3 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/doc.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/doc.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/doc.go index 0b5fe9d5df..0fe7d81cb4 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/doc.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_cluster.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_cluster.go index ab7fa2f300..624fc3c7eb 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_cluster.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_cluster.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_federation_client.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_federation_client.go index 829e6a1300..ab542fa7ae 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_federation_client.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/fake/fake_federation_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/federation_client.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/federation_client.go index 381aa9f8d9..427d41e010 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/federation_client.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/federation_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/generated_expansion.go b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/generated_expansion.go index ab1d777e17..877918cc57 100644 --- a/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/generated_expansion.go +++ b/federation/client/clientset_generated/federation_release_1_3/typed/federation/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/cluster/common.sh b/federation/cluster/common.sh index 7955dd6581..56b73f44ae 100644 --- a/federation/cluster/common.sh +++ b/federation/cluster/common.sh @@ -1,4 +1,4 @@ -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/federation/cluster/federation-down.sh b/federation/cluster/federation-down.sh index dd849add5e..7eeef61ec9 100755 --- a/federation/cluster/federation-down.sh +++ b/federation/cluster/federation-down.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/federation/cluster/federation-up.sh b/federation/cluster/federation-up.sh index 3c8680189c..ded9002696 100755 --- a/federation/cluster/federation-up.sh +++ b/federation/cluster/federation-up.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/federation/cluster/template.go b/federation/cluster/template.go index 3914cfec0d..3a550763f3 100644 --- a/federation/cluster/template.go +++ b/federation/cluster/template.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/cmd/federation-apiserver/apiserver.go b/federation/cmd/federation-apiserver/apiserver.go index ff4ef919d4..7f2deaebfa 100644 --- a/federation/cmd/federation-apiserver/apiserver.go +++ b/federation/cmd/federation-apiserver/apiserver.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/cmd/federation-apiserver/app/core.go b/federation/cmd/federation-apiserver/app/core.go index 6fe9f943a1..a473bc0b7d 100644 --- a/federation/cmd/federation-apiserver/app/core.go +++ b/federation/cmd/federation-apiserver/app/core.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/cmd/federation-apiserver/app/federation.go b/federation/cmd/federation-apiserver/app/federation.go index a0883f76de..f1a55eed73 100644 --- a/federation/cmd/federation-apiserver/app/federation.go +++ b/federation/cmd/federation-apiserver/app/federation.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/cmd/federation-apiserver/app/plugins.go b/federation/cmd/federation-apiserver/app/plugins.go index d8ff1d8a88..42b1a1dff1 100644 --- a/federation/cmd/federation-apiserver/app/plugins.go +++ b/federation/cmd/federation-apiserver/app/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/cmd/federation-apiserver/app/server.go b/federation/cmd/federation-apiserver/app/server.go index 15299a8e16..46d294434d 100644 --- a/federation/cmd/federation-apiserver/app/server.go +++ b/federation/cmd/federation-apiserver/app/server.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/cmd/federation-apiserver/app/server_test.go b/federation/cmd/federation-apiserver/app/server_test.go index a97e463d64..db693d92a4 100644 --- a/federation/cmd/federation-apiserver/app/server_test.go +++ b/federation/cmd/federation-apiserver/app/server_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/cmd/federation-controller-manager/app/controllermanager.go b/federation/cmd/federation-controller-manager/app/controllermanager.go index 73db396584..b103246762 100644 --- a/federation/cmd/federation-controller-manager/app/controllermanager.go +++ b/federation/cmd/federation-controller-manager/app/controllermanager.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/cmd/federation-controller-manager/app/options/options.go b/federation/cmd/federation-controller-manager/app/options/options.go index af3930800c..8e3a64ef77 100644 --- a/federation/cmd/federation-controller-manager/app/options/options.go +++ b/federation/cmd/federation-controller-manager/app/options/options.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/cmd/federation-controller-manager/app/plugins.go b/federation/cmd/federation-controller-manager/app/plugins.go index a17d46d8f5..6f07fa61e5 100644 --- a/federation/cmd/federation-controller-manager/app/plugins.go +++ b/federation/cmd/federation-controller-manager/app/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/cmd/federation-controller-manager/controller-manager.go b/federation/cmd/federation-controller-manager/controller-manager.go index 56a7c0c971..3e9becea55 100644 --- a/federation/cmd/federation-controller-manager/controller-manager.go +++ b/federation/cmd/federation-controller-manager/controller-manager.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/cmd/genfeddocs/gen_fed_docs.go b/federation/cmd/genfeddocs/gen_fed_docs.go index d7c30b14c5..c8bdf32293 100644 --- a/federation/cmd/genfeddocs/gen_fed_docs.go +++ b/federation/cmd/genfeddocs/gen_fed_docs.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/dns.go b/federation/pkg/dnsprovider/dns.go index f100133081..ade3e6a43b 100644 --- a/federation/pkg/dnsprovider/dns.go +++ b/federation/pkg/dnsprovider/dns.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/doc.go b/federation/pkg/dnsprovider/doc.go index 9a3d7e0455..9012e3f76e 100644 --- a/federation/pkg/dnsprovider/doc.go +++ b/federation/pkg/dnsprovider/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/plugins.go b/federation/pkg/dnsprovider/plugins.go index 8b79039161..72f7c507ba 100644 --- a/federation/pkg/dnsprovider/plugins.go +++ b/federation/pkg/dnsprovider/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/aws/route53/interface.go b/federation/pkg/dnsprovider/providers/aws/route53/interface.go index 384c79a140..3567dff2cb 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/interface.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/aws/route53/route53.go b/federation/pkg/dnsprovider/providers/aws/route53/route53.go index fa8a11be0f..6dcd5b1593 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/route53.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/route53.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/aws/route53/route53_test.go b/federation/pkg/dnsprovider/providers/aws/route53/route53_test.go index 180d7cc45b..5505a8388d 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/route53_test.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/route53_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/aws/route53/rrset.go b/federation/pkg/dnsprovider/providers/aws/route53/rrset.go index b762d09918..4c421178cd 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/rrset.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/rrset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/aws/route53/rrsets.go b/federation/pkg/dnsprovider/providers/aws/route53/rrsets.go index 1a2d9b2f57..221e217f3a 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/rrsets.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/rrsets.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go b/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go index 0869b3de23..3b2b6b73b3 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/aws/route53/zone.go b/federation/pkg/dnsprovider/providers/aws/route53/zone.go index 9877142d02..96228ffbad 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/zone.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/zone.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/aws/route53/zones.go b/federation/pkg/dnsprovider/providers/aws/route53/zones.go index 3b40bc1408..015f3d7862 100644 --- a/federation/pkg/dnsprovider/providers/aws/route53/zones.go +++ b/federation/pkg/dnsprovider/providers/aws/route53/zones.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/clouddns.go b/federation/pkg/dnsprovider/providers/google/clouddns/clouddns.go index 841cbb3d47..d79b21c489 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/clouddns.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/clouddns.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/clouddns_test.go b/federation/pkg/dnsprovider/providers/google/clouddns/clouddns_test.go index 9d0b06e5fb..59d2a67c80 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/clouddns_test.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/clouddns_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/interface.go b/federation/pkg/dnsprovider/providers/google/clouddns/interface.go index 0dd5ab877e..6fca4eb84c 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/interface.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/change.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/change.go index a77cadc0d1..fa88ed4097 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/change.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/change.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/changes_create_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/changes_create_call.go index 4fa335147e..ca77f6dfca 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/changes_create_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/changes_create_call.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/changes_service.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/changes_service.go index 9fcc8b897a..f20a19b87a 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/changes_service.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/changes_service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/clouddns.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/clouddns.go index 4a985bd562..3c8f8c5339 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/clouddns.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/clouddns.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/interfaces/interfaces.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/interfaces/interfaces.go index 43e050fc88..50ec390448 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/interfaces/interfaces.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/interfaces/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zone.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zone.go index 5f1d3af318..992c09bf2b 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zone.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zone.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zone_create_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zone_create_call.go index 376decc4c8..83d1e59b6d 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zone_create_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zone_create_call.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_delete_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_delete_call.go index 157ade0435..ccfec1a9bc 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_delete_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_delete_call.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_get_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_get_call.go index 36ba601a52..2ee7cb2e4f 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_get_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_get_call.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_list_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_list_call.go index 32e8e6320e..fec681b247 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_list_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_list_call.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_list_response.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_list_response.go index a98d992850..7ada41fdf7 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_list_response.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_list_response.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_service.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_service.go index 9862078618..72d75f6f66 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_service.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/managed_zones_service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrset.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrset.go index e880727f35..cacec57ddd 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrset.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrsets_list_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrsets_list_call.go index 6a5857609a..1ff9caf43e 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrsets_list_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrsets_list_call.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrsets_list_response.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrsets_list_response.go index d12137bba4..f98fea133b 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrsets_list_response.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrsets_list_response.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrsets_service.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrsets_service.go index 99cb5deebc..1a1e045e43 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrsets_service.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/rrsets_service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/service.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/service.go index a35c71f47d..aac6bdd38e 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/service.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/change.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/change.go index 4a455c8ac4..fe6937a366 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/change.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/change.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/changes_create_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/changes_create_call.go index 9e573d1638..6fd7b1341a 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/changes_create_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/changes_create_call.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/changes_service.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/changes_service.go index c3844d8f4a..42523074f5 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/changes_service.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/changes_service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/clouddns.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/clouddns.go index 2d8a206dca..e89e9dda7c 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/clouddns.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/clouddns.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zone.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zone.go index 6eb03fd93a..44b681a408 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zone.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zone.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zone_create_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zone_create_call.go index 21021ae0e9..31ac86f1ea 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zone_create_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zone_create_call.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_delete_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_delete_call.go index 0ef377b6fd..57bedf4df9 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_delete_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_delete_call.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_get_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_get_call.go index b661303be4..0b6750f663 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_get_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_get_call.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_list_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_list_call.go index c29806b4a2..9aeed9dece 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_list_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_list_call.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_list_response.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_list_response.go index 372f3b8f4c..7832b6c158 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_list_response.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_list_response.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_service.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_service.go index 9d849da775..f4a3a1712c 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_service.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/managed_zones_service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrset.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrset.go index a2377dc2d0..6372210be6 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrset.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrsets_list_call.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrsets_list_call.go index 8fb5d0ff9e..0066a77916 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrsets_list_call.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrsets_list_call.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrsets_list_response.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrsets_list_response.go index 3b6ee5fb2e..07f7bdd000 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrsets_list_response.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrsets_list_response.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrsets_service.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrsets_service.go index c24a416e77..530f9ef319 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrsets_service.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/rrsets_service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/service.go b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/service.go index c1a2b736e3..1355e7cfbb 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/service.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/internal/stubs/service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/rrset.go b/federation/pkg/dnsprovider/providers/google/clouddns/rrset.go index a4582c01fa..24076a22ad 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/rrset.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/rrset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/rrsets.go b/federation/pkg/dnsprovider/providers/google/clouddns/rrsets.go index 7216bec8f9..aa9cd1ba54 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/rrsets.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/rrsets.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/zone.go b/federation/pkg/dnsprovider/providers/google/clouddns/zone.go index 09d5048f65..401db798a4 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/zone.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/zone.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/zones.go b/federation/pkg/dnsprovider/providers/google/clouddns/zones.go index 4018037daa..b4bf02ab6a 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/zones.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/zones.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/dnsprovider/rrstype/rrstype.go b/federation/pkg/dnsprovider/rrstype/rrstype.go index 414c88f7f1..e8f274ec8b 100644 --- a/federation/pkg/dnsprovider/rrstype/rrstype.go +++ b/federation/pkg/dnsprovider/rrstype/rrstype.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/cluster/cluster_client.go b/federation/pkg/federation-controller/cluster/cluster_client.go index 3bf23433d7..bfc59c35cc 100644 --- a/federation/pkg/federation-controller/cluster/cluster_client.go +++ b/federation/pkg/federation-controller/cluster/cluster_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/cluster/clustercontroller.go b/federation/pkg/federation-controller/cluster/clustercontroller.go index 4a0cc802cb..c0d9788913 100644 --- a/federation/pkg/federation-controller/cluster/clustercontroller.go +++ b/federation/pkg/federation-controller/cluster/clustercontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/cluster/clustercontroller_test.go b/federation/pkg/federation-controller/cluster/clustercontroller_test.go index 0d6e11232b..e55b7e217c 100644 --- a/federation/pkg/federation-controller/cluster/clustercontroller_test.go +++ b/federation/pkg/federation-controller/cluster/clustercontroller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/cluster/doc.go b/federation/pkg/federation-controller/cluster/doc.go index 0815e8418a..4b5f8ef723 100644 --- a/federation/pkg/federation-controller/cluster/doc.go +++ b/federation/pkg/federation-controller/cluster/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/doc.go b/federation/pkg/federation-controller/doc.go index 2d806482ed..b2c33f1a8c 100644 --- a/federation/pkg/federation-controller/doc.go +++ b/federation/pkg/federation-controller/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/service/cluster_helper.go b/federation/pkg/federation-controller/service/cluster_helper.go index c24f28495f..0e1076a11e 100644 --- a/federation/pkg/federation-controller/service/cluster_helper.go +++ b/federation/pkg/federation-controller/service/cluster_helper.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/service/dns.go b/federation/pkg/federation-controller/service/dns.go index 5e245a1a43..9c073c3a08 100644 --- a/federation/pkg/federation-controller/service/dns.go +++ b/federation/pkg/federation-controller/service/dns.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/service/doc.go b/federation/pkg/federation-controller/service/doc.go index aebc7837f0..97063051a1 100644 --- a/federation/pkg/federation-controller/service/doc.go +++ b/federation/pkg/federation-controller/service/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/service/endpoint_helper.go b/federation/pkg/federation-controller/service/endpoint_helper.go index b4773a974d..afad27d461 100644 --- a/federation/pkg/federation-controller/service/endpoint_helper.go +++ b/federation/pkg/federation-controller/service/endpoint_helper.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/service/endpoint_helper_test.go b/federation/pkg/federation-controller/service/endpoint_helper_test.go index 67c639563a..be8c656231 100644 --- a/federation/pkg/federation-controller/service/endpoint_helper_test.go +++ b/federation/pkg/federation-controller/service/endpoint_helper_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/service/service_helper.go b/federation/pkg/federation-controller/service/service_helper.go index db8390d54c..76bc5959b8 100644 --- a/federation/pkg/federation-controller/service/service_helper.go +++ b/federation/pkg/federation-controller/service/service_helper.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/service/service_helper_test.go b/federation/pkg/federation-controller/service/service_helper_test.go index 50d5b742ad..26338c3067 100644 --- a/federation/pkg/federation-controller/service/service_helper_test.go +++ b/federation/pkg/federation-controller/service/service_helper_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/service/servicecontroller.go b/federation/pkg/federation-controller/service/servicecontroller.go index 5d285bc0c8..b86e5d953c 100644 --- a/federation/pkg/federation-controller/service/servicecontroller.go +++ b/federation/pkg/federation-controller/service/servicecontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/service/servicecontroller_test.go b/federation/pkg/federation-controller/service/servicecontroller_test.go index 17eee1abc1..631cbdb20a 100644 --- a/federation/pkg/federation-controller/service/servicecontroller_test.go +++ b/federation/pkg/federation-controller/service/servicecontroller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/pkg/federation-controller/util/cluster_util.go b/federation/pkg/federation-controller/util/cluster_util.go index d0bd34e6ef..769e5ee45f 100644 --- a/federation/pkg/federation-controller/util/cluster_util.go +++ b/federation/pkg/federation-controller/util/cluster_util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/registry/cluster/etcd/etcd.go b/federation/registry/cluster/etcd/etcd.go index 99f3f9a2cd..a49457623a 100644 --- a/federation/registry/cluster/etcd/etcd.go +++ b/federation/registry/cluster/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/registry/cluster/etcd/etcd_test.go b/federation/registry/cluster/etcd/etcd_test.go index f04a329bbd..dfb0bb723c 100644 --- a/federation/registry/cluster/etcd/etcd_test.go +++ b/federation/registry/cluster/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/registry/cluster/registry.go b/federation/registry/cluster/registry.go index 99a41e63cc..480190bbec 100644 --- a/federation/registry/cluster/registry.go +++ b/federation/registry/cluster/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/registry/cluster/strategy.go b/federation/registry/cluster/strategy.go index 8557a66f7d..0d78d743ac 100644 --- a/federation/registry/cluster/strategy.go +++ b/federation/registry/cluster/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/federation/registry/cluster/strategy_test.go b/federation/registry/cluster/strategy_test.go index 28db1d1abd..43962e2638 100644 --- a/federation/registry/cluster/strategy_test.go +++ b/federation/registry/cluster/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/hack/benchmark-go.sh b/hack/benchmark-go.sh index 5512a8b60c..7976d0b33c 100755 --- a/hack/benchmark-go.sh +++ b/hack/benchmark-go.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/benchmark-integration.sh b/hack/benchmark-integration.sh index a1c3894976..2eb12f139b 100755 --- a/hack/benchmark-integration.sh +++ b/hack/benchmark-integration.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/boilerplate/boilerplate.Dockerfile.txt b/hack/boilerplate/boilerplate.Dockerfile.txt index 6ce3fbd464..384f325abf 100644 --- a/hack/boilerplate/boilerplate.Dockerfile.txt +++ b/hack/boilerplate/boilerplate.Dockerfile.txt @@ -1,4 +1,4 @@ -# Copyright YEAR The Kubernetes Authors All rights reserved. +# Copyright YEAR The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/boilerplate/boilerplate.Makefile.txt b/hack/boilerplate/boilerplate.Makefile.txt index 6ce3fbd464..384f325abf 100644 --- a/hack/boilerplate/boilerplate.Makefile.txt +++ b/hack/boilerplate/boilerplate.Makefile.txt @@ -1,4 +1,4 @@ -# Copyright YEAR The Kubernetes Authors All rights reserved. +# Copyright YEAR The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/boilerplate/boilerplate.go.txt b/hack/boilerplate/boilerplate.go.txt index f3279e2bd0..59e740c1ee 100644 --- a/hack/boilerplate/boilerplate.go.txt +++ b/hack/boilerplate/boilerplate.go.txt @@ -1,5 +1,5 @@ /* -Copyright YEAR The Kubernetes Authors All rights reserved. +Copyright YEAR The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/hack/boilerplate/boilerplate.py b/hack/boilerplate/boilerplate.py index cd686b3de9..b9e1edf433 100755 --- a/hack/boilerplate/boilerplate.py +++ b/hack/boilerplate/boilerplate.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/boilerplate/boilerplate.py.txt b/hack/boilerplate/boilerplate.py.txt index 2a413f0711..a2e72e5988 100644 --- a/hack/boilerplate/boilerplate.py.txt +++ b/hack/boilerplate/boilerplate.py.txt @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright YEAR The Kubernetes Authors All rights reserved. +# Copyright YEAR The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/boilerplate/boilerplate.sh.txt b/hack/boilerplate/boilerplate.sh.txt index 6ce3fbd464..384f325abf 100644 --- a/hack/boilerplate/boilerplate.sh.txt +++ b/hack/boilerplate/boilerplate.sh.txt @@ -1,4 +1,4 @@ -# Copyright YEAR The Kubernetes Authors All rights reserved. +# Copyright YEAR The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/build-cross.sh b/hack/build-cross.sh index 98a9c60392..30cc0faee3 100755 --- a/hack/build-cross.sh +++ b/hack/build-cross.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/build-go.sh b/hack/build-go.sh index b294c7cd1e..bbc7bd0847 100755 --- a/hack/build-go.sh +++ b/hack/build-go.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/build-ui.sh b/hack/build-ui.sh index b511131988..90340e1db1 100755 --- a/hack/build-ui.sh +++ b/hack/build-ui.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/cherry_pick_pull.sh b/hack/cherry_pick_pull.sh index 02451fdc92..83a200f162 100755 --- a/hack/cherry_pick_pull.sh +++ b/hack/cherry_pick_pull.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/cmd/teststale/teststale.go b/hack/cmd/teststale/teststale.go index 2da1bb8567..45cbc6a3f9 100644 --- a/hack/cmd/teststale/teststale.go +++ b/hack/cmd/teststale/teststale.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/hack/cmd/teststale/teststale_test.go b/hack/cmd/teststale/teststale_test.go index 45096a8a8e..aa4e4fc21f 100644 --- a/hack/cmd/teststale/teststale_test.go +++ b/hack/cmd/teststale/teststale_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/hack/dev-build-and-push.sh b/hack/dev-build-and-push.sh index dbdbb52464..e971d09083 100755 --- a/hack/dev-build-and-push.sh +++ b/hack/dev-build-and-push.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/dev-build-and-up.sh b/hack/dev-build-and-up.sh index 13232035d5..f763c994cd 100755 --- a/hack/dev-build-and-up.sh +++ b/hack/dev-build-and-up.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/dev-push-hyperkube.sh b/hack/dev-push-hyperkube.sh index 15aa6f1dac..0a592b93a5 100755 --- a/hack/dev-push-hyperkube.sh +++ b/hack/dev-push-hyperkube.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/e2e-internal/build-release.sh b/hack/e2e-internal/build-release.sh index eb06ee2ba2..429714dec5 100755 --- a/hack/e2e-internal/build-release.sh +++ b/hack/e2e-internal/build-release.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/e2e-internal/e2e-cluster-size.sh b/hack/e2e-internal/e2e-cluster-size.sh index 66fe8c5f6a..a0921c3743 100755 --- a/hack/e2e-internal/e2e-cluster-size.sh +++ b/hack/e2e-internal/e2e-cluster-size.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/e2e-internal/e2e-down.sh b/hack/e2e-internal/e2e-down.sh index 61b563c81b..41108a59c4 100755 --- a/hack/e2e-internal/e2e-down.sh +++ b/hack/e2e-internal/e2e-down.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/e2e-internal/e2e-push.sh b/hack/e2e-internal/e2e-push.sh index e4644235cd..6187ae7502 100755 --- a/hack/e2e-internal/e2e-push.sh +++ b/hack/e2e-internal/e2e-push.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/e2e-internal/e2e-status.sh b/hack/e2e-internal/e2e-status.sh index f26530190b..ee321aa242 100755 --- a/hack/e2e-internal/e2e-status.sh +++ b/hack/e2e-internal/e2e-status.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/e2e-internal/e2e-up.sh b/hack/e2e-internal/e2e-up.sh index fd4495e655..fb80a23b4d 100755 --- a/hack/e2e-internal/e2e-up.sh +++ b/hack/e2e-internal/e2e-up.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/e2e-node-test.sh b/hack/e2e-node-test.sh index 7954744ec1..5111e3fe34 100755 --- a/hack/e2e-node-test.sh +++ b/hack/e2e-node-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/e2e.go b/hack/e2e.go index ee2b3388c1..b313434eb3 100644 --- a/hack/e2e.go +++ b/hack/e2e.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/hack/federated-ginkgo-e2e.sh b/hack/federated-ginkgo-e2e.sh index c42e9f2fa9..797ba64c0f 100755 --- a/hack/federated-ginkgo-e2e.sh +++ b/hack/federated-ginkgo-e2e.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/gen-swagger-doc/Dockerfile b/hack/gen-swagger-doc/Dockerfile index 6340568ca2..c850be9cfd 100644 --- a/hack/gen-swagger-doc/Dockerfile +++ b/hack/gen-swagger-doc/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/gen-swagger-doc/gen-swagger-docs.sh b/hack/gen-swagger-doc/gen-swagger-docs.sh index 641cbfcd79..b24a295e1b 100755 --- a/hack/gen-swagger-doc/gen-swagger-docs.sh +++ b/hack/gen-swagger-doc/gen-swagger-docs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/generate-docs.sh b/hack/generate-docs.sh index 19ee1c8385..522146ac23 100755 --- a/hack/generate-docs.sh +++ b/hack/generate-docs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/get-build.sh b/hack/get-build.sh index 8771a3a7c5..9297a8382b 100755 --- a/hack/get-build.sh +++ b/hack/get-build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/ginkgo-e2e.sh b/hack/ginkgo-e2e.sh index a17b20b393..fadc3fd67c 100755 --- a/hack/ginkgo-e2e.sh +++ b/hack/ginkgo-e2e.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/godep-save.sh b/hack/godep-save.sh index 960cd9d7a4..a23fa7abe6 100755 --- a/hack/godep-save.sh +++ b/hack/godep-save.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/grab-profiles.sh b/hack/grab-profiles.sh index de038581b1..086890a62b 100755 --- a/hack/grab-profiles.sh +++ b/hack/grab-profiles.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/install-etcd.sh b/hack/install-etcd.sh index 0e622a0fd0..365bab8aae 100755 --- a/hack/install-etcd.sh +++ b/hack/install-etcd.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/build.sh b/hack/jenkins/build.sh index 7a141b2c6d..1c732e7df8 100755 --- a/hack/jenkins/build.sh +++ b/hack/jenkins/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/dockerized-e2e-runner.sh b/hack/jenkins/dockerized-e2e-runner.sh index 6772a141dd..5d8768d7c0 100755 --- a/hack/jenkins/dockerized-e2e-runner.sh +++ b/hack/jenkins/dockerized-e2e-runner.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/e2e-runner.sh b/hack/jenkins/e2e-runner.sh index 35155ee6f6..7033df0bc6 100755 --- a/hack/jenkins/e2e-runner.sh +++ b/hack/jenkins/e2e-runner.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/gotest-dockerized.sh b/hack/jenkins/gotest-dockerized.sh index 91b0aed495..e8539c0e80 100755 --- a/hack/jenkins/gotest-dockerized.sh +++ b/hack/jenkins/gotest-dockerized.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/gotest.sh b/hack/jenkins/gotest.sh index 046dae54c5..fb9f40fcbc 100755 --- a/hack/jenkins/gotest.sh +++ b/hack/jenkins/gotest.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/test-dockerized.sh b/hack/jenkins/test-dockerized.sh index bae8299344..de23fbc85e 100755 --- a/hack/jenkins/test-dockerized.sh +++ b/hack/jenkins/test-dockerized.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/test-image/Dockerfile b/hack/jenkins/test-image/Dockerfile index 816f9a998d..69aed06be3 100644 --- a/hack/jenkins/test-image/Dockerfile +++ b/hack/jenkins/test-image/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/test-image/Makefile b/hack/jenkins/test-image/Makefile index 8c7c6c76d3..7028bc1b69 100644 --- a/hack/jenkins/test-image/Makefile +++ b/hack/jenkins/test-image/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/upload-finished.sh b/hack/jenkins/upload-finished.sh index 153121117b..9a90cb72c3 100755 --- a/hack/jenkins/upload-finished.sh +++ b/hack/jenkins/upload-finished.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/upload-started.sh b/hack/jenkins/upload-started.sh index b253f3b7ce..84c0bb0473 100755 --- a/hack/jenkins/upload-started.sh +++ b/hack/jenkins/upload-started.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/upload-to-gcs.sh b/hack/jenkins/upload-to-gcs.sh index 9c517e57f3..47229aeaa4 100755 --- a/hack/jenkins/upload-to-gcs.sh +++ b/hack/jenkins/upload-to-gcs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/verify-dockerized.sh b/hack/jenkins/verify-dockerized.sh index e7d45ce30a..f417b34ab7 100755 --- a/hack/jenkins/verify-dockerized.sh +++ b/hack/jenkins/verify-dockerized.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/jenkins/verify.sh b/hack/jenkins/verify.sh index 59725abec3..b9ccde02fd 100755 --- a/hack/jenkins/verify.sh +++ b/hack/jenkins/verify.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/lib/etcd.sh b/hack/lib/etcd.sh index 9bfe45dbec..2156061dc3 100644 --- a/hack/lib/etcd.sh +++ b/hack/lib/etcd.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index 6b08cfc149..057b4b100e 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/lib/init.sh b/hack/lib/init.sh index 3464a96330..53fdb69c3a 100644 --- a/hack/lib/init.sh +++ b/hack/lib/init.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/lib/test.sh b/hack/lib/test.sh index 8d47a3f488..00f7ceb6c8 100644 --- a/hack/lib/test.sh +++ b/hack/lib/test.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/lib/util.sh b/hack/lib/util.sh index 41b7a7222e..794cd41cd3 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/lib/version.sh b/hack/lib/version.sh index ed19dd5a2f..5bc603695b 100644 --- a/hack/lib/version.sh +++ b/hack/lib/version.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/list-feature-tests.sh b/hack/list-feature-tests.sh index cf2b6f04d6..42d47111c5 100755 --- a/hack/list-feature-tests.sh +++ b/hack/list-feature-tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 6a7e1e6458..c09ce74798 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/lookup_pull.py b/hack/lookup_pull.py index 25fa968d7b..3bbbac1ccc 100755 --- a/hack/lookup_pull.py +++ b/hack/lookup_pull.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 1ab9a4e27e..02f51e7e8a 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/test-go.sh b/hack/test-go.sh index 617b961c58..6c6b1019ca 100755 --- a/hack/test-go.sh +++ b/hack/test-go.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/test-integration.sh b/hack/test-integration.sh index 5eb7cdacd3..19ad160382 100755 --- a/hack/test-integration.sh +++ b/hack/test-integration.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/test-update-storage-objects.sh b/hack/test-update-storage-objects.sh index 29da3b0358..a51d264291 100755 --- a/hack/test-update-storage-objects.sh +++ b/hack/test-update-storage-objects.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/update-all.sh b/hack/update-all.sh index 78c7a43e76..b12545eb42 100755 --- a/hack/update-all.sh +++ b/hack/update-all.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/update-api-reference-docs.sh b/hack/update-api-reference-docs.sh index 464bc24026..ff74ec6fa4 100755 --- a/hack/update-api-reference-docs.sh +++ b/hack/update-api-reference-docs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/update-codecgen.sh b/hack/update-codecgen.sh index 653717f6ad..8b6f9c9516 100755 --- a/hack/update-codecgen.sh +++ b/hack/update-codecgen.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index a884db7ff1..4ee22c7324 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/update-generated-docs.sh b/hack/update-generated-docs.sh index 7720a042c3..f42c0f3c6e 100755 --- a/hack/update-generated-docs.sh +++ b/hack/update-generated-docs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/update-generated-protobuf-dockerized.sh b/hack/update-generated-protobuf-dockerized.sh index c7cb6c4350..fa9294cd54 100755 --- a/hack/update-generated-protobuf-dockerized.sh +++ b/hack/update-generated-protobuf-dockerized.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/update-generated-protobuf.sh b/hack/update-generated-protobuf.sh index 5750e1983e..9686cec974 100755 --- a/hack/update-generated-protobuf.sh +++ b/hack/update-generated-protobuf.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/update-generated-swagger-docs.sh b/hack/update-generated-swagger-docs.sh index f10ec45153..83dc2c1d0f 100755 --- a/hack/update-generated-swagger-docs.sh +++ b/hack/update-generated-swagger-docs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/update-godep-licenses.sh b/hack/update-godep-licenses.sh index 19a74671b1..cd21afec79 100755 --- a/hack/update-godep-licenses.sh +++ b/hack/update-godep-licenses.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/update-gofmt.sh b/hack/update-gofmt.sh index 8d67656ae0..a85713e3d2 100755 --- a/hack/update-gofmt.sh +++ b/hack/update-gofmt.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/update-munge-docs.sh b/hack/update-munge-docs.sh index 8a259a77b1..f6ce5fb9e5 100755 --- a/hack/update-munge-docs.sh +++ b/hack/update-munge-docs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/update-swagger-spec.sh b/hack/update-swagger-spec.sh index 8528a99dba..ec4d65eac0 100755 --- a/hack/update-swagger-spec.sh +++ b/hack/update-swagger-spec.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-all.sh b/hack/verify-all.sh index 44e6e00979..fc0630c48a 100755 --- a/hack/verify-all.sh +++ b/hack/verify-all.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-api-reference-docs.sh b/hack/verify-api-reference-docs.sh index 2cc0535f6b..ec1dca6991 100755 --- a/hack/verify-api-reference-docs.sh +++ b/hack/verify-api-reference-docs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-boilerplate.sh b/hack/verify-boilerplate.sh index 8d0c0fe656..145a806bf5 100755 --- a/hack/verify-boilerplate.sh +++ b/hack/verify-boilerplate.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-codecgen.sh b/hack/verify-codecgen.sh index c71280a6ce..aedbdd586f 100755 --- a/hack/verify-codecgen.sh +++ b/hack/verify-codecgen.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-codegen.sh b/hack/verify-codegen.sh index cbd31ed3c5..d1e8be09e1 100755 --- a/hack/verify-codegen.sh +++ b/hack/verify-codegen.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-description.sh b/hack/verify-description.sh index 2854d70e56..8bcbb0d65f 100755 --- a/hack/verify-description.sh +++ b/hack/verify-description.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-flags-underscore.py b/hack/verify-flags-underscore.py index 555c3d264a..ab0613a4c7 100755 --- a/hack/verify-flags-underscore.py +++ b/hack/verify-flags-underscore.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-generated-docs.sh b/hack/verify-generated-docs.sh index 99d2975203..b543a50166 100755 --- a/hack/verify-generated-docs.sh +++ b/hack/verify-generated-docs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-generated-protobuf.sh b/hack/verify-generated-protobuf.sh index 694face6a8..c76ee2956d 100755 --- a/hack/verify-generated-protobuf.sh +++ b/hack/verify-generated-protobuf.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-generated-swagger-docs.sh b/hack/verify-generated-swagger-docs.sh index 19bcbca068..8bbd767159 100755 --- a/hack/verify-generated-swagger-docs.sh +++ b/hack/verify-generated-swagger-docs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-godep-licenses.sh b/hack/verify-godep-licenses.sh index 637d79ab4d..924ec48578 100755 --- a/hack/verify-godep-licenses.sh +++ b/hack/verify-godep-licenses.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-godeps.sh b/hack/verify-godeps.sh index 857765a757..16af45a3bf 100755 --- a/hack/verify-godeps.sh +++ b/hack/verify-godeps.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-gofmt.sh b/hack/verify-gofmt.sh index 02c07b4ab9..cd86c82657 100755 --- a/hack/verify-gofmt.sh +++ b/hack/verify-gofmt.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-govet.sh b/hack/verify-govet.sh index 7cbd22e9c8..ab1c145728 100755 --- a/hack/verify-govet.sh +++ b/hack/verify-govet.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-import-boss.sh b/hack/verify-import-boss.sh index 89e96c1781..cb6a310695 100755 --- a/hack/verify-import-boss.sh +++ b/hack/verify-import-boss.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-linkcheck.sh b/hack/verify-linkcheck.sh index 7aba555cac..7ec986617f 100755 --- a/hack/verify-linkcheck.sh +++ b/hack/verify-linkcheck.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-munge-docs.sh b/hack/verify-munge-docs.sh index 6162b5329b..52a6858252 100755 --- a/hack/verify-munge-docs.sh +++ b/hack/verify-munge-docs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-swagger-spec.sh b/hack/verify-swagger-spec.sh index 030eee13c0..2477882743 100755 --- a/hack/verify-swagger-spec.sh +++ b/hack/verify-swagger-spec.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-symbols.sh b/hack/verify-symbols.sh index 220588a7d8..f398d9ff09 100755 --- a/hack/verify-symbols.sh +++ b/hack/verify-symbols.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/hack/verify-test-images.sh b/hack/verify-test-images.sh index db4047a053..7eb9db4039 100755 --- a/hack/verify-test-images.sh +++ b/hack/verify-test-images.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pkg/admission/attributes.go b/pkg/admission/attributes.go index d3b8dd080c..4075cf9007 100644 --- a/pkg/admission/attributes.go +++ b/pkg/admission/attributes.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/admission/chain.go b/pkg/admission/chain.go index 5301a7b724..41d40b6729 100644 --- a/pkg/admission/chain.go +++ b/pkg/admission/chain.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/admission/chain_test.go b/pkg/admission/chain_test.go index 3b138bbe03..5d63a5a2d4 100644 --- a/pkg/admission/chain_test.go +++ b/pkg/admission/chain_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/admission/errors.go b/pkg/admission/errors.go index bf5204e42c..b6878849b8 100644 --- a/pkg/admission/errors.go +++ b/pkg/admission/errors.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/admission/handler.go b/pkg/admission/handler.go index a0d26c4697..b4f2c57755 100644 --- a/pkg/admission/handler.go +++ b/pkg/admission/handler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/admission/interfaces.go b/pkg/admission/interfaces.go index 6c3ef09760..a5fa7ef65a 100644 --- a/pkg/admission/interfaces.go +++ b/pkg/admission/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/admission/plugins.go b/pkg/admission/plugins.go index 17736c4f32..6d739d99c5 100644 --- a/pkg/admission/plugins.go +++ b/pkg/admission/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/annotations/annotations.go b/pkg/api/annotations/annotations.go index dbdf11cbab..2f9a6c4422 100644 --- a/pkg/api/annotations/annotations.go +++ b/pkg/api/annotations/annotations.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/annotations/doc.go b/pkg/api/annotations/doc.go index 6a422ea4f4..0c36c85cc1 100644 --- a/pkg/api/annotations/doc.go +++ b/pkg/api/annotations/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/context.go b/pkg/api/context.go index 7e86395712..096144b835 100644 --- a/pkg/api/context.go +++ b/pkg/api/context.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/context_test.go b/pkg/api/context_test.go index c384999ff2..a0a72c5bde 100644 --- a/pkg/api/context_test.go +++ b/pkg/api/context_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/conversion.go b/pkg/api/conversion.go index 7ae1e0184e..8a024a24b2 100644 --- a/pkg/api/conversion.go +++ b/pkg/api/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/conversion_test.go b/pkg/api/conversion_test.go index 1f4c3a174e..5d4d080634 100644 --- a/pkg/api/conversion_test.go +++ b/pkg/api/conversion_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/copy_test.go b/pkg/api/copy_test.go index a0f7628bf7..e26b9efc98 100644 --- a/pkg/api/copy_test.go +++ b/pkg/api/copy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/deep_copy_generated.go b/pkg/api/deep_copy_generated.go index f3181b8a73..3dc9934481 100644 --- a/pkg/api/deep_copy_generated.go +++ b/pkg/api/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/deep_copy_test.go b/pkg/api/deep_copy_test.go index a251623a05..5b3eaaa3da 100644 --- a/pkg/api/deep_copy_test.go +++ b/pkg/api/deep_copy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/doc.go b/pkg/api/doc.go index 8a54f7acc6..a4262ab361 100644 --- a/pkg/api/doc.go +++ b/pkg/api/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/endpoints/util.go b/pkg/api/endpoints/util.go index 501d58f285..792a2536fe 100644 --- a/pkg/api/endpoints/util.go +++ b/pkg/api/endpoints/util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/endpoints/util_test.go b/pkg/api/endpoints/util_test.go index 7e003e66dd..68e334eff9 100644 --- a/pkg/api/endpoints/util_test.go +++ b/pkg/api/endpoints/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/errors/doc.go b/pkg/api/errors/doc.go index 3a2eb2a0a7..58751ed0ec 100644 --- a/pkg/api/errors/doc.go +++ b/pkg/api/errors/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/errors/errors.go b/pkg/api/errors/errors.go index 89e83c2e3a..a51fe94146 100644 --- a/pkg/api/errors/errors.go +++ b/pkg/api/errors/errors.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/errors/errors_test.go b/pkg/api/errors/errors_test.go index 55928f2318..c292213867 100644 --- a/pkg/api/errors/errors_test.go +++ b/pkg/api/errors/errors_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/errors/storage/doc.go b/pkg/api/errors/storage/doc.go index a2a550526c..4c26011954 100644 --- a/pkg/api/errors/storage/doc.go +++ b/pkg/api/errors/storage/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/errors/storage/storage.go b/pkg/api/errors/storage/storage.go index 2a22b4f171..d900c170e0 100644 --- a/pkg/api/errors/storage/storage.go +++ b/pkg/api/errors/storage/storage.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/field_constants.go b/pkg/api/field_constants.go index 94a825caf2..5ead0f13fe 100644 --- a/pkg/api/field_constants.go +++ b/pkg/api/field_constants.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/generate.go b/pkg/api/generate.go index 2cca5e52fc..19379d301e 100644 --- a/pkg/api/generate.go +++ b/pkg/api/generate.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/generate_test.go b/pkg/api/generate_test.go index fe3cf812b2..c34e6dad0e 100644 --- a/pkg/api/generate_test.go +++ b/pkg/api/generate_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/helpers.go b/pkg/api/helpers.go index 1349ef62b0..f18cc0eb75 100644 --- a/pkg/api/helpers.go +++ b/pkg/api/helpers.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/helpers_test.go b/pkg/api/helpers_test.go index 28c696b43c..8732f3b8ea 100644 --- a/pkg/api/helpers_test.go +++ b/pkg/api/helpers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/install/install.go b/pkg/api/install/install.go index bed5f0791a..937920d28a 100644 --- a/pkg/api/install/install.go +++ b/pkg/api/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/install/install_test.go b/pkg/api/install/install_test.go index 07c7f5d51d..20d579a8c9 100644 --- a/pkg/api/install/install_test.go +++ b/pkg/api/install/install_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/mapper.go b/pkg/api/mapper.go index 0216771eec..60addca7f2 100644 --- a/pkg/api/mapper.go +++ b/pkg/api/mapper.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta.go b/pkg/api/meta.go index 9d5dae2c59..77793593c1 100644 --- a/pkg/api/meta.go +++ b/pkg/api/meta.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/doc.go b/pkg/api/meta/doc.go index 4a132184f6..a3b18a5c9a 100644 --- a/pkg/api/meta/doc.go +++ b/pkg/api/meta/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/errors.go b/pkg/api/meta/errors.go index 2b89bcb8ac..dc4ec07a37 100644 --- a/pkg/api/meta/errors.go +++ b/pkg/api/meta/errors.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/help.go b/pkg/api/meta/help.go index cdc07930fe..0d733a58a0 100644 --- a/pkg/api/meta/help.go +++ b/pkg/api/meta/help.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/help_test.go b/pkg/api/meta/help_test.go index 85ba2cbf6d..fe97d8b5a7 100644 --- a/pkg/api/meta/help_test.go +++ b/pkg/api/meta/help_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/interfaces.go b/pkg/api/meta/interfaces.go index 286bdc0dd7..34c51e39b8 100644 --- a/pkg/api/meta/interfaces.go +++ b/pkg/api/meta/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/meta.go b/pkg/api/meta/meta.go index 5f185f39f3..df1da6f472 100644 --- a/pkg/api/meta/meta.go +++ b/pkg/api/meta/meta.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/meta_test.go b/pkg/api/meta/meta_test.go index cfcd724107..e1437d2922 100644 --- a/pkg/api/meta/meta_test.go +++ b/pkg/api/meta/meta_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/metatypes/types.go b/pkg/api/meta/metatypes/types.go index e7ac3e08d7..41e6596d77 100644 --- a/pkg/api/meta/metatypes/types.go +++ b/pkg/api/meta/metatypes/types.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/multirestmapper.go b/pkg/api/meta/multirestmapper.go index b720f8fa2e..790795a281 100644 --- a/pkg/api/meta/multirestmapper.go +++ b/pkg/api/meta/multirestmapper.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/multirestmapper_test.go b/pkg/api/meta/multirestmapper_test.go index 1b3685e850..2c6c3b2bd6 100644 --- a/pkg/api/meta/multirestmapper_test.go +++ b/pkg/api/meta/multirestmapper_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/priority.go b/pkg/api/meta/priority.go index 24f38f78fd..1e44e45f65 100644 --- a/pkg/api/meta/priority.go +++ b/pkg/api/meta/priority.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/priority_test.go b/pkg/api/meta/priority_test.go index ea2d24b372..1489fe8870 100644 --- a/pkg/api/meta/priority_test.go +++ b/pkg/api/meta/priority_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/restmapper.go b/pkg/api/meta/restmapper.go index 4e07ab7414..bf2567ea6e 100644 --- a/pkg/api/meta/restmapper.go +++ b/pkg/api/meta/restmapper.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta/restmapper_test.go b/pkg/api/meta/restmapper_test.go index 5baad6e622..4240981300 100644 --- a/pkg/api/meta/restmapper_test.go +++ b/pkg/api/meta/restmapper_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/meta_test.go b/pkg/api/meta_test.go index bd8b5f9862..36f878de94 100644 --- a/pkg/api/meta_test.go +++ b/pkg/api/meta_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/pod/util.go b/pkg/api/pod/util.go index 1bdacfe20d..cd6f9fb675 100644 --- a/pkg/api/pod/util.go +++ b/pkg/api/pod/util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/pod/util_test.go b/pkg/api/pod/util_test.go index 4c4cc97a0d..5dd8ff8809 100644 --- a/pkg/api/pod/util_test.go +++ b/pkg/api/pod/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/ref.go b/pkg/api/ref.go index 08dede0711..4aed9d2950 100644 --- a/pkg/api/ref.go +++ b/pkg/api/ref.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/ref_test.go b/pkg/api/ref_test.go index ad4df02b3e..82f26c11b6 100644 --- a/pkg/api/ref_test.go +++ b/pkg/api/ref_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/register.go b/pkg/api/register.go index 631a7f9588..6b1ed75752 100644 --- a/pkg/api/register.go +++ b/pkg/api/register.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/requestcontext.go b/pkg/api/requestcontext.go index 2c27d6862b..14983b2d41 100644 --- a/pkg/api/requestcontext.go +++ b/pkg/api/requestcontext.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/amount.go b/pkg/api/resource/amount.go index 6ae823a022..2d3012c875 100644 --- a/pkg/api/resource/amount.go +++ b/pkg/api/resource/amount.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/amount_test.go b/pkg/api/resource/amount_test.go index acaad6307b..ae5e1fc9c3 100644 --- a/pkg/api/resource/amount_test.go +++ b/pkg/api/resource/amount_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/deep_copy.go b/pkg/api/resource/deep_copy.go index 4efc0406f0..4052a4823c 100644 --- a/pkg/api/resource/deep_copy.go +++ b/pkg/api/resource/deep_copy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/generated.pb.go b/pkg/api/resource/generated.pb.go index cf9447a321..f091cdeef1 100644 --- a/pkg/api/resource/generated.pb.go +++ b/pkg/api/resource/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/generated.proto b/pkg/api/resource/generated.proto index e1c2a3d608..4b7f453b10 100644 --- a/pkg/api/resource/generated.proto +++ b/pkg/api/resource/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/math.go b/pkg/api/resource/math.go index 163aafa5db..887ac74c98 100644 --- a/pkg/api/resource/math.go +++ b/pkg/api/resource/math.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/math_test.go b/pkg/api/resource/math_test.go index 0fdda12e0a..070a0c237e 100644 --- a/pkg/api/resource/math_test.go +++ b/pkg/api/resource/math_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/quantity.go b/pkg/api/resource/quantity.go index 96877b4c94..067c96d40a 100644 --- a/pkg/api/resource/quantity.go +++ b/pkg/api/resource/quantity.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/quantity_example_test.go b/pkg/api/resource/quantity_example_test.go index 48c3d2555f..642c51a26a 100644 --- a/pkg/api/resource/quantity_example_test.go +++ b/pkg/api/resource/quantity_example_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/quantity_proto.go b/pkg/api/resource/quantity_proto.go index 240294682c..74dfb4e4b7 100644 --- a/pkg/api/resource/quantity_proto.go +++ b/pkg/api/resource/quantity_proto.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/quantity_test.go b/pkg/api/resource/quantity_test.go index 5f2e7be0aa..4e10e79c61 100644 --- a/pkg/api/resource/quantity_test.go +++ b/pkg/api/resource/quantity_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/scale_int.go b/pkg/api/resource/scale_int.go index 173de1a217..55e177b0e9 100644 --- a/pkg/api/resource/scale_int.go +++ b/pkg/api/resource/scale_int.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/scale_int_test.go b/pkg/api/resource/scale_int_test.go index 1b4390e559..50d91060aa 100644 --- a/pkg/api/resource/scale_int_test.go +++ b/pkg/api/resource/scale_int_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource/suffix.go b/pkg/api/resource/suffix.go index 0aa2ce2bf6..5ed7abe665 100644 --- a/pkg/api/resource/suffix.go +++ b/pkg/api/resource/suffix.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource_helpers.go b/pkg/api/resource_helpers.go index 4c55b120e1..2c683daa1e 100644 --- a/pkg/api/resource_helpers.go +++ b/pkg/api/resource_helpers.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/resource_helpers_test.go b/pkg/api/resource_helpers_test.go index d13929fa94..4c5f6a625a 100644 --- a/pkg/api/resource_helpers_test.go +++ b/pkg/api/resource_helpers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/rest/create.go b/pkg/api/rest/create.go index fa95b7f93f..e7a521cb2d 100644 --- a/pkg/api/rest/create.go +++ b/pkg/api/rest/create.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/rest/delete.go b/pkg/api/rest/delete.go index 34965d52fe..b695e830e8 100644 --- a/pkg/api/rest/delete.go +++ b/pkg/api/rest/delete.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/rest/doc.go b/pkg/api/rest/doc.go index 8fed0e9f48..ee7c4145f4 100644 --- a/pkg/api/rest/doc.go +++ b/pkg/api/rest/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/rest/export.go b/pkg/api/rest/export.go index e12f65de3c..4407da79ab 100644 --- a/pkg/api/rest/export.go +++ b/pkg/api/rest/export.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/rest/rest.go b/pkg/api/rest/rest.go index 4d5b5ba977..2d90c2f53f 100644 --- a/pkg/api/rest/rest.go +++ b/pkg/api/rest/rest.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/rest/resttest/resttest.go b/pkg/api/rest/resttest/resttest.go index 40b33b46e2..6a7cd08a53 100644 --- a/pkg/api/rest/resttest/resttest.go +++ b/pkg/api/rest/resttest/resttest.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/rest/types.go b/pkg/api/rest/types.go index 0e7f048ba5..85e786465a 100644 --- a/pkg/api/rest/types.go +++ b/pkg/api/rest/types.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/rest/update.go b/pkg/api/rest/update.go index 2645e2c31d..73f1339197 100644 --- a/pkg/api/rest/update.go +++ b/pkg/api/rest/update.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/serialization_proto_test.go b/pkg/api/serialization_proto_test.go index 7ce5b80cd9..b899a71314 100644 --- a/pkg/api/serialization_proto_test.go +++ b/pkg/api/serialization_proto_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/serialization_test.go b/pkg/api/serialization_test.go index e0b470c430..3ec93d2896 100644 --- a/pkg/api/serialization_test.go +++ b/pkg/api/serialization_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/service/annotations.go b/pkg/api/service/annotations.go index 9d57fa4c20..ee275d3c1e 100644 --- a/pkg/api/service/annotations.go +++ b/pkg/api/service/annotations.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/service/util.go b/pkg/api/service/util.go index b6611d2370..6f0e14e2bd 100644 --- a/pkg/api/service/util.go +++ b/pkg/api/service/util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/service/util_test.go b/pkg/api/service/util_test.go index a13f1e588d..1c4c20c004 100644 --- a/pkg/api/service/util_test.go +++ b/pkg/api/service/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/testapi/testapi.go b/pkg/api/testapi/testapi.go index 12a9d7c46b..f58e1c61ff 100644 --- a/pkg/api/testapi/testapi.go +++ b/pkg/api/testapi/testapi.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/testapi/testapi_test.go b/pkg/api/testapi/testapi_test.go index aa049f91d8..069cdc5a62 100644 --- a/pkg/api/testapi/testapi_test.go +++ b/pkg/api/testapi/testapi_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/testing/compat/compatibility_tester.go b/pkg/api/testing/compat/compatibility_tester.go index 82f165a339..5b5ab56cc4 100644 --- a/pkg/api/testing/compat/compatibility_tester.go +++ b/pkg/api/testing/compat/compatibility_tester.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/testing/conversion.go b/pkg/api/testing/conversion.go index 6f91427e71..136d25a37f 100644 --- a/pkg/api/testing/conversion.go +++ b/pkg/api/testing/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/testing/fuzzer.go b/pkg/api/testing/fuzzer.go index dfd15fec3e..f48aca4358 100644 --- a/pkg/api/testing/fuzzer.go +++ b/pkg/api/testing/fuzzer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/testing/pod_specs.go b/pkg/api/testing/pod_specs.go index 2020b3f7fb..d54606b300 100644 --- a/pkg/api/testing/pod_specs.go +++ b/pkg/api/testing/pod_specs.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/types.generated.go b/pkg/api/types.generated.go index b2dcd4afb7..67d3dbc27c 100644 --- a/pkg/api/types.generated.go +++ b/pkg/api/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/types.go b/pkg/api/types.go index 6d11c183ba..9a2948fe1a 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/deep_copy_generated.go b/pkg/api/unversioned/deep_copy_generated.go index ff8f1f0d66..a93a03c854 100644 --- a/pkg/api/unversioned/deep_copy_generated.go +++ b/pkg/api/unversioned/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/duration.go b/pkg/api/unversioned/duration.go index cdaf257300..ed54e515da 100644 --- a/pkg/api/unversioned/duration.go +++ b/pkg/api/unversioned/duration.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/duration_test.go b/pkg/api/unversioned/duration_test.go index 6650ca9aa1..9c7beaf10f 100644 --- a/pkg/api/unversioned/duration_test.go +++ b/pkg/api/unversioned/duration_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/generated.pb.go b/pkg/api/unversioned/generated.pb.go index cb9803552e..f0d7147173 100644 --- a/pkg/api/unversioned/generated.pb.go +++ b/pkg/api/unversioned/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/generated.proto b/pkg/api/unversioned/generated.proto index def4a6d6f6..bb4bf4aa7b 100644 --- a/pkg/api/unversioned/generated.proto +++ b/pkg/api/unversioned/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/group_version.go b/pkg/api/unversioned/group_version.go index 167002c3fc..8f74789217 100644 --- a/pkg/api/unversioned/group_version.go +++ b/pkg/api/unversioned/group_version.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/group_version_test.go b/pkg/api/unversioned/group_version_test.go index d2934fdf9b..ef3bcd89bd 100644 --- a/pkg/api/unversioned/group_version_test.go +++ b/pkg/api/unversioned/group_version_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/helpers.go b/pkg/api/unversioned/helpers.go index b71297ec5f..fbbff00197 100644 --- a/pkg/api/unversioned/helpers.go +++ b/pkg/api/unversioned/helpers.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/helpers_test.go b/pkg/api/unversioned/helpers_test.go index f803d43665..41b8c15831 100644 --- a/pkg/api/unversioned/helpers_test.go +++ b/pkg/api/unversioned/helpers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/meta.go b/pkg/api/unversioned/meta.go index b82b1990e1..48009da162 100644 --- a/pkg/api/unversioned/meta.go +++ b/pkg/api/unversioned/meta.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/register.go b/pkg/api/unversioned/register.go index f8dbd83711..9af0566931 100644 --- a/pkg/api/unversioned/register.go +++ b/pkg/api/unversioned/register.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/time.go b/pkg/api/unversioned/time.go index df94bbe72c..61a000844f 100644 --- a/pkg/api/unversioned/time.go +++ b/pkg/api/unversioned/time.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/time_proto.go b/pkg/api/unversioned/time_proto.go index 496d5d98ce..ba25e9164f 100644 --- a/pkg/api/unversioned/time_proto.go +++ b/pkg/api/unversioned/time_proto.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/time_test.go b/pkg/api/unversioned/time_test.go index 60c61a7378..ce9851592d 100644 --- a/pkg/api/unversioned/time_test.go +++ b/pkg/api/unversioned/time_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/types.go b/pkg/api/unversioned/types.go index 5006b2d0b7..f3964874e1 100644 --- a/pkg/api/unversioned/types.go +++ b/pkg/api/unversioned/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/types_swagger_doc_generated.go b/pkg/api/unversioned/types_swagger_doc_generated.go index 8caef8e549..cdd31eb48d 100644 --- a/pkg/api/unversioned/types_swagger_doc_generated.go +++ b/pkg/api/unversioned/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/validation/validation.go b/pkg/api/unversioned/validation/validation.go index 47852e3e29..ecb968bdcb 100644 --- a/pkg/api/unversioned/validation/validation.go +++ b/pkg/api/unversioned/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/validation/validation_test.go b/pkg/api/unversioned/validation/validation_test.go index ec1264f4ea..72b151a4c7 100644 --- a/pkg/api/unversioned/validation/validation_test.go +++ b/pkg/api/unversioned/validation/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/unversioned/well_known_labels.go b/pkg/api/unversioned/well_known_labels.go index 08e4f68892..318c6eebf1 100644 --- a/pkg/api/unversioned/well_known_labels.go +++ b/pkg/api/unversioned/well_known_labels.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/util/group_version.go b/pkg/api/util/group_version.go index 0cee250234..fea2f17f81 100644 --- a/pkg/api/util/group_version.go +++ b/pkg/api/util/group_version.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/util/group_version_test.go b/pkg/api/util/group_version_test.go index d53b5f4e5a..a7d4e12439 100644 --- a/pkg/api/util/group_version_test.go +++ b/pkg/api/util/group_version_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/backward_compatibility_test.go b/pkg/api/v1/backward_compatibility_test.go index 2ef3d926fd..6c1d2ec81e 100644 --- a/pkg/api/v1/backward_compatibility_test.go +++ b/pkg/api/v1/backward_compatibility_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/conversion.go b/pkg/api/v1/conversion.go index 98d8b7ed2a..c207e60e08 100644 --- a/pkg/api/v1/conversion.go +++ b/pkg/api/v1/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/conversion_generated.go b/pkg/api/v1/conversion_generated.go index 67b2ec1ab6..e232fdf7a7 100644 --- a/pkg/api/v1/conversion_generated.go +++ b/pkg/api/v1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/conversion_test.go b/pkg/api/v1/conversion_test.go index 205777cd28..27c215f3cf 100644 --- a/pkg/api/v1/conversion_test.go +++ b/pkg/api/v1/conversion_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/deep_copy_generated.go b/pkg/api/v1/deep_copy_generated.go index e7d59684a7..f4b604b90b 100644 --- a/pkg/api/v1/deep_copy_generated.go +++ b/pkg/api/v1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/defaults.go b/pkg/api/v1/defaults.go index c6f11b4ee1..5d6323fb4f 100644 --- a/pkg/api/v1/defaults.go +++ b/pkg/api/v1/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/defaults_test.go b/pkg/api/v1/defaults_test.go index b1a78e758e..4ca175f19c 100644 --- a/pkg/api/v1/defaults_test.go +++ b/pkg/api/v1/defaults_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/doc.go b/pkg/api/v1/doc.go index bf85d77a16..6f00ffc857 100644 --- a/pkg/api/v1/doc.go +++ b/pkg/api/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/generated.pb.go b/pkg/api/v1/generated.pb.go index 78477e4bfa..99220e0d0e 100644 --- a/pkg/api/v1/generated.pb.go +++ b/pkg/api/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/generated.proto b/pkg/api/v1/generated.proto index 2964344f2d..d6a19d9faf 100644 --- a/pkg/api/v1/generated.proto +++ b/pkg/api/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/meta.go b/pkg/api/v1/meta.go index 935bd973b7..d5ba042a20 100644 --- a/pkg/api/v1/meta.go +++ b/pkg/api/v1/meta.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/register.go b/pkg/api/v1/register.go index bf07189ee4..8c625b8780 100644 --- a/pkg/api/v1/register.go +++ b/pkg/api/v1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/types.generated.go b/pkg/api/v1/types.generated.go index 1b6c236dbe..304ec2acd1 100644 --- a/pkg/api/v1/types.generated.go +++ b/pkg/api/v1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index d527484db6..7a55940147 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/v1/types_swagger_doc_generated.go b/pkg/api/v1/types_swagger_doc_generated.go index 1c10626fd0..fcb047690b 100644 --- a/pkg/api/v1/types_swagger_doc_generated.go +++ b/pkg/api/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/validation/doc.go b/pkg/api/validation/doc.go index 1b7051073b..f17a15cf9c 100644 --- a/pkg/api/validation/doc.go +++ b/pkg/api/validation/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/validation/events.go b/pkg/api/validation/events.go index 0a5de5443b..754cf88300 100644 --- a/pkg/api/validation/events.go +++ b/pkg/api/validation/events.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/validation/events_test.go b/pkg/api/validation/events_test.go index a2910d0646..61f0d6e4e7 100644 --- a/pkg/api/validation/events_test.go +++ b/pkg/api/validation/events_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/validation/name.go b/pkg/api/validation/name.go index cf2eb8bb29..1358e6e7e9 100644 --- a/pkg/api/validation/name.go +++ b/pkg/api/validation/name.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/validation/name_test.go b/pkg/api/validation/name_test.go index f952a960e7..fb97e8a097 100644 --- a/pkg/api/validation/name_test.go +++ b/pkg/api/validation/name_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/validation/schema.go b/pkg/api/validation/schema.go index fb1873c789..f6a4d0798b 100644 --- a/pkg/api/validation/schema.go +++ b/pkg/api/validation/schema.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/validation/schema_test.go b/pkg/api/validation/schema_test.go index 876e467d37..e51aaa3430 100644 --- a/pkg/api/validation/schema_test.go +++ b/pkg/api/validation/schema_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index 8997ab01f7..5b9b739f6b 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/api/validation/validation_test.go b/pkg/api/validation/validation_test.go index 474bbe88e3..2781a1bdb4 100644 --- a/pkg/api/validation/validation_test.go +++ b/pkg/api/validation/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apimachinery/doc.go b/pkg/apimachinery/doc.go index 7c5a261b41..ede22b3d68 100644 --- a/pkg/apimachinery/doc.go +++ b/pkg/apimachinery/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apimachinery/registered/registered.go b/pkg/apimachinery/registered/registered.go index c418de3b05..307f55da0a 100644 --- a/pkg/apimachinery/registered/registered.go +++ b/pkg/apimachinery/registered/registered.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apimachinery/registered/registered_test.go b/pkg/apimachinery/registered/registered_test.go index 001b65e922..1018057510 100644 --- a/pkg/apimachinery/registered/registered_test.go +++ b/pkg/apimachinery/registered/registered_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apimachinery/types.go b/pkg/apimachinery/types.go index 3e86921ce2..0e90cbbe32 100644 --- a/pkg/apimachinery/types.go +++ b/pkg/apimachinery/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/abac/latest/latest.go b/pkg/apis/abac/latest/latest.go index 2618fc4fc2..d3c00c416f 100644 --- a/pkg/apis/abac/latest/latest.go +++ b/pkg/apis/abac/latest/latest.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/abac/register.go b/pkg/apis/abac/register.go index c555d5aa97..49a4c75619 100644 --- a/pkg/apis/abac/register.go +++ b/pkg/apis/abac/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/abac/types.go b/pkg/apis/abac/types.go index 024c7ee241..49d59ce50c 100644 --- a/pkg/apis/abac/types.go +++ b/pkg/apis/abac/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/abac/v0/conversion.go b/pkg/apis/abac/v0/conversion.go index c0fda4bd55..7e28ad66cf 100644 --- a/pkg/apis/abac/v0/conversion.go +++ b/pkg/apis/abac/v0/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/abac/v0/conversion_test.go b/pkg/apis/abac/v0/conversion_test.go index ffdbd398d9..827e8ce368 100644 --- a/pkg/apis/abac/v0/conversion_test.go +++ b/pkg/apis/abac/v0/conversion_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/abac/v0/register.go b/pkg/apis/abac/v0/register.go index d5338045a9..26fc59003d 100644 --- a/pkg/apis/abac/v0/register.go +++ b/pkg/apis/abac/v0/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/abac/v0/types.go b/pkg/apis/abac/v0/types.go index 58bb569f40..5462add3dc 100644 --- a/pkg/apis/abac/v0/types.go +++ b/pkg/apis/abac/v0/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/abac/v1beta1/register.go b/pkg/apis/abac/v1beta1/register.go index 95fd6b3ef1..f79265f9ff 100644 --- a/pkg/apis/abac/v1beta1/register.go +++ b/pkg/apis/abac/v1beta1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/abac/v1beta1/types.go b/pkg/apis/abac/v1beta1/types.go index 7ce61ac4ac..ecf988de05 100644 --- a/pkg/apis/abac/v1beta1/types.go +++ b/pkg/apis/abac/v1beta1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/deep_copy_generated.go b/pkg/apis/apps/deep_copy_generated.go index 5a2135c6a9..290c647fad 100644 --- a/pkg/apis/apps/deep_copy_generated.go +++ b/pkg/apis/apps/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/install/install.go b/pkg/apis/apps/install/install.go index b4d9011d37..346740e44a 100644 --- a/pkg/apis/apps/install/install.go +++ b/pkg/apis/apps/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/register.go b/pkg/apis/apps/register.go index dd5b9a900e..90acc12315 100644 --- a/pkg/apis/apps/register.go +++ b/pkg/apis/apps/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/types.generated.go b/pkg/apis/apps/types.generated.go index a084509225..be8a54ad51 100644 --- a/pkg/apis/apps/types.generated.go +++ b/pkg/apis/apps/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/types.go b/pkg/apis/apps/types.go index f140cab96e..c3e28972fe 100644 --- a/pkg/apis/apps/types.go +++ b/pkg/apis/apps/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/v1alpha1/conversion.go b/pkg/apis/apps/v1alpha1/conversion.go index 48f1f2b4d3..b2fb1be72f 100644 --- a/pkg/apis/apps/v1alpha1/conversion.go +++ b/pkg/apis/apps/v1alpha1/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/v1alpha1/conversion_generated.go b/pkg/apis/apps/v1alpha1/conversion_generated.go index cfd6ce44b2..3cf4728102 100644 --- a/pkg/apis/apps/v1alpha1/conversion_generated.go +++ b/pkg/apis/apps/v1alpha1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/v1alpha1/deep_copy_generated.go b/pkg/apis/apps/v1alpha1/deep_copy_generated.go index 6e51cacbc2..0f000c0c1e 100644 --- a/pkg/apis/apps/v1alpha1/deep_copy_generated.go +++ b/pkg/apis/apps/v1alpha1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/v1alpha1/defaults.go b/pkg/apis/apps/v1alpha1/defaults.go index e41028138a..e578e8c947 100644 --- a/pkg/apis/apps/v1alpha1/defaults.go +++ b/pkg/apis/apps/v1alpha1/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/v1alpha1/doc.go b/pkg/apis/apps/v1alpha1/doc.go index 65a03a2093..935d55b742 100644 --- a/pkg/apis/apps/v1alpha1/doc.go +++ b/pkg/apis/apps/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/v1alpha1/generated.pb.go b/pkg/apis/apps/v1alpha1/generated.pb.go index 88f1bcd407..7e76067e41 100644 --- a/pkg/apis/apps/v1alpha1/generated.pb.go +++ b/pkg/apis/apps/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/v1alpha1/generated.proto b/pkg/apis/apps/v1alpha1/generated.proto index 6cb15bf3fe..92bdd6b31c 100644 --- a/pkg/apis/apps/v1alpha1/generated.proto +++ b/pkg/apis/apps/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/v1alpha1/register.go b/pkg/apis/apps/v1alpha1/register.go index 9ab37dfb0d..9fd138c4a2 100644 --- a/pkg/apis/apps/v1alpha1/register.go +++ b/pkg/apis/apps/v1alpha1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/v1alpha1/types.generated.go b/pkg/apis/apps/v1alpha1/types.generated.go index a544c4e6ad..d03639227a 100644 --- a/pkg/apis/apps/v1alpha1/types.generated.go +++ b/pkg/apis/apps/v1alpha1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/v1alpha1/types.go b/pkg/apis/apps/v1alpha1/types.go index 5306483ab4..93a0c66e48 100644 --- a/pkg/apis/apps/v1alpha1/types.go +++ b/pkg/apis/apps/v1alpha1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go b/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go index 6306b48123..5191f1224c 100644 --- a/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go +++ b/pkg/apis/apps/v1alpha1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/validation/validation.go b/pkg/apis/apps/validation/validation.go index acbdfedfe1..5700cf8911 100644 --- a/pkg/apis/apps/validation/validation.go +++ b/pkg/apis/apps/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/apps/validation/validation_test.go b/pkg/apis/apps/validation/validation_test.go index 851ea895fc..0a0e6f9e81 100644 --- a/pkg/apis/apps/validation/validation_test.go +++ b/pkg/apis/apps/validation/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/deep_copy_generated.go b/pkg/apis/authentication.k8s.io/deep_copy_generated.go index 75ac7281ed..e339b4f850 100644 --- a/pkg/apis/authentication.k8s.io/deep_copy_generated.go +++ b/pkg/apis/authentication.k8s.io/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/install/install.go b/pkg/apis/authentication.k8s.io/install/install.go index 29447d2177..e021ea88f6 100644 --- a/pkg/apis/authentication.k8s.io/install/install.go +++ b/pkg/apis/authentication.k8s.io/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/register.go b/pkg/apis/authentication.k8s.io/register.go index 4dda3140fc..57394fcbcc 100644 --- a/pkg/apis/authentication.k8s.io/register.go +++ b/pkg/apis/authentication.k8s.io/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/types.generated.go b/pkg/apis/authentication.k8s.io/types.generated.go index b3b72d653b..b666e8c182 100644 --- a/pkg/apis/authentication.k8s.io/types.generated.go +++ b/pkg/apis/authentication.k8s.io/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/types.go b/pkg/apis/authentication.k8s.io/types.go index 02ec0d2b2b..20eac2bf75 100644 --- a/pkg/apis/authentication.k8s.io/types.go +++ b/pkg/apis/authentication.k8s.io/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/v1beta1/conversion.go b/pkg/apis/authentication.k8s.io/v1beta1/conversion.go index 6a8545d134..e360ee8a20 100644 --- a/pkg/apis/authentication.k8s.io/v1beta1/conversion.go +++ b/pkg/apis/authentication.k8s.io/v1beta1/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/v1beta1/conversion_generated.go b/pkg/apis/authentication.k8s.io/v1beta1/conversion_generated.go index 9972f82ed1..d60db5ed9d 100644 --- a/pkg/apis/authentication.k8s.io/v1beta1/conversion_generated.go +++ b/pkg/apis/authentication.k8s.io/v1beta1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/v1beta1/deep_copy_generated.go b/pkg/apis/authentication.k8s.io/v1beta1/deep_copy_generated.go index e44dfc86bf..f24f3ba859 100644 --- a/pkg/apis/authentication.k8s.io/v1beta1/deep_copy_generated.go +++ b/pkg/apis/authentication.k8s.io/v1beta1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/v1beta1/defaults.go b/pkg/apis/authentication.k8s.io/v1beta1/defaults.go index 0f3732e36d..83794ff7b1 100644 --- a/pkg/apis/authentication.k8s.io/v1beta1/defaults.go +++ b/pkg/apis/authentication.k8s.io/v1beta1/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/v1beta1/doc.go b/pkg/apis/authentication.k8s.io/v1beta1/doc.go index cfdb87c53d..ac2fd00ba9 100644 --- a/pkg/apis/authentication.k8s.io/v1beta1/doc.go +++ b/pkg/apis/authentication.k8s.io/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/v1beta1/register.go b/pkg/apis/authentication.k8s.io/v1beta1/register.go index e183299c0b..511793653a 100644 --- a/pkg/apis/authentication.k8s.io/v1beta1/register.go +++ b/pkg/apis/authentication.k8s.io/v1beta1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/v1beta1/types.generated.go b/pkg/apis/authentication.k8s.io/v1beta1/types.generated.go index 62d287ff57..60eeab9eb2 100644 --- a/pkg/apis/authentication.k8s.io/v1beta1/types.generated.go +++ b/pkg/apis/authentication.k8s.io/v1beta1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authentication.k8s.io/v1beta1/types.go b/pkg/apis/authentication.k8s.io/v1beta1/types.go index fc136877a9..ee3220672b 100644 --- a/pkg/apis/authentication.k8s.io/v1beta1/types.go +++ b/pkg/apis/authentication.k8s.io/v1beta1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/deep_copy_generated.go b/pkg/apis/authorization/deep_copy_generated.go index bc40fb33ea..d6aebc6ca3 100644 --- a/pkg/apis/authorization/deep_copy_generated.go +++ b/pkg/apis/authorization/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/install/install.go b/pkg/apis/authorization/install/install.go index bf8814dd5e..7899815598 100644 --- a/pkg/apis/authorization/install/install.go +++ b/pkg/apis/authorization/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/register.go b/pkg/apis/authorization/register.go index fdb6c4f4bd..b1cfa491bc 100644 --- a/pkg/apis/authorization/register.go +++ b/pkg/apis/authorization/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/types.generated.go b/pkg/apis/authorization/types.generated.go index 1c071376ca..a0811c8a71 100644 --- a/pkg/apis/authorization/types.generated.go +++ b/pkg/apis/authorization/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/types.go b/pkg/apis/authorization/types.go index 8cfdfbe977..afa2c4273c 100644 --- a/pkg/apis/authorization/types.go +++ b/pkg/apis/authorization/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/v1beta1/conversion.go b/pkg/apis/authorization/v1beta1/conversion.go index 0b45ed5fba..cd03e61b07 100644 --- a/pkg/apis/authorization/v1beta1/conversion.go +++ b/pkg/apis/authorization/v1beta1/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/v1beta1/conversion_generated.go b/pkg/apis/authorization/v1beta1/conversion_generated.go index a475c0fd0a..18d11380bf 100644 --- a/pkg/apis/authorization/v1beta1/conversion_generated.go +++ b/pkg/apis/authorization/v1beta1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/v1beta1/deep_copy_generated.go b/pkg/apis/authorization/v1beta1/deep_copy_generated.go index 94a35650cb..59f56c3648 100644 --- a/pkg/apis/authorization/v1beta1/deep_copy_generated.go +++ b/pkg/apis/authorization/v1beta1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/v1beta1/defaults.go b/pkg/apis/authorization/v1beta1/defaults.go index 340f80755a..f9dda995e3 100644 --- a/pkg/apis/authorization/v1beta1/defaults.go +++ b/pkg/apis/authorization/v1beta1/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/v1beta1/doc.go b/pkg/apis/authorization/v1beta1/doc.go index cfdb87c53d..ac2fd00ba9 100644 --- a/pkg/apis/authorization/v1beta1/doc.go +++ b/pkg/apis/authorization/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/v1beta1/register.go b/pkg/apis/authorization/v1beta1/register.go index d9e33ed5a2..fe99bee3fa 100644 --- a/pkg/apis/authorization/v1beta1/register.go +++ b/pkg/apis/authorization/v1beta1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/v1beta1/types.generated.go b/pkg/apis/authorization/v1beta1/types.generated.go index 3b5e4fbe93..0bd74a1bb4 100644 --- a/pkg/apis/authorization/v1beta1/types.generated.go +++ b/pkg/apis/authorization/v1beta1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/v1beta1/types.go b/pkg/apis/authorization/v1beta1/types.go index 27078e9fc0..70c1282a75 100644 --- a/pkg/apis/authorization/v1beta1/types.go +++ b/pkg/apis/authorization/v1beta1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go b/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go index d4c337db79..dc934768d8 100644 --- a/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go +++ b/pkg/apis/authorization/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/validation/validation.go b/pkg/apis/authorization/validation/validation.go index 11a548f416..7565ac4d8c 100644 --- a/pkg/apis/authorization/validation/validation.go +++ b/pkg/apis/authorization/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/authorization/validation/validation_test.go b/pkg/apis/authorization/validation/validation_test.go index c2776c404e..ecc382037e 100644 --- a/pkg/apis/authorization/validation/validation_test.go +++ b/pkg/apis/authorization/validation/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/deep_copy_generated.go b/pkg/apis/autoscaling/deep_copy_generated.go index d78bad7cbc..b3a6987c95 100644 --- a/pkg/apis/autoscaling/deep_copy_generated.go +++ b/pkg/apis/autoscaling/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/install/install.go b/pkg/apis/autoscaling/install/install.go index 6e226a0664..be236ff0e4 100644 --- a/pkg/apis/autoscaling/install/install.go +++ b/pkg/apis/autoscaling/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/register.go b/pkg/apis/autoscaling/register.go index 6a4fb747be..ee0d3c75bd 100644 --- a/pkg/apis/autoscaling/register.go +++ b/pkg/apis/autoscaling/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/types.generated.go b/pkg/apis/autoscaling/types.generated.go index fdd0591900..ded7227842 100644 --- a/pkg/apis/autoscaling/types.generated.go +++ b/pkg/apis/autoscaling/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/types.go b/pkg/apis/autoscaling/types.go index 3e60def923..6accc9fd4b 100644 --- a/pkg/apis/autoscaling/types.go +++ b/pkg/apis/autoscaling/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/v1/conversion_generated.go b/pkg/apis/autoscaling/v1/conversion_generated.go index 11ca6a056d..3d56992838 100644 --- a/pkg/apis/autoscaling/v1/conversion_generated.go +++ b/pkg/apis/autoscaling/v1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/v1/deep_copy_generated.go b/pkg/apis/autoscaling/v1/deep_copy_generated.go index 6932ba6381..ff94c7aa3b 100644 --- a/pkg/apis/autoscaling/v1/deep_copy_generated.go +++ b/pkg/apis/autoscaling/v1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/v1/defaults.go b/pkg/apis/autoscaling/v1/defaults.go index 3fb24c46b7..aacf552fca 100644 --- a/pkg/apis/autoscaling/v1/defaults.go +++ b/pkg/apis/autoscaling/v1/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/v1/doc.go b/pkg/apis/autoscaling/v1/doc.go index 1c67cc3a94..3003013179 100644 --- a/pkg/apis/autoscaling/v1/doc.go +++ b/pkg/apis/autoscaling/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/v1/generated.pb.go b/pkg/apis/autoscaling/v1/generated.pb.go index e90dd5d62c..f44b843b90 100644 --- a/pkg/apis/autoscaling/v1/generated.pb.go +++ b/pkg/apis/autoscaling/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/v1/generated.proto b/pkg/apis/autoscaling/v1/generated.proto index 7905f68a83..7730d6e910 100644 --- a/pkg/apis/autoscaling/v1/generated.proto +++ b/pkg/apis/autoscaling/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/v1/register.go b/pkg/apis/autoscaling/v1/register.go index fed2cdf48c..93d9535e4a 100644 --- a/pkg/apis/autoscaling/v1/register.go +++ b/pkg/apis/autoscaling/v1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/v1/types.generated.go b/pkg/apis/autoscaling/v1/types.generated.go index d8401bb8bc..ab9ebc5120 100644 --- a/pkg/apis/autoscaling/v1/types.generated.go +++ b/pkg/apis/autoscaling/v1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/v1/types.go b/pkg/apis/autoscaling/v1/types.go index 227e25703d..035288cb21 100644 --- a/pkg/apis/autoscaling/v1/types.go +++ b/pkg/apis/autoscaling/v1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go b/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go index 6e63745709..6b9bcf47e8 100644 --- a/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go +++ b/pkg/apis/autoscaling/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/validation/validation.go b/pkg/apis/autoscaling/validation/validation.go index 3432e3cb1c..d7e0e17dec 100644 --- a/pkg/apis/autoscaling/validation/validation.go +++ b/pkg/apis/autoscaling/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/autoscaling/validation/validation_test.go b/pkg/apis/autoscaling/validation/validation_test.go index 06d93c9eaa..bb7fa5fa3a 100644 --- a/pkg/apis/autoscaling/validation/validation_test.go +++ b/pkg/apis/autoscaling/validation/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/deep_copy_generated.go b/pkg/apis/batch/deep_copy_generated.go index 6e08ec4109..c8106aff07 100644 --- a/pkg/apis/batch/deep_copy_generated.go +++ b/pkg/apis/batch/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/install/install.go b/pkg/apis/batch/install/install.go index 9d1a88603b..22f92b708c 100644 --- a/pkg/apis/batch/install/install.go +++ b/pkg/apis/batch/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/register.go b/pkg/apis/batch/register.go index cafa3fd898..641df5f391 100644 --- a/pkg/apis/batch/register.go +++ b/pkg/apis/batch/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/types.generated.go b/pkg/apis/batch/types.generated.go index 14c44a0f82..03f0d248c6 100644 --- a/pkg/apis/batch/types.generated.go +++ b/pkg/apis/batch/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/types.go b/pkg/apis/batch/types.go index 6507c56a67..61a35d47fa 100644 --- a/pkg/apis/batch/types.go +++ b/pkg/apis/batch/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v1/conversion.go b/pkg/apis/batch/v1/conversion.go index 2d163c6e9a..8846af1ed5 100644 --- a/pkg/apis/batch/v1/conversion.go +++ b/pkg/apis/batch/v1/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v1/conversion_generated.go b/pkg/apis/batch/v1/conversion_generated.go index 4bb13c498d..88e6d961ff 100644 --- a/pkg/apis/batch/v1/conversion_generated.go +++ b/pkg/apis/batch/v1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v1/deep_copy_generated.go b/pkg/apis/batch/v1/deep_copy_generated.go index c2a50b4ee1..5374d69144 100644 --- a/pkg/apis/batch/v1/deep_copy_generated.go +++ b/pkg/apis/batch/v1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v1/defaults.go b/pkg/apis/batch/v1/defaults.go index 81aa90c1d0..571d2c524f 100644 --- a/pkg/apis/batch/v1/defaults.go +++ b/pkg/apis/batch/v1/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v1/doc.go b/pkg/apis/batch/v1/doc.go index 1c67cc3a94..3003013179 100644 --- a/pkg/apis/batch/v1/doc.go +++ b/pkg/apis/batch/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v1/generated.pb.go b/pkg/apis/batch/v1/generated.pb.go index 95646919d8..d3649ef667 100644 --- a/pkg/apis/batch/v1/generated.pb.go +++ b/pkg/apis/batch/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v1/generated.proto b/pkg/apis/batch/v1/generated.proto index 5c01754cea..75840ed787 100644 --- a/pkg/apis/batch/v1/generated.proto +++ b/pkg/apis/batch/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v1/register.go b/pkg/apis/batch/v1/register.go index d8c087f1bb..3631c02d12 100644 --- a/pkg/apis/batch/v1/register.go +++ b/pkg/apis/batch/v1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v1/types.generated.go b/pkg/apis/batch/v1/types.generated.go index 58d5f6f54c..a44952c7af 100644 --- a/pkg/apis/batch/v1/types.generated.go +++ b/pkg/apis/batch/v1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v1/types.go b/pkg/apis/batch/v1/types.go index 47ed77524e..a821e93662 100644 --- a/pkg/apis/batch/v1/types.go +++ b/pkg/apis/batch/v1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v1/types_swagger_doc_generated.go b/pkg/apis/batch/v1/types_swagger_doc_generated.go index 3e758b0096..aa0dbcc2fd 100644 --- a/pkg/apis/batch/v1/types_swagger_doc_generated.go +++ b/pkg/apis/batch/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v2alpha1/conversion.go b/pkg/apis/batch/v2alpha1/conversion.go index 4714fda0fb..2d5710a231 100644 --- a/pkg/apis/batch/v2alpha1/conversion.go +++ b/pkg/apis/batch/v2alpha1/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v2alpha1/conversion_generated.go b/pkg/apis/batch/v2alpha1/conversion_generated.go index c411875e37..3265269bdf 100644 --- a/pkg/apis/batch/v2alpha1/conversion_generated.go +++ b/pkg/apis/batch/v2alpha1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v2alpha1/deep_copy_generated.go b/pkg/apis/batch/v2alpha1/deep_copy_generated.go index 92cb71ea08..f33eb9c21b 100644 --- a/pkg/apis/batch/v2alpha1/deep_copy_generated.go +++ b/pkg/apis/batch/v2alpha1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v2alpha1/defaults.go b/pkg/apis/batch/v2alpha1/defaults.go index 72da797c77..a7d24ceac9 100644 --- a/pkg/apis/batch/v2alpha1/defaults.go +++ b/pkg/apis/batch/v2alpha1/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v2alpha1/doc.go b/pkg/apis/batch/v2alpha1/doc.go index 0e6b67b589..d320bc733c 100644 --- a/pkg/apis/batch/v2alpha1/doc.go +++ b/pkg/apis/batch/v2alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v2alpha1/generated.pb.go b/pkg/apis/batch/v2alpha1/generated.pb.go index 17192c01c4..a461a47eb9 100644 --- a/pkg/apis/batch/v2alpha1/generated.pb.go +++ b/pkg/apis/batch/v2alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v2alpha1/generated.proto b/pkg/apis/batch/v2alpha1/generated.proto index 7780bef31f..41e2001770 100644 --- a/pkg/apis/batch/v2alpha1/generated.proto +++ b/pkg/apis/batch/v2alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v2alpha1/register.go b/pkg/apis/batch/v2alpha1/register.go index 00142f018a..54f0d6290a 100644 --- a/pkg/apis/batch/v2alpha1/register.go +++ b/pkg/apis/batch/v2alpha1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v2alpha1/types.generated.go b/pkg/apis/batch/v2alpha1/types.generated.go index 341d1d217a..bd48550ca7 100644 --- a/pkg/apis/batch/v2alpha1/types.generated.go +++ b/pkg/apis/batch/v2alpha1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v2alpha1/types.go b/pkg/apis/batch/v2alpha1/types.go index 4575bc804b..0402df2e81 100644 --- a/pkg/apis/batch/v2alpha1/types.go +++ b/pkg/apis/batch/v2alpha1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go b/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go index 7f0e3b1997..17d43318df 100644 --- a/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go +++ b/pkg/apis/batch/v2alpha1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/validation/validation.go b/pkg/apis/batch/validation/validation.go index e592ca18dc..7139ac75f2 100644 --- a/pkg/apis/batch/validation/validation.go +++ b/pkg/apis/batch/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/batch/validation/validation_test.go b/pkg/apis/batch/validation/validation_test.go index fa91ae1ec5..e71b6f1517 100644 --- a/pkg/apis/batch/validation/validation_test.go +++ b/pkg/apis/batch/validation/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/deep_copy_generated.go b/pkg/apis/certificates/deep_copy_generated.go index e60053ad69..51f1323f73 100644 --- a/pkg/apis/certificates/deep_copy_generated.go +++ b/pkg/apis/certificates/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/install/install.go b/pkg/apis/certificates/install/install.go index f77e94902b..cf54da430e 100644 --- a/pkg/apis/certificates/install/install.go +++ b/pkg/apis/certificates/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/install/install_test.go b/pkg/apis/certificates/install/install_test.go index 894d7e196d..ca7cc686d1 100644 --- a/pkg/apis/certificates/install/install_test.go +++ b/pkg/apis/certificates/install/install_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/register.go b/pkg/apis/certificates/register.go index 02b095d098..d232b3c861 100644 --- a/pkg/apis/certificates/register.go +++ b/pkg/apis/certificates/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/types.generated.go b/pkg/apis/certificates/types.generated.go index 1dcd4360aa..21798df3c3 100644 --- a/pkg/apis/certificates/types.generated.go +++ b/pkg/apis/certificates/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/types.go b/pkg/apis/certificates/types.go index 0848d95e8e..46c41e392b 100644 --- a/pkg/apis/certificates/types.go +++ b/pkg/apis/certificates/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/v1alpha1/conversion.go b/pkg/apis/certificates/v1alpha1/conversion.go index 7570a9fbd1..0b933b2599 100644 --- a/pkg/apis/certificates/v1alpha1/conversion.go +++ b/pkg/apis/certificates/v1alpha1/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/v1alpha1/conversion_generated.go b/pkg/apis/certificates/v1alpha1/conversion_generated.go index 516d54ea95..454a98bf3b 100644 --- a/pkg/apis/certificates/v1alpha1/conversion_generated.go +++ b/pkg/apis/certificates/v1alpha1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/v1alpha1/deep_copy_generated.go b/pkg/apis/certificates/v1alpha1/deep_copy_generated.go index decc6dbcce..6a3e80a0b9 100644 --- a/pkg/apis/certificates/v1alpha1/deep_copy_generated.go +++ b/pkg/apis/certificates/v1alpha1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/v1alpha1/doc.go b/pkg/apis/certificates/v1alpha1/doc.go index 65a03a2093..935d55b742 100644 --- a/pkg/apis/certificates/v1alpha1/doc.go +++ b/pkg/apis/certificates/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/v1alpha1/generated.pb.go b/pkg/apis/certificates/v1alpha1/generated.pb.go index 7f07661200..174d7ef0c8 100644 --- a/pkg/apis/certificates/v1alpha1/generated.pb.go +++ b/pkg/apis/certificates/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/v1alpha1/generated.proto b/pkg/apis/certificates/v1alpha1/generated.proto index 6637629b30..450b374a19 100644 --- a/pkg/apis/certificates/v1alpha1/generated.proto +++ b/pkg/apis/certificates/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/v1alpha1/register.go b/pkg/apis/certificates/v1alpha1/register.go index 2373745296..7b841c0b54 100644 --- a/pkg/apis/certificates/v1alpha1/register.go +++ b/pkg/apis/certificates/v1alpha1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/v1alpha1/types.generated.go b/pkg/apis/certificates/v1alpha1/types.generated.go index a4bffad545..74d67657f7 100644 --- a/pkg/apis/certificates/v1alpha1/types.generated.go +++ b/pkg/apis/certificates/v1alpha1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/v1alpha1/types.go b/pkg/apis/certificates/v1alpha1/types.go index 5fc438d27f..85969cfc40 100644 --- a/pkg/apis/certificates/v1alpha1/types.go +++ b/pkg/apis/certificates/v1alpha1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go b/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go index 8362d6a80a..47b3b2821f 100644 --- a/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go +++ b/pkg/apis/certificates/v1alpha1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/certificates/validation/validation.go b/pkg/apis/certificates/validation/validation.go index 5779349b57..b625738448 100644 --- a/pkg/apis/certificates/validation/validation.go +++ b/pkg/apis/certificates/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/deep_copy_generated.go b/pkg/apis/componentconfig/deep_copy_generated.go index e4f82bcb2a..9c4259a8dd 100644 --- a/pkg/apis/componentconfig/deep_copy_generated.go +++ b/pkg/apis/componentconfig/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/helpers.go b/pkg/apis/componentconfig/helpers.go index edd9c79759..43b625b7ec 100644 --- a/pkg/apis/componentconfig/helpers.go +++ b/pkg/apis/componentconfig/helpers.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/helpers_test.go b/pkg/apis/componentconfig/helpers_test.go index 7aece8257f..12a8c6a8ce 100644 --- a/pkg/apis/componentconfig/helpers_test.go +++ b/pkg/apis/componentconfig/helpers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/install/install.go b/pkg/apis/componentconfig/install/install.go index ec55542737..1a8b0cd126 100644 --- a/pkg/apis/componentconfig/install/install.go +++ b/pkg/apis/componentconfig/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/install/install_test.go b/pkg/apis/componentconfig/install/install_test.go index 940e175673..e1b773ceac 100644 --- a/pkg/apis/componentconfig/install/install_test.go +++ b/pkg/apis/componentconfig/install/install_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/register.go b/pkg/apis/componentconfig/register.go index 0666c54317..599a44eb1f 100644 --- a/pkg/apis/componentconfig/register.go +++ b/pkg/apis/componentconfig/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/types.generated.go b/pkg/apis/componentconfig/types.generated.go index d821232e4a..c9fd4848f0 100644 --- a/pkg/apis/componentconfig/types.generated.go +++ b/pkg/apis/componentconfig/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/types.go b/pkg/apis/componentconfig/types.go index 0c7dfc9a33..97e9233372 100644 --- a/pkg/apis/componentconfig/types.go +++ b/pkg/apis/componentconfig/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/v1alpha1/conversion_generated.go b/pkg/apis/componentconfig/v1alpha1/conversion_generated.go index fd607760bf..160b0f9183 100644 --- a/pkg/apis/componentconfig/v1alpha1/conversion_generated.go +++ b/pkg/apis/componentconfig/v1alpha1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go b/pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go index f4f9fc9322..69904b5e9b 100644 --- a/pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go +++ b/pkg/apis/componentconfig/v1alpha1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/v1alpha1/defaults.go b/pkg/apis/componentconfig/v1alpha1/defaults.go index bab6bb3e32..b40b3e4636 100644 --- a/pkg/apis/componentconfig/v1alpha1/defaults.go +++ b/pkg/apis/componentconfig/v1alpha1/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/v1alpha1/doc.go b/pkg/apis/componentconfig/v1alpha1/doc.go index 65a03a2093..935d55b742 100644 --- a/pkg/apis/componentconfig/v1alpha1/doc.go +++ b/pkg/apis/componentconfig/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/v1alpha1/register.go b/pkg/apis/componentconfig/v1alpha1/register.go index d74effb7d1..17fb52a10f 100644 --- a/pkg/apis/componentconfig/v1alpha1/register.go +++ b/pkg/apis/componentconfig/v1alpha1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/componentconfig/v1alpha1/types.go b/pkg/apis/componentconfig/v1alpha1/types.go index 2ae65d87da..817468a70c 100644 --- a/pkg/apis/componentconfig/v1alpha1/types.go +++ b/pkg/apis/componentconfig/v1alpha1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/deep_copy_generated.go b/pkg/apis/extensions/deep_copy_generated.go index 118d478c28..39f6ac1055 100644 --- a/pkg/apis/extensions/deep_copy_generated.go +++ b/pkg/apis/extensions/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/install/install.go b/pkg/apis/extensions/install/install.go index 449127084b..1279dfb1f7 100644 --- a/pkg/apis/extensions/install/install.go +++ b/pkg/apis/extensions/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/install/install_test.go b/pkg/apis/extensions/install/install_test.go index 3252462a1d..383ddb8761 100644 --- a/pkg/apis/extensions/install/install_test.go +++ b/pkg/apis/extensions/install/install_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/register.go b/pkg/apis/extensions/register.go index 1c5f6ba105..48ba33d466 100644 --- a/pkg/apis/extensions/register.go +++ b/pkg/apis/extensions/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/types.generated.go b/pkg/apis/extensions/types.generated.go index eec90fb0a2..fd982347ae 100644 --- a/pkg/apis/extensions/types.generated.go +++ b/pkg/apis/extensions/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/types.go b/pkg/apis/extensions/types.go index 383719ca9a..8dc3a9047c 100644 --- a/pkg/apis/extensions/types.go +++ b/pkg/apis/extensions/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/conversion.go b/pkg/apis/extensions/v1beta1/conversion.go index ad5c91c90e..d685ebfee5 100644 --- a/pkg/apis/extensions/v1beta1/conversion.go +++ b/pkg/apis/extensions/v1beta1/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/conversion_generated.go b/pkg/apis/extensions/v1beta1/conversion_generated.go index 445394f16a..727b26e886 100644 --- a/pkg/apis/extensions/v1beta1/conversion_generated.go +++ b/pkg/apis/extensions/v1beta1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/conversion_test.go b/pkg/apis/extensions/v1beta1/conversion_test.go index 759e38ca10..5fab6b2f46 100644 --- a/pkg/apis/extensions/v1beta1/conversion_test.go +++ b/pkg/apis/extensions/v1beta1/conversion_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/deep_copy_generated.go b/pkg/apis/extensions/v1beta1/deep_copy_generated.go index 32debd197f..d2a9727c44 100644 --- a/pkg/apis/extensions/v1beta1/deep_copy_generated.go +++ b/pkg/apis/extensions/v1beta1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/defaults.go b/pkg/apis/extensions/v1beta1/defaults.go index 71e55a467a..ab6a202c37 100644 --- a/pkg/apis/extensions/v1beta1/defaults.go +++ b/pkg/apis/extensions/v1beta1/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/defaults_test.go b/pkg/apis/extensions/v1beta1/defaults_test.go index 6fce3d5efb..092cbe4b2e 100644 --- a/pkg/apis/extensions/v1beta1/defaults_test.go +++ b/pkg/apis/extensions/v1beta1/defaults_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/doc.go b/pkg/apis/extensions/v1beta1/doc.go index cfdb87c53d..ac2fd00ba9 100644 --- a/pkg/apis/extensions/v1beta1/doc.go +++ b/pkg/apis/extensions/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/generated.pb.go b/pkg/apis/extensions/v1beta1/generated.pb.go index 3120ce17ff..b585533207 100644 --- a/pkg/apis/extensions/v1beta1/generated.pb.go +++ b/pkg/apis/extensions/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/generated.proto b/pkg/apis/extensions/v1beta1/generated.proto index 2b639a9c73..46df0d6be0 100644 --- a/pkg/apis/extensions/v1beta1/generated.proto +++ b/pkg/apis/extensions/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/register.go b/pkg/apis/extensions/v1beta1/register.go index e8bbf28b10..91c1c48687 100644 --- a/pkg/apis/extensions/v1beta1/register.go +++ b/pkg/apis/extensions/v1beta1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/types.generated.go b/pkg/apis/extensions/v1beta1/types.generated.go index cbe82eff31..a0220de07c 100644 --- a/pkg/apis/extensions/v1beta1/types.generated.go +++ b/pkg/apis/extensions/v1beta1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/types.go b/pkg/apis/extensions/v1beta1/types.go index c9e6167b02..9990113384 100644 --- a/pkg/apis/extensions/v1beta1/types.go +++ b/pkg/apis/extensions/v1beta1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go b/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go index f8503f8db4..182ff78c62 100644 --- a/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go +++ b/pkg/apis/extensions/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/validation/validation.go b/pkg/apis/extensions/validation/validation.go index 564ff6e413..c061a03f39 100644 --- a/pkg/apis/extensions/validation/validation.go +++ b/pkg/apis/extensions/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/extensions/validation/validation_test.go b/pkg/apis/extensions/validation/validation_test.go index 7c7fa3c31f..8c0cc83865 100644 --- a/pkg/apis/extensions/validation/validation_test.go +++ b/pkg/apis/extensions/validation/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/deep_copy_generated.go b/pkg/apis/policy/deep_copy_generated.go index 390e4b4a7b..ab83ab89d6 100644 --- a/pkg/apis/policy/deep_copy_generated.go +++ b/pkg/apis/policy/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/install/install.go b/pkg/apis/policy/install/install.go index 7882a0c531..90489a7441 100644 --- a/pkg/apis/policy/install/install.go +++ b/pkg/apis/policy/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/register.go b/pkg/apis/policy/register.go index 76ea1a5524..e61c82b287 100644 --- a/pkg/apis/policy/register.go +++ b/pkg/apis/policy/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/types.generated.go b/pkg/apis/policy/types.generated.go index 08be370f15..06652687a2 100644 --- a/pkg/apis/policy/types.generated.go +++ b/pkg/apis/policy/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/types.go b/pkg/apis/policy/types.go index 2ecf41bcff..9b20699bd2 100644 --- a/pkg/apis/policy/types.go +++ b/pkg/apis/policy/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/v1alpha1/conversion_generated.go b/pkg/apis/policy/v1alpha1/conversion_generated.go index 23aaa9a378..c524ca24a3 100644 --- a/pkg/apis/policy/v1alpha1/conversion_generated.go +++ b/pkg/apis/policy/v1alpha1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/v1alpha1/deep_copy_generated.go b/pkg/apis/policy/v1alpha1/deep_copy_generated.go index 74680aff84..e284bd31bc 100644 --- a/pkg/apis/policy/v1alpha1/deep_copy_generated.go +++ b/pkg/apis/policy/v1alpha1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/v1alpha1/doc.go b/pkg/apis/policy/v1alpha1/doc.go index 5cb716c299..67857651c4 100644 --- a/pkg/apis/policy/v1alpha1/doc.go +++ b/pkg/apis/policy/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/v1alpha1/generated.pb.go b/pkg/apis/policy/v1alpha1/generated.pb.go index 867a6b0a6d..7a4c999011 100644 --- a/pkg/apis/policy/v1alpha1/generated.pb.go +++ b/pkg/apis/policy/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/v1alpha1/generated.proto b/pkg/apis/policy/v1alpha1/generated.proto index 866d0ae578..d04a0af8cd 100644 --- a/pkg/apis/policy/v1alpha1/generated.proto +++ b/pkg/apis/policy/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/v1alpha1/register.go b/pkg/apis/policy/v1alpha1/register.go index a6a94d96d0..6a82e3f9ce 100644 --- a/pkg/apis/policy/v1alpha1/register.go +++ b/pkg/apis/policy/v1alpha1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/v1alpha1/types.generated.go b/pkg/apis/policy/v1alpha1/types.generated.go index 7ed4308bcc..6592c9c311 100644 --- a/pkg/apis/policy/v1alpha1/types.generated.go +++ b/pkg/apis/policy/v1alpha1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/v1alpha1/types.go b/pkg/apis/policy/v1alpha1/types.go index 1f3265ae27..09d62285c7 100644 --- a/pkg/apis/policy/v1alpha1/types.go +++ b/pkg/apis/policy/v1alpha1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go b/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go index 8ca1782f4f..b12ce0fd26 100644 --- a/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go +++ b/pkg/apis/policy/v1alpha1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/validation/validation.go b/pkg/apis/policy/validation/validation.go index 6d40450ba8..e11498e707 100644 --- a/pkg/apis/policy/validation/validation.go +++ b/pkg/apis/policy/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/policy/validation/validation_test.go b/pkg/apis/policy/validation/validation_test.go index 9b07371564..cb998f3638 100644 --- a/pkg/apis/policy/validation/validation_test.go +++ b/pkg/apis/policy/validation/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/deep_copy_generated.go b/pkg/apis/rbac/deep_copy_generated.go index 5e9339a989..6c2bb5716e 100644 --- a/pkg/apis/rbac/deep_copy_generated.go +++ b/pkg/apis/rbac/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/doc.go b/pkg/apis/rbac/doc.go index 15f91da2c3..c5f057484c 100644 --- a/pkg/apis/rbac/doc.go +++ b/pkg/apis/rbac/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/install/install.go b/pkg/apis/rbac/install/install.go index 8cac247f4c..0f6dc91b9b 100644 --- a/pkg/apis/rbac/install/install.go +++ b/pkg/apis/rbac/install/install.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/install/install_test.go b/pkg/apis/rbac/install/install_test.go index 4f80a090dc..f704ff702b 100644 --- a/pkg/apis/rbac/install/install_test.go +++ b/pkg/apis/rbac/install/install_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/register.go b/pkg/apis/rbac/register.go index 58464d74d7..5d89656e5a 100644 --- a/pkg/apis/rbac/register.go +++ b/pkg/apis/rbac/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/types.go b/pkg/apis/rbac/types.go index a35eb7db95..361c936151 100644 --- a/pkg/apis/rbac/types.go +++ b/pkg/apis/rbac/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/v1alpha1/conversion_generated.go b/pkg/apis/rbac/v1alpha1/conversion_generated.go index f176aa0906..5588146771 100644 --- a/pkg/apis/rbac/v1alpha1/conversion_generated.go +++ b/pkg/apis/rbac/v1alpha1/conversion_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/v1alpha1/deep_copy_generated.go b/pkg/apis/rbac/v1alpha1/deep_copy_generated.go index f898a434ba..8b46841482 100644 --- a/pkg/apis/rbac/v1alpha1/deep_copy_generated.go +++ b/pkg/apis/rbac/v1alpha1/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/v1alpha1/doc.go b/pkg/apis/rbac/v1alpha1/doc.go index 6873ebb101..84205537df 100644 --- a/pkg/apis/rbac/v1alpha1/doc.go +++ b/pkg/apis/rbac/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/v1alpha1/generated.pb.go b/pkg/apis/rbac/v1alpha1/generated.pb.go index 54b03ed15d..fb917c356d 100644 --- a/pkg/apis/rbac/v1alpha1/generated.pb.go +++ b/pkg/apis/rbac/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/v1alpha1/generated.proto b/pkg/apis/rbac/v1alpha1/generated.proto index 15c63b2f51..062f815b81 100644 --- a/pkg/apis/rbac/v1alpha1/generated.proto +++ b/pkg/apis/rbac/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/v1alpha1/register.go b/pkg/apis/rbac/v1alpha1/register.go index eadcb4fbda..cff47206bb 100644 --- a/pkg/apis/rbac/v1alpha1/register.go +++ b/pkg/apis/rbac/v1alpha1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/v1alpha1/types.generated.go b/pkg/apis/rbac/v1alpha1/types.generated.go index 58965dec0f..bf7b3db2bf 100644 --- a/pkg/apis/rbac/v1alpha1/types.generated.go +++ b/pkg/apis/rbac/v1alpha1/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/v1alpha1/types.go b/pkg/apis/rbac/v1alpha1/types.go index 52eacfe3fc..e05c78998d 100644 --- a/pkg/apis/rbac/v1alpha1/types.go +++ b/pkg/apis/rbac/v1alpha1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go b/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go index b88c93c034..f1c6fdbdf6 100644 --- a/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go +++ b/pkg/apis/rbac/v1alpha1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/validation/cast.go b/pkg/apis/rbac/validation/cast.go index 1f5e83fdcb..77edea1a0f 100644 --- a/pkg/apis/rbac/validation/cast.go +++ b/pkg/apis/rbac/validation/cast.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/validation/policy_comparator.go b/pkg/apis/rbac/validation/policy_comparator.go index 1e5e74faa1..be9318d4d5 100644 --- a/pkg/apis/rbac/validation/policy_comparator.go +++ b/pkg/apis/rbac/validation/policy_comparator.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/validation/policy_comparator_test.go b/pkg/apis/rbac/validation/policy_comparator_test.go index da2f910a4e..4de7fb869a 100644 --- a/pkg/apis/rbac/validation/policy_comparator_test.go +++ b/pkg/apis/rbac/validation/policy_comparator_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/validation/rulevalidation.go b/pkg/apis/rbac/validation/rulevalidation.go index 3002f98842..c70ec8d80d 100644 --- a/pkg/apis/rbac/validation/rulevalidation.go +++ b/pkg/apis/rbac/validation/rulevalidation.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/validation/rulevalidation_test.go b/pkg/apis/rbac/validation/rulevalidation_test.go index 747ae0487e..bf5c185654 100644 --- a/pkg/apis/rbac/validation/rulevalidation_test.go +++ b/pkg/apis/rbac/validation/rulevalidation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/validation/validation.go b/pkg/apis/rbac/validation/validation.go index c43f733037..574a7b6ded 100644 --- a/pkg/apis/rbac/validation/validation.go +++ b/pkg/apis/rbac/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apis/rbac/validation/validation_test.go b/pkg/apis/rbac/validation/validation_test.go index 9a62f3bfb5..599bf9cef7 100644 --- a/pkg/apis/rbac/validation/validation_test.go +++ b/pkg/apis/rbac/validation/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/api_installer.go b/pkg/apiserver/api_installer.go index 30690dd7c0..49be3ca3fa 100644 --- a/pkg/apiserver/api_installer.go +++ b/pkg/apiserver/api_installer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/api_installer_test.go b/pkg/apiserver/api_installer_test.go index 3d5f2b869a..249cd34293 100644 --- a/pkg/apiserver/api_installer_test.go +++ b/pkg/apiserver/api_installer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/apiserver.go b/pkg/apiserver/apiserver.go index 9a72bad6b0..558a627b1f 100644 --- a/pkg/apiserver/apiserver.go +++ b/pkg/apiserver/apiserver.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/apiserver_test.go b/pkg/apiserver/apiserver_test.go index 649cdd7eef..835ae380b3 100644 --- a/pkg/apiserver/apiserver_test.go +++ b/pkg/apiserver/apiserver_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/authenticator/authn.go b/pkg/apiserver/authenticator/authn.go index 56dfcf8ad1..aed4efdf8c 100644 --- a/pkg/apiserver/authenticator/authn.go +++ b/pkg/apiserver/authenticator/authn.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/authz.go b/pkg/apiserver/authz.go index 2e7013df1b..e9deaad529 100644 --- a/pkg/apiserver/authz.go +++ b/pkg/apiserver/authz.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/authz_test.go b/pkg/apiserver/authz_test.go index 5ea6045a70..1c474363d9 100644 --- a/pkg/apiserver/authz_test.go +++ b/pkg/apiserver/authz_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/doc.go b/pkg/apiserver/doc.go index 7a919d2ca6..df1224d971 100644 --- a/pkg/apiserver/doc.go +++ b/pkg/apiserver/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/errors.go b/pkg/apiserver/errors.go index 4f9d16a268..9f10c5c9cf 100644 --- a/pkg/apiserver/errors.go +++ b/pkg/apiserver/errors.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/errors_test.go b/pkg/apiserver/errors_test.go index 0b83f4122c..d6efb4fa08 100644 --- a/pkg/apiserver/errors_test.go +++ b/pkg/apiserver/errors_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/handlers.go b/pkg/apiserver/handlers.go index 64c8397467..9520dfe2a9 100644 --- a/pkg/apiserver/handlers.go +++ b/pkg/apiserver/handlers.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/handlers_test.go b/pkg/apiserver/handlers_test.go index 1cfc032520..e1278c27e6 100644 --- a/pkg/apiserver/handlers_test.go +++ b/pkg/apiserver/handlers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/index.go b/pkg/apiserver/index.go index c01174d75d..eaeeb92e41 100644 --- a/pkg/apiserver/index.go +++ b/pkg/apiserver/index.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/metrics/metrics.go b/pkg/apiserver/metrics/metrics.go index dc7fe7009a..15c5173078 100644 --- a/pkg/apiserver/metrics/metrics.go +++ b/pkg/apiserver/metrics/metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/mux_helper.go b/pkg/apiserver/mux_helper.go index 48953321c1..d8e2388f53 100644 --- a/pkg/apiserver/mux_helper.go +++ b/pkg/apiserver/mux_helper.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/negotiate.go b/pkg/apiserver/negotiate.go index a9fedfc9af..f51e68ad27 100644 --- a/pkg/apiserver/negotiate.go +++ b/pkg/apiserver/negotiate.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/negotiate_test.go b/pkg/apiserver/negotiate_test.go index 87ad1a7eee..1735f3eebd 100644 --- a/pkg/apiserver/negotiate_test.go +++ b/pkg/apiserver/negotiate_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/proxy.go b/pkg/apiserver/proxy.go index 4b3d00d77d..403d219ee9 100644 --- a/pkg/apiserver/proxy.go +++ b/pkg/apiserver/proxy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/proxy_test.go b/pkg/apiserver/proxy_test.go index b8a0a09153..157025320c 100644 --- a/pkg/apiserver/proxy_test.go +++ b/pkg/apiserver/proxy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/resthandler.go b/pkg/apiserver/resthandler.go index c591837356..7cbb05a21f 100644 --- a/pkg/apiserver/resthandler.go +++ b/pkg/apiserver/resthandler.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/resthandler_test.go b/pkg/apiserver/resthandler_test.go index ffb7349c5c..5726fc7047 100644 --- a/pkg/apiserver/resthandler_test.go +++ b/pkg/apiserver/resthandler_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/testing/types.generated.go b/pkg/apiserver/testing/types.generated.go index b14fa3dfd3..e28d362634 100644 --- a/pkg/apiserver/testing/types.generated.go +++ b/pkg/apiserver/testing/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/testing/types.go b/pkg/apiserver/testing/types.go index c6a3df3cdd..096846c3ab 100644 --- a/pkg/apiserver/testing/types.go +++ b/pkg/apiserver/testing/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/validator.go b/pkg/apiserver/validator.go index 05fa79bf2f..7e155013fa 100644 --- a/pkg/apiserver/validator.go +++ b/pkg/apiserver/validator.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/validator_test.go b/pkg/apiserver/validator_test.go index f02c16300c..d44d50885d 100644 --- a/pkg/apiserver/validator_test.go +++ b/pkg/apiserver/validator_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/watch.go b/pkg/apiserver/watch.go index 220074edf2..feaac392d3 100644 --- a/pkg/apiserver/watch.go +++ b/pkg/apiserver/watch.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/apiserver/watch_test.go b/pkg/apiserver/watch_test.go index 8386008c85..d54f6b8fbd 100644 --- a/pkg/apiserver/watch_test.go +++ b/pkg/apiserver/watch_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/auth/authenticator/bearertoken/bearertoken.go b/pkg/auth/authenticator/bearertoken/bearertoken.go index eff338bfba..35f523d682 100644 --- a/pkg/auth/authenticator/bearertoken/bearertoken.go +++ b/pkg/auth/authenticator/bearertoken/bearertoken.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/auth/authenticator/bearertoken/bearertoken_test.go b/pkg/auth/authenticator/bearertoken/bearertoken_test.go index 6b9f676621..0a90df2611 100644 --- a/pkg/auth/authenticator/bearertoken/bearertoken_test.go +++ b/pkg/auth/authenticator/bearertoken/bearertoken_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/auth/authenticator/interfaces.go b/pkg/auth/authenticator/interfaces.go index 2da820cc08..1eafe605c6 100644 --- a/pkg/auth/authenticator/interfaces.go +++ b/pkg/auth/authenticator/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/auth/authorizer/abac/abac.go b/pkg/auth/authorizer/abac/abac.go index c3bfedcc4d..ebd53ae46b 100644 --- a/pkg/auth/authorizer/abac/abac.go +++ b/pkg/auth/authorizer/abac/abac.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/auth/authorizer/abac/abac_test.go b/pkg/auth/authorizer/abac/abac_test.go index 8b4e3b75ba..4a56b8dc39 100644 --- a/pkg/auth/authorizer/abac/abac_test.go +++ b/pkg/auth/authorizer/abac/abac_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/auth/authorizer/interfaces.go b/pkg/auth/authorizer/interfaces.go index d4f02efbd4..0b7bdc0e1b 100644 --- a/pkg/auth/authorizer/interfaces.go +++ b/pkg/auth/authorizer/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/auth/authorizer/union/union.go b/pkg/auth/authorizer/union/union.go index 255ad0823a..7adbaa512b 100644 --- a/pkg/auth/authorizer/union/union.go +++ b/pkg/auth/authorizer/union/union.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/auth/authorizer/union/union_test.go b/pkg/auth/authorizer/union/union_test.go index 1a01676af6..32bfbcd5a3 100644 --- a/pkg/auth/authorizer/union/union_test.go +++ b/pkg/auth/authorizer/union/union_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/auth/handlers/handlers.go b/pkg/auth/handlers/handlers.go index d005752f16..0f6e226e9c 100644 --- a/pkg/auth/handlers/handlers.go +++ b/pkg/auth/handlers/handlers.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/auth/handlers/handlers_test.go b/pkg/auth/handlers/handlers_test.go index 6ad0e67b59..1118081207 100644 --- a/pkg/auth/handlers/handlers_test.go +++ b/pkg/auth/handlers/handlers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/auth/user/doc.go b/pkg/auth/user/doc.go index b11258494e..570c51ae99 100644 --- a/pkg/auth/user/doc.go +++ b/pkg/auth/user/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/auth/user/user.go b/pkg/auth/user/user.go index c4a4c00d5b..99261965d8 100644 --- a/pkg/auth/user/user.go +++ b/pkg/auth/user/user.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/capabilities/capabilities.go b/pkg/capabilities/capabilities.go index d0a882c547..5c252ec585 100644 --- a/pkg/capabilities/capabilities.go +++ b/pkg/capabilities/capabilities.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/capabilities/doc.go b/pkg/capabilities/doc.go index 81143a78e1..b7fa14baad 100644 --- a/pkg/capabilities/doc.go +++ b/pkg/capabilities/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/delta_fifo.go b/pkg/client/cache/delta_fifo.go index 3cb077faf7..5872ad3081 100644 --- a/pkg/client/cache/delta_fifo.go +++ b/pkg/client/cache/delta_fifo.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/delta_fifo_test.go b/pkg/client/cache/delta_fifo_test.go index fb6e2a4a67..d3dd1ddbfa 100644 --- a/pkg/client/cache/delta_fifo_test.go +++ b/pkg/client/cache/delta_fifo_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/doc.go b/pkg/client/cache/doc.go index 16600cf242..4f593f0d3d 100644 --- a/pkg/client/cache/doc.go +++ b/pkg/client/cache/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/expiration_cache.go b/pkg/client/cache/expiration_cache.go index ad8684e8c3..8c5c4709d7 100644 --- a/pkg/client/cache/expiration_cache.go +++ b/pkg/client/cache/expiration_cache.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/expiration_cache_fakes.go b/pkg/client/cache/expiration_cache_fakes.go index 3b95977050..eb1d5353af 100644 --- a/pkg/client/cache/expiration_cache_fakes.go +++ b/pkg/client/cache/expiration_cache_fakes.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/expiration_cache_test.go b/pkg/client/cache/expiration_cache_test.go index 04a05786f8..4667d8777a 100644 --- a/pkg/client/cache/expiration_cache_test.go +++ b/pkg/client/cache/expiration_cache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/fake_custom_store.go b/pkg/client/cache/fake_custom_store.go index ccd69ef7bf..8d71c24749 100644 --- a/pkg/client/cache/fake_custom_store.go +++ b/pkg/client/cache/fake_custom_store.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/fifo.go b/pkg/client/cache/fifo.go index eaa35e62cb..50c7b22843 100644 --- a/pkg/client/cache/fifo.go +++ b/pkg/client/cache/fifo.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/fifo_test.go b/pkg/client/cache/fifo_test.go index 0f2ceb8eaa..14077dbe75 100644 --- a/pkg/client/cache/fifo_test.go +++ b/pkg/client/cache/fifo_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/index.go b/pkg/client/cache/index.go index 572f2c06b6..437988050a 100644 --- a/pkg/client/cache/index.go +++ b/pkg/client/cache/index.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/index_test.go b/pkg/client/cache/index_test.go index 4b0d5ff4f9..f36df387fd 100644 --- a/pkg/client/cache/index_test.go +++ b/pkg/client/cache/index_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/listers.go b/pkg/client/cache/listers.go index 90c9c62f9b..67d11232a6 100644 --- a/pkg/client/cache/listers.go +++ b/pkg/client/cache/listers.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/listers_test.go b/pkg/client/cache/listers_test.go index 30a60d5d4c..2a01eab070 100644 --- a/pkg/client/cache/listers_test.go +++ b/pkg/client/cache/listers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/listwatch.go b/pkg/client/cache/listwatch.go index 06c2f611bf..ff56c0b7bf 100644 --- a/pkg/client/cache/listwatch.go +++ b/pkg/client/cache/listwatch.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/listwatch_test.go b/pkg/client/cache/listwatch_test.go index ddd58cf747..41f501d542 100644 --- a/pkg/client/cache/listwatch_test.go +++ b/pkg/client/cache/listwatch_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/reflector.go b/pkg/client/cache/reflector.go index 3a5025a28a..e1af63e05c 100644 --- a/pkg/client/cache/reflector.go +++ b/pkg/client/cache/reflector.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/reflector_test.go b/pkg/client/cache/reflector_test.go index f560e449ca..a9a079608a 100644 --- a/pkg/client/cache/reflector_test.go +++ b/pkg/client/cache/reflector_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/store.go b/pkg/client/cache/store.go index 71115f2ce5..d17f0cd538 100644 --- a/pkg/client/cache/store.go +++ b/pkg/client/cache/store.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/store_test.go b/pkg/client/cache/store_test.go index 07275f493d..55da67105a 100644 --- a/pkg/client/cache/store_test.go +++ b/pkg/client/cache/store_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/thread_safe_store.go b/pkg/client/cache/thread_safe_store.go index e6a0eea336..9d88ce33df 100644 --- a/pkg/client/cache/thread_safe_store.go +++ b/pkg/client/cache/thread_safe_store.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/undelta_store.go b/pkg/client/cache/undelta_store.go index 4a8a4500e3..117df46c48 100644 --- a/pkg/client/cache/undelta_store.go +++ b/pkg/client/cache/undelta_store.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/cache/undelta_store_test.go b/pkg/client/cache/undelta_store_test.go index c14b7a8008..6316442e68 100644 --- a/pkg/client/cache/undelta_store_test.go +++ b/pkg/client/cache/undelta_store_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/chaosclient/chaosclient.go b/pkg/client/chaosclient/chaosclient.go index a0ed4b4c15..18fc9bbc33 100644 --- a/pkg/client/chaosclient/chaosclient.go +++ b/pkg/client/chaosclient/chaosclient.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/chaosclient/chaosclient_test.go b/pkg/client/chaosclient/chaosclient_test.go index 0c76736cfc..38286b3441 100644 --- a/pkg/client/chaosclient/chaosclient_test.go +++ b/pkg/client/chaosclient/chaosclient_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/clientset.go b/pkg/client/clientset_generated/internalclientset/clientset.go index b9ba3cc2af..010dd53036 100644 --- a/pkg/client/clientset_generated/internalclientset/clientset.go +++ b/pkg/client/clientset_generated/internalclientset/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/doc.go b/pkg/client/clientset_generated/internalclientset/doc.go index 3934caa42c..cf081af2ca 100644 --- a/pkg/client/clientset_generated/internalclientset/doc.go +++ b/pkg/client/clientset_generated/internalclientset/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go b/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go index 811cab547b..8d18af79b8 100644 --- a/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go +++ b/pkg/client/clientset_generated/internalclientset/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/fake/doc.go b/pkg/client/clientset_generated/internalclientset/fake/doc.go index 559cf8914e..937b6ba852 100644 --- a/pkg/client/clientset_generated/internalclientset/fake/doc.go +++ b/pkg/client/clientset_generated/internalclientset/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/import_known_versions.go b/pkg/client/clientset_generated/internalclientset/import_known_versions.go index 35f10bcf97..4a922df8ad 100644 --- a/pkg/client/clientset_generated/internalclientset/import_known_versions.go +++ b/pkg/client/clientset_generated/internalclientset/import_known_versions.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/autoscaling_client.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/autoscaling_client.go index 752b5d554e..71d01ff6dd 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/autoscaling_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/doc.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/doc.go index 47517b6422..1e6a8ff827 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/doc.go +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/doc.go index eb358c26c8..083f78f3a4 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/doc.go +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/fake_autoscaling_client.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/fake_autoscaling_client.go index d25beeebba..ab10c6bb0e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/fake_autoscaling_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/fake_autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/fake_horizontalpodautoscaler.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/fake_horizontalpodautoscaler.go index 78a8b974f1..845e0ba561 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/fake_horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/fake/fake_horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/generated_expansion.go index 39324902aa..628b494c0e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/generated_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/horizontalpodautoscaler.go b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/horizontalpodautoscaler.go index d90527f3e7..747afc67ae 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned/horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/batch_client.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/batch_client.go index 83d9d749c4..8f2b0e8038 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/batch_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/batch_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/doc.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/doc.go index 47517b6422..1e6a8ff827 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/doc.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/doc.go index eb358c26c8..083f78f3a4 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/doc.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_batch_client.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_batch_client.go index bf2a41a76a..b21ca42a40 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_batch_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_batch_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_job.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_job.go index 396ca281f9..892402777d 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_job.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_job.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_scheduledjob.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_scheduledjob.go index 3e0cee8517..dcdf87df51 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_scheduledjob.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/fake/fake_scheduledjob.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/generated_expansion.go index f876ef63fc..a12d6f3084 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/generated_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/job.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/job.go index a829a8e3f5..b7031c28f3 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/job.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/job.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/scheduledjob.go b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/scheduledjob.go index d276071c50..9c6e598329 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/scheduledjob.go +++ b/pkg/client/clientset_generated/internalclientset/typed/batch/unversioned/scheduledjob.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificates_client.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificates_client.go index dd67e78c2c..f1fdb45590 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificates_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificates_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificatesigningrequest.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificatesigningrequest.go index a097dc740b..6ed157cc3c 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificatesigningrequest.go +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/certificatesigningrequest.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/doc.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/doc.go index 47517b6422..1e6a8ff827 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/doc.go +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/doc.go index eb358c26c8..083f78f3a4 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/doc.go +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificates_client.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificates_client.go index 4a39901ba2..940b63da7e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificates_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificates_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificatesigningrequest.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificatesigningrequest.go index b4423a1b34..94f65743d6 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificatesigningrequest.go +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/fake/fake_certificatesigningrequest.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/generated_expansion.go index 6eb9ec25f2..fa61c9dbe1 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/generated_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/componentstatus.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/componentstatus.go index 74965a1090..014fd80b13 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/componentstatus.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/componentstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/configmap.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/configmap.go index f537ba0b39..9b24f8490c 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/configmap.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/core_client.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/core_client.go index 41aee4cf65..1e066dec90 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/core_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/core_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/doc.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/doc.go index 47517b6422..1e6a8ff827 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/doc.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/endpoints.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/endpoints.go index eec9924b7c..ee96600c2f 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/endpoints.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event.go index 54e370de84..f50a491d96 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event_expansion.go index 66831bdca1..f3d6f468d7 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/event_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/doc.go index eb358c26c8..083f78f3a4 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/doc.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_componentstatus.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_componentstatus.go index 75e3117292..feeea0ba5f 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_componentstatus.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_componentstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_configmap.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_configmap.go index f2342eaefc..5cc6ac44fa 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_configmap.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_core_client.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_core_client.go index 533735e7c1..71122d91f3 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_core_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_core_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_endpoints.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_endpoints.go index 6bf956a8e5..d1a90f2ab7 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_endpoints.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event.go index 346ba298e1..27c135cf32 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event_expansion.go index 84f562033d..c9a07517c2 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_event_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_limitrange.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_limitrange.go index 9a6b963fb2..d2b2c0cedb 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_limitrange.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_limitrange.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_namespace.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_namespace.go index ed88074177..7896270756 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_namespace.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_namespace_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_namespace_expansion.go index 04b3acc14d..41eb343e02 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_namespace_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_namespace_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_node.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_node.go index e2eb4efa24..75d061ae85 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_node.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_node.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_node_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_node_expansion.go index 161d5e7459..507d407ca8 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_node_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_node_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolume.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolume.go index fe40deb355..ebc4c446c6 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolume.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolumeclaim.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolumeclaim.go index f3ee1c27f3..e5b2739dfe 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolumeclaim.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_persistentvolumeclaim.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_pod.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_pod.go index 3871798104..560213e040 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_pod.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_pod.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_pod_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_pod_expansion.go index 32fd74c027..26343982c5 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_pod_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_pod_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_podtemplate.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_podtemplate.go index e3da0bc4ad..8dd7fe7c7f 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_podtemplate.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_podtemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_replicationcontroller.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_replicationcontroller.go index 4b8b4be3eb..cc1949e890 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_replicationcontroller.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_replicationcontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_resourcequota.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_resourcequota.go index e5b2b573ee..b710c17b68 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_resourcequota.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_resourcequota.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_secret.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_secret.go index 959edbe9bb..9a972aa5b1 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_secret.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_secret.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_service.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_service.go index a926435989..770c798606 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_service.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_service_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_service_expansion.go index 3494b87376..978585f670 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_service_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_service_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_serviceaccount.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_serviceaccount.go index fae9459e9d..634c583d52 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_serviceaccount.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake/fake_serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/generated_expansion.go index 546f8e7a1d..a61fba53a3 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/generated_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/limitrange.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/limitrange.go index 6681b9d7c0..7c65b06685 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/limitrange.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/limitrange.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/namespace.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/namespace.go index 83c28bb289..0f84a5a3e4 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/namespace.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/namespace_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/namespace_expansion.go index 8f47aec484..15049da11f 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/namespace_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/namespace_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/node.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/node.go index 8b11a0f244..7f2ea15919 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/node.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/node.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/node_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/node_expansion.go index 3146cdb357..767f157b82 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/node_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/node_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolume.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolume.go index f9988705d0..065df7c914 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolume.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolumeclaim.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolumeclaim.go index c2ecde9252..d63402358e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolumeclaim.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/persistentvolumeclaim.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/pod.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/pod.go index 8bec03eee5..630d3d4f56 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/pod.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/pod.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/pod_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/pod_expansion.go index 8ebd29d308..a72b843246 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/pod_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/pod_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/podtemplate.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/podtemplate.go index 2776d58d2b..1999c4069d 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/podtemplate.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/podtemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/replicationcontroller.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/replicationcontroller.go index 2935196fe2..fad85eb488 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/replicationcontroller.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/replicationcontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/resourcequota.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/resourcequota.go index 0669bffdff..d6a3fc5810 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/resourcequota.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/resourcequota.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/secret.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/secret.go index 14c38eb14a..e7a1f295b6 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/secret.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/secret.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service.go index e1f6c75a49..1d7b071e85 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service_expansion.go index 89266e6cd8..de8f21c625 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/service_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/serviceaccount.go b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/serviceaccount.go index eae85a25c5..43e1626d50 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/serviceaccount.go +++ b/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/daemonset.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/daemonset.go index a9d4003934..8cc2e2e022 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/daemonset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/deployment.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/deployment.go index ce689c2b1a..66ac29a606 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/deployment.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/deployment_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/deployment_expansion.go index 9969aecc93..4d89330f84 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/deployment_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/deployment_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/doc.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/doc.go index 47517b6422..1e6a8ff827 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/doc.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/extensions_client.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/extensions_client.go index 9b9f4749a6..5454ea783e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/extensions_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/extensions_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/doc.go index eb358c26c8..083f78f3a4 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/doc.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_daemonset.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_daemonset.go index dc9f84a016..540c87afc2 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_daemonset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_deployment.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_deployment.go index 3c148b8f5c..f3d0481cfa 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_deployment.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_deployment_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_deployment_expansion.go index 3a7c06e505..8b73f41073 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_deployment_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_deployment_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_extensions_client.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_extensions_client.go index 7c2fa08518..809e80ed8a 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_extensions_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_extensions_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_ingress.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_ingress.go index c3f90aca65..d9d8099605 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_ingress.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_podsecuritypolicy.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_podsecuritypolicy.go index 693e99504a..5e97962128 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_podsecuritypolicy.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_podsecuritypolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_replicaset.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_replicaset.go index cb4f9e643b..38fef7eda1 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_replicaset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_scale.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_scale.go index d2cfc5f7b7..0179e4edce 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_scale.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_scale.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_scale_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_scale_expansion.go index 949836afe5..481b8197f0 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_scale_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_scale_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_thirdpartyresource.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_thirdpartyresource.go index e4a029c7c0..4a74156698 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_thirdpartyresource.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake/fake_thirdpartyresource.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/generated_expansion.go index 7a1999454e..dd1ed2903e 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/generated_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/ingress.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/ingress.go index 5ca53fc941..48f52996dc 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/ingress.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/job.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/job.go index 4ae3f6cac5..f0411862bd 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/job.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/job.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/podsecuritypolicy.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/podsecuritypolicy.go index 6c57caa577..1ad64afe52 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/podsecuritypolicy.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/podsecuritypolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/replicaset.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/replicaset.go index 7a68acf0fd..c8f47f9e7d 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/replicaset.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/scale.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/scale.go index 7e54bc3474..12455ca888 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/scale.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/scale_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/scale_expansion.go index 61a77f260d..8dbba79e3f 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/scale_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/scale_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/thirdpartyresource.go b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/thirdpartyresource.go index 1ba36803b4..4539d15dda 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/thirdpartyresource.go +++ b/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/thirdpartyresource.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrole.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrole.go index b4495fe2a3..e8261651c5 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrole.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrolebinding.go index b909d409df..389464aee7 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrolebinding.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/doc.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/doc.go index 47517b6422..1e6a8ff827 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/doc.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/doc.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/doc.go index eb358c26c8..083f78f3a4 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/doc.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrole.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrole.go index 8939a9255e..2f4ef6cedc 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrole.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrolebinding.go index 10b2bc9955..4e90205e8d 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrolebinding.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_rbac_client.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_rbac_client.go index 5c4951fe18..9e3a130db3 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_rbac_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_rbac_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_role.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_role.go index 9d369ab581..fd13c318bb 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_role.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_role.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_rolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_rolebinding.go index 336d929487..3971a86fdb 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_rolebinding.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/fake/fake_rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/generated_expansion.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/generated_expansion.go index a3b9c689d3..cbb0192a16 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/generated_expansion.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/rbac_client.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/rbac_client.go index 4d67337cde..fa2f336fe7 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/rbac_client.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/rbac_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/role.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/role.go index 94f8d2e0ce..030244b110 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/role.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/role.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/rolebinding.go b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/rolebinding.go index 1a99e8190c..a91beb5922 100644 --- a/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/rolebinding.go +++ b/pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned/rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/clientset.go b/pkg/client/clientset_generated/release_1_2/clientset.go index 2fbae30289..95e587aad7 100644 --- a/pkg/client/clientset_generated/release_1_2/clientset.go +++ b/pkg/client/clientset_generated/release_1_2/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/doc.go b/pkg/client/clientset_generated/release_1_2/doc.go index 01f164f17b..ed48f89e09 100644 --- a/pkg/client/clientset_generated/release_1_2/doc.go +++ b/pkg/client/clientset_generated/release_1_2/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/fake/clientset_generated.go b/pkg/client/clientset_generated/release_1_2/fake/clientset_generated.go index ac11770fc0..414f0690ff 100644 --- a/pkg/client/clientset_generated/release_1_2/fake/clientset_generated.go +++ b/pkg/client/clientset_generated/release_1_2/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/fake/doc.go b/pkg/client/clientset_generated/release_1_2/fake/doc.go index d2e2dcd1d7..d96913b68b 100644 --- a/pkg/client/clientset_generated/release_1_2/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_2/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/import_known_versions.go b/pkg/client/clientset_generated/release_1_2/import_known_versions.go index b1b7752b82..9f62e0b863 100644 --- a/pkg/client/clientset_generated/release_1_2/import_known_versions.go +++ b/pkg/client/clientset_generated/release_1_2/import_known_versions.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/componentstatus.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/componentstatus.go index 23363f530d..c7e67cd53f 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/componentstatus.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/componentstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/configmap.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/configmap.go index 4fbb31328a..88cc926700 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/configmap.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/core_client.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/core_client.go index 6c2874e386..72d0a45b81 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/core_client.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/core_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/doc.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/doc.go index 30d0968525..4789199936 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/doc.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/endpoints.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/endpoints.go index 409b044c72..66bb2cacb3 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/endpoints.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/event.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/event.go index 92266c98b6..dd79972be3 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/event.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/event.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/event_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/event_expansion.go index 971c850c7a..ec2ba42af1 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/event_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/event_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/doc.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/doc.go index bafa0bfe44..66ed21840a 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_componentstatus.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_componentstatus.go index 6a86ac5690..bc4feb381b 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_componentstatus.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_componentstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_configmap.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_configmap.go index 81dcc633ad..e6bcef907e 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_configmap.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_core_client.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_core_client.go index 2f2c234548..acb89b67fc 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_core_client.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_core_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_endpoints.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_endpoints.go index f5c570ffd2..6d0cde3d7a 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_endpoints.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_event.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_event.go index 5dd7e08b8d..8c3c8bd24e 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_event.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_event.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_event_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_event_expansion.go index 173032b60c..dc216bccc8 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_event_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_event_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_limitrange.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_limitrange.go index f5755a87b6..7742733e83 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_limitrange.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_limitrange.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_namespace.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_namespace.go index b81ca5c52e..87f12aab0e 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_namespace.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_namespace_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_namespace_expansion.go index a4416ffcf4..c3ea410ad5 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_namespace_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_namespace_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_node.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_node.go index 320f80364f..b1ca4ee05a 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_node.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_node.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_persistentvolume.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_persistentvolume.go index 0aa61b830d..9c8d646b1e 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_persistentvolume.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_persistentvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_pod.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_pod.go index 0273bb9b07..bc50b696e4 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_pod.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_pod.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_pod_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_pod_expansion.go index 7e478dd5ec..a166f756ce 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_pod_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_pod_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_podtemplate.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_podtemplate.go index 89302ae8c4..00066c1071 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_podtemplate.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_podtemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_replicationcontroller.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_replicationcontroller.go index 3599a46e22..298eb319bb 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_replicationcontroller.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_replicationcontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_resourcequota.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_resourcequota.go index 2def4eec54..998c967a7b 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_resourcequota.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_resourcequota.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_secret.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_secret.go index 921da249aa..643a98d4db 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_secret.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_secret.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_service.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_service.go index 3355aa94e1..f19cf8d3b5 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_service.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_service_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_service_expansion.go index 3494b87376..978585f670 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_service_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_service_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_serviceaccount.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_serviceaccount.go index fa10a5353c..700749b7a1 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_serviceaccount.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake/fake_serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/generated_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/generated_expansion.go index 9974ef5c6a..dbcfd84ce4 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/generated_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/limitrange.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/limitrange.go index a44c61fa22..c735e47e8b 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/limitrange.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/limitrange.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/namespace.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/namespace.go index 3d2cff1446..d347219daf 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/namespace.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/namespace_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/namespace_expansion.go index 7b5cf683d0..36de2beeaa 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/namespace_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/namespace_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/node.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/node.go index 464eb8d6d6..90a07ecb61 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/node.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/node.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/persistentvolume.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/persistentvolume.go index 85ddf060e2..de51cb3b58 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/persistentvolume.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/persistentvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/pod.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/pod.go index d2ed5faaa8..3e4ba39a0e 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/pod.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/pod.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/pod_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/pod_expansion.go index f061b5d923..fba1fd069c 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/pod_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/pod_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/podtemplate.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/podtemplate.go index 1b95106d17..f307c49723 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/podtemplate.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/podtemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/replicationcontroller.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/replicationcontroller.go index 20bcc90c37..4646e591f9 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/replicationcontroller.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/replicationcontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/resourcequota.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/resourcequota.go index 466e963d6c..8330a26125 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/resourcequota.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/resourcequota.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/secret.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/secret.go index a95aa84f44..9faf811019 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/secret.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/secret.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/service.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/service.go index cd62b5d94f..c54d8001db 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/service.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/service_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/service_expansion.go index b4300483b8..ce53e41952 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/service_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/service_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/core/v1/serviceaccount.go b/pkg/client/clientset_generated/release_1_2/typed/core/v1/serviceaccount.go index eb0b258fa9..2db8170150 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/core/v1/serviceaccount.go +++ b/pkg/client/clientset_generated/release_1_2/typed/core/v1/serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/daemonset.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/daemonset.go index ecbece591b..1a0e1114d5 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/daemonset.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/deployment.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/deployment.go index 7cc3ff9d3f..bd3ddbaebb 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/deployment.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/deployment_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/deployment_expansion.go index 0c3ff63678..cd3cd1027e 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/deployment_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/deployment_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/doc.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/doc.go index ffd3806e8a..6f1bcd0536 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/doc.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/extensions_client.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/extensions_client.go index a1f6a982b8..e1352c5d19 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/extensions_client.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/extensions_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/doc.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/doc.go index bafa0bfe44..66ed21840a 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_daemonset.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_daemonset.go index 26187506e5..8cf03f7b1f 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_daemonset.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_deployment.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_deployment.go index dc6e55db69..3c206311f3 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_deployment.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_deployment_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_deployment_expansion.go index f154693645..37836278ae 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_deployment_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_deployment_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_extensions_client.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_extensions_client.go index 7027780932..c0a254bdd3 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_extensions_client.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_extensions_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_horizontalpodautoscaler.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_horizontalpodautoscaler.go index 8517996527..2193e60574 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_ingress.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_ingress.go index e1c46d4272..58237d56a1 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_ingress.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_job.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_job.go index e7819d36aa..d870f86b3b 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_job.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_job.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_replicaset.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_replicaset.go index 85aa5b87fa..1397ef6e1c 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_replicaset.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_scale.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_scale.go index d2cfc5f7b7..0179e4edce 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_scale.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_scale.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_scale_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_scale_expansion.go index c76f35e7cf..c83fde6bd3 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_scale_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_scale_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go index 49d8a30b5f..83b117c62e 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/generated_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/generated_expansion.go index 97c6a1c066..b593b6d644 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/generated_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/horizontalpodautoscaler.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/horizontalpodautoscaler.go index 93b486b894..211ce0251f 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/ingress.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/ingress.go index 96b4d04396..b240ab4e2a 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/ingress.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/job.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/job.go index c518c5abda..f40d4c3e33 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/job.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/job.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/replicaset.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/replicaset.go index 1822f052c9..f3c4a1d5ca 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/replicaset.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/scale.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/scale.go index 231fe5ccf7..3a7be158a6 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/scale.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/scale_expansion.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/scale_expansion.go index 488863d9f8..648b2f1c18 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/scale_expansion.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/scale_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/thirdpartyresource.go b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/thirdpartyresource.go index 81d73d32e2..1c9221c675 100644 --- a/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/thirdpartyresource.go +++ b/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/thirdpartyresource.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/clientset.go b/pkg/client/clientset_generated/release_1_3/clientset.go index 7232953696..341003a52e 100644 --- a/pkg/client/clientset_generated/release_1_3/clientset.go +++ b/pkg/client/clientset_generated/release_1_3/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/doc.go b/pkg/client/clientset_generated/release_1_3/doc.go index 721f472345..9d023967a1 100644 --- a/pkg/client/clientset_generated/release_1_3/doc.go +++ b/pkg/client/clientset_generated/release_1_3/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/fake/clientset_generated.go b/pkg/client/clientset_generated/release_1_3/fake/clientset_generated.go index b109de502d..3a80adc7dd 100644 --- a/pkg/client/clientset_generated/release_1_3/fake/clientset_generated.go +++ b/pkg/client/clientset_generated/release_1_3/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/fake/doc.go b/pkg/client/clientset_generated/release_1_3/fake/doc.go index 4866da9984..3dced25a39 100644 --- a/pkg/client/clientset_generated/release_1_3/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_3/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/import_known_versions.go b/pkg/client/clientset_generated/release_1_3/import_known_versions.go index 14b9eb98b3..291416a539 100644 --- a/pkg/client/clientset_generated/release_1_3/import_known_versions.go +++ b/pkg/client/clientset_generated/release_1_3/import_known_versions.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/autoscaling_client.go b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/autoscaling_client.go index a0fb01144e..5a8507225c 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/autoscaling_client.go +++ b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/doc.go b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/doc.go index 2dbfc49013..b9083ab35f 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/doc.go +++ b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/doc.go b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/doc.go index 924812c706..3847506040 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/fake_autoscaling_client.go b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/fake_autoscaling_client.go index 70c665c934..22a292f661 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/fake_autoscaling_client.go +++ b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/fake_autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go index 7373b0416c..5e89262cbe 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/generated_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/generated_expansion.go index 444cc29aee..3e37a64ef6 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/generated_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/horizontalpodautoscaler.go b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/horizontalpodautoscaler.go index 3e7e72ce07..937f351e95 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/release_1_3/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/batch_client.go b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/batch_client.go index 018d2c688a..4bef968c8e 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/batch_client.go +++ b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/batch_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/doc.go b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/doc.go index 2dbfc49013..b9083ab35f 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/doc.go +++ b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/doc.go b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/doc.go index 924812c706..3847506040 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/fake_batch_client.go b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/fake_batch_client.go index 546256aa20..a3c7382b4e 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/fake_batch_client.go +++ b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/fake_batch_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/fake_job.go b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/fake_job.go index 010119be17..ad9c2a67e0 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/fake_job.go +++ b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/fake/fake_job.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/generated_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/generated_expansion.go index 40daeb1c7b..b24faa3157 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/generated_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/job.go b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/job.go index 33287a00f2..bcd2f91fd6 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/batch/v1/job.go +++ b/pkg/client/clientset_generated/release_1_3/typed/batch/v1/job.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/componentstatus.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/componentstatus.go index 7f1f792d5c..d6e7881125 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/componentstatus.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/componentstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/configmap.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/configmap.go index 336dbfc682..7b3a465d68 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/configmap.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/core_client.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/core_client.go index 3804b8cb3b..8409f5f3c0 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/core_client.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/core_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/doc.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/doc.go index 2dbfc49013..b9083ab35f 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/doc.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/endpoints.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/endpoints.go index 3b2d53e2c4..6c1233b4c4 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/endpoints.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/event.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/event.go index a8b08353ff..36763a8fb6 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/event.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/event.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/event_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/event_expansion.go index 508cc39fde..f9769defcf 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/event_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/event_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/doc.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/doc.go index 924812c706..3847506040 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_componentstatus.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_componentstatus.go index 91e0e9b097..da1843cd4e 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_componentstatus.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_componentstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_configmap.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_configmap.go index 57ce1c3d15..b66ff0b876 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_configmap.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_core_client.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_core_client.go index 6ffe30d03a..721046b7e4 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_core_client.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_core_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_endpoints.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_endpoints.go index 0b5b5a8943..1241534630 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_endpoints.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event.go index 7a8dee2e5a..37d5fe647c 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event_expansion.go index 436918a933..a004bed7f6 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_event_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_limitrange.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_limitrange.go index ca29716f26..841bd3c2a8 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_limitrange.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_limitrange.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_namespace.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_namespace.go index f0b05b82aa..1637857df2 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_namespace.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_namespace_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_namespace_expansion.go index a4416ffcf4..c3ea410ad5 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_namespace_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_namespace_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_node.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_node.go index e84c06798d..8f16c9cfa8 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_node.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_node.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_persistentvolume.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_persistentvolume.go index 11a4a7614d..170c1322af 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_persistentvolume.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_persistentvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_pod.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_pod.go index 5460bdbe06..8baa5c9d39 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_pod.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_pod.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_pod_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_pod_expansion.go index 7e478dd5ec..a166f756ce 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_pod_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_pod_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_podtemplate.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_podtemplate.go index 7dee5b1ed1..0878b3b217 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_podtemplate.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_podtemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_replicationcontroller.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_replicationcontroller.go index 8c229b8b99..5635135deb 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_replicationcontroller.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_replicationcontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_resourcequota.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_resourcequota.go index f467df35ee..4862ff0e47 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_resourcequota.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_resourcequota.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_secret.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_secret.go index ff9142cf37..2351f33806 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_secret.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_secret.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_service.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_service.go index cbc358e6a3..5f235c5d49 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_service.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_service_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_service_expansion.go index 3494b87376..978585f670 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_service_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_service_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_serviceaccount.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_serviceaccount.go index 86757a6628..81e162e646 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_serviceaccount.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/fake/fake_serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/generated_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/generated_expansion.go index 9974ef5c6a..dbcfd84ce4 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/generated_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/limitrange.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/limitrange.go index 435ac0949b..e788a9a775 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/limitrange.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/limitrange.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/namespace.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/namespace.go index 592517a7ce..43b0cfeae2 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/namespace.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/namespace_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/namespace_expansion.go index 7b5cf683d0..36de2beeaa 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/namespace_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/namespace_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/node.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/node.go index ad3fc1bc1f..fdd231aa96 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/node.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/node.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/persistentvolume.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/persistentvolume.go index 1573833e56..6de108e965 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/persistentvolume.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/persistentvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/pod.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/pod.go index de1ee946b1..cce36510b1 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/pod.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/pod.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/pod_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/pod_expansion.go index f061b5d923..fba1fd069c 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/pod_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/pod_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/podtemplate.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/podtemplate.go index 6a7a898499..f3d4de4b21 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/podtemplate.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/podtemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/replicationcontroller.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/replicationcontroller.go index dfa75e485c..303f61980c 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/replicationcontroller.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/replicationcontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/resourcequota.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/resourcequota.go index 36c1f548e0..addf2900b9 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/resourcequota.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/resourcequota.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/secret.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/secret.go index 712048cee7..6f187e02ca 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/secret.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/secret.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/service.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/service.go index ca533d1f2f..5c3bf4223c 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/service.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/service_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/service_expansion.go index b4300483b8..ce53e41952 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/service_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/service_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/core/v1/serviceaccount.go b/pkg/client/clientset_generated/release_1_3/typed/core/v1/serviceaccount.go index 39804da3ba..07ac1373a5 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/core/v1/serviceaccount.go +++ b/pkg/client/clientset_generated/release_1_3/typed/core/v1/serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/daemonset.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/daemonset.go index 26b402c1e9..28d840f0f5 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/daemonset.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/deployment.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/deployment.go index ad5de86e45..4303c47bee 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/deployment.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/deployment_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/deployment_expansion.go index 0c3ff63678..cd3cd1027e 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/deployment_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/deployment_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/doc.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/doc.go index 22d20e331d..84e91d2db6 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/doc.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/extensions_client.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/extensions_client.go index 23aa5b219e..5de34ad1f1 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/extensions_client.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/extensions_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/doc.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/doc.go index 924812c706..3847506040 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_daemonset.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_daemonset.go index ca4ffe1f0b..151c4c5c4c 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_daemonset.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_deployment.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_deployment.go index b827448b0c..bd82129020 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_deployment.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_deployment_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_deployment_expansion.go index f154693645..37836278ae 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_deployment_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_deployment_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_extensions_client.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_extensions_client.go index ac0f33da68..c93908de1d 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_extensions_client.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_extensions_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_horizontalpodautoscaler.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_horizontalpodautoscaler.go index 5ccf47d7b2..1d898a564f 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_ingress.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_ingress.go index 840d0c27ad..347976c47e 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_ingress.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_job.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_job.go index 6a4949186e..503edde5ef 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_job.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_job.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go index 7ea9b88f2e..76827d4c2f 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_replicaset.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_replicaset.go index 31fd676b8e..523aaa9c52 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_replicaset.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_scale.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_scale.go index d2cfc5f7b7..0179e4edce 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_scale.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_scale.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_scale_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_scale_expansion.go index c76f35e7cf..c83fde6bd3 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_scale_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_scale_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go index 7fbf25397e..d06a5eef32 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/fake/fake_thirdpartyresource.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/generated_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/generated_expansion.go index 7477a57113..4db1600104 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/generated_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/horizontalpodautoscaler.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/horizontalpodautoscaler.go index 16c874a82f..80a0b3f76f 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/horizontalpodautoscaler.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/ingress.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/ingress.go index feb5c2bd25..623477d25f 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/ingress.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/job.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/job.go index 9f3782f324..b4f77b53ea 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/job.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/job.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/podsecuritypolicy.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/podsecuritypolicy.go index d139ef7886..58236e5a57 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/podsecuritypolicy.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/podsecuritypolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/replicaset.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/replicaset.go index 73ecd29875..e5168a0918 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/replicaset.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/scale.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/scale.go index 231fe5ccf7..3a7be158a6 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/scale.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/scale_expansion.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/scale_expansion.go index 488863d9f8..648b2f1c18 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/scale_expansion.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/scale_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/thirdpartyresource.go b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/thirdpartyresource.go index 30ec768aab..507f587015 100644 --- a/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/thirdpartyresource.go +++ b/pkg/client/clientset_generated/release_1_3/typed/extensions/v1beta1/thirdpartyresource.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/leaderelection/leaderelection.go b/pkg/client/leaderelection/leaderelection.go index 2bd4df3edb..ac8d8967a6 100644 --- a/pkg/client/leaderelection/leaderelection.go +++ b/pkg/client/leaderelection/leaderelection.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/leaderelection/leaderelection_test.go b/pkg/client/leaderelection/leaderelection_test.go index cd880f73e1..15b9b59260 100644 --- a/pkg/client/leaderelection/leaderelection_test.go +++ b/pkg/client/leaderelection/leaderelection_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/metrics/metrics.go b/pkg/client/metrics/metrics.go index efa66fc8bc..53029b53e9 100644 --- a/pkg/client/metrics/metrics.go +++ b/pkg/client/metrics/metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/record/doc.go b/pkg/client/record/doc.go index d955154326..0dc790696f 100644 --- a/pkg/client/record/doc.go +++ b/pkg/client/record/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/record/event.go b/pkg/client/record/event.go index 47cbe3eca6..903da6352f 100644 --- a/pkg/client/record/event.go +++ b/pkg/client/record/event.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/record/event_test.go b/pkg/client/record/event_test.go index ba7005abf7..6d067e9d62 100644 --- a/pkg/client/record/event_test.go +++ b/pkg/client/record/event_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/record/events_cache.go b/pkg/client/record/events_cache.go index fa76db7958..3b08655a80 100644 --- a/pkg/client/record/events_cache.go +++ b/pkg/client/record/events_cache.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/record/events_cache_test.go b/pkg/client/record/events_cache_test.go index 166550783f..afe4acb13a 100644 --- a/pkg/client/record/events_cache_test.go +++ b/pkg/client/record/events_cache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/record/fake.go b/pkg/client/record/fake.go index 35204ef2df..e063a4fc64 100644 --- a/pkg/client/record/fake.go +++ b/pkg/client/record/fake.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/client.go b/pkg/client/restclient/client.go index 230edd45c7..9019c116a7 100644 --- a/pkg/client/restclient/client.go +++ b/pkg/client/restclient/client.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/client_test.go b/pkg/client/restclient/client_test.go index 826d8d47ad..2d20ababff 100644 --- a/pkg/client/restclient/client_test.go +++ b/pkg/client/restclient/client_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/config.go b/pkg/client/restclient/config.go index 0741e3c2d8..452e6495fb 100644 --- a/pkg/client/restclient/config.go +++ b/pkg/client/restclient/config.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/config_test.go b/pkg/client/restclient/config_test.go index a9c71e19d8..3935dc4b0c 100644 --- a/pkg/client/restclient/config_test.go +++ b/pkg/client/restclient/config_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/plugin.go b/pkg/client/restclient/plugin.go index 4752e375bc..06ac3cce16 100644 --- a/pkg/client/restclient/plugin.go +++ b/pkg/client/restclient/plugin.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/plugin_test.go b/pkg/client/restclient/plugin_test.go index 3419ecb8ac..76b6dd7ea9 100644 --- a/pkg/client/restclient/plugin_test.go +++ b/pkg/client/restclient/plugin_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/request.go b/pkg/client/restclient/request.go index 9fd3f0ddb0..e6d489ce76 100644 --- a/pkg/client/restclient/request.go +++ b/pkg/client/restclient/request.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/request_test.go b/pkg/client/restclient/request_test.go index d51b43501f..a517862c21 100644 --- a/pkg/client/restclient/request_test.go +++ b/pkg/client/restclient/request_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/transport.go b/pkg/client/restclient/transport.go index 0bfa2ea272..c385914e29 100644 --- a/pkg/client/restclient/transport.go +++ b/pkg/client/restclient/transport.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/url_utils.go b/pkg/client/restclient/url_utils.go index 9a83d78747..b98eead6f6 100644 --- a/pkg/client/restclient/url_utils.go +++ b/pkg/client/restclient/url_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/url_utils_test.go b/pkg/client/restclient/url_utils_test.go index 4bf8c5423d..0e4dbfc57b 100644 --- a/pkg/client/restclient/url_utils_test.go +++ b/pkg/client/restclient/url_utils_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/urlbackoff.go b/pkg/client/restclient/urlbackoff.go index 6c672f08af..24a89ed975 100644 --- a/pkg/client/restclient/urlbackoff.go +++ b/pkg/client/restclient/urlbackoff.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/urlbackoff_test.go b/pkg/client/restclient/urlbackoff_test.go index 5b370dbe53..269f3536e0 100644 --- a/pkg/client/restclient/urlbackoff_test.go +++ b/pkg/client/restclient/urlbackoff_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/restclient/versions.go b/pkg/client/restclient/versions.go index e12c05c10f..3376434474 100644 --- a/pkg/client/restclient/versions.go +++ b/pkg/client/restclient/versions.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/testing/core/actions.go b/pkg/client/testing/core/actions.go index d56fef9ccb..8e5bf73475 100644 --- a/pkg/client/testing/core/actions.go +++ b/pkg/client/testing/core/actions.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/testing/core/fake.go b/pkg/client/testing/core/fake.go index 751780b1d6..c04ea1f40e 100644 --- a/pkg/client/testing/core/fake.go +++ b/pkg/client/testing/core/fake.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/testing/core/fake_test.go b/pkg/client/testing/core/fake_test.go index c872d5d238..1170d10fdb 100644 --- a/pkg/client/testing/core/fake_test.go +++ b/pkg/client/testing/core/fake_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/testing/core/fixture.go b/pkg/client/testing/core/fixture.go index 96472bcbbe..9902e49860 100644 --- a/pkg/client/testing/core/fixture.go +++ b/pkg/client/testing/core/fixture.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/transport/cache.go b/pkg/client/transport/cache.go index 8c07f5391a..eedfd3d78b 100644 --- a/pkg/client/transport/cache.go +++ b/pkg/client/transport/cache.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/transport/cache_test.go b/pkg/client/transport/cache_test.go index 8a602c147e..eb9624d7ed 100644 --- a/pkg/client/transport/cache_test.go +++ b/pkg/client/transport/cache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/transport/config.go b/pkg/client/transport/config.go index 63a63fbb47..6e5c68a30b 100644 --- a/pkg/client/transport/config.go +++ b/pkg/client/transport/config.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/transport/round_trippers.go b/pkg/client/transport/round_trippers.go index 55284ebc65..aadf0cbf9a 100644 --- a/pkg/client/transport/round_trippers.go +++ b/pkg/client/transport/round_trippers.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/transport/round_trippers_test.go b/pkg/client/transport/round_trippers_test.go index 6e8e52f7d7..78af9a59ea 100644 --- a/pkg/client/transport/round_trippers_test.go +++ b/pkg/client/transport/round_trippers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/transport/transport.go b/pkg/client/transport/transport.go index 2d20e1b878..9c5b9ef3c3 100644 --- a/pkg/client/transport/transport.go +++ b/pkg/client/transport/transport.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/transport/transport_test.go b/pkg/client/transport/transport_test.go index ca04172d20..4d2d78f86c 100644 --- a/pkg/client/transport/transport_test.go +++ b/pkg/client/transport/transport_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/typed/discovery/client_test.go b/pkg/client/typed/discovery/client_test.go index 0563a83d84..52be5a68c5 100644 --- a/pkg/client/typed/discovery/client_test.go +++ b/pkg/client/typed/discovery/client_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/typed/discovery/discovery_client.go b/pkg/client/typed/discovery/discovery_client.go index 635ca4a9e1..1bd18b9548 100644 --- a/pkg/client/typed/discovery/discovery_client.go +++ b/pkg/client/typed/discovery/discovery_client.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/typed/discovery/fake/discovery.go b/pkg/client/typed/discovery/fake/discovery.go index 1c230acf02..25b48c076a 100644 --- a/pkg/client/typed/discovery/fake/discovery.go +++ b/pkg/client/typed/discovery/fake/discovery.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/typed/dynamic/client.go b/pkg/client/typed/dynamic/client.go index 26369bd582..cd87d7b9dc 100644 --- a/pkg/client/typed/dynamic/client.go +++ b/pkg/client/typed/dynamic/client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/typed/dynamic/client_pool.go b/pkg/client/typed/dynamic/client_pool.go index f7c6505fd7..5723ed708f 100644 --- a/pkg/client/typed/dynamic/client_pool.go +++ b/pkg/client/typed/dynamic/client_pool.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/typed/dynamic/client_test.go b/pkg/client/typed/dynamic/client_test.go index 828ac8fced..d0dbe0b756 100644 --- a/pkg/client/typed/dynamic/client_test.go +++ b/pkg/client/typed/dynamic/client_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/typed/dynamic/dynamic_util.go b/pkg/client/typed/dynamic/dynamic_util.go index 094f838115..88686954bd 100644 --- a/pkg/client/typed/dynamic/dynamic_util.go +++ b/pkg/client/typed/dynamic/dynamic_util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/typed/dynamic/dynamic_util_test.go b/pkg/client/typed/dynamic/dynamic_util_test.go index c6c315a8a7..0d3ed2934f 100644 --- a/pkg/client/typed/dynamic/dynamic_util_test.go +++ b/pkg/client/typed/dynamic/dynamic_util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/adapters/internalclientset/clientset_adaption.go b/pkg/client/unversioned/adapters/internalclientset/clientset_adaption.go index 680cadc922..26bcd67dfa 100644 --- a/pkg/client/unversioned/adapters/internalclientset/clientset_adaption.go +++ b/pkg/client/unversioned/adapters/internalclientset/clientset_adaption.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/apps.go b/pkg/client/unversioned/apps.go index 1905c29c24..add0371211 100644 --- a/pkg/client/unversioned/apps.go +++ b/pkg/client/unversioned/apps.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/auth/clientauth.go b/pkg/client/unversioned/auth/clientauth.go index 64b3ef6bec..128597f93a 100644 --- a/pkg/client/unversioned/auth/clientauth.go +++ b/pkg/client/unversioned/auth/clientauth.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/auth/clientauth_test.go b/pkg/client/unversioned/auth/clientauth_test.go index a99c5d94a0..03bf6a52f1 100644 --- a/pkg/client/unversioned/auth/clientauth_test.go +++ b/pkg/client/unversioned/auth/clientauth_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/autoscaling.go b/pkg/client/unversioned/autoscaling.go index 9e543c9d3a..964fd76579 100644 --- a/pkg/client/unversioned/autoscaling.go +++ b/pkg/client/unversioned/autoscaling.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/batch.go b/pkg/client/unversioned/batch.go index 40fc49dc12..8e6d9a2ce4 100644 --- a/pkg/client/unversioned/batch.go +++ b/pkg/client/unversioned/batch.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/certificates.go b/pkg/client/unversioned/certificates.go index 677e46e2fa..ae6e9840d1 100644 --- a/pkg/client/unversioned/certificates.go +++ b/pkg/client/unversioned/certificates.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/certificatesigningrequests.go b/pkg/client/unversioned/certificatesigningrequests.go index c2c391c6bd..f3ce09fc38 100644 --- a/pkg/client/unversioned/certificatesigningrequests.go +++ b/pkg/client/unversioned/certificatesigningrequests.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/client.go b/pkg/client/unversioned/client.go index f06c69825f..5474e966f0 100644 --- a/pkg/client/unversioned/client.go +++ b/pkg/client/unversioned/client.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/api/helpers.go b/pkg/client/unversioned/clientcmd/api/helpers.go index 87330c5009..43e26487cb 100644 --- a/pkg/client/unversioned/clientcmd/api/helpers.go +++ b/pkg/client/unversioned/clientcmd/api/helpers.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/api/helpers_test.go b/pkg/client/unversioned/clientcmd/api/helpers_test.go index 6952524c6b..430208456d 100644 --- a/pkg/client/unversioned/clientcmd/api/helpers_test.go +++ b/pkg/client/unversioned/clientcmd/api/helpers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/api/latest/latest.go b/pkg/client/unversioned/clientcmd/api/latest/latest.go index 48cedb82ea..0b9a4270c0 100644 --- a/pkg/client/unversioned/clientcmd/api/latest/latest.go +++ b/pkg/client/unversioned/clientcmd/api/latest/latest.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/api/register.go b/pkg/client/unversioned/clientcmd/api/register.go index f26a6cd1b1..5426e7fef4 100644 --- a/pkg/client/unversioned/clientcmd/api/register.go +++ b/pkg/client/unversioned/clientcmd/api/register.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/api/types.go b/pkg/client/unversioned/clientcmd/api/types.go index 56b44e8f42..95b5289f46 100644 --- a/pkg/client/unversioned/clientcmd/api/types.go +++ b/pkg/client/unversioned/clientcmd/api/types.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/api/types_test.go b/pkg/client/unversioned/clientcmd/api/types_test.go index 6c79728f4c..bd34834521 100644 --- a/pkg/client/unversioned/clientcmd/api/types_test.go +++ b/pkg/client/unversioned/clientcmd/api/types_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/api/v1/conversion.go b/pkg/client/unversioned/clientcmd/api/v1/conversion.go index e03fc60b16..e22e5f81ec 100644 --- a/pkg/client/unversioned/clientcmd/api/v1/conversion.go +++ b/pkg/client/unversioned/clientcmd/api/v1/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/api/v1/register.go b/pkg/client/unversioned/clientcmd/api/v1/register.go index e5c9e88ef9..dcdb533c0d 100644 --- a/pkg/client/unversioned/clientcmd/api/v1/register.go +++ b/pkg/client/unversioned/clientcmd/api/v1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/api/v1/types.go b/pkg/client/unversioned/clientcmd/api/v1/types.go index 46b5dbaa72..77bce80a3b 100644 --- a/pkg/client/unversioned/clientcmd/api/v1/types.go +++ b/pkg/client/unversioned/clientcmd/api/v1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/auth_loaders.go b/pkg/client/unversioned/clientcmd/auth_loaders.go index 8b10ce2bcb..0abc425c0c 100644 --- a/pkg/client/unversioned/clientcmd/auth_loaders.go +++ b/pkg/client/unversioned/clientcmd/auth_loaders.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/client_config.go b/pkg/client/unversioned/clientcmd/client_config.go index c83f315a31..47b14e215a 100644 --- a/pkg/client/unversioned/clientcmd/client_config.go +++ b/pkg/client/unversioned/clientcmd/client_config.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/client_config_test.go b/pkg/client/unversioned/clientcmd/client_config_test.go index 32c6a293bd..3c2aba7bd3 100644 --- a/pkg/client/unversioned/clientcmd/client_config_test.go +++ b/pkg/client/unversioned/clientcmd/client_config_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/config.go b/pkg/client/unversioned/clientcmd/config.go index 049fc39213..9eb932c351 100644 --- a/pkg/client/unversioned/clientcmd/config.go +++ b/pkg/client/unversioned/clientcmd/config.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/doc.go b/pkg/client/unversioned/clientcmd/doc.go index 7e8f9b4e3a..30ef6f36da 100644 --- a/pkg/client/unversioned/clientcmd/doc.go +++ b/pkg/client/unversioned/clientcmd/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/loader.go b/pkg/client/unversioned/clientcmd/loader.go index 3d2df1f7da..e0df237890 100644 --- a/pkg/client/unversioned/clientcmd/loader.go +++ b/pkg/client/unversioned/clientcmd/loader.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/loader_test.go b/pkg/client/unversioned/clientcmd/loader_test.go index 5075bded22..501850ba05 100644 --- a/pkg/client/unversioned/clientcmd/loader_test.go +++ b/pkg/client/unversioned/clientcmd/loader_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/merged_client_builder.go b/pkg/client/unversioned/clientcmd/merged_client_builder.go index 52c1493d05..0180469127 100644 --- a/pkg/client/unversioned/clientcmd/merged_client_builder.go +++ b/pkg/client/unversioned/clientcmd/merged_client_builder.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/overrides.go b/pkg/client/unversioned/clientcmd/overrides.go index f6dda97f1c..c3539d8f9f 100644 --- a/pkg/client/unversioned/clientcmd/overrides.go +++ b/pkg/client/unversioned/clientcmd/overrides.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/validation.go b/pkg/client/unversioned/clientcmd/validation.go index 1690f515e9..63f8adec62 100644 --- a/pkg/client/unversioned/clientcmd/validation.go +++ b/pkg/client/unversioned/clientcmd/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clientcmd/validation_test.go b/pkg/client/unversioned/clientcmd/validation_test.go index ca4843a877..f760c5b4f6 100644 --- a/pkg/client/unversioned/clientcmd/validation_test.go +++ b/pkg/client/unversioned/clientcmd/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clusterrolebindings.go b/pkg/client/unversioned/clusterrolebindings.go index 2a9d79846f..fa9cad97d3 100644 --- a/pkg/client/unversioned/clusterrolebindings.go +++ b/pkg/client/unversioned/clusterrolebindings.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/clusterroles.go b/pkg/client/unversioned/clusterroles.go index 0d2d375d61..165271ab50 100644 --- a/pkg/client/unversioned/clusterroles.go +++ b/pkg/client/unversioned/clusterroles.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/componentstatuses.go b/pkg/client/unversioned/componentstatuses.go index 0717cdec12..aca996b2b0 100644 --- a/pkg/client/unversioned/componentstatuses.go +++ b/pkg/client/unversioned/componentstatuses.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/conditions.go b/pkg/client/unversioned/conditions.go index f68f98fe12..5c284292bf 100644 --- a/pkg/client/unversioned/conditions.go +++ b/pkg/client/unversioned/conditions.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/configmap.go b/pkg/client/unversioned/configmap.go index 60fffa7557..c2f20354f4 100644 --- a/pkg/client/unversioned/configmap.go +++ b/pkg/client/unversioned/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/containerinfo.go b/pkg/client/unversioned/containerinfo.go index 306386852f..2f9aae8ab3 100644 --- a/pkg/client/unversioned/containerinfo.go +++ b/pkg/client/unversioned/containerinfo.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/containerinfo_test.go b/pkg/client/unversioned/containerinfo_test.go index 797ad51398..34ddd444e2 100644 --- a/pkg/client/unversioned/containerinfo_test.go +++ b/pkg/client/unversioned/containerinfo_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/daemon_sets.go b/pkg/client/unversioned/daemon_sets.go index fa12591a65..7ec9182f8a 100644 --- a/pkg/client/unversioned/daemon_sets.go +++ b/pkg/client/unversioned/daemon_sets.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/daemon_sets_test.go b/pkg/client/unversioned/daemon_sets_test.go index f453a91387..83b309ac0f 100644 --- a/pkg/client/unversioned/daemon_sets_test.go +++ b/pkg/client/unversioned/daemon_sets_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/deployment.go b/pkg/client/unversioned/deployment.go index cafd4cfd1d..a5e8afe947 100644 --- a/pkg/client/unversioned/deployment.go +++ b/pkg/client/unversioned/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/deployment_test.go b/pkg/client/unversioned/deployment_test.go index c530411a75..c2351a7c6c 100644 --- a/pkg/client/unversioned/deployment_test.go +++ b/pkg/client/unversioned/deployment_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/doc.go b/pkg/client/unversioned/doc.go index 252d809758..dac3925b4a 100644 --- a/pkg/client/unversioned/doc.go +++ b/pkg/client/unversioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/endpoints.go b/pkg/client/unversioned/endpoints.go index c58c88a28d..6e20a347eb 100644 --- a/pkg/client/unversioned/endpoints.go +++ b/pkg/client/unversioned/endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/endpoints_test.go b/pkg/client/unversioned/endpoints_test.go index 59bc869b87..7db891b0c8 100644 --- a/pkg/client/unversioned/endpoints_test.go +++ b/pkg/client/unversioned/endpoints_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/events.go b/pkg/client/unversioned/events.go index b882ccdc47..3421bd8117 100644 --- a/pkg/client/unversioned/events.go +++ b/pkg/client/unversioned/events.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/events_test.go b/pkg/client/unversioned/events_test.go index 371c7544e8..cd4b6aa853 100644 --- a/pkg/client/unversioned/events_test.go +++ b/pkg/client/unversioned/events_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/extensions.go b/pkg/client/unversioned/extensions.go index 3c9114d9a8..a9243629e5 100644 --- a/pkg/client/unversioned/extensions.go +++ b/pkg/client/unversioned/extensions.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/fake/fake.go b/pkg/client/unversioned/fake/fake.go index 7fd452d264..018dd9432a 100644 --- a/pkg/client/unversioned/fake/fake.go +++ b/pkg/client/unversioned/fake/fake.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/flags.go b/pkg/client/unversioned/flags.go index 9fc540cfbd..7d32a259df 100644 --- a/pkg/client/unversioned/flags.go +++ b/pkg/client/unversioned/flags.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/flags_test.go b/pkg/client/unversioned/flags_test.go index ab0f94d041..455ee7df12 100644 --- a/pkg/client/unversioned/flags_test.go +++ b/pkg/client/unversioned/flags_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/helper.go b/pkg/client/unversioned/helper.go index 40b42695ff..f07e9fa228 100644 --- a/pkg/client/unversioned/helper.go +++ b/pkg/client/unversioned/helper.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/helper_blackbox_test.go b/pkg/client/unversioned/helper_blackbox_test.go index 9567339894..41d3a21abc 100644 --- a/pkg/client/unversioned/helper_blackbox_test.go +++ b/pkg/client/unversioned/helper_blackbox_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/helper_test.go b/pkg/client/unversioned/helper_test.go index 0e186e4c78..7a7ec3f2c5 100644 --- a/pkg/client/unversioned/helper_test.go +++ b/pkg/client/unversioned/helper_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/horizontalpodautoscaler.go b/pkg/client/unversioned/horizontalpodautoscaler.go index 8cdba3a265..76c6a9cf9d 100644 --- a/pkg/client/unversioned/horizontalpodautoscaler.go +++ b/pkg/client/unversioned/horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/horizontalpodautoscaler_test.go b/pkg/client/unversioned/horizontalpodautoscaler_test.go index b893a29ad8..6083643543 100644 --- a/pkg/client/unversioned/horizontalpodautoscaler_test.go +++ b/pkg/client/unversioned/horizontalpodautoscaler_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/import_known_versions.go b/pkg/client/unversioned/import_known_versions.go index 6d803af055..8508573c0a 100644 --- a/pkg/client/unversioned/import_known_versions.go +++ b/pkg/client/unversioned/import_known_versions.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/ingress.go b/pkg/client/unversioned/ingress.go index 4865b20862..59c6a6d9f8 100644 --- a/pkg/client/unversioned/ingress.go +++ b/pkg/client/unversioned/ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/ingress_test.go b/pkg/client/unversioned/ingress_test.go index dfec482ead..0dc4e71ca7 100644 --- a/pkg/client/unversioned/ingress_test.go +++ b/pkg/client/unversioned/ingress_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/jobs.go b/pkg/client/unversioned/jobs.go index 94b819079a..14cfa3a30b 100644 --- a/pkg/client/unversioned/jobs.go +++ b/pkg/client/unversioned/jobs.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/jobs_test.go b/pkg/client/unversioned/jobs_test.go index e47d49d51e..8b198701a0 100644 --- a/pkg/client/unversioned/jobs_test.go +++ b/pkg/client/unversioned/jobs_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/limit_ranges.go b/pkg/client/unversioned/limit_ranges.go index 8bc2253da9..914a049f44 100644 --- a/pkg/client/unversioned/limit_ranges.go +++ b/pkg/client/unversioned/limit_ranges.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/limit_ranges_test.go b/pkg/client/unversioned/limit_ranges_test.go index 445310291e..47995e6c97 100644 --- a/pkg/client/unversioned/limit_ranges_test.go +++ b/pkg/client/unversioned/limit_ranges_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/namespaces.go b/pkg/client/unversioned/namespaces.go index 122bcba508..b4a38361ca 100644 --- a/pkg/client/unversioned/namespaces.go +++ b/pkg/client/unversioned/namespaces.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/namespaces_test.go b/pkg/client/unversioned/namespaces_test.go index 8e38c935b6..ce4db7f990 100644 --- a/pkg/client/unversioned/namespaces_test.go +++ b/pkg/client/unversioned/namespaces_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/network_policys.go b/pkg/client/unversioned/network_policys.go index 0dc9d97be8..3e3f61045d 100644 --- a/pkg/client/unversioned/network_policys.go +++ b/pkg/client/unversioned/network_policys.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/nodes.go b/pkg/client/unversioned/nodes.go index 452a03f169..6a05a2a216 100644 --- a/pkg/client/unversioned/nodes.go +++ b/pkg/client/unversioned/nodes.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/nodes_test.go b/pkg/client/unversioned/nodes_test.go index d20656d49e..0ec6ab9366 100644 --- a/pkg/client/unversioned/nodes_test.go +++ b/pkg/client/unversioned/nodes_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/persistentvolume_test.go b/pkg/client/unversioned/persistentvolume_test.go index 03ebed7e7c..20832461b5 100644 --- a/pkg/client/unversioned/persistentvolume_test.go +++ b/pkg/client/unversioned/persistentvolume_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/persistentvolumeclaim.go b/pkg/client/unversioned/persistentvolumeclaim.go index bf5447d758..4ea3a95a76 100644 --- a/pkg/client/unversioned/persistentvolumeclaim.go +++ b/pkg/client/unversioned/persistentvolumeclaim.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/persistentvolumeclaim_test.go b/pkg/client/unversioned/persistentvolumeclaim_test.go index 901f510dfa..18a9b9d89f 100644 --- a/pkg/client/unversioned/persistentvolumeclaim_test.go +++ b/pkg/client/unversioned/persistentvolumeclaim_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/persistentvolumes.go b/pkg/client/unversioned/persistentvolumes.go index 2de17bb718..5fce1f0a45 100644 --- a/pkg/client/unversioned/persistentvolumes.go +++ b/pkg/client/unversioned/persistentvolumes.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/pet_sets.go b/pkg/client/unversioned/pet_sets.go index 71b1ea0217..954efcd092 100644 --- a/pkg/client/unversioned/pet_sets.go +++ b/pkg/client/unversioned/pet_sets.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/pet_sets_test.go b/pkg/client/unversioned/pet_sets_test.go index 879aa5ce7d..fb00024e6e 100644 --- a/pkg/client/unversioned/pet_sets_test.go +++ b/pkg/client/unversioned/pet_sets_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/pod_disruption_budgets.go b/pkg/client/unversioned/pod_disruption_budgets.go index 14f373f376..0239623a7b 100644 --- a/pkg/client/unversioned/pod_disruption_budgets.go +++ b/pkg/client/unversioned/pod_disruption_budgets.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/pod_templates.go b/pkg/client/unversioned/pod_templates.go index ed5b733c67..7627d735f5 100644 --- a/pkg/client/unversioned/pod_templates.go +++ b/pkg/client/unversioned/pod_templates.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/pod_templates_test.go b/pkg/client/unversioned/pod_templates_test.go index c72f0a21c8..d296be1aa2 100644 --- a/pkg/client/unversioned/pod_templates_test.go +++ b/pkg/client/unversioned/pod_templates_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/pods.go b/pkg/client/unversioned/pods.go index 426d3ee8e9..ea16fb87d6 100644 --- a/pkg/client/unversioned/pods.go +++ b/pkg/client/unversioned/pods.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/pods_test.go b/pkg/client/unversioned/pods_test.go index 42a806502a..1aa9a96c2e 100644 --- a/pkg/client/unversioned/pods_test.go +++ b/pkg/client/unversioned/pods_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/podsecuritypolicy.go b/pkg/client/unversioned/podsecuritypolicy.go index 356d913dbe..f03e643f26 100644 --- a/pkg/client/unversioned/podsecuritypolicy.go +++ b/pkg/client/unversioned/podsecuritypolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/podsecuritypolicy_test.go b/pkg/client/unversioned/podsecuritypolicy_test.go index 06fae477e3..0b0185f5f9 100644 --- a/pkg/client/unversioned/podsecuritypolicy_test.go +++ b/pkg/client/unversioned/podsecuritypolicy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/policy.go b/pkg/client/unversioned/policy.go index 8b06ce275a..ed4d0679d1 100644 --- a/pkg/client/unversioned/policy.go +++ b/pkg/client/unversioned/policy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/portforward/doc.go b/pkg/client/unversioned/portforward/doc.go index 032f180f97..e0f6cfbf2b 100644 --- a/pkg/client/unversioned/portforward/doc.go +++ b/pkg/client/unversioned/portforward/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/portforward/portforward.go b/pkg/client/unversioned/portforward/portforward.go index a5ce32d348..6ecedb6df9 100644 --- a/pkg/client/unversioned/portforward/portforward.go +++ b/pkg/client/unversioned/portforward/portforward.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/portforward/portforward_test.go b/pkg/client/unversioned/portforward/portforward_test.go index 31689eed21..6bc49a902f 100644 --- a/pkg/client/unversioned/portforward/portforward_test.go +++ b/pkg/client/unversioned/portforward/portforward_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/rbac.go b/pkg/client/unversioned/rbac.go index 76ec392c3e..76a070cbce 100644 --- a/pkg/client/unversioned/rbac.go +++ b/pkg/client/unversioned/rbac.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/remotecommand/doc.go b/pkg/client/unversioned/remotecommand/doc.go index 88197ed0d4..b9f0db2d9a 100644 --- a/pkg/client/unversioned/remotecommand/doc.go +++ b/pkg/client/unversioned/remotecommand/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/remotecommand/remotecommand.go b/pkg/client/unversioned/remotecommand/remotecommand.go index 7144f3093c..d39947d7e1 100644 --- a/pkg/client/unversioned/remotecommand/remotecommand.go +++ b/pkg/client/unversioned/remotecommand/remotecommand.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/remotecommand/remotecommand_test.go b/pkg/client/unversioned/remotecommand/remotecommand_test.go index f231a7f492..9c445c26f7 100644 --- a/pkg/client/unversioned/remotecommand/remotecommand_test.go +++ b/pkg/client/unversioned/remotecommand/remotecommand_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/remotecommand/v1.go b/pkg/client/unversioned/remotecommand/v1.go index f5428e0f95..2fa5b2e911 100644 --- a/pkg/client/unversioned/remotecommand/v1.go +++ b/pkg/client/unversioned/remotecommand/v1.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/remotecommand/v2.go b/pkg/client/unversioned/remotecommand/v2.go index 67e8637cf8..66ca9c6486 100644 --- a/pkg/client/unversioned/remotecommand/v2.go +++ b/pkg/client/unversioned/remotecommand/v2.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/replica_sets.go b/pkg/client/unversioned/replica_sets.go index be9284084f..191a006b60 100644 --- a/pkg/client/unversioned/replica_sets.go +++ b/pkg/client/unversioned/replica_sets.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/replica_sets_test.go b/pkg/client/unversioned/replica_sets_test.go index 2a0e8142cf..e662610e27 100644 --- a/pkg/client/unversioned/replica_sets_test.go +++ b/pkg/client/unversioned/replica_sets_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/replication_controllers.go b/pkg/client/unversioned/replication_controllers.go index f237a76acf..e4b9e2d992 100644 --- a/pkg/client/unversioned/replication_controllers.go +++ b/pkg/client/unversioned/replication_controllers.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/replication_controllers_test.go b/pkg/client/unversioned/replication_controllers_test.go index de0458ce40..64586cedef 100644 --- a/pkg/client/unversioned/replication_controllers_test.go +++ b/pkg/client/unversioned/replication_controllers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/resource_quotas.go b/pkg/client/unversioned/resource_quotas.go index acfd8ddb32..9944cef9bb 100644 --- a/pkg/client/unversioned/resource_quotas.go +++ b/pkg/client/unversioned/resource_quotas.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/resource_quotas_test.go b/pkg/client/unversioned/resource_quotas_test.go index 73dba8dfba..32317bcc4b 100644 --- a/pkg/client/unversioned/resource_quotas_test.go +++ b/pkg/client/unversioned/resource_quotas_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/rolebindings.go b/pkg/client/unversioned/rolebindings.go index a43815c552..b79838010d 100644 --- a/pkg/client/unversioned/rolebindings.go +++ b/pkg/client/unversioned/rolebindings.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/roles.go b/pkg/client/unversioned/roles.go index 29aee1baee..b265e787b5 100644 --- a/pkg/client/unversioned/roles.go +++ b/pkg/client/unversioned/roles.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/scale.go b/pkg/client/unversioned/scale.go index 705f6048b5..a55b0777db 100644 --- a/pkg/client/unversioned/scale.go +++ b/pkg/client/unversioned/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/scheduledjobs.go b/pkg/client/unversioned/scheduledjobs.go index d2b83fce20..de07a7e5de 100644 --- a/pkg/client/unversioned/scheduledjobs.go +++ b/pkg/client/unversioned/scheduledjobs.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/secrets.go b/pkg/client/unversioned/secrets.go index 33d77ad249..bba3fd9369 100644 --- a/pkg/client/unversioned/secrets.go +++ b/pkg/client/unversioned/secrets.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/service_accounts.go b/pkg/client/unversioned/service_accounts.go index d78a25c473..68d1b2112a 100644 --- a/pkg/client/unversioned/service_accounts.go +++ b/pkg/client/unversioned/service_accounts.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/services.go b/pkg/client/unversioned/services.go index 8b40a5d048..aada5c164a 100644 --- a/pkg/client/unversioned/services.go +++ b/pkg/client/unversioned/services.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/services_test.go b/pkg/client/unversioned/services_test.go index fadfe2be48..ef0149ae29 100644 --- a/pkg/client/unversioned/services_test.go +++ b/pkg/client/unversioned/services_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/actions.go b/pkg/client/unversioned/testclient/actions.go index 1e5a5e4701..15769e69d1 100644 --- a/pkg/client/unversioned/testclient/actions.go +++ b/pkg/client/unversioned/testclient/actions.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_certificates.go b/pkg/client/unversioned/testclient/fake_certificates.go index facb687781..6278decdf8 100644 --- a/pkg/client/unversioned/testclient/fake_certificates.go +++ b/pkg/client/unversioned/testclient/fake_certificates.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_clusterrolebindings.go b/pkg/client/unversioned/testclient/fake_clusterrolebindings.go index 6da1da3553..0e9d2413e6 100644 --- a/pkg/client/unversioned/testclient/fake_clusterrolebindings.go +++ b/pkg/client/unversioned/testclient/fake_clusterrolebindings.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_clusterroles.go b/pkg/client/unversioned/testclient/fake_clusterroles.go index 5bdfd3dc74..5735224a75 100644 --- a/pkg/client/unversioned/testclient/fake_clusterroles.go +++ b/pkg/client/unversioned/testclient/fake_clusterroles.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_componentstatuses.go b/pkg/client/unversioned/testclient/fake_componentstatuses.go index 34bf210d47..06bbdf8d2b 100644 --- a/pkg/client/unversioned/testclient/fake_componentstatuses.go +++ b/pkg/client/unversioned/testclient/fake_componentstatuses.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_configmaps.go b/pkg/client/unversioned/testclient/fake_configmaps.go index 17a5bfeb81..7a35b28ab4 100644 --- a/pkg/client/unversioned/testclient/fake_configmaps.go +++ b/pkg/client/unversioned/testclient/fake_configmaps.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_daemon_sets.go b/pkg/client/unversioned/testclient/fake_daemon_sets.go index d0e1e73e14..ec0c88850a 100644 --- a/pkg/client/unversioned/testclient/fake_daemon_sets.go +++ b/pkg/client/unversioned/testclient/fake_daemon_sets.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_deployments.go b/pkg/client/unversioned/testclient/fake_deployments.go index 3e13fe7b34..7c4c10b302 100644 --- a/pkg/client/unversioned/testclient/fake_deployments.go +++ b/pkg/client/unversioned/testclient/fake_deployments.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_endpoints.go b/pkg/client/unversioned/testclient/fake_endpoints.go index 68f6178f77..dda3456afa 100644 --- a/pkg/client/unversioned/testclient/fake_endpoints.go +++ b/pkg/client/unversioned/testclient/fake_endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_events.go b/pkg/client/unversioned/testclient/fake_events.go index 3da2143fc4..7c3ee3be69 100644 --- a/pkg/client/unversioned/testclient/fake_events.go +++ b/pkg/client/unversioned/testclient/fake_events.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_horizontal_pod_autoscalers.go b/pkg/client/unversioned/testclient/fake_horizontal_pod_autoscalers.go index c299679f0b..9c3805f8f7 100644 --- a/pkg/client/unversioned/testclient/fake_horizontal_pod_autoscalers.go +++ b/pkg/client/unversioned/testclient/fake_horizontal_pod_autoscalers.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_ingress.go b/pkg/client/unversioned/testclient/fake_ingress.go index b15458997f..da2b41115f 100644 --- a/pkg/client/unversioned/testclient/fake_ingress.go +++ b/pkg/client/unversioned/testclient/fake_ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_jobs.go b/pkg/client/unversioned/testclient/fake_jobs.go index dedde9dc3d..bbcbdf6620 100644 --- a/pkg/client/unversioned/testclient/fake_jobs.go +++ b/pkg/client/unversioned/testclient/fake_jobs.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_limit_ranges.go b/pkg/client/unversioned/testclient/fake_limit_ranges.go index 3669f5ff82..2520933240 100644 --- a/pkg/client/unversioned/testclient/fake_limit_ranges.go +++ b/pkg/client/unversioned/testclient/fake_limit_ranges.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_namespaces.go b/pkg/client/unversioned/testclient/fake_namespaces.go index 8c4ac1ac27..45c9246561 100644 --- a/pkg/client/unversioned/testclient/fake_namespaces.go +++ b/pkg/client/unversioned/testclient/fake_namespaces.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_network_policies.go b/pkg/client/unversioned/testclient/fake_network_policies.go index abbe9c61ba..5239be9a1e 100644 --- a/pkg/client/unversioned/testclient/fake_network_policies.go +++ b/pkg/client/unversioned/testclient/fake_network_policies.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_nodes.go b/pkg/client/unversioned/testclient/fake_nodes.go index b1943366e5..859a1c6473 100644 --- a/pkg/client/unversioned/testclient/fake_nodes.go +++ b/pkg/client/unversioned/testclient/fake_nodes.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_persistent_volume_claims.go b/pkg/client/unversioned/testclient/fake_persistent_volume_claims.go index cadfb084c3..6eb092ff71 100644 --- a/pkg/client/unversioned/testclient/fake_persistent_volume_claims.go +++ b/pkg/client/unversioned/testclient/fake_persistent_volume_claims.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_persistent_volumes.go b/pkg/client/unversioned/testclient/fake_persistent_volumes.go index cb184bc441..d17d351f05 100644 --- a/pkg/client/unversioned/testclient/fake_persistent_volumes.go +++ b/pkg/client/unversioned/testclient/fake_persistent_volumes.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_pod_templates.go b/pkg/client/unversioned/testclient/fake_pod_templates.go index 47ff3d8ace..83d7468352 100644 --- a/pkg/client/unversioned/testclient/fake_pod_templates.go +++ b/pkg/client/unversioned/testclient/fake_pod_templates.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_pods.go b/pkg/client/unversioned/testclient/fake_pods.go index e634030c80..ef45382b7a 100644 --- a/pkg/client/unversioned/testclient/fake_pods.go +++ b/pkg/client/unversioned/testclient/fake_pods.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_podsecuritypolicy.go b/pkg/client/unversioned/testclient/fake_podsecuritypolicy.go index 06bd10991f..33297b1a23 100644 --- a/pkg/client/unversioned/testclient/fake_podsecuritypolicy.go +++ b/pkg/client/unversioned/testclient/fake_podsecuritypolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_replica_sets.go b/pkg/client/unversioned/testclient/fake_replica_sets.go index 29c985c8c9..174f9360db 100644 --- a/pkg/client/unversioned/testclient/fake_replica_sets.go +++ b/pkg/client/unversioned/testclient/fake_replica_sets.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_replication_controllers.go b/pkg/client/unversioned/testclient/fake_replication_controllers.go index e44b826155..2d3d7d9ef8 100644 --- a/pkg/client/unversioned/testclient/fake_replication_controllers.go +++ b/pkg/client/unversioned/testclient/fake_replication_controllers.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_resource_quotas.go b/pkg/client/unversioned/testclient/fake_resource_quotas.go index d5090f0d0f..1bb062f4a7 100644 --- a/pkg/client/unversioned/testclient/fake_resource_quotas.go +++ b/pkg/client/unversioned/testclient/fake_resource_quotas.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_rolebindings.go b/pkg/client/unversioned/testclient/fake_rolebindings.go index 6502cbd5a9..d5e6bfc95b 100644 --- a/pkg/client/unversioned/testclient/fake_rolebindings.go +++ b/pkg/client/unversioned/testclient/fake_rolebindings.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_roles.go b/pkg/client/unversioned/testclient/fake_roles.go index 53aeb1e27f..bbbd795c5c 100644 --- a/pkg/client/unversioned/testclient/fake_roles.go +++ b/pkg/client/unversioned/testclient/fake_roles.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_scales.go b/pkg/client/unversioned/testclient/fake_scales.go index 53ff5f87df..13050eb10f 100644 --- a/pkg/client/unversioned/testclient/fake_scales.go +++ b/pkg/client/unversioned/testclient/fake_scales.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_scheduledjobs.go b/pkg/client/unversioned/testclient/fake_scheduledjobs.go index 7036682bac..60e866e6a0 100644 --- a/pkg/client/unversioned/testclient/fake_scheduledjobs.go +++ b/pkg/client/unversioned/testclient/fake_scheduledjobs.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_secrets.go b/pkg/client/unversioned/testclient/fake_secrets.go index f54cffb871..8ead395cb2 100644 --- a/pkg/client/unversioned/testclient/fake_secrets.go +++ b/pkg/client/unversioned/testclient/fake_secrets.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_service_accounts.go b/pkg/client/unversioned/testclient/fake_service_accounts.go index e40641668e..43dc3aaf56 100644 --- a/pkg/client/unversioned/testclient/fake_service_accounts.go +++ b/pkg/client/unversioned/testclient/fake_service_accounts.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_services.go b/pkg/client/unversioned/testclient/fake_services.go index fd4861ba14..158ad26ce7 100644 --- a/pkg/client/unversioned/testclient/fake_services.go +++ b/pkg/client/unversioned/testclient/fake_services.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_test.go b/pkg/client/unversioned/testclient/fake_test.go index 303d6d786b..208df0730b 100644 --- a/pkg/client/unversioned/testclient/fake_test.go +++ b/pkg/client/unversioned/testclient/fake_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fake_thirdpartyresources.go b/pkg/client/unversioned/testclient/fake_thirdpartyresources.go index cb4a15572a..db5a718504 100644 --- a/pkg/client/unversioned/testclient/fake_thirdpartyresources.go +++ b/pkg/client/unversioned/testclient/fake_thirdpartyresources.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/fixture.go b/pkg/client/unversioned/testclient/fixture.go index 0fdbeac9f6..6149f0a8de 100644 --- a/pkg/client/unversioned/testclient/fixture.go +++ b/pkg/client/unversioned/testclient/fixture.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/simple/simple_testclient.go b/pkg/client/unversioned/testclient/simple/simple_testclient.go index 546fb7c47b..6efdf0da52 100644 --- a/pkg/client/unversioned/testclient/simple/simple_testclient.go +++ b/pkg/client/unversioned/testclient/simple/simple_testclient.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/testclient.go b/pkg/client/unversioned/testclient/testclient.go index 191fd21b12..d4f1eb70c5 100644 --- a/pkg/client/unversioned/testclient/testclient.go +++ b/pkg/client/unversioned/testclient/testclient.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/testclient/testclient_test.go b/pkg/client/unversioned/testclient/testclient_test.go index 4a799df71d..d10c1845a9 100644 --- a/pkg/client/unversioned/testclient/testclient_test.go +++ b/pkg/client/unversioned/testclient/testclient_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/thirdpartyresources.go b/pkg/client/unversioned/thirdpartyresources.go index 0908db06eb..68adddbe7c 100644 --- a/pkg/client/unversioned/thirdpartyresources.go +++ b/pkg/client/unversioned/thirdpartyresources.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/thirdpartyresources_test.go b/pkg/client/unversioned/thirdpartyresources_test.go index 266ff4ae8b..c5ab51069a 100644 --- a/pkg/client/unversioned/thirdpartyresources_test.go +++ b/pkg/client/unversioned/thirdpartyresources_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/util.go b/pkg/client/unversioned/util.go index 37ada3c3d6..9657ff2a9f 100644 --- a/pkg/client/unversioned/util.go +++ b/pkg/client/unversioned/util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/unversioned/util_test.go b/pkg/client/unversioned/util_test.go index 8a5826c22b..9438a764cf 100644 --- a/pkg/client/unversioned/util_test.go +++ b/pkg/client/unversioned/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/cloud.go b/pkg/cloudprovider/cloud.go index 0190ed50ac..59cd18fa40 100644 --- a/pkg/cloudprovider/cloud.go +++ b/pkg/cloudprovider/cloud.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/doc.go b/pkg/cloudprovider/doc.go index eaa91e6cf2..7192394c39 100644 --- a/pkg/cloudprovider/doc.go +++ b/pkg/cloudprovider/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/plugins.go b/pkg/cloudprovider/plugins.go index ad39e34051..670400f628 100644 --- a/pkg/cloudprovider/plugins.go +++ b/pkg/cloudprovider/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/aws/aws.go b/pkg/cloudprovider/providers/aws/aws.go index 1d933551d2..37c042923e 100644 --- a/pkg/cloudprovider/providers/aws/aws.go +++ b/pkg/cloudprovider/providers/aws/aws.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/aws/aws_instancegroups.go b/pkg/cloudprovider/providers/aws/aws_instancegroups.go index 5edbb3da99..af3ff541a0 100644 --- a/pkg/cloudprovider/providers/aws/aws_instancegroups.go +++ b/pkg/cloudprovider/providers/aws/aws_instancegroups.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/aws/aws_loadbalancer.go b/pkg/cloudprovider/providers/aws/aws_loadbalancer.go index 85b2f2d50c..a7bf841e31 100644 --- a/pkg/cloudprovider/providers/aws/aws_loadbalancer.go +++ b/pkg/cloudprovider/providers/aws/aws_loadbalancer.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/aws/aws_routes.go b/pkg/cloudprovider/providers/aws/aws_routes.go index 63a9e2e5ae..9814059934 100644 --- a/pkg/cloudprovider/providers/aws/aws_routes.go +++ b/pkg/cloudprovider/providers/aws/aws_routes.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/aws/aws_test.go b/pkg/cloudprovider/providers/aws/aws_test.go index 5932b059ed..bb06db2df5 100644 --- a/pkg/cloudprovider/providers/aws/aws_test.go +++ b/pkg/cloudprovider/providers/aws/aws_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/aws/aws_utils.go b/pkg/cloudprovider/providers/aws/aws_utils.go index 0067ded7f0..361b93e7fa 100644 --- a/pkg/cloudprovider/providers/aws/aws_utils.go +++ b/pkg/cloudprovider/providers/aws/aws_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/aws/log_handler.go b/pkg/cloudprovider/providers/aws/log_handler.go index 177c7074a8..f1c88fd1e4 100644 --- a/pkg/cloudprovider/providers/aws/log_handler.go +++ b/pkg/cloudprovider/providers/aws/log_handler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/aws/retry_handler.go b/pkg/cloudprovider/providers/aws/retry_handler.go index 6e6657bf0b..49a50ef5c5 100644 --- a/pkg/cloudprovider/providers/aws/retry_handler.go +++ b/pkg/cloudprovider/providers/aws/retry_handler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/aws/retry_handler_test.go b/pkg/cloudprovider/providers/aws/retry_handler_test.go index e02b52d6db..27b18c6005 100644 --- a/pkg/cloudprovider/providers/aws/retry_handler_test.go +++ b/pkg/cloudprovider/providers/aws/retry_handler_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/aws/sets_ippermissions.go b/pkg/cloudprovider/providers/aws/sets_ippermissions.go index 2e1343ff8d..8a268c4b0e 100644 --- a/pkg/cloudprovider/providers/aws/sets_ippermissions.go +++ b/pkg/cloudprovider/providers/aws/sets_ippermissions.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/fake/doc.go b/pkg/cloudprovider/providers/fake/doc.go index ff22d568f9..caf5b1e52c 100644 --- a/pkg/cloudprovider/providers/fake/doc.go +++ b/pkg/cloudprovider/providers/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/fake/fake.go b/pkg/cloudprovider/providers/fake/fake.go index 10c58991c5..5801ca2bbf 100644 --- a/pkg/cloudprovider/providers/fake/fake.go +++ b/pkg/cloudprovider/providers/fake/fake.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/gce/doc.go b/pkg/cloudprovider/providers/gce/doc.go index 93acc5a314..25c79b9ec0 100644 --- a/pkg/cloudprovider/providers/gce/doc.go +++ b/pkg/cloudprovider/providers/gce/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/gce/gce.go b/pkg/cloudprovider/providers/gce/gce.go index 7352bd37bf..589f2e001f 100644 --- a/pkg/cloudprovider/providers/gce/gce.go +++ b/pkg/cloudprovider/providers/gce/gce.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/gce/gce_test.go b/pkg/cloudprovider/providers/gce/gce_test.go index f7ca0f881f..5bba03bf97 100644 --- a/pkg/cloudprovider/providers/gce/gce_test.go +++ b/pkg/cloudprovider/providers/gce/gce_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/gce/token_source.go b/pkg/cloudprovider/providers/gce/token_source.go index 20028c02c6..a30cae577c 100644 --- a/pkg/cloudprovider/providers/gce/token_source.go +++ b/pkg/cloudprovider/providers/gce/token_source.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/mesos/client.go b/pkg/cloudprovider/providers/mesos/client.go index 1b488bc62d..84b506fc7a 100644 --- a/pkg/cloudprovider/providers/mesos/client.go +++ b/pkg/cloudprovider/providers/mesos/client.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/mesos/client_test.go b/pkg/cloudprovider/providers/mesos/client_test.go index 849a039ca0..684bd8b7f4 100644 --- a/pkg/cloudprovider/providers/mesos/client_test.go +++ b/pkg/cloudprovider/providers/mesos/client_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/mesos/config.go b/pkg/cloudprovider/providers/mesos/config.go index 9edbc8f5f5..29d3bfdc4f 100644 --- a/pkg/cloudprovider/providers/mesos/config.go +++ b/pkg/cloudprovider/providers/mesos/config.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/mesos/config_test.go b/pkg/cloudprovider/providers/mesos/config_test.go index d1013471c7..4637ab852b 100644 --- a/pkg/cloudprovider/providers/mesos/config_test.go +++ b/pkg/cloudprovider/providers/mesos/config_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/mesos/mesos.go b/pkg/cloudprovider/providers/mesos/mesos.go index 20285843b6..1ca1dcf365 100644 --- a/pkg/cloudprovider/providers/mesos/mesos.go +++ b/pkg/cloudprovider/providers/mesos/mesos.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/mesos/mesos_test.go b/pkg/cloudprovider/providers/mesos/mesos_test.go index b504f4ef03..e620d50b1d 100644 --- a/pkg/cloudprovider/providers/mesos/mesos_test.go +++ b/pkg/cloudprovider/providers/mesos/mesos_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/mesos/plugins.go b/pkg/cloudprovider/providers/mesos/plugins.go index 2baf7b47f5..4f07353089 100644 --- a/pkg/cloudprovider/providers/mesos/plugins.go +++ b/pkg/cloudprovider/providers/mesos/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/openstack/openstack.go b/pkg/cloudprovider/providers/openstack/openstack.go index fa801bb9cb..baa5a09c74 100644 --- a/pkg/cloudprovider/providers/openstack/openstack.go +++ b/pkg/cloudprovider/providers/openstack/openstack.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go b/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go index 90f345a8ae..e3b2ab12b0 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go +++ b/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/openstack/openstack_test.go b/pkg/cloudprovider/providers/openstack/openstack_test.go index 1093348be9..9e72c382b7 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_test.go +++ b/pkg/cloudprovider/providers/openstack/openstack_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/ovirt/ovirt.go b/pkg/cloudprovider/providers/ovirt/ovirt.go index d2ba03c10b..3fb29893f5 100644 --- a/pkg/cloudprovider/providers/ovirt/ovirt.go +++ b/pkg/cloudprovider/providers/ovirt/ovirt.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/ovirt/ovirt_test.go b/pkg/cloudprovider/providers/ovirt/ovirt_test.go index c76bde7262..a90d676d28 100644 --- a/pkg/cloudprovider/providers/ovirt/ovirt_test.go +++ b/pkg/cloudprovider/providers/ovirt/ovirt_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/providers.go b/pkg/cloudprovider/providers/providers.go index 765beb636b..cd9aadeea3 100644 --- a/pkg/cloudprovider/providers/providers.go +++ b/pkg/cloudprovider/providers/providers.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/rackspace/rackspace.go b/pkg/cloudprovider/providers/rackspace/rackspace.go index 3f6f6a5d4b..d036096624 100644 --- a/pkg/cloudprovider/providers/rackspace/rackspace.go +++ b/pkg/cloudprovider/providers/rackspace/rackspace.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/rackspace/rackspace_test.go b/pkg/cloudprovider/providers/rackspace/rackspace_test.go index 1b00b13306..7403c5eee8 100644 --- a/pkg/cloudprovider/providers/rackspace/rackspace_test.go +++ b/pkg/cloudprovider/providers/rackspace/rackspace_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/vsphere/vsphere.go b/pkg/cloudprovider/providers/vsphere/vsphere.go index 8561ed3693..c647e049e9 100644 --- a/pkg/cloudprovider/providers/vsphere/vsphere.go +++ b/pkg/cloudprovider/providers/vsphere/vsphere.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/cloudprovider/providers/vsphere/vsphere_test.go b/pkg/cloudprovider/providers/vsphere/vsphere_test.go index 26edbd3ce5..217bf24907 100644 --- a/pkg/cloudprovider/providers/vsphere/vsphere_test.go +++ b/pkg/cloudprovider/providers/vsphere/vsphere_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/controller_utils.go b/pkg/controller/controller_utils.go index efdab55c13..ae6dbadba7 100644 --- a/pkg/controller/controller_utils.go +++ b/pkg/controller/controller_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/controller_utils_test.go b/pkg/controller/controller_utils_test.go index 423e42703e..01d7705ce3 100644 --- a/pkg/controller/controller_utils_test.go +++ b/pkg/controller/controller_utils_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/daemon/controller.go b/pkg/controller/daemon/controller.go index 44ce50f3e5..ec91d1789c 100644 --- a/pkg/controller/daemon/controller.go +++ b/pkg/controller/daemon/controller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/daemon/controller_test.go b/pkg/controller/daemon/controller_test.go index c21d746d34..090ae26aad 100644 --- a/pkg/controller/daemon/controller_test.go +++ b/pkg/controller/daemon/controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/daemon/doc.go b/pkg/controller/daemon/doc.go index db689ac1bb..9a5190a29b 100644 --- a/pkg/controller/daemon/doc.go +++ b/pkg/controller/daemon/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/deployment/deployment_controller.go b/pkg/controller/deployment/deployment_controller.go index 192d12d8ce..9e937b2b9d 100644 --- a/pkg/controller/deployment/deployment_controller.go +++ b/pkg/controller/deployment/deployment_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/deployment/deployment_controller_test.go b/pkg/controller/deployment/deployment_controller_test.go index a192dcc22b..d9c2b18105 100644 --- a/pkg/controller/deployment/deployment_controller_test.go +++ b/pkg/controller/deployment/deployment_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/deployment/util.go b/pkg/controller/deployment/util.go index b8c45c090d..06fbad3c87 100644 --- a/pkg/controller/deployment/util.go +++ b/pkg/controller/deployment/util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/doc.go b/pkg/controller/doc.go index 1e310b466f..ded3905820 100644 --- a/pkg/controller/doc.go +++ b/pkg/controller/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/endpoint/doc.go b/pkg/controller/endpoint/doc.go index c51ec65183..2a84e5754f 100644 --- a/pkg/controller/endpoint/doc.go +++ b/pkg/controller/endpoint/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/endpoint/endpoints_controller.go b/pkg/controller/endpoint/endpoints_controller.go index a28c87181f..d9ed3a89b5 100644 --- a/pkg/controller/endpoint/endpoints_controller.go +++ b/pkg/controller/endpoint/endpoints_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/endpoint/endpoints_controller_test.go b/pkg/controller/endpoint/endpoints_controller_test.go index e4097eb16a..deb7d344c2 100644 --- a/pkg/controller/endpoint/endpoints_controller_test.go +++ b/pkg/controller/endpoint/endpoints_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/framework/controller.go b/pkg/controller/framework/controller.go index c6363952b0..8cbd124a36 100644 --- a/pkg/controller/framework/controller.go +++ b/pkg/controller/framework/controller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/framework/controller_test.go b/pkg/controller/framework/controller_test.go index b17aba4ab6..17b598a668 100644 --- a/pkg/controller/framework/controller_test.go +++ b/pkg/controller/framework/controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/framework/doc.go b/pkg/controller/framework/doc.go index ecd3cf28ab..feceba36c9 100644 --- a/pkg/controller/framework/doc.go +++ b/pkg/controller/framework/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/framework/fake_controller_source.go b/pkg/controller/framework/fake_controller_source.go index 9e90e7c916..ee00c0586e 100644 --- a/pkg/controller/framework/fake_controller_source.go +++ b/pkg/controller/framework/fake_controller_source.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/framework/fake_controller_source_test.go b/pkg/controller/framework/fake_controller_source_test.go index 01269ce643..0256e46159 100644 --- a/pkg/controller/framework/fake_controller_source_test.go +++ b/pkg/controller/framework/fake_controller_source_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/framework/informers/factory.go b/pkg/controller/framework/informers/factory.go index 6e432ef9cd..be973bfb54 100644 --- a/pkg/controller/framework/informers/factory.go +++ b/pkg/controller/framework/informers/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/framework/processor_listener_test.go b/pkg/controller/framework/processor_listener_test.go index ffd72d8fae..31ed784f1a 100644 --- a/pkg/controller/framework/processor_listener_test.go +++ b/pkg/controller/framework/processor_listener_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/framework/shared_informer.go b/pkg/controller/framework/shared_informer.go index 8762228ba4..df540da1b3 100644 --- a/pkg/controller/framework/shared_informer.go +++ b/pkg/controller/framework/shared_informer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/garbagecollector/garbagecollector.go b/pkg/controller/garbagecollector/garbagecollector.go index cbd0ba29e7..ebb5742dcd 100644 --- a/pkg/controller/garbagecollector/garbagecollector.go +++ b/pkg/controller/garbagecollector/garbagecollector.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/garbagecollector/garbagecollector_test.go b/pkg/controller/garbagecollector/garbagecollector_test.go index 617054439d..58fc5fccae 100644 --- a/pkg/controller/garbagecollector/garbagecollector_test.go +++ b/pkg/controller/garbagecollector/garbagecollector_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/job/controller.go b/pkg/controller/job/controller.go index 964a4ec14d..a310c424f1 100644 --- a/pkg/controller/job/controller.go +++ b/pkg/controller/job/controller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/job/controller_test.go b/pkg/controller/job/controller_test.go index 95f0432b68..4ced7477f9 100644 --- a/pkg/controller/job/controller_test.go +++ b/pkg/controller/job/controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/job/doc.go b/pkg/controller/job/doc.go index 9c569bfc08..281ab9ad73 100644 --- a/pkg/controller/job/doc.go +++ b/pkg/controller/job/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/lookup_cache.go b/pkg/controller/lookup_cache.go index 0333eff38c..84029c5f3f 100644 --- a/pkg/controller/lookup_cache.go +++ b/pkg/controller/lookup_cache.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/namespace/doc.go b/pkg/controller/namespace/doc.go index fea657af5e..7a5556480f 100644 --- a/pkg/controller/namespace/doc.go +++ b/pkg/controller/namespace/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/namespace/namespace_controller.go b/pkg/controller/namespace/namespace_controller.go index 0583313ab8..0c367bdfe2 100644 --- a/pkg/controller/namespace/namespace_controller.go +++ b/pkg/controller/namespace/namespace_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/namespace/namespace_controller_test.go b/pkg/controller/namespace/namespace_controller_test.go index 9c5b77d8ef..056204d86e 100644 --- a/pkg/controller/namespace/namespace_controller_test.go +++ b/pkg/controller/namespace/namespace_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/namespace/namespace_controller_utils.go b/pkg/controller/namespace/namespace_controller_utils.go index 9971e3ee5e..f6ed3f3399 100644 --- a/pkg/controller/namespace/namespace_controller_utils.go +++ b/pkg/controller/namespace/namespace_controller_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/node/cidr_allocator.go b/pkg/controller/node/cidr_allocator.go index f05792a1c4..066a9dca7b 100644 --- a/pkg/controller/node/cidr_allocator.go +++ b/pkg/controller/node/cidr_allocator.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/node/cidr_allocator_test.go b/pkg/controller/node/cidr_allocator_test.go index 37cfdf67ba..8fd7578854 100644 --- a/pkg/controller/node/cidr_allocator_test.go +++ b/pkg/controller/node/cidr_allocator_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/node/doc.go b/pkg/controller/node/doc.go index 084754e699..ac61e48586 100644 --- a/pkg/controller/node/doc.go +++ b/pkg/controller/node/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/node/nodecontroller.go b/pkg/controller/node/nodecontroller.go index 578181d26c..f36ac78e55 100644 --- a/pkg/controller/node/nodecontroller.go +++ b/pkg/controller/node/nodecontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/node/nodecontroller_test.go b/pkg/controller/node/nodecontroller_test.go index 818be93f22..9791fe4d60 100644 --- a/pkg/controller/node/nodecontroller_test.go +++ b/pkg/controller/node/nodecontroller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/node/rate_limited_queue.go b/pkg/controller/node/rate_limited_queue.go index a2865418fb..2cf933534f 100644 --- a/pkg/controller/node/rate_limited_queue.go +++ b/pkg/controller/node/rate_limited_queue.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/node/rate_limited_queue_test.go b/pkg/controller/node/rate_limited_queue_test.go index fded671abd..0b2016f9d8 100644 --- a/pkg/controller/node/rate_limited_queue_test.go +++ b/pkg/controller/node/rate_limited_queue_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/persistentvolume/binder_test.go b/pkg/controller/persistentvolume/binder_test.go index 86ed41e3a7..4d8ea0ee1a 100644 --- a/pkg/controller/persistentvolume/binder_test.go +++ b/pkg/controller/persistentvolume/binder_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/persistentvolume/controller.go b/pkg/controller/persistentvolume/controller.go index 87dc695c27..0fff15b19c 100644 --- a/pkg/controller/persistentvolume/controller.go +++ b/pkg/controller/persistentvolume/controller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/persistentvolume/controller_base.go b/pkg/controller/persistentvolume/controller_base.go index 67a70b2f39..88b5b139ac 100644 --- a/pkg/controller/persistentvolume/controller_base.go +++ b/pkg/controller/persistentvolume/controller_base.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/persistentvolume/controller_test.go b/pkg/controller/persistentvolume/controller_test.go index 4233e1b6bd..638fae112f 100644 --- a/pkg/controller/persistentvolume/controller_test.go +++ b/pkg/controller/persistentvolume/controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/persistentvolume/delete_test.go b/pkg/controller/persistentvolume/delete_test.go index c486502b8b..c134c0bfc9 100644 --- a/pkg/controller/persistentvolume/delete_test.go +++ b/pkg/controller/persistentvolume/delete_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/persistentvolume/framework_test.go b/pkg/controller/persistentvolume/framework_test.go index c4b5752560..218300b2fa 100644 --- a/pkg/controller/persistentvolume/framework_test.go +++ b/pkg/controller/persistentvolume/framework_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/persistentvolume/index.go b/pkg/controller/persistentvolume/index.go index 1d4df66e4f..60699e6e65 100644 --- a/pkg/controller/persistentvolume/index.go +++ b/pkg/controller/persistentvolume/index.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/persistentvolume/index_test.go b/pkg/controller/persistentvolume/index_test.go index 4fdb9c15ae..c055c3fa3c 100644 --- a/pkg/controller/persistentvolume/index_test.go +++ b/pkg/controller/persistentvolume/index_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/persistentvolume/options/options.go b/pkg/controller/persistentvolume/options/options.go index 6a84a55a84..c2c564cc5f 100644 --- a/pkg/controller/persistentvolume/options/options.go +++ b/pkg/controller/persistentvolume/options/options.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/persistentvolume/provision_test.go b/pkg/controller/persistentvolume/provision_test.go index dc9c59ae05..51f6fb5c94 100644 --- a/pkg/controller/persistentvolume/provision_test.go +++ b/pkg/controller/persistentvolume/provision_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/persistentvolume/recycle_test.go b/pkg/controller/persistentvolume/recycle_test.go index 7832bf0486..c6fde8b3fe 100644 --- a/pkg/controller/persistentvolume/recycle_test.go +++ b/pkg/controller/persistentvolume/recycle_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/persistentvolume/volume_host.go b/pkg/controller/persistentvolume/volume_host.go index 28bef72bf5..23915c22d4 100644 --- a/pkg/controller/persistentvolume/volume_host.go +++ b/pkg/controller/persistentvolume/volume_host.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/petset/fakes.go b/pkg/controller/petset/fakes.go index 6c1c8e713f..a0f4b948fc 100644 --- a/pkg/controller/petset/fakes.go +++ b/pkg/controller/petset/fakes.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/petset/identity_mappers.go b/pkg/controller/petset/identity_mappers.go index ae72ef2a8f..985d289f0c 100644 --- a/pkg/controller/petset/identity_mappers.go +++ b/pkg/controller/petset/identity_mappers.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/petset/identity_mappers_test.go b/pkg/controller/petset/identity_mappers_test.go index f9a736fc30..6f5e822e83 100644 --- a/pkg/controller/petset/identity_mappers_test.go +++ b/pkg/controller/petset/identity_mappers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/petset/iterator.go b/pkg/controller/petset/iterator.go index 81df6814cc..aef4ac9dd2 100644 --- a/pkg/controller/petset/iterator.go +++ b/pkg/controller/petset/iterator.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/petset/iterator_test.go b/pkg/controller/petset/iterator_test.go index ab07c4223b..dafe1cd3d7 100644 --- a/pkg/controller/petset/iterator_test.go +++ b/pkg/controller/petset/iterator_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/petset/pet.go b/pkg/controller/petset/pet.go index aa3534c442..42e2555e5d 100644 --- a/pkg/controller/petset/pet.go +++ b/pkg/controller/petset/pet.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/petset/pet_set.go b/pkg/controller/petset/pet_set.go index a34eb6d5c2..bc03a9a452 100644 --- a/pkg/controller/petset/pet_set.go +++ b/pkg/controller/petset/pet_set.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/petset/pet_set_test.go b/pkg/controller/petset/pet_set_test.go index 8498fce870..61e626f9bc 100644 --- a/pkg/controller/petset/pet_set_test.go +++ b/pkg/controller/petset/pet_set_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/petset/pet_set_utils.go b/pkg/controller/petset/pet_set_utils.go index d6d373050d..85e62b7b41 100644 --- a/pkg/controller/petset/pet_set_utils.go +++ b/pkg/controller/petset/pet_set_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/podautoscaler/doc.go b/pkg/controller/podautoscaler/doc.go index 34ce53aec7..fbbf843b01 100644 --- a/pkg/controller/podautoscaler/doc.go +++ b/pkg/controller/podautoscaler/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/podautoscaler/horizontal.go b/pkg/controller/podautoscaler/horizontal.go index 2ca083ff20..9c6cc436b1 100644 --- a/pkg/controller/podautoscaler/horizontal.go +++ b/pkg/controller/podautoscaler/horizontal.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/podautoscaler/horizontal_test.go b/pkg/controller/podautoscaler/horizontal_test.go index 003a4a5d69..611794402a 100644 --- a/pkg/controller/podautoscaler/horizontal_test.go +++ b/pkg/controller/podautoscaler/horizontal_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/podautoscaler/metrics/metrics_client.go b/pkg/controller/podautoscaler/metrics/metrics_client.go index 0e6f208ee6..ebc683fde6 100644 --- a/pkg/controller/podautoscaler/metrics/metrics_client.go +++ b/pkg/controller/podautoscaler/metrics/metrics_client.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/podautoscaler/metrics/metrics_client_test.go b/pkg/controller/podautoscaler/metrics/metrics_client_test.go index 1467b20923..a37056cbc5 100644 --- a/pkg/controller/podautoscaler/metrics/metrics_client_test.go +++ b/pkg/controller/podautoscaler/metrics/metrics_client_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/podgc/doc.go b/pkg/controller/podgc/doc.go index 735e2c727a..6a23ea6314 100644 --- a/pkg/controller/podgc/doc.go +++ b/pkg/controller/podgc/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/podgc/gc_controller.go b/pkg/controller/podgc/gc_controller.go index fbeab69ad9..a2175c5add 100644 --- a/pkg/controller/podgc/gc_controller.go +++ b/pkg/controller/podgc/gc_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/podgc/gc_controller_test.go b/pkg/controller/podgc/gc_controller_test.go index c6d230d38c..b49425fc15 100644 --- a/pkg/controller/podgc/gc_controller_test.go +++ b/pkg/controller/podgc/gc_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/replicaset/doc.go b/pkg/controller/replicaset/doc.go index 9d42796d99..d93c793804 100644 --- a/pkg/controller/replicaset/doc.go +++ b/pkg/controller/replicaset/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/replicaset/options/options.go b/pkg/controller/replicaset/options/options.go index 91951a5492..2cfc88a1ce 100644 --- a/pkg/controller/replicaset/options/options.go +++ b/pkg/controller/replicaset/options/options.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/replicaset/replica_set.go b/pkg/controller/replicaset/replica_set.go index 6d6ddffb51..6baa4aa4d6 100644 --- a/pkg/controller/replicaset/replica_set.go +++ b/pkg/controller/replicaset/replica_set.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/replicaset/replica_set_test.go b/pkg/controller/replicaset/replica_set_test.go index fbdfc497fb..f74a04236c 100644 --- a/pkg/controller/replicaset/replica_set_test.go +++ b/pkg/controller/replicaset/replica_set_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/replicaset/replica_set_utils.go b/pkg/controller/replicaset/replica_set_utils.go index fd8bd70626..9f230b7690 100644 --- a/pkg/controller/replicaset/replica_set_utils.go +++ b/pkg/controller/replicaset/replica_set_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/replication/doc.go b/pkg/controller/replication/doc.go index b60e1d99c4..eb0f42158f 100644 --- a/pkg/controller/replication/doc.go +++ b/pkg/controller/replication/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/replication/replication_controller.go b/pkg/controller/replication/replication_controller.go index fa2c01940d..08a036d2f7 100644 --- a/pkg/controller/replication/replication_controller.go +++ b/pkg/controller/replication/replication_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/replication/replication_controller_test.go b/pkg/controller/replication/replication_controller_test.go index 52254f2707..f518601656 100644 --- a/pkg/controller/replication/replication_controller_test.go +++ b/pkg/controller/replication/replication_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/replication/replication_controller_utils.go b/pkg/controller/replication/replication_controller_utils.go index 0383fa9464..25f2a0c4c7 100644 --- a/pkg/controller/replication/replication_controller_utils.go +++ b/pkg/controller/replication/replication_controller_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/resourcequota/doc.go b/pkg/controller/resourcequota/doc.go index a83ad10dd6..bb2035d2bb 100644 --- a/pkg/controller/resourcequota/doc.go +++ b/pkg/controller/resourcequota/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/resourcequota/replenishment_controller.go b/pkg/controller/resourcequota/replenishment_controller.go index a344bec870..25a84a02e0 100644 --- a/pkg/controller/resourcequota/replenishment_controller.go +++ b/pkg/controller/resourcequota/replenishment_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/resourcequota/replenishment_controller_test.go b/pkg/controller/resourcequota/replenishment_controller_test.go index b7bb665022..8659e2d281 100644 --- a/pkg/controller/resourcequota/replenishment_controller_test.go +++ b/pkg/controller/resourcequota/replenishment_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/resourcequota/resource_quota_controller.go b/pkg/controller/resourcequota/resource_quota_controller.go index a64781c012..91f55be065 100644 --- a/pkg/controller/resourcequota/resource_quota_controller.go +++ b/pkg/controller/resourcequota/resource_quota_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/resourcequota/resource_quota_controller_test.go b/pkg/controller/resourcequota/resource_quota_controller_test.go index 6fb82b9a5e..afee22196c 100644 --- a/pkg/controller/resourcequota/resource_quota_controller_test.go +++ b/pkg/controller/resourcequota/resource_quota_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/route/doc.go b/pkg/controller/route/doc.go index bc4ae60a27..7208f5b498 100644 --- a/pkg/controller/route/doc.go +++ b/pkg/controller/route/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/route/routecontroller.go b/pkg/controller/route/routecontroller.go index 96a99101e1..54ce35072d 100644 --- a/pkg/controller/route/routecontroller.go +++ b/pkg/controller/route/routecontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/route/routecontroller_test.go b/pkg/controller/route/routecontroller_test.go index 398a494ee4..7f8ba7a7d3 100644 --- a/pkg/controller/route/routecontroller_test.go +++ b/pkg/controller/route/routecontroller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/service/doc.go b/pkg/controller/service/doc.go index 78c20eb965..42b9d1f174 100644 --- a/pkg/controller/service/doc.go +++ b/pkg/controller/service/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/service/servicecontroller.go b/pkg/controller/service/servicecontroller.go index 30ebe09549..d157eb4344 100644 --- a/pkg/controller/service/servicecontroller.go +++ b/pkg/controller/service/servicecontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/service/servicecontroller_test.go b/pkg/controller/service/servicecontroller_test.go index 8f58de10ae..69ccb77e98 100644 --- a/pkg/controller/service/servicecontroller_test.go +++ b/pkg/controller/service/servicecontroller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/serviceaccount/doc.go b/pkg/controller/serviceaccount/doc.go index b69d1a1215..211796b123 100644 --- a/pkg/controller/serviceaccount/doc.go +++ b/pkg/controller/serviceaccount/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/serviceaccount/serviceaccounts_controller.go b/pkg/controller/serviceaccount/serviceaccounts_controller.go index 084ddae500..5062305e5a 100644 --- a/pkg/controller/serviceaccount/serviceaccounts_controller.go +++ b/pkg/controller/serviceaccount/serviceaccounts_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/serviceaccount/serviceaccounts_controller_test.go b/pkg/controller/serviceaccount/serviceaccounts_controller_test.go index e55ffeb513..b9c7b0d0cb 100644 --- a/pkg/controller/serviceaccount/serviceaccounts_controller_test.go +++ b/pkg/controller/serviceaccount/serviceaccounts_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/serviceaccount/tokengetter.go b/pkg/controller/serviceaccount/tokengetter.go index bd7fc827b2..bf5e8891b5 100644 --- a/pkg/controller/serviceaccount/tokengetter.go +++ b/pkg/controller/serviceaccount/tokengetter.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/serviceaccount/tokens_controller.go b/pkg/controller/serviceaccount/tokens_controller.go index e7a25f2b6c..4c3f4fba0d 100644 --- a/pkg/controller/serviceaccount/tokens_controller.go +++ b/pkg/controller/serviceaccount/tokens_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/serviceaccount/tokens_controller_test.go b/pkg/controller/serviceaccount/tokens_controller_test.go index 3442b896dc..20db534b84 100644 --- a/pkg/controller/serviceaccount/tokens_controller_test.go +++ b/pkg/controller/serviceaccount/tokens_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/volume/attach_detach_controller.go b/pkg/controller/volume/attach_detach_controller.go index 7997f5e8f6..9a07437276 100644 --- a/pkg/controller/volume/attach_detach_controller.go +++ b/pkg/controller/volume/attach_detach_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/volume/attach_detach_controller_test.go b/pkg/controller/volume/attach_detach_controller_test.go index 913f7ccf88..3741c56bcd 100644 --- a/pkg/controller/volume/attach_detach_controller_test.go +++ b/pkg/controller/volume/attach_detach_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/volume/cache/actual_state_of_world.go b/pkg/controller/volume/cache/actual_state_of_world.go index b90981e40d..6a33e1d97d 100644 --- a/pkg/controller/volume/cache/actual_state_of_world.go +++ b/pkg/controller/volume/cache/actual_state_of_world.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/volume/cache/actual_state_of_world_test.go b/pkg/controller/volume/cache/actual_state_of_world_test.go index d4cc74923e..ede15ee013 100644 --- a/pkg/controller/volume/cache/actual_state_of_world_test.go +++ b/pkg/controller/volume/cache/actual_state_of_world_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/volume/cache/desired_state_of_world.go b/pkg/controller/volume/cache/desired_state_of_world.go index 2543ecfed3..d53a442368 100644 --- a/pkg/controller/volume/cache/desired_state_of_world.go +++ b/pkg/controller/volume/cache/desired_state_of_world.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/volume/cache/desired_state_of_world_test.go b/pkg/controller/volume/cache/desired_state_of_world_test.go index 039d78c629..b2de80f6cd 100644 --- a/pkg/controller/volume/cache/desired_state_of_world_test.go +++ b/pkg/controller/volume/cache/desired_state_of_world_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/volume/populator/desired_state_of_world_populator.go b/pkg/controller/volume/populator/desired_state_of_world_populator.go index da9554c211..371edb59fa 100644 --- a/pkg/controller/volume/populator/desired_state_of_world_populator.go +++ b/pkg/controller/volume/populator/desired_state_of_world_populator.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/volume/reconciler/reconciler.go b/pkg/controller/volume/reconciler/reconciler.go index 914d93250c..60914004bb 100644 --- a/pkg/controller/volume/reconciler/reconciler.go +++ b/pkg/controller/volume/reconciler/reconciler.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/volume/reconciler/reconciler_test.go b/pkg/controller/volume/reconciler/reconciler_test.go index 3563cebdf0..91d173f5d4 100644 --- a/pkg/controller/volume/reconciler/reconciler_test.go +++ b/pkg/controller/volume/reconciler/reconciler_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/volume/statusupdater/fake_node_status_updater.go b/pkg/controller/volume/statusupdater/fake_node_status_updater.go index dc734e2ff0..b78e80e386 100644 --- a/pkg/controller/volume/statusupdater/fake_node_status_updater.go +++ b/pkg/controller/volume/statusupdater/fake_node_status_updater.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/volume/statusupdater/node_status_updater.go b/pkg/controller/volume/statusupdater/node_status_updater.go index cf9d989b5f..463062297e 100644 --- a/pkg/controller/volume/statusupdater/node_status_updater.go +++ b/pkg/controller/volume/statusupdater/node_status_updater.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/controller/volume/testing/testvolumespec.go b/pkg/controller/volume/testing/testvolumespec.go index 62515c818e..b7e72a2bfe 100644 --- a/pkg/controller/volume/testing/testvolumespec.go +++ b/pkg/controller/volume/testing/testvolumespec.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/conversion/cloner.go b/pkg/conversion/cloner.go index a8c5747132..e4e74f6362 100644 --- a/pkg/conversion/cloner.go +++ b/pkg/conversion/cloner.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/conversion/converter.go b/pkg/conversion/converter.go index e045dcd2f7..7a18d6360f 100644 --- a/pkg/conversion/converter.go +++ b/pkg/conversion/converter.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/conversion/converter_test.go b/pkg/conversion/converter_test.go index cdd61435fb..47ea9f1c91 100644 --- a/pkg/conversion/converter_test.go +++ b/pkg/conversion/converter_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/conversion/deep_copy_test.go b/pkg/conversion/deep_copy_test.go index a1cd65308a..fdef856f29 100644 --- a/pkg/conversion/deep_copy_test.go +++ b/pkg/conversion/deep_copy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/conversion/deep_equal.go b/pkg/conversion/deep_equal.go index 7c3ed7cda1..4cb51d79a8 100644 --- a/pkg/conversion/deep_equal.go +++ b/pkg/conversion/deep_equal.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/conversion/doc.go b/pkg/conversion/doc.go index 3ef2eaba45..0c46ef2d16 100644 --- a/pkg/conversion/doc.go +++ b/pkg/conversion/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/conversion/helper.go b/pkg/conversion/helper.go index 39f7826595..4ebc1ebc51 100644 --- a/pkg/conversion/helper.go +++ b/pkg/conversion/helper.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/conversion/helper_test.go b/pkg/conversion/helper_test.go index 69fef3334b..8c61a30a88 100644 --- a/pkg/conversion/helper_test.go +++ b/pkg/conversion/helper_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/conversion/queryparams/convert.go b/pkg/conversion/queryparams/convert.go index 63c5456976..30f717b2ce 100644 --- a/pkg/conversion/queryparams/convert.go +++ b/pkg/conversion/queryparams/convert.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/conversion/queryparams/convert_test.go b/pkg/conversion/queryparams/convert_test.go index cbeeeca739..656108d9d7 100644 --- a/pkg/conversion/queryparams/convert_test.go +++ b/pkg/conversion/queryparams/convert_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/conversion/queryparams/doc.go b/pkg/conversion/queryparams/doc.go index 0e9127a189..4c1002a4c1 100644 --- a/pkg/conversion/queryparams/doc.go +++ b/pkg/conversion/queryparams/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/aws/aws_credentials.go b/pkg/credentialprovider/aws/aws_credentials.go index 3b9b5c9820..f9d34e3907 100644 --- a/pkg/credentialprovider/aws/aws_credentials.go +++ b/pkg/credentialprovider/aws/aws_credentials.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/aws/aws_credentials_test.go b/pkg/credentialprovider/aws/aws_credentials_test.go index b286c7d61d..7299c85ce5 100644 --- a/pkg/credentialprovider/aws/aws_credentials_test.go +++ b/pkg/credentialprovider/aws/aws_credentials_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/config.go b/pkg/credentialprovider/config.go index b80fa5945c..582c1ef277 100644 --- a/pkg/credentialprovider/config.go +++ b/pkg/credentialprovider/config.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/config_test.go b/pkg/credentialprovider/config_test.go index 587879fe93..9111aab63e 100644 --- a/pkg/credentialprovider/config_test.go +++ b/pkg/credentialprovider/config_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/doc.go b/pkg/credentialprovider/doc.go index f071c0c893..41c12410f0 100644 --- a/pkg/credentialprovider/doc.go +++ b/pkg/credentialprovider/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/gcp/doc.go b/pkg/credentialprovider/gcp/doc.go index e6f2beba80..09a0b9d5bb 100644 --- a/pkg/credentialprovider/gcp/doc.go +++ b/pkg/credentialprovider/gcp/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/gcp/jwt.go b/pkg/credentialprovider/gcp/jwt.go index e4c16afa85..b34c0fcaaf 100644 --- a/pkg/credentialprovider/gcp/jwt.go +++ b/pkg/credentialprovider/gcp/jwt.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/gcp/jwt_test.go b/pkg/credentialprovider/gcp/jwt_test.go index 4066d02af9..00b9f514b0 100644 --- a/pkg/credentialprovider/gcp/jwt_test.go +++ b/pkg/credentialprovider/gcp/jwt_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/gcp/metadata.go b/pkg/credentialprovider/gcp/metadata.go index fb89b38c0c..98e0965906 100644 --- a/pkg/credentialprovider/gcp/metadata.go +++ b/pkg/credentialprovider/gcp/metadata.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/gcp/metadata_test.go b/pkg/credentialprovider/gcp/metadata_test.go index b65b13a015..9f738531c1 100644 --- a/pkg/credentialprovider/gcp/metadata_test.go +++ b/pkg/credentialprovider/gcp/metadata_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/keyring.go b/pkg/credentialprovider/keyring.go index eedbee5ad8..ed712ccfdc 100644 --- a/pkg/credentialprovider/keyring.go +++ b/pkg/credentialprovider/keyring.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/keyring_test.go b/pkg/credentialprovider/keyring_test.go index 376e080170..4a865bedd8 100644 --- a/pkg/credentialprovider/keyring_test.go +++ b/pkg/credentialprovider/keyring_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/plugins.go b/pkg/credentialprovider/plugins.go index a871cc02bc..76c2e72490 100644 --- a/pkg/credentialprovider/plugins.go +++ b/pkg/credentialprovider/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/provider.go b/pkg/credentialprovider/provider.go index 215650392b..52f4045b81 100644 --- a/pkg/credentialprovider/provider.go +++ b/pkg/credentialprovider/provider.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/credentialprovider/provider_test.go b/pkg/credentialprovider/provider_test.go index 099d839fbf..4d70689532 100644 --- a/pkg/credentialprovider/provider_test.go +++ b/pkg/credentialprovider/provider_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/dns/dns.go b/pkg/dns/dns.go index f89be8afa8..298b23280f 100644 --- a/pkg/dns/dns.go +++ b/pkg/dns/dns.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/dns/dns_test.go b/pkg/dns/dns_test.go index 0d9e11dfa5..505f6c3911 100644 --- a/pkg/dns/dns_test.go +++ b/pkg/dns/dns_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/dns/doc.go b/pkg/dns/doc.go index 16c76acbf8..f02745bcea 100644 --- a/pkg/dns/doc.go +++ b/pkg/dns/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/dns/treecache.go b/pkg/dns/treecache.go index 6f7a9aa1fb..0c8f23c6dd 100644 --- a/pkg/dns/treecache.go +++ b/pkg/dns/treecache.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/fieldpath/doc.go b/pkg/fieldpath/doc.go index c91ff6ecab..83cbdce0c8 100644 --- a/pkg/fieldpath/doc.go +++ b/pkg/fieldpath/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/fieldpath/fieldpath.go b/pkg/fieldpath/fieldpath.go index bede9b2c0b..4de70460bc 100644 --- a/pkg/fieldpath/fieldpath.go +++ b/pkg/fieldpath/fieldpath.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/fieldpath/fieldpath_test.go b/pkg/fieldpath/fieldpath_test.go index 0a840b1226..5bfb1061bb 100644 --- a/pkg/fieldpath/fieldpath_test.go +++ b/pkg/fieldpath/fieldpath_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/fields/doc.go b/pkg/fields/doc.go index 767615c9f7..49059e2635 100644 --- a/pkg/fields/doc.go +++ b/pkg/fields/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/fields/fields.go b/pkg/fields/fields.go index 50fef14a81..623b27e957 100644 --- a/pkg/fields/fields.go +++ b/pkg/fields/fields.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/fields/fields_test.go b/pkg/fields/fields_test.go index 9f6f3fc357..6965be6870 100644 --- a/pkg/fields/fields_test.go +++ b/pkg/fields/fields_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/fields/selector.go b/pkg/fields/selector.go index c0a6385818..eef44d3563 100644 --- a/pkg/fields/selector.go +++ b/pkg/fields/selector.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/fields/selector_test.go b/pkg/fields/selector_test.go index 7651ae6bb3..b41d712c9a 100644 --- a/pkg/fields/selector_test.go +++ b/pkg/fields/selector_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/default_storage_factory_builder.go b/pkg/genericapiserver/default_storage_factory_builder.go index ef727662a8..db9d07e9c7 100644 --- a/pkg/genericapiserver/default_storage_factory_builder.go +++ b/pkg/genericapiserver/default_storage_factory_builder.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/default_storage_factory_builder_test.go b/pkg/genericapiserver/default_storage_factory_builder_test.go index fc80696f8a..447778ebc3 100644 --- a/pkg/genericapiserver/default_storage_factory_builder_test.go +++ b/pkg/genericapiserver/default_storage_factory_builder_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/doc.go b/pkg/genericapiserver/doc.go index 12238d568e..c4abd9097c 100644 --- a/pkg/genericapiserver/doc.go +++ b/pkg/genericapiserver/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/genericapiserver.go b/pkg/genericapiserver/genericapiserver.go index 32b102a7c4..d1cdec4e3c 100644 --- a/pkg/genericapiserver/genericapiserver.go +++ b/pkg/genericapiserver/genericapiserver.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/genericapiserver_test.go b/pkg/genericapiserver/genericapiserver_test.go index 6fda30e80d..2b3ae75c89 100644 --- a/pkg/genericapiserver/genericapiserver_test.go +++ b/pkg/genericapiserver/genericapiserver_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/options/doc.go b/pkg/genericapiserver/options/doc.go index c90eb8b8d1..a7167a419e 100644 --- a/pkg/genericapiserver/options/doc.go +++ b/pkg/genericapiserver/options/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/options/server_run_options.go b/pkg/genericapiserver/options/server_run_options.go index a1c6b26111..cbb29f49ca 100644 --- a/pkg/genericapiserver/options/server_run_options.go +++ b/pkg/genericapiserver/options/server_run_options.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/resource_config.go b/pkg/genericapiserver/resource_config.go index 0f40e3774f..15cdda2b72 100644 --- a/pkg/genericapiserver/resource_config.go +++ b/pkg/genericapiserver/resource_config.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/resource_config_test.go b/pkg/genericapiserver/resource_config_test.go index 0fbd6651fc..9dc389f0f4 100644 --- a/pkg/genericapiserver/resource_config_test.go +++ b/pkg/genericapiserver/resource_config_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/resource_encoding_config.go b/pkg/genericapiserver/resource_encoding_config.go index 04a25d45fb..3682e8a128 100644 --- a/pkg/genericapiserver/resource_encoding_config.go +++ b/pkg/genericapiserver/resource_encoding_config.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/server_run_options_test.go b/pkg/genericapiserver/server_run_options_test.go index 1c36d508b5..ad836871e5 100644 --- a/pkg/genericapiserver/server_run_options_test.go +++ b/pkg/genericapiserver/server_run_options_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/storage_factory.go b/pkg/genericapiserver/storage_factory.go index fb25cb0b06..6835718ebe 100644 --- a/pkg/genericapiserver/storage_factory.go +++ b/pkg/genericapiserver/storage_factory.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/storage_factory_test.go b/pkg/genericapiserver/storage_factory_test.go index 578c47731b..7c353eafae 100644 --- a/pkg/genericapiserver/storage_factory_test.go +++ b/pkg/genericapiserver/storage_factory_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/tunneler.go b/pkg/genericapiserver/tunneler.go index 1d452c210f..aea78233fd 100644 --- a/pkg/genericapiserver/tunneler.go +++ b/pkg/genericapiserver/tunneler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/genericapiserver/tunneler_test.go b/pkg/genericapiserver/tunneler_test.go index 918149d89a..43d9e3bd77 100644 --- a/pkg/genericapiserver/tunneler_test.go +++ b/pkg/genericapiserver/tunneler_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/healthz/doc.go b/pkg/healthz/doc.go index 37a95b806e..a70a0eaafc 100644 --- a/pkg/healthz/doc.go +++ b/pkg/healthz/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/healthz/healthz.go b/pkg/healthz/healthz.go index 5a9af7aa10..b71797d753 100644 --- a/pkg/healthz/healthz.go +++ b/pkg/healthz/healthz.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/healthz/healthz_test.go b/pkg/healthz/healthz_test.go index bfd833eb83..190ea5441c 100644 --- a/pkg/healthz/healthz_test.go +++ b/pkg/healthz/healthz_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/httplog/doc.go b/pkg/httplog/doc.go index 99973e2d7e..57aa55ab91 100644 --- a/pkg/httplog/doc.go +++ b/pkg/httplog/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/httplog/log.go b/pkg/httplog/log.go index d4530dbd8b..6b64c6d550 100644 --- a/pkg/httplog/log.go +++ b/pkg/httplog/log.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/httplog/log_test.go b/pkg/httplog/log_test.go index a5d72b1ccb..57829299e7 100644 --- a/pkg/httplog/log_test.go +++ b/pkg/httplog/log_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/hyperkube/doc.go b/pkg/hyperkube/doc.go index 88b6e2e692..78e8506020 100644 --- a/pkg/hyperkube/doc.go +++ b/pkg/hyperkube/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/apply.go b/pkg/kubectl/apply.go index 1836fc2507..6f183f1c0d 100644 --- a/pkg/kubectl/apply.go +++ b/pkg/kubectl/apply.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/autoscale.go b/pkg/kubectl/autoscale.go index 979a93bf0f..6e5f5a24e6 100644 --- a/pkg/kubectl/autoscale.go +++ b/pkg/kubectl/autoscale.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/bash_comp_utils.go b/pkg/kubectl/bash_comp_utils.go index e3eaf30e4b..346200276f 100644 --- a/pkg/kubectl/bash_comp_utils.go +++ b/pkg/kubectl/bash_comp_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/annotate.go b/pkg/kubectl/cmd/annotate.go index 789967aed7..18682ebc7a 100644 --- a/pkg/kubectl/cmd/annotate.go +++ b/pkg/kubectl/cmd/annotate.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/annotate_test.go b/pkg/kubectl/cmd/annotate_test.go index 58730662ab..eb12826b40 100644 --- a/pkg/kubectl/cmd/annotate_test.go +++ b/pkg/kubectl/cmd/annotate_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/apiversions.go b/pkg/kubectl/cmd/apiversions.go index 3c53a5fd12..7c272e3385 100644 --- a/pkg/kubectl/cmd/apiversions.go +++ b/pkg/kubectl/cmd/apiversions.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/apply.go b/pkg/kubectl/cmd/apply.go index bb073759b5..e198cfcbd4 100644 --- a/pkg/kubectl/cmd/apply.go +++ b/pkg/kubectl/cmd/apply.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/apply_test.go b/pkg/kubectl/cmd/apply_test.go index dc1217bc9d..9c8b6d53ae 100644 --- a/pkg/kubectl/cmd/apply_test.go +++ b/pkg/kubectl/cmd/apply_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/attach.go b/pkg/kubectl/cmd/attach.go index 76e11dd5fb..e73772796c 100644 --- a/pkg/kubectl/cmd/attach.go +++ b/pkg/kubectl/cmd/attach.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/attach_test.go b/pkg/kubectl/cmd/attach_test.go index eb67aaf9ba..9ebc756b3c 100644 --- a/pkg/kubectl/cmd/attach_test.go +++ b/pkg/kubectl/cmd/attach_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/autoscale.go b/pkg/kubectl/cmd/autoscale.go index 8b77b3b441..335115e22c 100644 --- a/pkg/kubectl/cmd/autoscale.go +++ b/pkg/kubectl/cmd/autoscale.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/clusterinfo.go b/pkg/kubectl/cmd/clusterinfo.go index a333eef3a6..cbb57d2e13 100644 --- a/pkg/kubectl/cmd/clusterinfo.go +++ b/pkg/kubectl/cmd/clusterinfo.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/clusterinfo_dump.go b/pkg/kubectl/cmd/clusterinfo_dump.go index 9a1865902a..3d33325725 100644 --- a/pkg/kubectl/cmd/clusterinfo_dump.go +++ b/pkg/kubectl/cmd/clusterinfo_dump.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/clusterinfo_dump_test.go b/pkg/kubectl/cmd/clusterinfo_dump_test.go index 3531452589..c4bb2c58a5 100644 --- a/pkg/kubectl/cmd/clusterinfo_dump_test.go +++ b/pkg/kubectl/cmd/clusterinfo_dump_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/cmd.go b/pkg/kubectl/cmd/cmd.go index c8c58f06b9..23380cc6ee 100644 --- a/pkg/kubectl/cmd/cmd.go +++ b/pkg/kubectl/cmd/cmd.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/cmd_test.go b/pkg/kubectl/cmd/cmd_test.go index 729827772a..703f67bd7b 100644 --- a/pkg/kubectl/cmd/cmd_test.go +++ b/pkg/kubectl/cmd/cmd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/completion.go b/pkg/kubectl/cmd/completion.go index 678a079177..d0c8cb2983 100644 --- a/pkg/kubectl/cmd/completion.go +++ b/pkg/kubectl/cmd/completion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -95,7 +95,7 @@ func runCompletionBash(out io.Writer, kubectl *cobra.Command) error { } func runCompletionZsh(out io.Writer, kubectl *cobra.Command) error { - zsh_initialilzation := `# Copyright 2016 The Kubernetes Authors All rights reserved. + zsh_initialilzation := `# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/config.go b/pkg/kubectl/cmd/config/config.go index a285634683..2a3523a614 100644 --- a/pkg/kubectl/cmd/config/config.go +++ b/pkg/kubectl/cmd/config/config.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/config_test.go b/pkg/kubectl/cmd/config/config_test.go index 33ba5f4759..5e7a1f69d3 100644 --- a/pkg/kubectl/cmd/config/config_test.go +++ b/pkg/kubectl/cmd/config/config_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/create_authinfo.go b/pkg/kubectl/cmd/config/create_authinfo.go index 41fd2501d4..3b0669c4c4 100644 --- a/pkg/kubectl/cmd/config/create_authinfo.go +++ b/pkg/kubectl/cmd/config/create_authinfo.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/create_cluster.go b/pkg/kubectl/cmd/config/create_cluster.go index e6a6f7f222..22763e2d09 100644 --- a/pkg/kubectl/cmd/config/create_cluster.go +++ b/pkg/kubectl/cmd/config/create_cluster.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/create_context.go b/pkg/kubectl/cmd/config/create_context.go index f72671cdc0..85d02026c3 100644 --- a/pkg/kubectl/cmd/config/create_context.go +++ b/pkg/kubectl/cmd/config/create_context.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/current_context.go b/pkg/kubectl/cmd/config/current_context.go index 4422add714..fc23cd705c 100644 --- a/pkg/kubectl/cmd/config/current_context.go +++ b/pkg/kubectl/cmd/config/current_context.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/current_context_test.go b/pkg/kubectl/cmd/config/current_context_test.go index 7a68415f6a..abd11ffb4b 100644 --- a/pkg/kubectl/cmd/config/current_context_test.go +++ b/pkg/kubectl/cmd/config/current_context_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/navigation_step_parser.go b/pkg/kubectl/cmd/config/navigation_step_parser.go index 0be5f241ee..60177be725 100644 --- a/pkg/kubectl/cmd/config/navigation_step_parser.go +++ b/pkg/kubectl/cmd/config/navigation_step_parser.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/navigation_step_parser_test.go b/pkg/kubectl/cmd/config/navigation_step_parser_test.go index 2bca8d0892..48b2e0cffd 100644 --- a/pkg/kubectl/cmd/config/navigation_step_parser_test.go +++ b/pkg/kubectl/cmd/config/navigation_step_parser_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/set.go b/pkg/kubectl/cmd/config/set.go index 9c06caaef2..941acb39e6 100644 --- a/pkg/kubectl/cmd/config/set.go +++ b/pkg/kubectl/cmd/config/set.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/unset.go b/pkg/kubectl/cmd/config/unset.go index 40e150745f..9b5da81b5f 100644 --- a/pkg/kubectl/cmd/config/unset.go +++ b/pkg/kubectl/cmd/config/unset.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/use_context.go b/pkg/kubectl/cmd/config/use_context.go index abfe8bbf91..f73037aa0a 100644 --- a/pkg/kubectl/cmd/config/use_context.go +++ b/pkg/kubectl/cmd/config/use_context.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/config/view.go b/pkg/kubectl/cmd/config/view.go index 38a011123e..16a950aa38 100644 --- a/pkg/kubectl/cmd/config/view.go +++ b/pkg/kubectl/cmd/config/view.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/convert.go b/pkg/kubectl/cmd/convert.go index c6dc0ef13e..4ba71fafde 100644 --- a/pkg/kubectl/cmd/convert.go +++ b/pkg/kubectl/cmd/convert.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/create.go b/pkg/kubectl/cmd/create.go index 6a2c93a919..a2638dcf96 100644 --- a/pkg/kubectl/cmd/create.go +++ b/pkg/kubectl/cmd/create.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/create_configmap.go b/pkg/kubectl/cmd/create_configmap.go index 4643405fc3..21c3144b73 100644 --- a/pkg/kubectl/cmd/create_configmap.go +++ b/pkg/kubectl/cmd/create_configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/create_configmap_test.go b/pkg/kubectl/cmd/create_configmap_test.go index fff769a48d..7e62366b7f 100644 --- a/pkg/kubectl/cmd/create_configmap_test.go +++ b/pkg/kubectl/cmd/create_configmap_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/create_namespace.go b/pkg/kubectl/cmd/create_namespace.go index 11c516784d..62d81cdbb8 100644 --- a/pkg/kubectl/cmd/create_namespace.go +++ b/pkg/kubectl/cmd/create_namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/create_namespace_test.go b/pkg/kubectl/cmd/create_namespace_test.go index 80483f2f58..3ad34c2d1f 100644 --- a/pkg/kubectl/cmd/create_namespace_test.go +++ b/pkg/kubectl/cmd/create_namespace_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/create_secret.go b/pkg/kubectl/cmd/create_secret.go index 38268f263b..b51e2c3203 100644 --- a/pkg/kubectl/cmd/create_secret.go +++ b/pkg/kubectl/cmd/create_secret.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/create_secret_test.go b/pkg/kubectl/cmd/create_secret_test.go index ff3dcf162a..d810b01337 100644 --- a/pkg/kubectl/cmd/create_secret_test.go +++ b/pkg/kubectl/cmd/create_secret_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/create_serviceaccount.go b/pkg/kubectl/cmd/create_serviceaccount.go index d83c0994c5..8163b4cc02 100644 --- a/pkg/kubectl/cmd/create_serviceaccount.go +++ b/pkg/kubectl/cmd/create_serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/create_serviceaccount_test.go b/pkg/kubectl/cmd/create_serviceaccount_test.go index 927e6132ae..ba4979b417 100644 --- a/pkg/kubectl/cmd/create_serviceaccount_test.go +++ b/pkg/kubectl/cmd/create_serviceaccount_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/create_test.go b/pkg/kubectl/cmd/create_test.go index 19653ebeeb..c6623cb2a5 100644 --- a/pkg/kubectl/cmd/create_test.go +++ b/pkg/kubectl/cmd/create_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/delete.go b/pkg/kubectl/cmd/delete.go index a6d7c937fd..c9a2c86b4b 100644 --- a/pkg/kubectl/cmd/delete.go +++ b/pkg/kubectl/cmd/delete.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/delete_test.go b/pkg/kubectl/cmd/delete_test.go index 79be18a66d..d7cc46557e 100644 --- a/pkg/kubectl/cmd/delete_test.go +++ b/pkg/kubectl/cmd/delete_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/describe.go b/pkg/kubectl/cmd/describe.go index 93bd3d2c24..1b2ff86db1 100644 --- a/pkg/kubectl/cmd/describe.go +++ b/pkg/kubectl/cmd/describe.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/describe_test.go b/pkg/kubectl/cmd/describe_test.go index 54f6ce5dbe..026ad36965 100644 --- a/pkg/kubectl/cmd/describe_test.go +++ b/pkg/kubectl/cmd/describe_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/drain.go b/pkg/kubectl/cmd/drain.go index af5c7f6056..eecdff87a8 100644 --- a/pkg/kubectl/cmd/drain.go +++ b/pkg/kubectl/cmd/drain.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/drain_test.go b/pkg/kubectl/cmd/drain_test.go index 4fb3bad4b8..94e38685a3 100644 --- a/pkg/kubectl/cmd/drain_test.go +++ b/pkg/kubectl/cmd/drain_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/edit.go b/pkg/kubectl/cmd/edit.go index d3e60405dc..fd871715d1 100644 --- a/pkg/kubectl/cmd/edit.go +++ b/pkg/kubectl/cmd/edit.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/exec.go b/pkg/kubectl/cmd/exec.go index 0ad6de373d..6ccbeef461 100644 --- a/pkg/kubectl/cmd/exec.go +++ b/pkg/kubectl/cmd/exec.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/exec_test.go b/pkg/kubectl/cmd/exec_test.go index 9b77322a30..8a4ed3479f 100644 --- a/pkg/kubectl/cmd/exec_test.go +++ b/pkg/kubectl/cmd/exec_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/explain.go b/pkg/kubectl/cmd/explain.go index ade8949b88..6f90592153 100644 --- a/pkg/kubectl/cmd/explain.go +++ b/pkg/kubectl/cmd/explain.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/expose.go b/pkg/kubectl/cmd/expose.go index 0ef3230732..c4fca0bd7d 100644 --- a/pkg/kubectl/cmd/expose.go +++ b/pkg/kubectl/cmd/expose.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/expose_test.go b/pkg/kubectl/cmd/expose_test.go index 5ad4cc7313..82067a1867 100644 --- a/pkg/kubectl/cmd/expose_test.go +++ b/pkg/kubectl/cmd/expose_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/get.go b/pkg/kubectl/cmd/get.go index 0887cc1bd8..3aab52515f 100644 --- a/pkg/kubectl/cmd/get.go +++ b/pkg/kubectl/cmd/get.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/get_test.go b/pkg/kubectl/cmd/get_test.go index 6f18031c4a..6f680e8a5f 100644 --- a/pkg/kubectl/cmd/get_test.go +++ b/pkg/kubectl/cmd/get_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/label.go b/pkg/kubectl/cmd/label.go index 6fade577e5..e2144c5628 100644 --- a/pkg/kubectl/cmd/label.go +++ b/pkg/kubectl/cmd/label.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/label_test.go b/pkg/kubectl/cmd/label_test.go index dbfdf9a868..d5b5af695d 100644 --- a/pkg/kubectl/cmd/label_test.go +++ b/pkg/kubectl/cmd/label_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/logs.go b/pkg/kubectl/cmd/logs.go index 3d9a960c78..a149259dee 100644 --- a/pkg/kubectl/cmd/logs.go +++ b/pkg/kubectl/cmd/logs.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/logs_test.go b/pkg/kubectl/cmd/logs_test.go index 3eaa4e59a2..e7d93e8e56 100644 --- a/pkg/kubectl/cmd/logs_test.go +++ b/pkg/kubectl/cmd/logs_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/namespace.go b/pkg/kubectl/cmd/namespace.go index e50e4c0785..bb372f8fdd 100644 --- a/pkg/kubectl/cmd/namespace.go +++ b/pkg/kubectl/cmd/namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/patch.go b/pkg/kubectl/cmd/patch.go index 759ac0e44a..9eab6591f6 100644 --- a/pkg/kubectl/cmd/patch.go +++ b/pkg/kubectl/cmd/patch.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/patch_test.go b/pkg/kubectl/cmd/patch_test.go index a6e2a5432f..de0640fc53 100644 --- a/pkg/kubectl/cmd/patch_test.go +++ b/pkg/kubectl/cmd/patch_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/portforward.go b/pkg/kubectl/cmd/portforward.go index 64e8281cd0..86125883a2 100644 --- a/pkg/kubectl/cmd/portforward.go +++ b/pkg/kubectl/cmd/portforward.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/portforward_test.go b/pkg/kubectl/cmd/portforward_test.go index 75363d2ca8..a1dcf43343 100644 --- a/pkg/kubectl/cmd/portforward_test.go +++ b/pkg/kubectl/cmd/portforward_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/proxy.go b/pkg/kubectl/cmd/proxy.go index a14584db6c..95a1fa640b 100644 --- a/pkg/kubectl/cmd/proxy.go +++ b/pkg/kubectl/cmd/proxy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/replace.go b/pkg/kubectl/cmd/replace.go index 9dc44c3110..12c4381e02 100644 --- a/pkg/kubectl/cmd/replace.go +++ b/pkg/kubectl/cmd/replace.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/replace_test.go b/pkg/kubectl/cmd/replace_test.go index 47ed751a73..f9aff544bd 100644 --- a/pkg/kubectl/cmd/replace_test.go +++ b/pkg/kubectl/cmd/replace_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/rollingupdate.go b/pkg/kubectl/cmd/rollingupdate.go index 5570bd25d3..5cf19c5876 100644 --- a/pkg/kubectl/cmd/rollingupdate.go +++ b/pkg/kubectl/cmd/rollingupdate.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/rollingupdate_test.go b/pkg/kubectl/cmd/rollingupdate_test.go index bf2204b273..d79c0cf4c0 100644 --- a/pkg/kubectl/cmd/rollingupdate_test.go +++ b/pkg/kubectl/cmd/rollingupdate_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/rollout/rollout.go b/pkg/kubectl/cmd/rollout/rollout.go index a586f7b2d8..f9d1cce56d 100644 --- a/pkg/kubectl/cmd/rollout/rollout.go +++ b/pkg/kubectl/cmd/rollout/rollout.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/rollout/rollout_history.go b/pkg/kubectl/cmd/rollout/rollout_history.go index 467de122f9..5ea6ebc107 100644 --- a/pkg/kubectl/cmd/rollout/rollout_history.go +++ b/pkg/kubectl/cmd/rollout/rollout_history.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/rollout/rollout_pause.go b/pkg/kubectl/cmd/rollout/rollout_pause.go index cdc1f133e8..26eee06d84 100644 --- a/pkg/kubectl/cmd/rollout/rollout_pause.go +++ b/pkg/kubectl/cmd/rollout/rollout_pause.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/rollout/rollout_resume.go b/pkg/kubectl/cmd/rollout/rollout_resume.go index 5c563c02fc..e4b42250f7 100644 --- a/pkg/kubectl/cmd/rollout/rollout_resume.go +++ b/pkg/kubectl/cmd/rollout/rollout_resume.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/rollout/rollout_status.go b/pkg/kubectl/cmd/rollout/rollout_status.go index 0b3f623041..e1f2d10ff6 100644 --- a/pkg/kubectl/cmd/rollout/rollout_status.go +++ b/pkg/kubectl/cmd/rollout/rollout_status.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/rollout/rollout_undo.go b/pkg/kubectl/cmd/rollout/rollout_undo.go index 6173be6be2..51df6eee23 100644 --- a/pkg/kubectl/cmd/rollout/rollout_undo.go +++ b/pkg/kubectl/cmd/rollout/rollout_undo.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/run.go b/pkg/kubectl/cmd/run.go index a7de04af77..6b6ca5617a 100644 --- a/pkg/kubectl/cmd/run.go +++ b/pkg/kubectl/cmd/run.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/run_test.go b/pkg/kubectl/cmd/run_test.go index 13cbf03640..ffec144537 100644 --- a/pkg/kubectl/cmd/run_test.go +++ b/pkg/kubectl/cmd/run_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/scale.go b/pkg/kubectl/cmd/scale.go index 7001b7c17d..a6dbd3ac2c 100644 --- a/pkg/kubectl/cmd/scale.go +++ b/pkg/kubectl/cmd/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/set/helper.go b/pkg/kubectl/cmd/set/helper.go index 7a3a04a3d1..8c01d66079 100644 --- a/pkg/kubectl/cmd/set/helper.go +++ b/pkg/kubectl/cmd/set/helper.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/set/set.go b/pkg/kubectl/cmd/set/set.go index 945322e787..2dd208f01f 100644 --- a/pkg/kubectl/cmd/set/set.go +++ b/pkg/kubectl/cmd/set/set.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/set/set_image.go b/pkg/kubectl/cmd/set/set_image.go index 5ffc6ad4cd..6c92c5c615 100644 --- a/pkg/kubectl/cmd/set/set_image.go +++ b/pkg/kubectl/cmd/set/set_image.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/stop.go b/pkg/kubectl/cmd/stop.go index b180583bc2..8245ec9775 100644 --- a/pkg/kubectl/cmd/stop.go +++ b/pkg/kubectl/cmd/stop.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/taint.go b/pkg/kubectl/cmd/taint.go index 73bc80e03c..2cd125ae78 100644 --- a/pkg/kubectl/cmd/taint.go +++ b/pkg/kubectl/cmd/taint.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/taint_test.go b/pkg/kubectl/cmd/taint_test.go index d57b3d2d7e..86c2840489 100644 --- a/pkg/kubectl/cmd/taint_test.go +++ b/pkg/kubectl/cmd/taint_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/util/clientcache.go b/pkg/kubectl/cmd/util/clientcache.go index 43ddf3e982..039f5048cf 100644 --- a/pkg/kubectl/cmd/util/clientcache.go +++ b/pkg/kubectl/cmd/util/clientcache.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/util/editor/editor.go b/pkg/kubectl/cmd/util/editor/editor.go index 1c58d846b5..9f53ee7c75 100644 --- a/pkg/kubectl/cmd/util/editor/editor.go +++ b/pkg/kubectl/cmd/util/editor/editor.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/util/editor/editor_test.go b/pkg/kubectl/cmd/util/editor/editor_test.go index 9be83a0427..1ff23aaa23 100644 --- a/pkg/kubectl/cmd/util/editor/editor_test.go +++ b/pkg/kubectl/cmd/util/editor/editor_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/util/factory.go b/pkg/kubectl/cmd/util/factory.go index 64755f182a..aa7d61581c 100644 --- a/pkg/kubectl/cmd/util/factory.go +++ b/pkg/kubectl/cmd/util/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/util/factory_test.go b/pkg/kubectl/cmd/util/factory_test.go index 6d8120cc2f..1bbc66e780 100644 --- a/pkg/kubectl/cmd/util/factory_test.go +++ b/pkg/kubectl/cmd/util/factory_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/util/helpers.go b/pkg/kubectl/cmd/util/helpers.go index 9eaade7b9d..b00b0d13db 100644 --- a/pkg/kubectl/cmd/util/helpers.go +++ b/pkg/kubectl/cmd/util/helpers.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/util/helpers_test.go b/pkg/kubectl/cmd/util/helpers_test.go index 3b09a665c1..e50117f5d8 100644 --- a/pkg/kubectl/cmd/util/helpers_test.go +++ b/pkg/kubectl/cmd/util/helpers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/util/jsonmerge/jsonmerge.go b/pkg/kubectl/cmd/util/jsonmerge/jsonmerge.go index 84a76da954..9685ce71c3 100644 --- a/pkg/kubectl/cmd/util/jsonmerge/jsonmerge.go +++ b/pkg/kubectl/cmd/util/jsonmerge/jsonmerge.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/util/printing.go b/pkg/kubectl/cmd/util/printing.go index a5faaee524..205d50b23d 100644 --- a/pkg/kubectl/cmd/util/printing.go +++ b/pkg/kubectl/cmd/util/printing.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/cmd/version.go b/pkg/kubectl/cmd/version.go index beaeda7bb1..7faefc7bc9 100644 --- a/pkg/kubectl/cmd/version.go +++ b/pkg/kubectl/cmd/version.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/configmap.go b/pkg/kubectl/configmap.go index 04ed4aa6a4..fcd3fc6b8e 100644 --- a/pkg/kubectl/configmap.go +++ b/pkg/kubectl/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/configmap_test.go b/pkg/kubectl/configmap_test.go index d4458bdd0f..70c154b8ba 100644 --- a/pkg/kubectl/configmap_test.go +++ b/pkg/kubectl/configmap_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/custom_column_printer.go b/pkg/kubectl/custom_column_printer.go index 255ad1de84..93d7d754d7 100644 --- a/pkg/kubectl/custom_column_printer.go +++ b/pkg/kubectl/custom_column_printer.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/custom_column_printer_test.go b/pkg/kubectl/custom_column_printer_test.go index 531881a732..73ed60e779 100644 --- a/pkg/kubectl/custom_column_printer_test.go +++ b/pkg/kubectl/custom_column_printer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/describe.go b/pkg/kubectl/describe.go index 2d6f79245b..cd62b10dab 100644 --- a/pkg/kubectl/describe.go +++ b/pkg/kubectl/describe.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/describe_test.go b/pkg/kubectl/describe_test.go index 54f7f60219..2d0e9d698b 100644 --- a/pkg/kubectl/describe_test.go +++ b/pkg/kubectl/describe_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/doc.go b/pkg/kubectl/doc.go index cc34fba7d1..d1516ebb7a 100644 --- a/pkg/kubectl/doc.go +++ b/pkg/kubectl/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/explain.go b/pkg/kubectl/explain.go index d8b9a14725..dd85a7f366 100644 --- a/pkg/kubectl/explain.go +++ b/pkg/kubectl/explain.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/generate.go b/pkg/kubectl/generate.go index ea254bcb54..e1ffe370ec 100644 --- a/pkg/kubectl/generate.go +++ b/pkg/kubectl/generate.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/generate_test.go b/pkg/kubectl/generate_test.go index 62823f9dc0..87fb722e9e 100644 --- a/pkg/kubectl/generate_test.go +++ b/pkg/kubectl/generate_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/history.go b/pkg/kubectl/history.go index 0e81ebf281..65888d8524 100644 --- a/pkg/kubectl/history.go +++ b/pkg/kubectl/history.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/interfaces.go b/pkg/kubectl/interfaces.go index 8f1e6f197b..f8acb1ea0d 100644 --- a/pkg/kubectl/interfaces.go +++ b/pkg/kubectl/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/kubectl.go b/pkg/kubectl/kubectl.go index 9f5cb22ff8..5b9726d5bb 100644 --- a/pkg/kubectl/kubectl.go +++ b/pkg/kubectl/kubectl.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/kubectl_test.go b/pkg/kubectl/kubectl_test.go index 1cd69d11e9..87f846307d 100644 --- a/pkg/kubectl/kubectl_test.go +++ b/pkg/kubectl/kubectl_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/namespace.go b/pkg/kubectl/namespace.go index c6011d38b4..6d58c226ef 100644 --- a/pkg/kubectl/namespace.go +++ b/pkg/kubectl/namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/namespace_test.go b/pkg/kubectl/namespace_test.go index 70e961ccfc..eadad06838 100644 --- a/pkg/kubectl/namespace_test.go +++ b/pkg/kubectl/namespace_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/proxy_server.go b/pkg/kubectl/proxy_server.go index 082b542fc8..733a3f90f3 100644 --- a/pkg/kubectl/proxy_server.go +++ b/pkg/kubectl/proxy_server.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/proxy_server_test.go b/pkg/kubectl/proxy_server_test.go index 79d1365a33..18b5118127 100644 --- a/pkg/kubectl/proxy_server_test.go +++ b/pkg/kubectl/proxy_server_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource/builder.go b/pkg/kubectl/resource/builder.go index 2e71537b56..9c32fc6a97 100644 --- a/pkg/kubectl/resource/builder.go +++ b/pkg/kubectl/resource/builder.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource/builder_test.go b/pkg/kubectl/resource/builder_test.go index 66076f9e32..71e33b1d83 100644 --- a/pkg/kubectl/resource/builder_test.go +++ b/pkg/kubectl/resource/builder_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource/doc.go b/pkg/kubectl/resource/doc.go index 05b35cfddc..a0e22e7cf7 100644 --- a/pkg/kubectl/resource/doc.go +++ b/pkg/kubectl/resource/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource/helper.go b/pkg/kubectl/resource/helper.go index 849a6c0406..6b5f8d639b 100644 --- a/pkg/kubectl/resource/helper.go +++ b/pkg/kubectl/resource/helper.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource/helper_test.go b/pkg/kubectl/resource/helper_test.go index 0cd438b059..0413878165 100644 --- a/pkg/kubectl/resource/helper_test.go +++ b/pkg/kubectl/resource/helper_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource/interfaces.go b/pkg/kubectl/resource/interfaces.go index 2639a61ecc..7a872eb2e4 100644 --- a/pkg/kubectl/resource/interfaces.go +++ b/pkg/kubectl/resource/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource/mapper.go b/pkg/kubectl/resource/mapper.go index 1ca922a051..fe0f315ab5 100644 --- a/pkg/kubectl/resource/mapper.go +++ b/pkg/kubectl/resource/mapper.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource/result.go b/pkg/kubectl/resource/result.go index 562fc0cc35..7e73d75a28 100644 --- a/pkg/kubectl/resource/result.go +++ b/pkg/kubectl/resource/result.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource/selector.go b/pkg/kubectl/resource/selector.go index 047a814ae3..afa07d7321 100644 --- a/pkg/kubectl/resource/selector.go +++ b/pkg/kubectl/resource/selector.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource/visitor.go b/pkg/kubectl/resource/visitor.go index 2430b312dc..a643925d32 100644 --- a/pkg/kubectl/resource/visitor.go +++ b/pkg/kubectl/resource/visitor.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource/visitor_test.go b/pkg/kubectl/resource/visitor_test.go index e781c90c24..50f7db7cad 100644 --- a/pkg/kubectl/resource/visitor_test.go +++ b/pkg/kubectl/resource/visitor_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource_printer.go b/pkg/kubectl/resource_printer.go index bd26d43036..f4da0941e1 100644 --- a/pkg/kubectl/resource_printer.go +++ b/pkg/kubectl/resource_printer.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/resource_printer_test.go b/pkg/kubectl/resource_printer_test.go index 35461e3637..c4e4940976 100644 --- a/pkg/kubectl/resource_printer_test.go +++ b/pkg/kubectl/resource_printer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/rollback.go b/pkg/kubectl/rollback.go index 2e4f92b305..244280e5cd 100644 --- a/pkg/kubectl/rollback.go +++ b/pkg/kubectl/rollback.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/rolling_updater.go b/pkg/kubectl/rolling_updater.go index 0af1253ad6..b54fe6892c 100644 --- a/pkg/kubectl/rolling_updater.go +++ b/pkg/kubectl/rolling_updater.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/rolling_updater_test.go b/pkg/kubectl/rolling_updater_test.go index 9abe440569..bc5fb2e1d0 100644 --- a/pkg/kubectl/rolling_updater_test.go +++ b/pkg/kubectl/rolling_updater_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/rollout_status.go b/pkg/kubectl/rollout_status.go index dc39865d45..632a98f794 100644 --- a/pkg/kubectl/rollout_status.go +++ b/pkg/kubectl/rollout_status.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/run.go b/pkg/kubectl/run.go index 4e076c0719..1ce9f890ef 100644 --- a/pkg/kubectl/run.go +++ b/pkg/kubectl/run.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/run_test.go b/pkg/kubectl/run_test.go index 88238a8fb0..25829b0b74 100644 --- a/pkg/kubectl/run_test.go +++ b/pkg/kubectl/run_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/scale.go b/pkg/kubectl/scale.go index bef93d9909..a15d8c621e 100644 --- a/pkg/kubectl/scale.go +++ b/pkg/kubectl/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/scale_test.go b/pkg/kubectl/scale_test.go index 0dc55cda18..459ddfe0c8 100644 --- a/pkg/kubectl/scale_test.go +++ b/pkg/kubectl/scale_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/secret.go b/pkg/kubectl/secret.go index e5b7cc33e7..85d264cbe1 100644 --- a/pkg/kubectl/secret.go +++ b/pkg/kubectl/secret.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/secret_for_docker_registry.go b/pkg/kubectl/secret_for_docker_registry.go index 773bde3865..65615a7fd6 100644 --- a/pkg/kubectl/secret_for_docker_registry.go +++ b/pkg/kubectl/secret_for_docker_registry.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/secret_for_docker_registry_test.go b/pkg/kubectl/secret_for_docker_registry_test.go index 65d8d397d7..9a0595d813 100644 --- a/pkg/kubectl/secret_for_docker_registry_test.go +++ b/pkg/kubectl/secret_for_docker_registry_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/secret_for_tls.go b/pkg/kubectl/secret_for_tls.go index 05061d2597..a29af55976 100644 --- a/pkg/kubectl/secret_for_tls.go +++ b/pkg/kubectl/secret_for_tls.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/secret_for_tls_test.go b/pkg/kubectl/secret_for_tls_test.go index f24403fd22..7c5b0cb352 100644 --- a/pkg/kubectl/secret_for_tls_test.go +++ b/pkg/kubectl/secret_for_tls_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/secret_test.go b/pkg/kubectl/secret_test.go index 944c42356b..1114813b0a 100644 --- a/pkg/kubectl/secret_test.go +++ b/pkg/kubectl/secret_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/service.go b/pkg/kubectl/service.go index f67b3a11b4..891e9de834 100644 --- a/pkg/kubectl/service.go +++ b/pkg/kubectl/service.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/service_test.go b/pkg/kubectl/service_test.go index e65df05b5b..bd7f26ce4e 100644 --- a/pkg/kubectl/service_test.go +++ b/pkg/kubectl/service_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/serviceaccount.go b/pkg/kubectl/serviceaccount.go index 2be08dd2d2..1a7e256daa 100644 --- a/pkg/kubectl/serviceaccount.go +++ b/pkg/kubectl/serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/serviceaccount_test.go b/pkg/kubectl/serviceaccount_test.go index ca000f85f2..1eedeec35d 100644 --- a/pkg/kubectl/serviceaccount_test.go +++ b/pkg/kubectl/serviceaccount_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/sorted_event_list.go b/pkg/kubectl/sorted_event_list.go index 568c46d6d1..b8db7fad21 100644 --- a/pkg/kubectl/sorted_event_list.go +++ b/pkg/kubectl/sorted_event_list.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/sorted_event_list_test.go b/pkg/kubectl/sorted_event_list_test.go index 471069ed21..101ca3cea0 100644 --- a/pkg/kubectl/sorted_event_list_test.go +++ b/pkg/kubectl/sorted_event_list_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/sorted_resource_name_list.go b/pkg/kubectl/sorted_resource_name_list.go index 2bce7dfc2d..949f66c4da 100644 --- a/pkg/kubectl/sorted_resource_name_list.go +++ b/pkg/kubectl/sorted_resource_name_list.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/sorted_resource_name_list_test.go b/pkg/kubectl/sorted_resource_name_list_test.go index c0e4855584..cf999c7f36 100644 --- a/pkg/kubectl/sorted_resource_name_list_test.go +++ b/pkg/kubectl/sorted_resource_name_list_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/sorting_printer.go b/pkg/kubectl/sorting_printer.go index e95b8a1e74..c2c97f37d7 100644 --- a/pkg/kubectl/sorting_printer.go +++ b/pkg/kubectl/sorting_printer.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/sorting_printer_test.go b/pkg/kubectl/sorting_printer_test.go index b9f9f1be98..70b0cdc6de 100644 --- a/pkg/kubectl/sorting_printer_test.go +++ b/pkg/kubectl/sorting_printer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/stop.go b/pkg/kubectl/stop.go index d784ef24ce..ea8ed5155b 100644 --- a/pkg/kubectl/stop.go +++ b/pkg/kubectl/stop.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/stop_test.go b/pkg/kubectl/stop_test.go index dfc161051e..1964b81b0a 100644 --- a/pkg/kubectl/stop_test.go +++ b/pkg/kubectl/stop_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/testing/types.generated.go b/pkg/kubectl/testing/types.generated.go index 6b0facba08..1ce641b4ed 100644 --- a/pkg/kubectl/testing/types.generated.go +++ b/pkg/kubectl/testing/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/testing/types.go b/pkg/kubectl/testing/types.go index 2fbc2ed45f..740b777ebb 100644 --- a/pkg/kubectl/testing/types.go +++ b/pkg/kubectl/testing/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/version.go b/pkg/kubectl/version.go index 4c39b3c999..8e32c2dcc5 100644 --- a/pkg/kubectl/version.go +++ b/pkg/kubectl/version.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubectl/watchloop.go b/pkg/kubectl/watchloop.go index d2920dd7d2..2f814a61cc 100644 --- a/pkg/kubectl/watchloop.go +++ b/pkg/kubectl/watchloop.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/api/v1alpha1/stats/types.go b/pkg/kubelet/api/v1alpha1/stats/types.go index 90c566d9d3..e0f5dfa62f 100644 --- a/pkg/kubelet/api/v1alpha1/stats/types.go +++ b/pkg/kubelet/api/v1alpha1/stats/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cadvisor/cadvisor_linux.go b/pkg/kubelet/cadvisor/cadvisor_linux.go index 6ba118b371..6524e792b3 100644 --- a/pkg/kubelet/cadvisor/cadvisor_linux.go +++ b/pkg/kubelet/cadvisor/cadvisor_linux.go @@ -1,7 +1,7 @@ // +build cgo,linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cadvisor/cadvisor_unsupported.go b/pkg/kubelet/cadvisor/cadvisor_unsupported.go index e5f281d646..f8036e1b3f 100644 --- a/pkg/kubelet/cadvisor/cadvisor_unsupported.go +++ b/pkg/kubelet/cadvisor/cadvisor_unsupported.go @@ -1,7 +1,7 @@ // +build !cgo !linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cadvisor/doc.go b/pkg/kubelet/cadvisor/doc.go index 8e1c076c68..22ae55f26d 100644 --- a/pkg/kubelet/cadvisor/doc.go +++ b/pkg/kubelet/cadvisor/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cadvisor/testing/cadvisor_fake.go b/pkg/kubelet/cadvisor/testing/cadvisor_fake.go index f73597ea69..894c6f0c97 100644 --- a/pkg/kubelet/cadvisor/testing/cadvisor_fake.go +++ b/pkg/kubelet/cadvisor/testing/cadvisor_fake.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cadvisor/testing/cadvisor_mock.go b/pkg/kubelet/cadvisor/testing/cadvisor_mock.go index 97b5091ed6..a6ba72c878 100644 --- a/pkg/kubelet/cadvisor/testing/cadvisor_mock.go +++ b/pkg/kubelet/cadvisor/testing/cadvisor_mock.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cadvisor/types.go b/pkg/kubelet/cadvisor/types.go index fbf7b9e058..de7d334c1b 100644 --- a/pkg/kubelet/cadvisor/types.go +++ b/pkg/kubelet/cadvisor/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cadvisor/util.go b/pkg/kubelet/cadvisor/util.go index 2dac217565..5fa528a585 100644 --- a/pkg/kubelet/cadvisor/util.go +++ b/pkg/kubelet/cadvisor/util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/client/kubelet_client.go b/pkg/kubelet/client/kubelet_client.go index b656fbf09b..4d14457914 100644 --- a/pkg/kubelet/client/kubelet_client.go +++ b/pkg/kubelet/client/kubelet_client.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/client/kubelet_client_test.go b/pkg/kubelet/client/kubelet_client_test.go index a8352a9d8a..7eef04a602 100644 --- a/pkg/kubelet/client/kubelet_client_test.go +++ b/pkg/kubelet/client/kubelet_client_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cm/cgroup_manager_linux.go b/pkg/kubelet/cm/cgroup_manager_linux.go index e147319ec6..200ddb9fa4 100644 --- a/pkg/kubelet/cm/cgroup_manager_linux.go +++ b/pkg/kubelet/cm/cgroup_manager_linux.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cm/cgroup_manager_unsupported.go b/pkg/kubelet/cm/cgroup_manager_unsupported.go index 0c9b4b433f..492c1457f3 100644 --- a/pkg/kubelet/cm/cgroup_manager_unsupported.go +++ b/pkg/kubelet/cm/cgroup_manager_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cm/container_manager.go b/pkg/kubelet/cm/container_manager.go index e18bc6865e..9e69949630 100644 --- a/pkg/kubelet/cm/container_manager.go +++ b/pkg/kubelet/cm/container_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cm/container_manager_linux.go b/pkg/kubelet/cm/container_manager_linux.go index 70b53a5608..4caeb48577 100644 --- a/pkg/kubelet/cm/container_manager_linux.go +++ b/pkg/kubelet/cm/container_manager_linux.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cm/container_manager_linux_test.go b/pkg/kubelet/cm/container_manager_linux_test.go index 34e91c83b6..9188486b71 100644 --- a/pkg/kubelet/cm/container_manager_linux_test.go +++ b/pkg/kubelet/cm/container_manager_linux_test.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cm/container_manager_stub.go b/pkg/kubelet/cm/container_manager_stub.go index 4bca506c2f..977b713fa8 100644 --- a/pkg/kubelet/cm/container_manager_stub.go +++ b/pkg/kubelet/cm/container_manager_stub.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cm/container_manager_unsupported.go b/pkg/kubelet/cm/container_manager_unsupported.go index 426c95ca4c..fe6cb808fa 100644 --- a/pkg/kubelet/cm/container_manager_unsupported.go +++ b/pkg/kubelet/cm/container_manager_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cm/container_manager_unsupported_test.go b/pkg/kubelet/cm/container_manager_unsupported_test.go index 48a4f04fdb..143d1f0f12 100644 --- a/pkg/kubelet/cm/container_manager_unsupported_test.go +++ b/pkg/kubelet/cm/container_manager_unsupported_test.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cm/helpers_linux.go b/pkg/kubelet/cm/helpers_linux.go index 12a0b315c6..1d2a196878 100644 --- a/pkg/kubelet/cm/helpers_linux.go +++ b/pkg/kubelet/cm/helpers_linux.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/cm/types.go b/pkg/kubelet/cm/types.go index a225bb8d6d..147dedd449 100644 --- a/pkg/kubelet/cm/types.go +++ b/pkg/kubelet/cm/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/config/apiserver.go b/pkg/kubelet/config/apiserver.go index c3baed8d04..8975449935 100644 --- a/pkg/kubelet/config/apiserver.go +++ b/pkg/kubelet/config/apiserver.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/config/apiserver_test.go b/pkg/kubelet/config/apiserver_test.go index d7be8a7fed..f05ebd5c3a 100644 --- a/pkg/kubelet/config/apiserver_test.go +++ b/pkg/kubelet/config/apiserver_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/config/common.go b/pkg/kubelet/config/common.go index 0838699ec2..ec11b227a3 100644 --- a/pkg/kubelet/config/common.go +++ b/pkg/kubelet/config/common.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/config/common_test.go b/pkg/kubelet/config/common_test.go index 80eab2f4e4..082f619ac9 100644 --- a/pkg/kubelet/config/common_test.go +++ b/pkg/kubelet/config/common_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/config/config.go b/pkg/kubelet/config/config.go index 0d190e01e0..6ed60a997c 100644 --- a/pkg/kubelet/config/config.go +++ b/pkg/kubelet/config/config.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/config/config_test.go b/pkg/kubelet/config/config_test.go index 5bc6a114a5..45b641537e 100644 --- a/pkg/kubelet/config/config_test.go +++ b/pkg/kubelet/config/config_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/config/doc.go b/pkg/kubelet/config/doc.go index 511d055220..1d839ba325 100644 --- a/pkg/kubelet/config/doc.go +++ b/pkg/kubelet/config/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/config/file.go b/pkg/kubelet/config/file.go index da5cd74007..bc2d346c95 100644 --- a/pkg/kubelet/config/file.go +++ b/pkg/kubelet/config/file.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/config/file_test.go b/pkg/kubelet/config/file_test.go index fad1f227b9..ce79d88f4c 100644 --- a/pkg/kubelet/config/file_test.go +++ b/pkg/kubelet/config/file_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/config/http.go b/pkg/kubelet/config/http.go index 0752e5fa30..c061714a5a 100644 --- a/pkg/kubelet/config/http.go +++ b/pkg/kubelet/config/http.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/config/http_test.go b/pkg/kubelet/config/http_test.go index b30bf6ab0c..20b4dc39e1 100644 --- a/pkg/kubelet/config/http_test.go +++ b/pkg/kubelet/config/http_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/config/sources.go b/pkg/kubelet/config/sources.go index e26b9de28a..772c020ab3 100644 --- a/pkg/kubelet/config/sources.go +++ b/pkg/kubelet/config/sources.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/cache.go b/pkg/kubelet/container/cache.go index 219ad49f39..a15acf006c 100644 --- a/pkg/kubelet/container/cache.go +++ b/pkg/kubelet/container/cache.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/cache_test.go b/pkg/kubelet/container/cache_test.go index 5755005d84..665d80b197 100644 --- a/pkg/kubelet/container/cache_test.go +++ b/pkg/kubelet/container/cache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/container_gc.go b/pkg/kubelet/container/container_gc.go index c749a43037..a66acc9ef0 100644 --- a/pkg/kubelet/container/container_gc.go +++ b/pkg/kubelet/container/container_gc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/container_reference_manager.go b/pkg/kubelet/container/container_reference_manager.go index 1f44389c7f..f37a7103ab 100644 --- a/pkg/kubelet/container/container_reference_manager.go +++ b/pkg/kubelet/container/container_reference_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/event.go b/pkg/kubelet/container/event.go index 949dfcccc0..8e4cba635b 100644 --- a/pkg/kubelet/container/event.go +++ b/pkg/kubelet/container/event.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/helpers.go b/pkg/kubelet/container/helpers.go index ed0311df2a..496969768d 100644 --- a/pkg/kubelet/container/helpers.go +++ b/pkg/kubelet/container/helpers.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/helpers_test.go b/pkg/kubelet/container/helpers_test.go index 435790c954..4856d79af2 100644 --- a/pkg/kubelet/container/helpers_test.go +++ b/pkg/kubelet/container/helpers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/image_puller.go b/pkg/kubelet/container/image_puller.go index 60f6ee4a24..fb3e46e4a9 100644 --- a/pkg/kubelet/container/image_puller.go +++ b/pkg/kubelet/container/image_puller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/image_puller_test.go b/pkg/kubelet/container/image_puller_test.go index baabc0012c..a18b8c57aa 100644 --- a/pkg/kubelet/container/image_puller_test.go +++ b/pkg/kubelet/container/image_puller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/os.go b/pkg/kubelet/container/os.go index 21c0264e2a..4fbb76b031 100644 --- a/pkg/kubelet/container/os.go +++ b/pkg/kubelet/container/os.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/pty_linux.go b/pkg/kubelet/container/pty_linux.go index cbc36f6d3f..40906ce99b 100644 --- a/pkg/kubelet/container/pty_linux.go +++ b/pkg/kubelet/container/pty_linux.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/pty_unsupported.go b/pkg/kubelet/container/pty_unsupported.go index b48a999b0a..24ea2f787f 100644 --- a/pkg/kubelet/container/pty_unsupported.go +++ b/pkg/kubelet/container/pty_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/ref.go b/pkg/kubelet/container/ref.go index ebfff2ebf7..8fcdc95ad2 100644 --- a/pkg/kubelet/container/ref.go +++ b/pkg/kubelet/container/ref.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/ref_test.go b/pkg/kubelet/container/ref_test.go index 18cc6672e9..9b35b48b27 100644 --- a/pkg/kubelet/container/ref_test.go +++ b/pkg/kubelet/container/ref_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/runtime.go b/pkg/kubelet/container/runtime.go index d48f4a7024..e110a16d2a 100644 --- a/pkg/kubelet/container/runtime.go +++ b/pkg/kubelet/container/runtime.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/runtime_cache.go b/pkg/kubelet/container/runtime_cache.go index 0926107da5..d15852f886 100644 --- a/pkg/kubelet/container/runtime_cache.go +++ b/pkg/kubelet/container/runtime_cache.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/runtime_cache_fake.go b/pkg/kubelet/container/runtime_cache_fake.go index 0b6e7d868b..5416d91672 100644 --- a/pkg/kubelet/container/runtime_cache_fake.go +++ b/pkg/kubelet/container/runtime_cache_fake.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/runtime_cache_test.go b/pkg/kubelet/container/runtime_cache_test.go index e98b8f7ca3..4fc4da8bf3 100644 --- a/pkg/kubelet/container/runtime_cache_test.go +++ b/pkg/kubelet/container/runtime_cache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/serialized_image_puller.go b/pkg/kubelet/container/serialized_image_puller.go index 3b5c4689f5..6de03f03fc 100644 --- a/pkg/kubelet/container/serialized_image_puller.go +++ b/pkg/kubelet/container/serialized_image_puller.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/serialized_image_puller_test.go b/pkg/kubelet/container/serialized_image_puller_test.go index 4fea2b2748..f7830665ee 100644 --- a/pkg/kubelet/container/serialized_image_puller_test.go +++ b/pkg/kubelet/container/serialized_image_puller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/sync_result.go b/pkg/kubelet/container/sync_result.go index 6a196f602b..67e786b03e 100644 --- a/pkg/kubelet/container/sync_result.go +++ b/pkg/kubelet/container/sync_result.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/sync_result_test.go b/pkg/kubelet/container/sync_result_test.go index a510d8a922..56f191d3d5 100644 --- a/pkg/kubelet/container/sync_result_test.go +++ b/pkg/kubelet/container/sync_result_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/testing/fake_cache.go b/pkg/kubelet/container/testing/fake_cache.go index db7a82e5a1..e77f180fa0 100644 --- a/pkg/kubelet/container/testing/fake_cache.go +++ b/pkg/kubelet/container/testing/fake_cache.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/testing/fake_runtime.go b/pkg/kubelet/container/testing/fake_runtime.go index 3bd5c69974..3612f555bf 100644 --- a/pkg/kubelet/container/testing/fake_runtime.go +++ b/pkg/kubelet/container/testing/fake_runtime.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/testing/os.go b/pkg/kubelet/container/testing/os.go index f926661944..74c884d68f 100644 --- a/pkg/kubelet/container/testing/os.go +++ b/pkg/kubelet/container/testing/os.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container/testing/runtime_mock.go b/pkg/kubelet/container/testing/runtime_mock.go index 939054b0f0..43dd2a9573 100644 --- a/pkg/kubelet/container/testing/runtime_mock.go +++ b/pkg/kubelet/container/testing/runtime_mock.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/container_bridge.go b/pkg/kubelet/container_bridge.go index e151dc709b..5255502308 100644 --- a/pkg/kubelet/container_bridge.go +++ b/pkg/kubelet/container_bridge.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/custommetrics/custom_metrics.go b/pkg/kubelet/custommetrics/custom_metrics.go index 05a628a440..314a3b5df0 100644 --- a/pkg/kubelet/custommetrics/custom_metrics.go +++ b/pkg/kubelet/custommetrics/custom_metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/custommetrics/custom_metrics_test.go b/pkg/kubelet/custommetrics/custom_metrics_test.go index 54892ad1bd..bcda7b056c 100644 --- a/pkg/kubelet/custommetrics/custom_metrics_test.go +++ b/pkg/kubelet/custommetrics/custom_metrics_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/disk_manager.go b/pkg/kubelet/disk_manager.go index edf749b4f8..b5b0d499dd 100644 --- a/pkg/kubelet/disk_manager.go +++ b/pkg/kubelet/disk_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/disk_manager_test.go b/pkg/kubelet/disk_manager_test.go index f9dba0bf1c..e9ff9cf773 100644 --- a/pkg/kubelet/disk_manager_test.go +++ b/pkg/kubelet/disk_manager_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/doc.go b/pkg/kubelet/doc.go index 8fd7b3b3df..7d31922769 100644 --- a/pkg/kubelet/doc.go +++ b/pkg/kubelet/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/container_gc.go b/pkg/kubelet/dockertools/container_gc.go index b6e7acb5fc..edbef76a07 100644 --- a/pkg/kubelet/dockertools/container_gc.go +++ b/pkg/kubelet/dockertools/container_gc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/container_gc_test.go b/pkg/kubelet/dockertools/container_gc_test.go index 868e9d8cee..eacd7780ba 100644 --- a/pkg/kubelet/dockertools/container_gc_test.go +++ b/pkg/kubelet/dockertools/container_gc_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/convert.go b/pkg/kubelet/dockertools/convert.go index 48c594ff1a..ba440baa05 100644 --- a/pkg/kubelet/dockertools/convert.go +++ b/pkg/kubelet/dockertools/convert.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/convert_test.go b/pkg/kubelet/dockertools/convert_test.go index fbc3985530..392a034acd 100644 --- a/pkg/kubelet/dockertools/convert_test.go +++ b/pkg/kubelet/dockertools/convert_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/docker.go b/pkg/kubelet/dockertools/docker.go index 58dae17599..0eb4631704 100644 --- a/pkg/kubelet/dockertools/docker.go +++ b/pkg/kubelet/dockertools/docker.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/docker_manager.go b/pkg/kubelet/dockertools/docker_manager.go index 28ba651e65..2c89fed947 100644 --- a/pkg/kubelet/dockertools/docker_manager.go +++ b/pkg/kubelet/dockertools/docker_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/docker_manager_test.go b/pkg/kubelet/dockertools/docker_manager_test.go index 97cad5e566..da9a2a6560 100644 --- a/pkg/kubelet/dockertools/docker_manager_test.go +++ b/pkg/kubelet/dockertools/docker_manager_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/docker_test.go b/pkg/kubelet/dockertools/docker_test.go index 5e0804ec9c..1c063fe1aa 100644 --- a/pkg/kubelet/dockertools/docker_test.go +++ b/pkg/kubelet/dockertools/docker_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/exec.go b/pkg/kubelet/dockertools/exec.go index 2568b60b2d..b836652888 100644 --- a/pkg/kubelet/dockertools/exec.go +++ b/pkg/kubelet/dockertools/exec.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/fake_docker_client.go b/pkg/kubelet/dockertools/fake_docker_client.go index 686a2ccd76..a9d3c2249b 100644 --- a/pkg/kubelet/dockertools/fake_docker_client.go +++ b/pkg/kubelet/dockertools/fake_docker_client.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/fake_manager.go b/pkg/kubelet/dockertools/fake_manager.go index 38c801e35a..1bb5cf59b8 100644 --- a/pkg/kubelet/dockertools/fake_manager.go +++ b/pkg/kubelet/dockertools/fake_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/images.go b/pkg/kubelet/dockertools/images.go index 6f7be9e0eb..e87c30fcf8 100644 --- a/pkg/kubelet/dockertools/images.go +++ b/pkg/kubelet/dockertools/images.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/images_test.go b/pkg/kubelet/dockertools/images_test.go index 6ef3556295..21fe5ee942 100644 --- a/pkg/kubelet/dockertools/images_test.go +++ b/pkg/kubelet/dockertools/images_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/instrumented_docker.go b/pkg/kubelet/dockertools/instrumented_docker.go index 36e3fdd637..3a6e85493b 100644 --- a/pkg/kubelet/dockertools/instrumented_docker.go +++ b/pkg/kubelet/dockertools/instrumented_docker.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/kube_docker_client.go b/pkg/kubelet/dockertools/kube_docker_client.go index d390eff108..d66fc380cb 100644 --- a/pkg/kubelet/dockertools/kube_docker_client.go +++ b/pkg/kubelet/dockertools/kube_docker_client.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/labels.go b/pkg/kubelet/dockertools/labels.go index 9d2bd68b50..8e9e0dadd4 100644 --- a/pkg/kubelet/dockertools/labels.go +++ b/pkg/kubelet/dockertools/labels.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/dockertools/labels_test.go b/pkg/kubelet/dockertools/labels_test.go index 48eaa8059c..b8c9f2d8f2 100644 --- a/pkg/kubelet/dockertools/labels_test.go +++ b/pkg/kubelet/dockertools/labels_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/envvars/doc.go b/pkg/kubelet/envvars/doc.go index 22f57e80a8..42fea62f22 100644 --- a/pkg/kubelet/envvars/doc.go +++ b/pkg/kubelet/envvars/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/envvars/envvars.go b/pkg/kubelet/envvars/envvars.go index 31e82eb781..186a0a87c8 100644 --- a/pkg/kubelet/envvars/envvars.go +++ b/pkg/kubelet/envvars/envvars.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/envvars/envvars_test.go b/pkg/kubelet/envvars/envvars_test.go index 7feaf065da..9818741be3 100644 --- a/pkg/kubelet/envvars/envvars_test.go +++ b/pkg/kubelet/envvars/envvars_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/eviction/doc.go b/pkg/kubelet/eviction/doc.go index d46bb27796..1395301680 100644 --- a/pkg/kubelet/eviction/doc.go +++ b/pkg/kubelet/eviction/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/eviction/eviction_manager.go b/pkg/kubelet/eviction/eviction_manager.go index ca9c98e3be..f4ef16e5c5 100644 --- a/pkg/kubelet/eviction/eviction_manager.go +++ b/pkg/kubelet/eviction/eviction_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/eviction/eviction_manager_test.go b/pkg/kubelet/eviction/eviction_manager_test.go index c51dbd8200..f4fa542a6e 100644 --- a/pkg/kubelet/eviction/eviction_manager_test.go +++ b/pkg/kubelet/eviction/eviction_manager_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/eviction/helpers.go b/pkg/kubelet/eviction/helpers.go index f4b58051eb..e36cd8e105 100644 --- a/pkg/kubelet/eviction/helpers.go +++ b/pkg/kubelet/eviction/helpers.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/eviction/helpers_test.go b/pkg/kubelet/eviction/helpers_test.go index 3063150641..98b767fa57 100644 --- a/pkg/kubelet/eviction/helpers_test.go +++ b/pkg/kubelet/eviction/helpers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/eviction/types.go b/pkg/kubelet/eviction/types.go index 3b4470d7c7..185860722a 100644 --- a/pkg/kubelet/eviction/types.go +++ b/pkg/kubelet/eviction/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/flannel_helper.go b/pkg/kubelet/flannel_helper.go index c81cb594fe..eb61e81ed9 100644 --- a/pkg/kubelet/flannel_helper.go +++ b/pkg/kubelet/flannel_helper.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/image_manager.go b/pkg/kubelet/image_manager.go index 9fd4780ff2..ba5239c841 100644 --- a/pkg/kubelet/image_manager.go +++ b/pkg/kubelet/image_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/image_manager_test.go b/pkg/kubelet/image_manager_test.go index 93ffd86260..1dabf28c36 100644 --- a/pkg/kubelet/image_manager_test.go +++ b/pkg/kubelet/image_manager_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 6281aebdf4..71e41da028 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/kubelet_cadvisor.go b/pkg/kubelet/kubelet_cadvisor.go index 76bf6ceb34..c61f89b04c 100644 --- a/pkg/kubelet/kubelet_cadvisor.go +++ b/pkg/kubelet/kubelet_cadvisor.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/kubelet_cadvisor_test.go b/pkg/kubelet/kubelet_cadvisor_test.go index 1c0f7c8e96..03d69d1768 100644 --- a/pkg/kubelet/kubelet_cadvisor_test.go +++ b/pkg/kubelet/kubelet_cadvisor_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/kubelet_getters.go b/pkg/kubelet/kubelet_getters.go index 5032ebf80f..64a86653c1 100644 --- a/pkg/kubelet/kubelet_getters.go +++ b/pkg/kubelet/kubelet_getters.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/kubelet_getters_test.go b/pkg/kubelet/kubelet_getters_test.go index a2a0b96f09..0c05c39435 100644 --- a/pkg/kubelet/kubelet_getters_test.go +++ b/pkg/kubelet/kubelet_getters_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/kubelet_resources.go b/pkg/kubelet/kubelet_resources.go index b21d840ef3..2868f99287 100644 --- a/pkg/kubelet/kubelet_resources.go +++ b/pkg/kubelet/kubelet_resources.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/kubelet_resources_test.go b/pkg/kubelet/kubelet_resources_test.go index b864509716..f7f6e2fe78 100644 --- a/pkg/kubelet/kubelet_resources_test.go +++ b/pkg/kubelet/kubelet_resources_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index 10e49c34b9..8a6f9e8ecc 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/kubelet_volumes.go b/pkg/kubelet/kubelet_volumes.go index 13323acdbf..f92d7e363a 100644 --- a/pkg/kubelet/kubelet_volumes.go +++ b/pkg/kubelet/kubelet_volumes.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/leaky/leaky.go b/pkg/kubelet/leaky/leaky.go index dd4e6efb03..4e3e1e1f27 100644 --- a/pkg/kubelet/leaky/leaky.go +++ b/pkg/kubelet/leaky/leaky.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/lifecycle/doc.go b/pkg/kubelet/lifecycle/doc.go index f398ca060c..16c90b6899 100644 --- a/pkg/kubelet/lifecycle/doc.go +++ b/pkg/kubelet/lifecycle/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/lifecycle/fake_handler_runner.go b/pkg/kubelet/lifecycle/fake_handler_runner.go index 501fb79caa..3979204e42 100644 --- a/pkg/kubelet/lifecycle/fake_handler_runner.go +++ b/pkg/kubelet/lifecycle/fake_handler_runner.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/lifecycle/handlers.go b/pkg/kubelet/lifecycle/handlers.go index 011a264ad0..f3894659f0 100644 --- a/pkg/kubelet/lifecycle/handlers.go +++ b/pkg/kubelet/lifecycle/handlers.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/lifecycle/handlers_test.go b/pkg/kubelet/lifecycle/handlers_test.go index 3fc2389ee8..1bdd711421 100644 --- a/pkg/kubelet/lifecycle/handlers_test.go +++ b/pkg/kubelet/lifecycle/handlers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/lifecycle/interfaces.go b/pkg/kubelet/lifecycle/interfaces.go index 0dedd4510a..38ee01825f 100644 --- a/pkg/kubelet/lifecycle/interfaces.go +++ b/pkg/kubelet/lifecycle/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/metrics/metrics.go b/pkg/kubelet/metrics/metrics.go index 7d8294c150..7461a73657 100644 --- a/pkg/kubelet/metrics/metrics.go +++ b/pkg/kubelet/metrics/metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/cni/cni.go b/pkg/kubelet/network/cni/cni.go index 2356cb5bcf..81e7d0c0cf 100644 --- a/pkg/kubelet/network/cni/cni.go +++ b/pkg/kubelet/network/cni/cni.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/cni/cni_test.go b/pkg/kubelet/network/cni/cni_test.go index 3ad6aaeb94..2022c7e8f6 100644 --- a/pkg/kubelet/network/cni/cni_test.go +++ b/pkg/kubelet/network/cni/cni_test.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/cni/testing/mock_cni.go b/pkg/kubelet/network/cni/testing/mock_cni.go index 622edefd57..96fd1ba646 100644 --- a/pkg/kubelet/network/cni/testing/mock_cni.go +++ b/pkg/kubelet/network/cni/testing/mock_cni.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/exec/exec.go b/pkg/kubelet/network/exec/exec.go index 83d934b57c..98819740c4 100644 --- a/pkg/kubelet/network/exec/exec.go +++ b/pkg/kubelet/network/exec/exec.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/exec/exec_test.go b/pkg/kubelet/network/exec/exec_test.go index 4a682864d1..ec06925813 100644 --- a/pkg/kubelet/network/exec/exec_test.go +++ b/pkg/kubelet/network/exec/exec_test.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/exec/exec_unix.go b/pkg/kubelet/network/exec/exec_unix.go index 26847fe768..0c97e254b1 100644 --- a/pkg/kubelet/network/exec/exec_unix.go +++ b/pkg/kubelet/network/exec/exec_unix.go @@ -1,7 +1,7 @@ // +build !windows /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/exec/exec_unsupported.go b/pkg/kubelet/network/exec/exec_unsupported.go index e2d4969f75..126c8151dc 100644 --- a/pkg/kubelet/network/exec/exec_unsupported.go +++ b/pkg/kubelet/network/exec/exec_unsupported.go @@ -1,7 +1,7 @@ // +build windows /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/hairpin/hairpin.go b/pkg/kubelet/network/hairpin/hairpin.go index b725fbba3a..1bbcc49694 100644 --- a/pkg/kubelet/network/hairpin/hairpin.go +++ b/pkg/kubelet/network/hairpin/hairpin.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/hairpin/hairpin_test.go b/pkg/kubelet/network/hairpin/hairpin_test.go index b94c7b997c..8c667f0c69 100644 --- a/pkg/kubelet/network/hairpin/hairpin_test.go +++ b/pkg/kubelet/network/hairpin/hairpin_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/hostport/fake_iptables.go b/pkg/kubelet/network/hostport/fake_iptables.go index 12c7f8bb61..5b1a1367ae 100644 --- a/pkg/kubelet/network/hostport/fake_iptables.go +++ b/pkg/kubelet/network/hostport/fake_iptables.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/hostport/hostport.go b/pkg/kubelet/network/hostport/hostport.go index 10ce366ec8..86d9594fa4 100644 --- a/pkg/kubelet/network/hostport/hostport.go +++ b/pkg/kubelet/network/hostport/hostport.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/hostport/hostport_test.go b/pkg/kubelet/network/hostport/hostport_test.go index 18fa865165..42bdd9c247 100644 --- a/pkg/kubelet/network/hostport/hostport_test.go +++ b/pkg/kubelet/network/hostport/hostport_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/hostport/testing/fake.go b/pkg/kubelet/network/hostport/testing/fake.go index f5ce6b94cf..60c8e7193b 100644 --- a/pkg/kubelet/network/hostport/testing/fake.go +++ b/pkg/kubelet/network/hostport/testing/fake.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/kubenet/kubenet_linux.go b/pkg/kubelet/network/kubenet/kubenet_linux.go index e91b74889c..b7de8e68ae 100644 --- a/pkg/kubelet/network/kubenet/kubenet_linux.go +++ b/pkg/kubelet/network/kubenet/kubenet_linux.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/kubenet/kubenet_linux_test.go b/pkg/kubelet/network/kubenet/kubenet_linux_test.go index 02b2b93a0d..576bb524d5 100644 --- a/pkg/kubelet/network/kubenet/kubenet_linux_test.go +++ b/pkg/kubelet/network/kubenet/kubenet_linux_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/kubenet/kubenet_unsupported.go b/pkg/kubelet/network/kubenet/kubenet_unsupported.go index 50ceb2af08..28bc88227e 100644 --- a/pkg/kubelet/network/kubenet/kubenet_unsupported.go +++ b/pkg/kubelet/network/kubenet/kubenet_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/mock_network/network_plugins.go b/pkg/kubelet/network/mock_network/network_plugins.go index 9b93d7eebd..00fd719ba4 100644 --- a/pkg/kubelet/network/mock_network/network_plugins.go +++ b/pkg/kubelet/network/mock_network/network_plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/network.go b/pkg/kubelet/network/network.go index 1396d41558..9f9d4f0b23 100644 --- a/pkg/kubelet/network/network.go +++ b/pkg/kubelet/network/network.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/plugins.go b/pkg/kubelet/network/plugins.go index 25c14937e9..e5045824cb 100644 --- a/pkg/kubelet/network/plugins.go +++ b/pkg/kubelet/network/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/plugins_test.go b/pkg/kubelet/network/plugins_test.go index a5baf93a3d..f045827aaa 100644 --- a/pkg/kubelet/network/plugins_test.go +++ b/pkg/kubelet/network/plugins_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/network/testing/fake_host.go b/pkg/kubelet/network/testing/fake_host.go index 9b0f349ab2..3eb1d1672f 100644 --- a/pkg/kubelet/network/testing/fake_host.go +++ b/pkg/kubelet/network/testing/fake_host.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/networks.go b/pkg/kubelet/networks.go index 43674f8041..9ab4a137e6 100644 --- a/pkg/kubelet/networks.go +++ b/pkg/kubelet/networks.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/oom_watcher.go b/pkg/kubelet/oom_watcher.go index 12dd2c48f5..ca4c53d943 100644 --- a/pkg/kubelet/oom_watcher.go +++ b/pkg/kubelet/oom_watcher.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/oom_watcher_test.go b/pkg/kubelet/oom_watcher_test.go index 5928e87ee9..e8915e627a 100644 --- a/pkg/kubelet/oom_watcher_test.go +++ b/pkg/kubelet/oom_watcher_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/pleg/doc.go b/pkg/kubelet/pleg/doc.go index c8782ee898..cda634061c 100644 --- a/pkg/kubelet/pleg/doc.go +++ b/pkg/kubelet/pleg/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/pleg/generic.go b/pkg/kubelet/pleg/generic.go index e0340bdd10..2841425a37 100644 --- a/pkg/kubelet/pleg/generic.go +++ b/pkg/kubelet/pleg/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/pleg/generic_test.go b/pkg/kubelet/pleg/generic_test.go index 0f92e57448..db004ba247 100644 --- a/pkg/kubelet/pleg/generic_test.go +++ b/pkg/kubelet/pleg/generic_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/pleg/pleg.go b/pkg/kubelet/pleg/pleg.go index 0179823728..49f839d9c6 100644 --- a/pkg/kubelet/pleg/pleg.go +++ b/pkg/kubelet/pleg/pleg.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/pod/mirror_client.go b/pkg/kubelet/pod/mirror_client.go index 94af3250cd..f19bc240bc 100644 --- a/pkg/kubelet/pod/mirror_client.go +++ b/pkg/kubelet/pod/mirror_client.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/pod/mirror_client_test.go b/pkg/kubelet/pod/mirror_client_test.go index d8baa05f80..b43c419250 100644 --- a/pkg/kubelet/pod/mirror_client_test.go +++ b/pkg/kubelet/pod/mirror_client_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/pod/pod_manager.go b/pkg/kubelet/pod/pod_manager.go index e4241ceb7d..8c7851f620 100644 --- a/pkg/kubelet/pod/pod_manager.go +++ b/pkg/kubelet/pod/pod_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/pod/pod_manager_test.go b/pkg/kubelet/pod/pod_manager_test.go index 965e24ef2d..4ff42841cf 100644 --- a/pkg/kubelet/pod/pod_manager_test.go +++ b/pkg/kubelet/pod/pod_manager_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/pod/testing/fake_mirror_client.go b/pkg/kubelet/pod/testing/fake_mirror_client.go index 64bfd2351b..72563485a3 100644 --- a/pkg/kubelet/pod/testing/fake_mirror_client.go +++ b/pkg/kubelet/pod/testing/fake_mirror_client.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/pod_workers.go b/pkg/kubelet/pod_workers.go index 90d1c2c3d8..4bb3c7a856 100644 --- a/pkg/kubelet/pod_workers.go +++ b/pkg/kubelet/pod_workers.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/pod_workers_test.go b/pkg/kubelet/pod_workers_test.go index 655c835a55..8839923656 100644 --- a/pkg/kubelet/pod_workers_test.go +++ b/pkg/kubelet/pod_workers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/prober/common_test.go b/pkg/kubelet/prober/common_test.go index aeb61ca217..71f43f98a2 100644 --- a/pkg/kubelet/prober/common_test.go +++ b/pkg/kubelet/prober/common_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/prober/prober.go b/pkg/kubelet/prober/prober.go index 82d2eb5468..19e02238c3 100644 --- a/pkg/kubelet/prober/prober.go +++ b/pkg/kubelet/prober/prober.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/prober/prober_manager.go b/pkg/kubelet/prober/prober_manager.go index 01218a75df..389c2d1d62 100644 --- a/pkg/kubelet/prober/prober_manager.go +++ b/pkg/kubelet/prober/prober_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/prober/prober_manager_test.go b/pkg/kubelet/prober/prober_manager_test.go index 1cf6e5c944..7585ba3898 100644 --- a/pkg/kubelet/prober/prober_manager_test.go +++ b/pkg/kubelet/prober/prober_manager_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/prober/prober_test.go b/pkg/kubelet/prober/prober_test.go index b3cff1410e..bd66c143fb 100644 --- a/pkg/kubelet/prober/prober_test.go +++ b/pkg/kubelet/prober/prober_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/prober/results/results_manager.go b/pkg/kubelet/prober/results/results_manager.go index 9f9b1938d6..28703c6c6b 100644 --- a/pkg/kubelet/prober/results/results_manager.go +++ b/pkg/kubelet/prober/results/results_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/prober/results/results_manager_test.go b/pkg/kubelet/prober/results/results_manager_test.go index 9cc5135987..9fc347acbe 100644 --- a/pkg/kubelet/prober/results/results_manager_test.go +++ b/pkg/kubelet/prober/results/results_manager_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/prober/testing/fake_manager.go b/pkg/kubelet/prober/testing/fake_manager.go index b0d4e55891..3fc4212507 100644 --- a/pkg/kubelet/prober/testing/fake_manager.go +++ b/pkg/kubelet/prober/testing/fake_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/prober/worker.go b/pkg/kubelet/prober/worker.go index 6edd3daa38..f86131edb4 100644 --- a/pkg/kubelet/prober/worker.go +++ b/pkg/kubelet/prober/worker.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/prober/worker_test.go b/pkg/kubelet/prober/worker_test.go index 2b23ad36aa..95ea99213b 100644 --- a/pkg/kubelet/prober/worker_test.go +++ b/pkg/kubelet/prober/worker_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/qos/doc.go b/pkg/kubelet/qos/doc.go index 04a25c9079..ebc1cc598b 100644 --- a/pkg/kubelet/qos/doc.go +++ b/pkg/kubelet/qos/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/qos/policy.go b/pkg/kubelet/qos/policy.go index 50961bfe3d..ad696f3610 100644 --- a/pkg/kubelet/qos/policy.go +++ b/pkg/kubelet/qos/policy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/qos/policy_test.go b/pkg/kubelet/qos/policy_test.go index e66b7b158a..50c9b16349 100644 --- a/pkg/kubelet/qos/policy_test.go +++ b/pkg/kubelet/qos/policy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/qos/qos.go b/pkg/kubelet/qos/qos.go index 4e10587fe9..2c0d19d044 100644 --- a/pkg/kubelet/qos/qos.go +++ b/pkg/kubelet/qos/qos.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/qos/qos_test.go b/pkg/kubelet/qos/qos_test.go index 512d9e0098..d89c714cac 100644 --- a/pkg/kubelet/qos/qos_test.go +++ b/pkg/kubelet/qos/qos_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/qos/types.go b/pkg/kubelet/qos/types.go index 587571ef95..e52dece45a 100644 --- a/pkg/kubelet/qos/types.go +++ b/pkg/kubelet/qos/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/reason_cache.go b/pkg/kubelet/reason_cache.go index 2374f159e0..59f2da3563 100644 --- a/pkg/kubelet/reason_cache.go +++ b/pkg/kubelet/reason_cache.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/reason_cache_test.go b/pkg/kubelet/reason_cache_test.go index cc77ded578..7ca3ad52c9 100644 --- a/pkg/kubelet/reason_cache_test.go +++ b/pkg/kubelet/reason_cache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/rkt/cap.go b/pkg/kubelet/rkt/cap.go index a00057f9e1..bbf7cdb552 100644 --- a/pkg/kubelet/rkt/cap.go +++ b/pkg/kubelet/rkt/cap.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/rkt/config.go b/pkg/kubelet/rkt/config.go index d978847f08..3af07a3541 100644 --- a/pkg/kubelet/rkt/config.go +++ b/pkg/kubelet/rkt/config.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/rkt/container_id.go b/pkg/kubelet/rkt/container_id.go index 73810ed70a..ac37c1815c 100644 --- a/pkg/kubelet/rkt/container_id.go +++ b/pkg/kubelet/rkt/container_id.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/rkt/doc.go b/pkg/kubelet/rkt/doc.go index d45fb3f0e1..71fdac61c1 100644 --- a/pkg/kubelet/rkt/doc.go +++ b/pkg/kubelet/rkt/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/rkt/fake_rkt_interface_test.go b/pkg/kubelet/rkt/fake_rkt_interface_test.go index a7070b4542..65cd726e98 100644 --- a/pkg/kubelet/rkt/fake_rkt_interface_test.go +++ b/pkg/kubelet/rkt/fake_rkt_interface_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/rkt/image.go b/pkg/kubelet/rkt/image.go index 0cad258c4f..e8be07e9c5 100644 --- a/pkg/kubelet/rkt/image.go +++ b/pkg/kubelet/rkt/image.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/rkt/log.go b/pkg/kubelet/rkt/log.go index 4213f591fa..46543820b6 100644 --- a/pkg/kubelet/rkt/log.go +++ b/pkg/kubelet/rkt/log.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/rkt/mock_os/mockfileinfo.go b/pkg/kubelet/rkt/mock_os/mockfileinfo.go index 16761e2586..17f8f956a3 100644 --- a/pkg/kubelet/rkt/mock_os/mockfileinfo.go +++ b/pkg/kubelet/rkt/mock_os/mockfileinfo.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/rkt/rkt.go b/pkg/kubelet/rkt/rkt.go index 1880efdc2d..ff589c6a47 100644 --- a/pkg/kubelet/rkt/rkt.go +++ b/pkg/kubelet/rkt/rkt.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/rkt/rkt_test.go b/pkg/kubelet/rkt/rkt_test.go index cdc90c0ba1..e665a86da8 100644 --- a/pkg/kubelet/rkt/rkt_test.go +++ b/pkg/kubelet/rkt/rkt_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/rkt/systemd.go b/pkg/kubelet/rkt/systemd.go index aee6998df0..8655df92a9 100644 --- a/pkg/kubelet/rkt/systemd.go +++ b/pkg/kubelet/rkt/systemd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/rkt/version.go b/pkg/kubelet/rkt/version.go index 2cf7a63461..ee8ff11f38 100644 --- a/pkg/kubelet/rkt/version.go +++ b/pkg/kubelet/rkt/version.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/root_context_linux.go b/pkg/kubelet/root_context_linux.go index a694d71ba1..6f74ebb358 100644 --- a/pkg/kubelet/root_context_linux.go +++ b/pkg/kubelet/root_context_linux.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/root_context_unsupported.go b/pkg/kubelet/root_context_unsupported.go index 826ac34f04..5e2ee30752 100644 --- a/pkg/kubelet/root_context_unsupported.go +++ b/pkg/kubelet/root_context_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/runonce.go b/pkg/kubelet/runonce.go index bf7ee7fcc5..37e0f0b1d0 100644 --- a/pkg/kubelet/runonce.go +++ b/pkg/kubelet/runonce.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/runonce_test.go b/pkg/kubelet/runonce_test.go index c88ed13d61..ffe96f8036 100644 --- a/pkg/kubelet/runonce_test.go +++ b/pkg/kubelet/runonce_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/runtime.go b/pkg/kubelet/runtime.go index 63dd013636..0f1acbf47c 100644 --- a/pkg/kubelet/runtime.go +++ b/pkg/kubelet/runtime.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/auth.go b/pkg/kubelet/server/auth.go index 0ab25512c0..a153ff4e4f 100644 --- a/pkg/kubelet/server/auth.go +++ b/pkg/kubelet/server/auth.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/doc.go b/pkg/kubelet/server/doc.go index edb357a8e1..22774d20d0 100644 --- a/pkg/kubelet/server/doc.go +++ b/pkg/kubelet/server/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/portforward/constants.go b/pkg/kubelet/server/portforward/constants.go index f438670675..1b73be299b 100644 --- a/pkg/kubelet/server/portforward/constants.go +++ b/pkg/kubelet/server/portforward/constants.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/remotecommand/attach.go b/pkg/kubelet/server/remotecommand/attach.go index 0f9ba7ff5e..a7a12ea166 100644 --- a/pkg/kubelet/server/remotecommand/attach.go +++ b/pkg/kubelet/server/remotecommand/attach.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/remotecommand/contants.go b/pkg/kubelet/server/remotecommand/contants.go index f45cc64403..1ecb072a11 100644 --- a/pkg/kubelet/server/remotecommand/contants.go +++ b/pkg/kubelet/server/remotecommand/contants.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/remotecommand/doc.go b/pkg/kubelet/server/remotecommand/doc.go index 482e9afc1f..34d8f40eff 100644 --- a/pkg/kubelet/server/remotecommand/doc.go +++ b/pkg/kubelet/server/remotecommand/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/remotecommand/exec.go b/pkg/kubelet/server/remotecommand/exec.go index df9a4b5854..e77081f698 100644 --- a/pkg/kubelet/server/remotecommand/exec.go +++ b/pkg/kubelet/server/remotecommand/exec.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/remotecommand/httpstream.go b/pkg/kubelet/server/remotecommand/httpstream.go index 4b0c588e9f..f42b07e611 100644 --- a/pkg/kubelet/server/remotecommand/httpstream.go +++ b/pkg/kubelet/server/remotecommand/httpstream.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/remotecommand/websocket.go b/pkg/kubelet/server/remotecommand/websocket.go index 06a84c8e7d..d9a0665179 100644 --- a/pkg/kubelet/server/remotecommand/websocket.go +++ b/pkg/kubelet/server/remotecommand/websocket.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/server.go b/pkg/kubelet/server/server.go index f490a5075b..bd24e94338 100644 --- a/pkg/kubelet/server/server.go +++ b/pkg/kubelet/server/server.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/server_test.go b/pkg/kubelet/server/server_test.go index 2df3088fda..3d38931ac9 100644 --- a/pkg/kubelet/server/server_test.go +++ b/pkg/kubelet/server/server_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/stats/doc.go b/pkg/kubelet/server/stats/doc.go index 289fdae706..f8d987c1ee 100644 --- a/pkg/kubelet/server/stats/doc.go +++ b/pkg/kubelet/server/stats/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/stats/fs_resource_analyzer.go b/pkg/kubelet/server/stats/fs_resource_analyzer.go index c45e34694a..4cc5c68518 100644 --- a/pkg/kubelet/server/stats/fs_resource_analyzer.go +++ b/pkg/kubelet/server/stats/fs_resource_analyzer.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/stats/handler.go b/pkg/kubelet/server/stats/handler.go index 531d55350a..3102d03d45 100644 --- a/pkg/kubelet/server/stats/handler.go +++ b/pkg/kubelet/server/stats/handler.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/stats/mocks_test.go b/pkg/kubelet/server/stats/mocks_test.go index 3449534609..bb5d013cbd 100644 --- a/pkg/kubelet/server/stats/mocks_test.go +++ b/pkg/kubelet/server/stats/mocks_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/stats/resource_analyzer.go b/pkg/kubelet/server/stats/resource_analyzer.go index a9e9dbbf0a..670e7a751a 100644 --- a/pkg/kubelet/server/stats/resource_analyzer.go +++ b/pkg/kubelet/server/stats/resource_analyzer.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/stats/summary.go b/pkg/kubelet/server/stats/summary.go index a74e7f4398..00b8b82b59 100644 --- a/pkg/kubelet/server/stats/summary.go +++ b/pkg/kubelet/server/stats/summary.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/stats/summary_test.go b/pkg/kubelet/server/stats/summary_test.go index e78cbe2781..cb38951f07 100644 --- a/pkg/kubelet/server/stats/summary_test.go +++ b/pkg/kubelet/server/stats/summary_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/server/stats/volume_stat_calculator.go b/pkg/kubelet/server/stats/volume_stat_calculator.go index 65bc6254ce..8cdc9f4ea5 100644 --- a/pkg/kubelet/server/stats/volume_stat_calculator.go +++ b/pkg/kubelet/server/stats/volume_stat_calculator.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/status/generate.go b/pkg/kubelet/status/generate.go index cc000929a0..aca89076e2 100644 --- a/pkg/kubelet/status/generate.go +++ b/pkg/kubelet/status/generate.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/status/generate_test.go b/pkg/kubelet/status/generate_test.go index 2d39c238d5..768e5898ae 100644 --- a/pkg/kubelet/status/generate_test.go +++ b/pkg/kubelet/status/generate_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/status/status_manager.go b/pkg/kubelet/status/status_manager.go index 337058df67..704dc08ca9 100644 --- a/pkg/kubelet/status/status_manager.go +++ b/pkg/kubelet/status/status_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/status/status_manager_test.go b/pkg/kubelet/status/status_manager_test.go index e6130540c7..c18a53ae0a 100644 --- a/pkg/kubelet/status/status_manager_test.go +++ b/pkg/kubelet/status/status_manager_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/types/constants.go b/pkg/kubelet/types/constants.go index 060fec752a..eeabba0174 100644 --- a/pkg/kubelet/types/constants.go +++ b/pkg/kubelet/types/constants.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/types/doc.go b/pkg/kubelet/types/doc.go index 104ff4e356..0d9efe50f0 100644 --- a/pkg/kubelet/types/doc.go +++ b/pkg/kubelet/types/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/types/labels.go b/pkg/kubelet/types/labels.go index 24f91f9497..c4dad6302e 100644 --- a/pkg/kubelet/types/labels.go +++ b/pkg/kubelet/types/labels.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/types/pod_update.go b/pkg/kubelet/types/pod_update.go index 88bcb54b32..1bb1a4d249 100644 --- a/pkg/kubelet/types/pod_update.go +++ b/pkg/kubelet/types/pod_update.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/types/pod_update_test.go b/pkg/kubelet/types/pod_update_test.go index a753bb5872..19a3b37957 100644 --- a/pkg/kubelet/types/pod_update_test.go +++ b/pkg/kubelet/types/pod_update_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/types/types.go b/pkg/kubelet/types/types.go index d9102a592f..017c3c8cb3 100644 --- a/pkg/kubelet/types/types.go +++ b/pkg/kubelet/types/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/types/types_test.go b/pkg/kubelet/types/types_test.go index 6b12e62534..b7476b8126 100644 --- a/pkg/kubelet/types/types_test.go +++ b/pkg/kubelet/types/types_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/util.go b/pkg/kubelet/util.go index dba4269a82..41a469366e 100644 --- a/pkg/kubelet/util.go +++ b/pkg/kubelet/util.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/util/cache/object_cache.go b/pkg/kubelet/util/cache/object_cache.go index 9bb809c0d0..a87592122a 100644 --- a/pkg/kubelet/util/cache/object_cache.go +++ b/pkg/kubelet/util/cache/object_cache.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/util/cache/object_cache_test.go b/pkg/kubelet/util/cache/object_cache_test.go index e53ae0df02..7b08bf6b11 100644 --- a/pkg/kubelet/util/cache/object_cache_test.go +++ b/pkg/kubelet/util/cache/object_cache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/util/doc.go b/pkg/kubelet/util/doc.go index b7e74c7f29..727215372f 100644 --- a/pkg/kubelet/util/doc.go +++ b/pkg/kubelet/util/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/util/format/pod.go b/pkg/kubelet/util/format/pod.go index da69f0e5d3..1ec7645518 100644 --- a/pkg/kubelet/util/format/pod.go +++ b/pkg/kubelet/util/format/pod.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/util/format/resources.go b/pkg/kubelet/util/format/resources.go index 4e90c295c8..f37c433560 100644 --- a/pkg/kubelet/util/format/resources.go +++ b/pkg/kubelet/util/format/resources.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/util/format/resources_test.go b/pkg/kubelet/util/format/resources_test.go index bbb8812066..177229c116 100644 --- a/pkg/kubelet/util/format/resources_test.go +++ b/pkg/kubelet/util/format/resources_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/util/ioutils/ioutils.go b/pkg/kubelet/util/ioutils/ioutils.go index fa700396ec..42f1998c79 100644 --- a/pkg/kubelet/util/ioutils/ioutils.go +++ b/pkg/kubelet/util/ioutils/ioutils.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/util/queue/work_queue.go b/pkg/kubelet/util/queue/work_queue.go index 48d0919d9b..33722b42d0 100644 --- a/pkg/kubelet/util/queue/work_queue.go +++ b/pkg/kubelet/util/queue/work_queue.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/util/queue/work_queue_test.go b/pkg/kubelet/util/queue/work_queue_test.go index 40ba6d95d8..0859e4bb7e 100644 --- a/pkg/kubelet/util/queue/work_queue_test.go +++ b/pkg/kubelet/util/queue/work_queue_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/volume/cache/actual_state_of_world.go b/pkg/kubelet/volume/cache/actual_state_of_world.go index 4dd5f5444f..f904274e6c 100644 --- a/pkg/kubelet/volume/cache/actual_state_of_world.go +++ b/pkg/kubelet/volume/cache/actual_state_of_world.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/volume/cache/actual_state_of_world_test.go b/pkg/kubelet/volume/cache/actual_state_of_world_test.go index 7a1cf27b84..1a26860563 100644 --- a/pkg/kubelet/volume/cache/actual_state_of_world_test.go +++ b/pkg/kubelet/volume/cache/actual_state_of_world_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/volume/cache/desired_state_of_world.go b/pkg/kubelet/volume/cache/desired_state_of_world.go index 673897d8e7..bdcac83bab 100644 --- a/pkg/kubelet/volume/cache/desired_state_of_world.go +++ b/pkg/kubelet/volume/cache/desired_state_of_world.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/volume/cache/desired_state_of_world_test.go b/pkg/kubelet/volume/cache/desired_state_of_world_test.go index 41a3c2235c..9d07a7850b 100644 --- a/pkg/kubelet/volume/cache/desired_state_of_world_test.go +++ b/pkg/kubelet/volume/cache/desired_state_of_world_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/volume/populator/desired_state_of_world_populator.go b/pkg/kubelet/volume/populator/desired_state_of_world_populator.go index eecd802206..4ef7788a8a 100644 --- a/pkg/kubelet/volume/populator/desired_state_of_world_populator.go +++ b/pkg/kubelet/volume/populator/desired_state_of_world_populator.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/volume/reconciler/reconciler.go b/pkg/kubelet/volume/reconciler/reconciler.go index 2f27bb9cab..0df8c6a861 100644 --- a/pkg/kubelet/volume/reconciler/reconciler.go +++ b/pkg/kubelet/volume/reconciler/reconciler.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/volume/reconciler/reconciler_test.go b/pkg/kubelet/volume/reconciler/reconciler_test.go index 3f9c71fd4b..356bd95c58 100644 --- a/pkg/kubelet/volume/reconciler/reconciler_test.go +++ b/pkg/kubelet/volume/reconciler/reconciler_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/volume/volume_manager.go b/pkg/kubelet/volume/volume_manager.go index 4976ccb9e2..d1864df0f8 100644 --- a/pkg/kubelet/volume/volume_manager.go +++ b/pkg/kubelet/volume/volume_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubelet/volume_host.go b/pkg/kubelet/volume_host.go index c12f973b58..5d48a760b4 100644 --- a/pkg/kubelet/volume_host.go +++ b/pkg/kubelet/volume_host.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubemark/hollow_kubelet.go b/pkg/kubemark/hollow_kubelet.go index c08869b6ee..937f17ea44 100644 --- a/pkg/kubemark/hollow_kubelet.go +++ b/pkg/kubemark/hollow_kubelet.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/kubemark/hollow_proxy.go b/pkg/kubemark/hollow_proxy.go index 2cff3473f4..a51b9f7ae0 100644 --- a/pkg/kubemark/hollow_proxy.go +++ b/pkg/kubemark/hollow_proxy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/labels/doc.go b/pkg/labels/doc.go index 0e0282c357..35ba788094 100644 --- a/pkg/labels/doc.go +++ b/pkg/labels/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/labels/labels.go b/pkg/labels/labels.go index 73324ba2bc..637a45fd38 100644 --- a/pkg/labels/labels.go +++ b/pkg/labels/labels.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/labels/labels_test.go b/pkg/labels/labels_test.go index 8d3834d514..a9f1930988 100644 --- a/pkg/labels/labels_test.go +++ b/pkg/labels/labels_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/labels/selector.go b/pkg/labels/selector.go index ab64ecc809..4a0254f259 100644 --- a/pkg/labels/selector.go +++ b/pkg/labels/selector.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/labels/selector_test.go b/pkg/labels/selector_test.go index 5fbb1fc762..79d4c026b3 100644 --- a/pkg/labels/selector_test.go +++ b/pkg/labels/selector_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/master/controller.go b/pkg/master/controller.go index e0482e65f6..81f3f849bb 100644 --- a/pkg/master/controller.go +++ b/pkg/master/controller.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/master/controller_test.go b/pkg/master/controller_test.go index 63b9bfb0f0..1d3278711f 100644 --- a/pkg/master/controller_test.go +++ b/pkg/master/controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/master/doc.go b/pkg/master/doc.go index cc21977b80..1c0ae1ed8f 100644 --- a/pkg/master/doc.go +++ b/pkg/master/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/master/import_known_versions.go b/pkg/master/import_known_versions.go index f63139b8b9..21873a0afb 100644 --- a/pkg/master/import_known_versions.go +++ b/pkg/master/import_known_versions.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/master/master.go b/pkg/master/master.go index 5418207891..8c23fb4e3b 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/master/master_test.go b/pkg/master/master_test.go index e65273079d..0c9faf4161 100644 --- a/pkg/master/master_test.go +++ b/pkg/master/master_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/master/ports/doc.go b/pkg/master/ports/doc.go index dc6c989e82..a2a002101c 100644 --- a/pkg/master/ports/doc.go +++ b/pkg/master/ports/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/master/ports/ports.go b/pkg/master/ports/ports.go index 246a1a562d..9c597ba47b 100644 --- a/pkg/master/ports/ports.go +++ b/pkg/master/ports/ports.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/master/thirdparty_controller.go b/pkg/master/thirdparty_controller.go index 15b44dfc45..ed49257350 100644 --- a/pkg/master/thirdparty_controller.go +++ b/pkg/master/thirdparty_controller.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/master/thirdparty_controller_test.go b/pkg/master/thirdparty_controller_test.go index 4b52e89949..77126ea0ac 100644 --- a/pkg/master/thirdparty_controller_test.go +++ b/pkg/master/thirdparty_controller_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/metrics/api_server_metrics.go b/pkg/metrics/api_server_metrics.go index 8ff1e7da93..72f57588e7 100644 --- a/pkg/metrics/api_server_metrics.go +++ b/pkg/metrics/api_server_metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/metrics/controller_manager_metrics.go b/pkg/metrics/controller_manager_metrics.go index 98df025df3..60f0e9649b 100644 --- a/pkg/metrics/controller_manager_metrics.go +++ b/pkg/metrics/controller_manager_metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/metrics/generic_metrics.go b/pkg/metrics/generic_metrics.go index da448efeda..10c1273c9b 100644 --- a/pkg/metrics/generic_metrics.go +++ b/pkg/metrics/generic_metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/metrics/kubelet_metrics.go b/pkg/metrics/kubelet_metrics.go index 8925a347c0..0324db13e4 100644 --- a/pkg/metrics/kubelet_metrics.go +++ b/pkg/metrics/kubelet_metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/metrics/metrics_grabber.go b/pkg/metrics/metrics_grabber.go index f2dc31f0db..8b80d21fdf 100644 --- a/pkg/metrics/metrics_grabber.go +++ b/pkg/metrics/metrics_grabber.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/metrics/scheduler_metrics.go b/pkg/metrics/scheduler_metrics.go index c03ecba531..6fb7ae6614 100644 --- a/pkg/metrics/scheduler_metrics.go +++ b/pkg/metrics/scheduler_metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/probe/doc.go b/pkg/probe/doc.go index dbdfe44db3..89c70b2c16 100644 --- a/pkg/probe/doc.go +++ b/pkg/probe/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/probe/exec/exec.go b/pkg/probe/exec/exec.go index a8ea0f6e3c..2507ca4389 100644 --- a/pkg/probe/exec/exec.go +++ b/pkg/probe/exec/exec.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/probe/exec/exec_test.go b/pkg/probe/exec/exec_test.go index 6c01871dd9..3ad124ce26 100644 --- a/pkg/probe/exec/exec_test.go +++ b/pkg/probe/exec/exec_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/probe/http/http.go b/pkg/probe/http/http.go index a5fce49fa7..50659556a0 100644 --- a/pkg/probe/http/http.go +++ b/pkg/probe/http/http.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/probe/http/http_test.go b/pkg/probe/http/http_test.go index db52d181a9..c929481717 100644 --- a/pkg/probe/http/http_test.go +++ b/pkg/probe/http/http_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/probe/probe.go b/pkg/probe/probe.go index f175860d7a..ebbb607c46 100644 --- a/pkg/probe/probe.go +++ b/pkg/probe/probe.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/probe/tcp/tcp.go b/pkg/probe/tcp/tcp.go index 8e3676fbd6..cce3be9935 100644 --- a/pkg/probe/tcp/tcp.go +++ b/pkg/probe/tcp/tcp.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/probe/tcp/tcp_test.go b/pkg/probe/tcp/tcp_test.go index 751d23b724..f4a64984ec 100644 --- a/pkg/probe/tcp/tcp_test.go +++ b/pkg/probe/tcp/tcp_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/config/api.go b/pkg/proxy/config/api.go index 51f8abf4a2..4159022ed6 100644 --- a/pkg/proxy/config/api.go +++ b/pkg/proxy/config/api.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/config/api_test.go b/pkg/proxy/config/api_test.go index 66d62ae9ef..6925660582 100644 --- a/pkg/proxy/config/api_test.go +++ b/pkg/proxy/config/api_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/config/config.go b/pkg/proxy/config/config.go index 2181ca93f7..9f5bbd3fa2 100644 --- a/pkg/proxy/config/config.go +++ b/pkg/proxy/config/config.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/config/config_test.go b/pkg/proxy/config/config_test.go index 7855a93ec9..e4bdfd4b6f 100644 --- a/pkg/proxy/config/config_test.go +++ b/pkg/proxy/config/config_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/config/doc.go b/pkg/proxy/config/doc.go index 035d99c4ec..632d1618b8 100644 --- a/pkg/proxy/config/doc.go +++ b/pkg/proxy/config/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/doc.go b/pkg/proxy/doc.go index 05b801a2ba..a69b3082cd 100644 --- a/pkg/proxy/doc.go +++ b/pkg/proxy/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/iptables/proxier.go b/pkg/proxy/iptables/proxier.go index 83ee6e5bab..38a4226ee4 100644 --- a/pkg/proxy/iptables/proxier.go +++ b/pkg/proxy/iptables/proxier.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/iptables/proxier_test.go b/pkg/proxy/iptables/proxier_test.go index 1ab1c5f7af..4ef5126098 100644 --- a/pkg/proxy/iptables/proxier_test.go +++ b/pkg/proxy/iptables/proxier_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/types.go b/pkg/proxy/types.go index 15b227f1cc..4d2ead275e 100644 --- a/pkg/proxy/types.go +++ b/pkg/proxy/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/userspace/loadbalancer.go b/pkg/proxy/userspace/loadbalancer.go index e68bedcc93..8cc0b050b6 100644 --- a/pkg/proxy/userspace/loadbalancer.go +++ b/pkg/proxy/userspace/loadbalancer.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/userspace/port_allocator.go b/pkg/proxy/userspace/port_allocator.go index 22182f9c98..8ae6e9779b 100644 --- a/pkg/proxy/userspace/port_allocator.go +++ b/pkg/proxy/userspace/port_allocator.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/userspace/port_allocator_test.go b/pkg/proxy/userspace/port_allocator_test.go index b2c2e5a677..509c0e6136 100644 --- a/pkg/proxy/userspace/port_allocator_test.go +++ b/pkg/proxy/userspace/port_allocator_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/userspace/proxier.go b/pkg/proxy/userspace/proxier.go index 0ee5185943..044742efc0 100644 --- a/pkg/proxy/userspace/proxier.go +++ b/pkg/proxy/userspace/proxier.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/userspace/proxier_test.go b/pkg/proxy/userspace/proxier_test.go index 71d3f2cd12..17e230727d 100644 --- a/pkg/proxy/userspace/proxier_test.go +++ b/pkg/proxy/userspace/proxier_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/userspace/proxysocket.go b/pkg/proxy/userspace/proxysocket.go index 3cab4444d2..e690efbae5 100644 --- a/pkg/proxy/userspace/proxysocket.go +++ b/pkg/proxy/userspace/proxysocket.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/userspace/rlimit.go b/pkg/proxy/userspace/rlimit.go index 0f634e051c..d3f52b6def 100644 --- a/pkg/proxy/userspace/rlimit.go +++ b/pkg/proxy/userspace/rlimit.go @@ -1,7 +1,7 @@ // +build !windows /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/userspace/rlimit_windows.go b/pkg/proxy/userspace/rlimit_windows.go index 346ee18bb9..b0a1dd2e3e 100644 --- a/pkg/proxy/userspace/rlimit_windows.go +++ b/pkg/proxy/userspace/rlimit_windows.go @@ -1,7 +1,7 @@ // +build windows /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/userspace/roundrobin.go b/pkg/proxy/userspace/roundrobin.go index 55021dc0b8..eea8e120b8 100644 --- a/pkg/proxy/userspace/roundrobin.go +++ b/pkg/proxy/userspace/roundrobin.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/userspace/roundrobin_test.go b/pkg/proxy/userspace/roundrobin_test.go index 9587cb71a1..db769cb056 100644 --- a/pkg/proxy/userspace/roundrobin_test.go +++ b/pkg/proxy/userspace/roundrobin_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/proxy/userspace/udp_server.go b/pkg/proxy/userspace/udp_server.go index fdc85b47df..49e8d603f2 100644 --- a/pkg/proxy/userspace/udp_server.go +++ b/pkg/proxy/userspace/udp_server.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/evaluator/core/configmap.go b/pkg/quota/evaluator/core/configmap.go index 879beb1b93..46ee974292 100644 --- a/pkg/quota/evaluator/core/configmap.go +++ b/pkg/quota/evaluator/core/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/evaluator/core/doc.go b/pkg/quota/evaluator/core/doc.go index 3fdfaa773b..f80963bcf3 100644 --- a/pkg/quota/evaluator/core/doc.go +++ b/pkg/quota/evaluator/core/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/evaluator/core/persistent_volume_claims.go b/pkg/quota/evaluator/core/persistent_volume_claims.go index 4edfffdd0d..a00e44f100 100644 --- a/pkg/quota/evaluator/core/persistent_volume_claims.go +++ b/pkg/quota/evaluator/core/persistent_volume_claims.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/evaluator/core/pods.go b/pkg/quota/evaluator/core/pods.go index 1ffc9ac9e4..dc3411ff6d 100644 --- a/pkg/quota/evaluator/core/pods.go +++ b/pkg/quota/evaluator/core/pods.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/evaluator/core/registry.go b/pkg/quota/evaluator/core/registry.go index 69d1484559..814e9d4737 100644 --- a/pkg/quota/evaluator/core/registry.go +++ b/pkg/quota/evaluator/core/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/evaluator/core/replication_controllers.go b/pkg/quota/evaluator/core/replication_controllers.go index 7d4b44337c..c99f33d25d 100644 --- a/pkg/quota/evaluator/core/replication_controllers.go +++ b/pkg/quota/evaluator/core/replication_controllers.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/evaluator/core/resource_quotas.go b/pkg/quota/evaluator/core/resource_quotas.go index 6d52e70e14..51bc04c9dd 100644 --- a/pkg/quota/evaluator/core/resource_quotas.go +++ b/pkg/quota/evaluator/core/resource_quotas.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/evaluator/core/secrets.go b/pkg/quota/evaluator/core/secrets.go index d3d79f293d..c378597324 100644 --- a/pkg/quota/evaluator/core/secrets.go +++ b/pkg/quota/evaluator/core/secrets.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/evaluator/core/services.go b/pkg/quota/evaluator/core/services.go index 818a5b1c21..9e3de1e0f7 100644 --- a/pkg/quota/evaluator/core/services.go +++ b/pkg/quota/evaluator/core/services.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/evaluator/core/services_test.go b/pkg/quota/evaluator/core/services_test.go index 8affd4cfff..fdd07abdae 100644 --- a/pkg/quota/evaluator/core/services_test.go +++ b/pkg/quota/evaluator/core/services_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/generic/evaluator.go b/pkg/quota/generic/evaluator.go index 629b6fed71..cb0869389b 100644 --- a/pkg/quota/generic/evaluator.go +++ b/pkg/quota/generic/evaluator.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/generic/registry.go b/pkg/quota/generic/registry.go index 0609d73cfa..2a0600a5a0 100644 --- a/pkg/quota/generic/registry.go +++ b/pkg/quota/generic/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/install/registry.go b/pkg/quota/install/registry.go index 109b57484b..46c46dd878 100644 --- a/pkg/quota/install/registry.go +++ b/pkg/quota/install/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/interfaces.go b/pkg/quota/interfaces.go index da7e4a18fe..728f8e5b83 100644 --- a/pkg/quota/interfaces.go +++ b/pkg/quota/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/resources.go b/pkg/quota/resources.go index 0d5a750341..f3573c89a6 100644 --- a/pkg/quota/resources.go +++ b/pkg/quota/resources.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/quota/resources_test.go b/pkg/quota/resources_test.go index 79a3184f05..42a7eee188 100644 --- a/pkg/quota/resources_test.go +++ b/pkg/quota/resources_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/cachesize/cachesize.go b/pkg/registry/cachesize/cachesize.go index eccb73e2fb..f3d05196ab 100644 --- a/pkg/registry/cachesize/cachesize.go +++ b/pkg/registry/cachesize/cachesize.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/certificates/doc.go b/pkg/registry/certificates/doc.go index 03db7ed3df..8f69902f2e 100644 --- a/pkg/registry/certificates/doc.go +++ b/pkg/registry/certificates/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/certificates/etcd/etcd.go b/pkg/registry/certificates/etcd/etcd.go index 5e6ad01023..6ae90404b0 100644 --- a/pkg/registry/certificates/etcd/etcd.go +++ b/pkg/registry/certificates/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/certificates/registry.go b/pkg/registry/certificates/registry.go index 2e11d2a186..59142125c6 100644 --- a/pkg/registry/certificates/registry.go +++ b/pkg/registry/certificates/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/certificates/strategy.go b/pkg/registry/certificates/strategy.go index cab3a92b88..4ea468645e 100644 --- a/pkg/registry/certificates/strategy.go +++ b/pkg/registry/certificates/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/clusterrole/doc.go b/pkg/registry/clusterrole/doc.go index 89c0edef4d..11dea907de 100644 --- a/pkg/registry/clusterrole/doc.go +++ b/pkg/registry/clusterrole/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/clusterrole/etcd/etcd.go b/pkg/registry/clusterrole/etcd/etcd.go index e33ffaa6bb..314b3d9247 100644 --- a/pkg/registry/clusterrole/etcd/etcd.go +++ b/pkg/registry/clusterrole/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/clusterrole/policybased/storage.go b/pkg/registry/clusterrole/policybased/storage.go index 8e9f5cc972..3c6a4a63e0 100644 --- a/pkg/registry/clusterrole/policybased/storage.go +++ b/pkg/registry/clusterrole/policybased/storage.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/clusterrole/registry.go b/pkg/registry/clusterrole/registry.go index 701fc55a0b..4312307c67 100644 --- a/pkg/registry/clusterrole/registry.go +++ b/pkg/registry/clusterrole/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/clusterrole/strategy.go b/pkg/registry/clusterrole/strategy.go index dc7e1e0565..cf24c248ee 100644 --- a/pkg/registry/clusterrole/strategy.go +++ b/pkg/registry/clusterrole/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/clusterrolebinding/doc.go b/pkg/registry/clusterrolebinding/doc.go index 8eb13084ad..8df6c7cc20 100644 --- a/pkg/registry/clusterrolebinding/doc.go +++ b/pkg/registry/clusterrolebinding/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/clusterrolebinding/etcd/etcd.go b/pkg/registry/clusterrolebinding/etcd/etcd.go index c49b9b2dc8..300b207085 100644 --- a/pkg/registry/clusterrolebinding/etcd/etcd.go +++ b/pkg/registry/clusterrolebinding/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/clusterrolebinding/policybased/storage.go b/pkg/registry/clusterrolebinding/policybased/storage.go index 358a36bd8c..bc6da0569d 100644 --- a/pkg/registry/clusterrolebinding/policybased/storage.go +++ b/pkg/registry/clusterrolebinding/policybased/storage.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/clusterrolebinding/registry.go b/pkg/registry/clusterrolebinding/registry.go index 7f96eaa4a1..c7738640ae 100644 --- a/pkg/registry/clusterrolebinding/registry.go +++ b/pkg/registry/clusterrolebinding/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/clusterrolebinding/strategy.go b/pkg/registry/clusterrolebinding/strategy.go index 3dd1bf7e59..c8eac7ca5b 100644 --- a/pkg/registry/clusterrolebinding/strategy.go +++ b/pkg/registry/clusterrolebinding/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/componentstatus/doc.go b/pkg/registry/componentstatus/doc.go index 85248b33af..af0672af83 100644 --- a/pkg/registry/componentstatus/doc.go +++ b/pkg/registry/componentstatus/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/componentstatus/rest.go b/pkg/registry/componentstatus/rest.go index 968b90bbbc..3de63e0e9f 100644 --- a/pkg/registry/componentstatus/rest.go +++ b/pkg/registry/componentstatus/rest.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/componentstatus/rest_test.go b/pkg/registry/componentstatus/rest_test.go index 526f1a0793..cf786dc488 100644 --- a/pkg/registry/componentstatus/rest_test.go +++ b/pkg/registry/componentstatus/rest_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/configmap/doc.go b/pkg/registry/configmap/doc.go index ec8cc087d8..dd414e3ce4 100644 --- a/pkg/registry/configmap/doc.go +++ b/pkg/registry/configmap/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/configmap/etcd/etcd.go b/pkg/registry/configmap/etcd/etcd.go index 801e94d2ec..88e5b0eee6 100644 --- a/pkg/registry/configmap/etcd/etcd.go +++ b/pkg/registry/configmap/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/configmap/etcd/etcd_test.go b/pkg/registry/configmap/etcd/etcd_test.go index 52837358e8..be4bc57e34 100644 --- a/pkg/registry/configmap/etcd/etcd_test.go +++ b/pkg/registry/configmap/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/configmap/registry.go b/pkg/registry/configmap/registry.go index ff052e377d..b3fcc24507 100644 --- a/pkg/registry/configmap/registry.go +++ b/pkg/registry/configmap/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/configmap/strategy.go b/pkg/registry/configmap/strategy.go index a07a7b9171..f6ddeb4132 100644 --- a/pkg/registry/configmap/strategy.go +++ b/pkg/registry/configmap/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/configmap/strategy_test.go b/pkg/registry/configmap/strategy_test.go index e2b06790dd..64553caf56 100644 --- a/pkg/registry/configmap/strategy_test.go +++ b/pkg/registry/configmap/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/controller/doc.go b/pkg/registry/controller/doc.go index 4c0d14fabb..3d5e224104 100644 --- a/pkg/registry/controller/doc.go +++ b/pkg/registry/controller/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/controller/etcd/etcd.go b/pkg/registry/controller/etcd/etcd.go index a6607d66c1..545d59f86f 100644 --- a/pkg/registry/controller/etcd/etcd.go +++ b/pkg/registry/controller/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/controller/etcd/etcd_test.go b/pkg/registry/controller/etcd/etcd_test.go index ea5debad2a..bc323b7f0c 100644 --- a/pkg/registry/controller/etcd/etcd_test.go +++ b/pkg/registry/controller/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/controller/registry.go b/pkg/registry/controller/registry.go index a8eea1dde3..2455eca821 100644 --- a/pkg/registry/controller/registry.go +++ b/pkg/registry/controller/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/controller/strategy.go b/pkg/registry/controller/strategy.go index 9fa5bebdac..e4e8794870 100644 --- a/pkg/registry/controller/strategy.go +++ b/pkg/registry/controller/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/controller/strategy_test.go b/pkg/registry/controller/strategy_test.go index bf530b584e..5206c53ba2 100644 --- a/pkg/registry/controller/strategy_test.go +++ b/pkg/registry/controller/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/daemonset/doc.go b/pkg/registry/daemonset/doc.go index 435b0fe615..2c1697402b 100644 --- a/pkg/registry/daemonset/doc.go +++ b/pkg/registry/daemonset/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/daemonset/etcd/etcd.go b/pkg/registry/daemonset/etcd/etcd.go index c5df8cb0c2..c284539f86 100644 --- a/pkg/registry/daemonset/etcd/etcd.go +++ b/pkg/registry/daemonset/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/daemonset/etcd/etcd_test.go b/pkg/registry/daemonset/etcd/etcd_test.go index 18e02e171e..e268d146b9 100644 --- a/pkg/registry/daemonset/etcd/etcd_test.go +++ b/pkg/registry/daemonset/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/daemonset/strategy.go b/pkg/registry/daemonset/strategy.go index 044d779b43..88d3f1c864 100644 --- a/pkg/registry/daemonset/strategy.go +++ b/pkg/registry/daemonset/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/daemonset/strategy_test.go b/pkg/registry/daemonset/strategy_test.go index dd5ef836de..00f8a2b168 100644 --- a/pkg/registry/daemonset/strategy_test.go +++ b/pkg/registry/daemonset/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/deployment/doc.go b/pkg/registry/deployment/doc.go index 184fa30d3a..6bc30adfac 100644 --- a/pkg/registry/deployment/doc.go +++ b/pkg/registry/deployment/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/deployment/etcd/etcd.go b/pkg/registry/deployment/etcd/etcd.go index e09f881204..b73f9cb74c 100644 --- a/pkg/registry/deployment/etcd/etcd.go +++ b/pkg/registry/deployment/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/deployment/etcd/etcd_test.go b/pkg/registry/deployment/etcd/etcd_test.go index b5782bdbc2..b311f90cc0 100644 --- a/pkg/registry/deployment/etcd/etcd_test.go +++ b/pkg/registry/deployment/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/deployment/registry.go b/pkg/registry/deployment/registry.go index f9ddf358c6..73a02288cf 100644 --- a/pkg/registry/deployment/registry.go +++ b/pkg/registry/deployment/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/deployment/strategy.go b/pkg/registry/deployment/strategy.go index 574cc0583a..09fdbfb260 100644 --- a/pkg/registry/deployment/strategy.go +++ b/pkg/registry/deployment/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/deployment/strategy_test.go b/pkg/registry/deployment/strategy_test.go index ca4e59489d..92df49b9bc 100644 --- a/pkg/registry/deployment/strategy_test.go +++ b/pkg/registry/deployment/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/doc.go b/pkg/registry/doc.go index 0cfe6ff81f..2a8a439efd 100644 --- a/pkg/registry/doc.go +++ b/pkg/registry/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/endpoint/doc.go b/pkg/registry/endpoint/doc.go index 05141506cd..8d8bffd52f 100644 --- a/pkg/registry/endpoint/doc.go +++ b/pkg/registry/endpoint/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/endpoint/etcd/etcd.go b/pkg/registry/endpoint/etcd/etcd.go index 71658b4c6a..b2ff923cb5 100644 --- a/pkg/registry/endpoint/etcd/etcd.go +++ b/pkg/registry/endpoint/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/endpoint/etcd/etcd_test.go b/pkg/registry/endpoint/etcd/etcd_test.go index 38092f4b41..8b297a8357 100644 --- a/pkg/registry/endpoint/etcd/etcd_test.go +++ b/pkg/registry/endpoint/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/endpoint/registry.go b/pkg/registry/endpoint/registry.go index 8490718922..fa415921e2 100644 --- a/pkg/registry/endpoint/registry.go +++ b/pkg/registry/endpoint/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/endpoint/strategy.go b/pkg/registry/endpoint/strategy.go index f6f6634a32..24cc6824e4 100644 --- a/pkg/registry/endpoint/strategy.go +++ b/pkg/registry/endpoint/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/endpoint/strategy_test.go b/pkg/registry/endpoint/strategy_test.go index 915e5e6936..0a4cd87b8b 100644 --- a/pkg/registry/endpoint/strategy_test.go +++ b/pkg/registry/endpoint/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/event/doc.go b/pkg/registry/event/doc.go index 67633f235f..5c5446d61a 100644 --- a/pkg/registry/event/doc.go +++ b/pkg/registry/event/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/event/etcd/etcd.go b/pkg/registry/event/etcd/etcd.go index c90da35fb1..a35078c9c6 100644 --- a/pkg/registry/event/etcd/etcd.go +++ b/pkg/registry/event/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/event/etcd/etcd_test.go b/pkg/registry/event/etcd/etcd_test.go index f4e8df7347..efb228f581 100644 --- a/pkg/registry/event/etcd/etcd_test.go +++ b/pkg/registry/event/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/event/strategy.go b/pkg/registry/event/strategy.go index d9f628e768..292c87f7f3 100644 --- a/pkg/registry/event/strategy.go +++ b/pkg/registry/event/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/event/strategy_test.go b/pkg/registry/event/strategy_test.go index c5a685b249..ca95a7a90f 100644 --- a/pkg/registry/event/strategy_test.go +++ b/pkg/registry/event/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/experimental/controller/etcd/etcd.go b/pkg/registry/experimental/controller/etcd/etcd.go index 58ce0af0e0..ee8a15bcf7 100644 --- a/pkg/registry/experimental/controller/etcd/etcd.go +++ b/pkg/registry/experimental/controller/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/experimental/controller/etcd/etcd_test.go b/pkg/registry/experimental/controller/etcd/etcd_test.go index 0cbb262be1..70ea39e5f3 100644 --- a/pkg/registry/experimental/controller/etcd/etcd_test.go +++ b/pkg/registry/experimental/controller/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/doc.go b/pkg/registry/generic/doc.go index 2486e9b742..47bb953040 100644 --- a/pkg/registry/generic/doc.go +++ b/pkg/registry/generic/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/matcher.go b/pkg/registry/generic/matcher.go index 08e2df7b45..a3ca2bddfa 100644 --- a/pkg/registry/generic/matcher.go +++ b/pkg/registry/generic/matcher.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/matcher_test.go b/pkg/registry/generic/matcher_test.go index 17c7fb3636..80f57a161f 100644 --- a/pkg/registry/generic/matcher_test.go +++ b/pkg/registry/generic/matcher_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/options.go b/pkg/registry/generic/options.go index eea52c995b..b67f3a06af 100644 --- a/pkg/registry/generic/options.go +++ b/pkg/registry/generic/options.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/registry/doc.go b/pkg/registry/generic/registry/doc.go index ee972408dc..643a6fb7b6 100644 --- a/pkg/registry/generic/registry/doc.go +++ b/pkg/registry/generic/registry/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/registry/storage_factory.go b/pkg/registry/generic/registry/storage_factory.go index 4a9c845ccc..ed4066902a 100644 --- a/pkg/registry/generic/registry/storage_factory.go +++ b/pkg/registry/generic/registry/storage_factory.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/registry/store.go b/pkg/registry/generic/registry/store.go index e5f120124d..6eb42032b8 100644 --- a/pkg/registry/generic/registry/store.go +++ b/pkg/registry/generic/registry/store.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/registry/store_test.go b/pkg/registry/generic/registry/store_test.go index e26bec885d..681a94343a 100644 --- a/pkg/registry/generic/registry/store_test.go +++ b/pkg/registry/generic/registry/store_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/rest/doc.go b/pkg/registry/generic/rest/doc.go index fef4613877..9696087fb2 100644 --- a/pkg/registry/generic/rest/doc.go +++ b/pkg/registry/generic/rest/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/rest/proxy.go b/pkg/registry/generic/rest/proxy.go index ca28831c8c..81a297bc30 100644 --- a/pkg/registry/generic/rest/proxy.go +++ b/pkg/registry/generic/rest/proxy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/rest/proxy_test.go b/pkg/registry/generic/rest/proxy_test.go index 8b92684029..644da05e51 100644 --- a/pkg/registry/generic/rest/proxy_test.go +++ b/pkg/registry/generic/rest/proxy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/rest/response_checker.go b/pkg/registry/generic/rest/response_checker.go index b0c61075c1..c0be9d27f0 100644 --- a/pkg/registry/generic/rest/response_checker.go +++ b/pkg/registry/generic/rest/response_checker.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/rest/response_checker_test.go b/pkg/registry/generic/rest/response_checker_test.go index f1ad62020a..87c51c478d 100644 --- a/pkg/registry/generic/rest/response_checker_test.go +++ b/pkg/registry/generic/rest/response_checker_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/rest/streamer.go b/pkg/registry/generic/rest/streamer.go index afa9eb5b5d..2f13f25d3a 100644 --- a/pkg/registry/generic/rest/streamer.go +++ b/pkg/registry/generic/rest/streamer.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/rest/streamer_test.go b/pkg/registry/generic/rest/streamer_test.go index 9562228376..2e92352c6c 100644 --- a/pkg/registry/generic/rest/streamer_test.go +++ b/pkg/registry/generic/rest/streamer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/generic/storage_decorator.go b/pkg/registry/generic/storage_decorator.go index 70109efe33..79198663a0 100644 --- a/pkg/registry/generic/storage_decorator.go +++ b/pkg/registry/generic/storage_decorator.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/horizontalpodautoscaler/doc.go b/pkg/registry/horizontalpodautoscaler/doc.go index a628ee1b94..349ff00544 100644 --- a/pkg/registry/horizontalpodautoscaler/doc.go +++ b/pkg/registry/horizontalpodautoscaler/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/horizontalpodautoscaler/etcd/etcd.go b/pkg/registry/horizontalpodautoscaler/etcd/etcd.go index 614455924c..62c87c9b2a 100644 --- a/pkg/registry/horizontalpodautoscaler/etcd/etcd.go +++ b/pkg/registry/horizontalpodautoscaler/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/horizontalpodautoscaler/etcd/etcd_test.go b/pkg/registry/horizontalpodautoscaler/etcd/etcd_test.go index bc926d57d7..202d1eddb1 100644 --- a/pkg/registry/horizontalpodautoscaler/etcd/etcd_test.go +++ b/pkg/registry/horizontalpodautoscaler/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/horizontalpodautoscaler/strategy.go b/pkg/registry/horizontalpodautoscaler/strategy.go index 419beb6b1b..c3f9271516 100644 --- a/pkg/registry/horizontalpodautoscaler/strategy.go +++ b/pkg/registry/horizontalpodautoscaler/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/horizontalpodautoscaler/strategy_test.go b/pkg/registry/horizontalpodautoscaler/strategy_test.go index 121f6b7b40..12f38da1b6 100644 --- a/pkg/registry/horizontalpodautoscaler/strategy_test.go +++ b/pkg/registry/horizontalpodautoscaler/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/ingress/doc.go b/pkg/registry/ingress/doc.go index 5a6272cc54..42fb63fc57 100644 --- a/pkg/registry/ingress/doc.go +++ b/pkg/registry/ingress/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/ingress/etcd/etcd.go b/pkg/registry/ingress/etcd/etcd.go index 185d4331c2..d117cc890c 100644 --- a/pkg/registry/ingress/etcd/etcd.go +++ b/pkg/registry/ingress/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/ingress/etcd/etcd_test.go b/pkg/registry/ingress/etcd/etcd_test.go index 4da4835cd8..59e5c20935 100644 --- a/pkg/registry/ingress/etcd/etcd_test.go +++ b/pkg/registry/ingress/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/ingress/strategy.go b/pkg/registry/ingress/strategy.go index 92a596a5e5..0c4d434c39 100644 --- a/pkg/registry/ingress/strategy.go +++ b/pkg/registry/ingress/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/ingress/strategy_test.go b/pkg/registry/ingress/strategy_test.go index 88cbeb3e53..9cddc0b837 100644 --- a/pkg/registry/ingress/strategy_test.go +++ b/pkg/registry/ingress/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/job/doc.go b/pkg/registry/job/doc.go index d6351371c5..f34b36abc0 100644 --- a/pkg/registry/job/doc.go +++ b/pkg/registry/job/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/job/etcd/etcd.go b/pkg/registry/job/etcd/etcd.go index 726fb63ab1..32898356eb 100644 --- a/pkg/registry/job/etcd/etcd.go +++ b/pkg/registry/job/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/job/etcd/etcd_test.go b/pkg/registry/job/etcd/etcd_test.go index 1e1ba5a26a..2275025a4a 100644 --- a/pkg/registry/job/etcd/etcd_test.go +++ b/pkg/registry/job/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/job/strategy.go b/pkg/registry/job/strategy.go index 3c362326e7..f2755f52ab 100644 --- a/pkg/registry/job/strategy.go +++ b/pkg/registry/job/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/job/strategy_test.go b/pkg/registry/job/strategy_test.go index d90ea525ba..b527b54cfa 100644 --- a/pkg/registry/job/strategy_test.go +++ b/pkg/registry/job/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/limitrange/doc.go b/pkg/registry/limitrange/doc.go index 6c4214a040..4a6ab76c5c 100644 --- a/pkg/registry/limitrange/doc.go +++ b/pkg/registry/limitrange/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/limitrange/etcd/etcd.go b/pkg/registry/limitrange/etcd/etcd.go index 620cc829ff..39fb893795 100644 --- a/pkg/registry/limitrange/etcd/etcd.go +++ b/pkg/registry/limitrange/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/limitrange/etcd/etcd_test.go b/pkg/registry/limitrange/etcd/etcd_test.go index f0c353dc4a..c10f3c6cb4 100644 --- a/pkg/registry/limitrange/etcd/etcd_test.go +++ b/pkg/registry/limitrange/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/limitrange/strategy.go b/pkg/registry/limitrange/strategy.go index ff36fe68d2..aa424eb6f4 100644 --- a/pkg/registry/limitrange/strategy.go +++ b/pkg/registry/limitrange/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/limitrange/strategy_test.go b/pkg/registry/limitrange/strategy_test.go index 38ceb8c238..4c9a8465e7 100644 --- a/pkg/registry/limitrange/strategy_test.go +++ b/pkg/registry/limitrange/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/namespace/doc.go b/pkg/registry/namespace/doc.go index 206290037e..f618932fe2 100644 --- a/pkg/registry/namespace/doc.go +++ b/pkg/registry/namespace/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/namespace/etcd/etcd.go b/pkg/registry/namespace/etcd/etcd.go index cfecfd4374..ecc6182c20 100644 --- a/pkg/registry/namespace/etcd/etcd.go +++ b/pkg/registry/namespace/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/namespace/etcd/etcd_test.go b/pkg/registry/namespace/etcd/etcd_test.go index a2cdfcb3e0..27d01d93ed 100644 --- a/pkg/registry/namespace/etcd/etcd_test.go +++ b/pkg/registry/namespace/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/namespace/registry.go b/pkg/registry/namespace/registry.go index b78d3afd7f..f30857fd47 100644 --- a/pkg/registry/namespace/registry.go +++ b/pkg/registry/namespace/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/namespace/strategy.go b/pkg/registry/namespace/strategy.go index 3b069847c3..b27826450f 100644 --- a/pkg/registry/namespace/strategy.go +++ b/pkg/registry/namespace/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/namespace/strategy_test.go b/pkg/registry/namespace/strategy_test.go index ec852541e2..6dde22c93c 100644 --- a/pkg/registry/namespace/strategy_test.go +++ b/pkg/registry/namespace/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/networkpolicy/doc.go b/pkg/registry/networkpolicy/doc.go index 2cc5a21e9b..3535feb242 100644 --- a/pkg/registry/networkpolicy/doc.go +++ b/pkg/registry/networkpolicy/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/networkpolicy/etcd/etcd.go b/pkg/registry/networkpolicy/etcd/etcd.go index e3dea0f18c..fd1c2af13c 100644 --- a/pkg/registry/networkpolicy/etcd/etcd.go +++ b/pkg/registry/networkpolicy/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/networkpolicy/etcd/etcd_test.go b/pkg/registry/networkpolicy/etcd/etcd_test.go index 7d2e456032..777464c500 100644 --- a/pkg/registry/networkpolicy/etcd/etcd_test.go +++ b/pkg/registry/networkpolicy/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/networkpolicy/strategy.go b/pkg/registry/networkpolicy/strategy.go index b8217ac50c..e12165e26a 100644 --- a/pkg/registry/networkpolicy/strategy.go +++ b/pkg/registry/networkpolicy/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/networkpolicy/strategy_test.go b/pkg/registry/networkpolicy/strategy_test.go index b3a95d3de6..c6062d4975 100644 --- a/pkg/registry/networkpolicy/strategy_test.go +++ b/pkg/registry/networkpolicy/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/node/doc.go b/pkg/registry/node/doc.go index cd604b4ab4..79a95fd3d3 100644 --- a/pkg/registry/node/doc.go +++ b/pkg/registry/node/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/node/etcd/etcd.go b/pkg/registry/node/etcd/etcd.go index c37af18eab..d983b917ed 100644 --- a/pkg/registry/node/etcd/etcd.go +++ b/pkg/registry/node/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/node/etcd/etcd_test.go b/pkg/registry/node/etcd/etcd_test.go index 526f09ab15..d6eaf12656 100644 --- a/pkg/registry/node/etcd/etcd_test.go +++ b/pkg/registry/node/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/node/registry.go b/pkg/registry/node/registry.go index aae18bfc21..71e194dcc1 100644 --- a/pkg/registry/node/registry.go +++ b/pkg/registry/node/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/node/rest/proxy.go b/pkg/registry/node/rest/proxy.go index 1e80327cfe..afe0bd9a86 100644 --- a/pkg/registry/node/rest/proxy.go +++ b/pkg/registry/node/rest/proxy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/node/strategy.go b/pkg/registry/node/strategy.go index 9085090b8c..1dda98d2b4 100644 --- a/pkg/registry/node/strategy.go +++ b/pkg/registry/node/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/node/strategy_test.go b/pkg/registry/node/strategy_test.go index 3a8552d2c6..18757f5b46 100644 --- a/pkg/registry/node/strategy_test.go +++ b/pkg/registry/node/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/persistentvolume/doc.go b/pkg/registry/persistentvolume/doc.go index 0f0cd6c912..06fda296fa 100644 --- a/pkg/registry/persistentvolume/doc.go +++ b/pkg/registry/persistentvolume/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/persistentvolume/etcd/etcd.go b/pkg/registry/persistentvolume/etcd/etcd.go index 53d92d827b..6b15c3e5af 100644 --- a/pkg/registry/persistentvolume/etcd/etcd.go +++ b/pkg/registry/persistentvolume/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/persistentvolume/etcd/etcd_test.go b/pkg/registry/persistentvolume/etcd/etcd_test.go index 9339d98299..ac1589c689 100644 --- a/pkg/registry/persistentvolume/etcd/etcd_test.go +++ b/pkg/registry/persistentvolume/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/persistentvolume/strategy.go b/pkg/registry/persistentvolume/strategy.go index b8920c4708..1c1039434e 100644 --- a/pkg/registry/persistentvolume/strategy.go +++ b/pkg/registry/persistentvolume/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/persistentvolume/strategy_test.go b/pkg/registry/persistentvolume/strategy_test.go index 423aa7364e..fb8704884c 100644 --- a/pkg/registry/persistentvolume/strategy_test.go +++ b/pkg/registry/persistentvolume/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/persistentvolumeclaim/doc.go b/pkg/registry/persistentvolumeclaim/doc.go index f58b1682ce..c6950ee8c0 100644 --- a/pkg/registry/persistentvolumeclaim/doc.go +++ b/pkg/registry/persistentvolumeclaim/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/persistentvolumeclaim/etcd/etcd.go b/pkg/registry/persistentvolumeclaim/etcd/etcd.go index f724bf8875..edd392bd83 100644 --- a/pkg/registry/persistentvolumeclaim/etcd/etcd.go +++ b/pkg/registry/persistentvolumeclaim/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/persistentvolumeclaim/etcd/etcd_test.go b/pkg/registry/persistentvolumeclaim/etcd/etcd_test.go index 22a37d5f37..b3b752970e 100644 --- a/pkg/registry/persistentvolumeclaim/etcd/etcd_test.go +++ b/pkg/registry/persistentvolumeclaim/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/persistentvolumeclaim/strategy.go b/pkg/registry/persistentvolumeclaim/strategy.go index 100ad6a4cb..2cf2b64833 100644 --- a/pkg/registry/persistentvolumeclaim/strategy.go +++ b/pkg/registry/persistentvolumeclaim/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/persistentvolumeclaim/strategy_test.go b/pkg/registry/persistentvolumeclaim/strategy_test.go index ecbdba3bd1..0fb2c74ba7 100644 --- a/pkg/registry/persistentvolumeclaim/strategy_test.go +++ b/pkg/registry/persistentvolumeclaim/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/petset/doc.go b/pkg/registry/petset/doc.go index 960710dd4f..fe54856993 100644 --- a/pkg/registry/petset/doc.go +++ b/pkg/registry/petset/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/petset/etcd/etcd.go b/pkg/registry/petset/etcd/etcd.go index 1d9a92a83f..3362fc4f3d 100644 --- a/pkg/registry/petset/etcd/etcd.go +++ b/pkg/registry/petset/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/petset/etcd/etcd_test.go b/pkg/registry/petset/etcd/etcd_test.go index cbca15e4a4..963d97e2d5 100644 --- a/pkg/registry/petset/etcd/etcd_test.go +++ b/pkg/registry/petset/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/petset/strategy.go b/pkg/registry/petset/strategy.go index 80bff2a5dd..c315cbd6a3 100644 --- a/pkg/registry/petset/strategy.go +++ b/pkg/registry/petset/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/petset/strategy_test.go b/pkg/registry/petset/strategy_test.go index 1e28fa6199..6306f3620d 100644 --- a/pkg/registry/petset/strategy_test.go +++ b/pkg/registry/petset/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/pod/doc.go b/pkg/registry/pod/doc.go index 3c6d2f3c17..d2294852b5 100644 --- a/pkg/registry/pod/doc.go +++ b/pkg/registry/pod/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/pod/etcd/etcd.go b/pkg/registry/pod/etcd/etcd.go index 8e9939a3df..5f0fdc2001 100644 --- a/pkg/registry/pod/etcd/etcd.go +++ b/pkg/registry/pod/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/pod/etcd/etcd_test.go b/pkg/registry/pod/etcd/etcd_test.go index b9a6cb6a4c..cec9e15bdd 100644 --- a/pkg/registry/pod/etcd/etcd_test.go +++ b/pkg/registry/pod/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/pod/rest/log.go b/pkg/registry/pod/rest/log.go index bae6c6a0d8..24e3c422e6 100644 --- a/pkg/registry/pod/rest/log.go +++ b/pkg/registry/pod/rest/log.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/pod/rest/log_test.go b/pkg/registry/pod/rest/log_test.go index 66c2853588..ec244807a8 100644 --- a/pkg/registry/pod/rest/log_test.go +++ b/pkg/registry/pod/rest/log_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/pod/rest/subresources.go b/pkg/registry/pod/rest/subresources.go index fd65a441dc..049aeeb78d 100644 --- a/pkg/registry/pod/rest/subresources.go +++ b/pkg/registry/pod/rest/subresources.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/pod/strategy.go b/pkg/registry/pod/strategy.go index 4846d4e418..e48775cf6b 100644 --- a/pkg/registry/pod/strategy.go +++ b/pkg/registry/pod/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/pod/strategy_test.go b/pkg/registry/pod/strategy_test.go index 7f03fd655e..f99ce7d8e9 100644 --- a/pkg/registry/pod/strategy_test.go +++ b/pkg/registry/pod/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/poddisruptionbudget/doc.go b/pkg/registry/poddisruptionbudget/doc.go index 717f26d21d..a3ee49ca45 100644 --- a/pkg/registry/poddisruptionbudget/doc.go +++ b/pkg/registry/poddisruptionbudget/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/poddisruptionbudget/etcd/etcd.go b/pkg/registry/poddisruptionbudget/etcd/etcd.go index 8fa3524fb6..56a9d06903 100644 --- a/pkg/registry/poddisruptionbudget/etcd/etcd.go +++ b/pkg/registry/poddisruptionbudget/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/poddisruptionbudget/etcd/etcd_test.go b/pkg/registry/poddisruptionbudget/etcd/etcd_test.go index 5efabb6849..d63c0ff3a8 100644 --- a/pkg/registry/poddisruptionbudget/etcd/etcd_test.go +++ b/pkg/registry/poddisruptionbudget/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/poddisruptionbudget/strategy.go b/pkg/registry/poddisruptionbudget/strategy.go index 4b32b95326..1f97c7b8d3 100644 --- a/pkg/registry/poddisruptionbudget/strategy.go +++ b/pkg/registry/poddisruptionbudget/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/poddisruptionbudget/strategy_test.go b/pkg/registry/poddisruptionbudget/strategy_test.go index 6469af3b02..dc9d25c2e0 100644 --- a/pkg/registry/poddisruptionbudget/strategy_test.go +++ b/pkg/registry/poddisruptionbudget/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/podsecuritypolicy/doc.go b/pkg/registry/podsecuritypolicy/doc.go index fa50db8e4e..c52667c5b7 100644 --- a/pkg/registry/podsecuritypolicy/doc.go +++ b/pkg/registry/podsecuritypolicy/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/podsecuritypolicy/etcd/etcd.go b/pkg/registry/podsecuritypolicy/etcd/etcd.go index 58cc8b8307..2929d6be4e 100644 --- a/pkg/registry/podsecuritypolicy/etcd/etcd.go +++ b/pkg/registry/podsecuritypolicy/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/podsecuritypolicy/etcd/etcd_test.go b/pkg/registry/podsecuritypolicy/etcd/etcd_test.go index b0c4371025..7aad1ca5c6 100644 --- a/pkg/registry/podsecuritypolicy/etcd/etcd_test.go +++ b/pkg/registry/podsecuritypolicy/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/podsecuritypolicy/strategy.go b/pkg/registry/podsecuritypolicy/strategy.go index 905be4dc6d..9d04bdd933 100644 --- a/pkg/registry/podsecuritypolicy/strategy.go +++ b/pkg/registry/podsecuritypolicy/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/podtemplate/doc.go b/pkg/registry/podtemplate/doc.go index a622a2ecfa..b3e43f22ff 100644 --- a/pkg/registry/podtemplate/doc.go +++ b/pkg/registry/podtemplate/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/podtemplate/etcd/etcd.go b/pkg/registry/podtemplate/etcd/etcd.go index 760853a6ff..46ca527813 100644 --- a/pkg/registry/podtemplate/etcd/etcd.go +++ b/pkg/registry/podtemplate/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/podtemplate/etcd/etcd_test.go b/pkg/registry/podtemplate/etcd/etcd_test.go index 87e14ed2ac..6c3eeac2e7 100644 --- a/pkg/registry/podtemplate/etcd/etcd_test.go +++ b/pkg/registry/podtemplate/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/podtemplate/strategy.go b/pkg/registry/podtemplate/strategy.go index 03ce851865..5667db8ad0 100644 --- a/pkg/registry/podtemplate/strategy.go +++ b/pkg/registry/podtemplate/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/podtemplate/strategy_test.go b/pkg/registry/podtemplate/strategy_test.go index e26c13b86b..5622310e77 100644 --- a/pkg/registry/podtemplate/strategy_test.go +++ b/pkg/registry/podtemplate/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/registrytest/doc.go b/pkg/registry/registrytest/doc.go index 81c4607067..c4f29f3d58 100644 --- a/pkg/registry/registrytest/doc.go +++ b/pkg/registry/registrytest/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/registrytest/endpoint.go b/pkg/registry/registrytest/endpoint.go index d11dafa672..12a7e9d1c4 100644 --- a/pkg/registry/registrytest/endpoint.go +++ b/pkg/registry/registrytest/endpoint.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/registrytest/etcd.go b/pkg/registry/registrytest/etcd.go index f64b4b3ee4..ae025e7b01 100644 --- a/pkg/registry/registrytest/etcd.go +++ b/pkg/registry/registrytest/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/registrytest/node.go b/pkg/registry/registrytest/node.go index 8f917b9bcf..a2cf6359b0 100644 --- a/pkg/registry/registrytest/node.go +++ b/pkg/registry/registrytest/node.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/registrytest/service.go b/pkg/registry/registrytest/service.go index 82dcf5cc91..b06d1e76ef 100644 --- a/pkg/registry/registrytest/service.go +++ b/pkg/registry/registrytest/service.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/replicaset/doc.go b/pkg/registry/replicaset/doc.go index ee349fae74..3e8d4bfefe 100644 --- a/pkg/registry/replicaset/doc.go +++ b/pkg/registry/replicaset/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/replicaset/etcd/etcd.go b/pkg/registry/replicaset/etcd/etcd.go index 463dd689e7..23795fedfd 100644 --- a/pkg/registry/replicaset/etcd/etcd.go +++ b/pkg/registry/replicaset/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/replicaset/etcd/etcd_test.go b/pkg/registry/replicaset/etcd/etcd_test.go index 7443e7219f..a325a0b31b 100644 --- a/pkg/registry/replicaset/etcd/etcd_test.go +++ b/pkg/registry/replicaset/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/replicaset/registry.go b/pkg/registry/replicaset/registry.go index 284ed47f32..16202919bc 100644 --- a/pkg/registry/replicaset/registry.go +++ b/pkg/registry/replicaset/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/replicaset/strategy.go b/pkg/registry/replicaset/strategy.go index 7d7b38a0d0..773eb6f52d 100644 --- a/pkg/registry/replicaset/strategy.go +++ b/pkg/registry/replicaset/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/replicaset/strategy_test.go b/pkg/registry/replicaset/strategy_test.go index e4fea3c39f..4efb4928c8 100644 --- a/pkg/registry/replicaset/strategy_test.go +++ b/pkg/registry/replicaset/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/resourcequota/doc.go b/pkg/registry/resourcequota/doc.go index 91ec69fcce..aa335fe24c 100644 --- a/pkg/registry/resourcequota/doc.go +++ b/pkg/registry/resourcequota/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/resourcequota/etcd/etcd.go b/pkg/registry/resourcequota/etcd/etcd.go index ea343ae29c..bbfe95cc76 100644 --- a/pkg/registry/resourcequota/etcd/etcd.go +++ b/pkg/registry/resourcequota/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/resourcequota/etcd/etcd_test.go b/pkg/registry/resourcequota/etcd/etcd_test.go index 97f4bf36cd..e6e549f0c2 100644 --- a/pkg/registry/resourcequota/etcd/etcd_test.go +++ b/pkg/registry/resourcequota/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/resourcequota/strategy.go b/pkg/registry/resourcequota/strategy.go index 656d5cecba..a426079f77 100644 --- a/pkg/registry/resourcequota/strategy.go +++ b/pkg/registry/resourcequota/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/resourcequota/strategy_test.go b/pkg/registry/resourcequota/strategy_test.go index 9bc8a70ad4..aaee90d318 100644 --- a/pkg/registry/resourcequota/strategy_test.go +++ b/pkg/registry/resourcequota/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/role/doc.go b/pkg/registry/role/doc.go index 2e867eb39e..38e2310213 100644 --- a/pkg/registry/role/doc.go +++ b/pkg/registry/role/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/role/etcd/etcd.go b/pkg/registry/role/etcd/etcd.go index 0097292ea8..9c7b68a12e 100644 --- a/pkg/registry/role/etcd/etcd.go +++ b/pkg/registry/role/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/role/policybased/storage.go b/pkg/registry/role/policybased/storage.go index 07ddc26a16..f9e07435e1 100644 --- a/pkg/registry/role/policybased/storage.go +++ b/pkg/registry/role/policybased/storage.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/role/registry.go b/pkg/registry/role/registry.go index 40f2975da8..706988dfe1 100644 --- a/pkg/registry/role/registry.go +++ b/pkg/registry/role/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/role/strategy.go b/pkg/registry/role/strategy.go index 23efccd77f..007bb61552 100644 --- a/pkg/registry/role/strategy.go +++ b/pkg/registry/role/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/rolebinding/doc.go b/pkg/registry/rolebinding/doc.go index bac8e64fc0..581afbb9f2 100644 --- a/pkg/registry/rolebinding/doc.go +++ b/pkg/registry/rolebinding/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/rolebinding/etcd/etcd.go b/pkg/registry/rolebinding/etcd/etcd.go index 559a00402e..ffcf0d84b2 100644 --- a/pkg/registry/rolebinding/etcd/etcd.go +++ b/pkg/registry/rolebinding/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/rolebinding/policybased/storage.go b/pkg/registry/rolebinding/policybased/storage.go index df2049b5e1..c0d3ce1259 100644 --- a/pkg/registry/rolebinding/policybased/storage.go +++ b/pkg/registry/rolebinding/policybased/storage.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/rolebinding/registry.go b/pkg/registry/rolebinding/registry.go index 435a2d57f7..fa7a269418 100644 --- a/pkg/registry/rolebinding/registry.go +++ b/pkg/registry/rolebinding/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/rolebinding/strategy.go b/pkg/registry/rolebinding/strategy.go index 7818025a75..885d9b2bf5 100644 --- a/pkg/registry/rolebinding/strategy.go +++ b/pkg/registry/rolebinding/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/scheduledjob/doc.go b/pkg/registry/scheduledjob/doc.go index 0dcb941316..8c30c0a4bf 100644 --- a/pkg/registry/scheduledjob/doc.go +++ b/pkg/registry/scheduledjob/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/scheduledjob/etcd/etcd.go b/pkg/registry/scheduledjob/etcd/etcd.go index 98395c3dc6..5b2f617c73 100644 --- a/pkg/registry/scheduledjob/etcd/etcd.go +++ b/pkg/registry/scheduledjob/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/scheduledjob/strategy.go b/pkg/registry/scheduledjob/strategy.go index 34fdb8744f..b42ea66c04 100644 --- a/pkg/registry/scheduledjob/strategy.go +++ b/pkg/registry/scheduledjob/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/scheduledjob/strategy_test.go b/pkg/registry/scheduledjob/strategy_test.go index 3ace2dd2fc..17520f0803 100644 --- a/pkg/registry/scheduledjob/strategy_test.go +++ b/pkg/registry/scheduledjob/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/secret/doc.go b/pkg/registry/secret/doc.go index 0f3c2c7209..1dc79f578f 100644 --- a/pkg/registry/secret/doc.go +++ b/pkg/registry/secret/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/secret/etcd/etcd.go b/pkg/registry/secret/etcd/etcd.go index 77b34273b3..975cb8f550 100644 --- a/pkg/registry/secret/etcd/etcd.go +++ b/pkg/registry/secret/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/secret/etcd/etcd_test.go b/pkg/registry/secret/etcd/etcd_test.go index f8e6e97660..1c420e5568 100644 --- a/pkg/registry/secret/etcd/etcd_test.go +++ b/pkg/registry/secret/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/secret/registry.go b/pkg/registry/secret/registry.go index 157ac7191a..03d948c3d8 100644 --- a/pkg/registry/secret/registry.go +++ b/pkg/registry/secret/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/secret/strategy.go b/pkg/registry/secret/strategy.go index d06c86b330..66ff11d1ec 100644 --- a/pkg/registry/secret/strategy.go +++ b/pkg/registry/secret/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/secret/strategy_test.go b/pkg/registry/secret/strategy_test.go index c9f2afdf6e..55374b6085 100644 --- a/pkg/registry/secret/strategy_test.go +++ b/pkg/registry/secret/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/allocator/bitmap.go b/pkg/registry/service/allocator/bitmap.go index e90f396a60..9394d59fc3 100644 --- a/pkg/registry/service/allocator/bitmap.go +++ b/pkg/registry/service/allocator/bitmap.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/allocator/bitmap_test.go b/pkg/registry/service/allocator/bitmap_test.go index 87e145e942..14139b2b3e 100644 --- a/pkg/registry/service/allocator/bitmap_test.go +++ b/pkg/registry/service/allocator/bitmap_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/allocator/etcd/etcd.go b/pkg/registry/service/allocator/etcd/etcd.go index 2c1c74984b..42f31bbf88 100644 --- a/pkg/registry/service/allocator/etcd/etcd.go +++ b/pkg/registry/service/allocator/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/allocator/etcd/etcd_test.go b/pkg/registry/service/allocator/etcd/etcd_test.go index 2f2e4bcaa5..56eeb87461 100644 --- a/pkg/registry/service/allocator/etcd/etcd_test.go +++ b/pkg/registry/service/allocator/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/allocator/interfaces.go b/pkg/registry/service/allocator/interfaces.go index 9d44090989..88231dafc1 100644 --- a/pkg/registry/service/allocator/interfaces.go +++ b/pkg/registry/service/allocator/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/allocator/utils.go b/pkg/registry/service/allocator/utils.go index fc7cff70e2..4691f57a15 100644 --- a/pkg/registry/service/allocator/utils.go +++ b/pkg/registry/service/allocator/utils.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/allocator/utils_test.go b/pkg/registry/service/allocator/utils_test.go index fcd59f0166..9ec711d83d 100644 --- a/pkg/registry/service/allocator/utils_test.go +++ b/pkg/registry/service/allocator/utils_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/doc.go b/pkg/registry/service/doc.go index 64d927e807..13616309c4 100644 --- a/pkg/registry/service/doc.go +++ b/pkg/registry/service/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/etcd/etcd.go b/pkg/registry/service/etcd/etcd.go index 1ebbc42929..4bd4205a01 100644 --- a/pkg/registry/service/etcd/etcd.go +++ b/pkg/registry/service/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/etcd/etcd_test.go b/pkg/registry/service/etcd/etcd_test.go index b836037261..357a1ebbe7 100644 --- a/pkg/registry/service/etcd/etcd_test.go +++ b/pkg/registry/service/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/ipallocator/allocator.go b/pkg/registry/service/ipallocator/allocator.go index 3aa5e58f63..d5a3ced642 100644 --- a/pkg/registry/service/ipallocator/allocator.go +++ b/pkg/registry/service/ipallocator/allocator.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/ipallocator/allocator_test.go b/pkg/registry/service/ipallocator/allocator_test.go index c853ebab2e..d8e5bfb73d 100644 --- a/pkg/registry/service/ipallocator/allocator_test.go +++ b/pkg/registry/service/ipallocator/allocator_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/ipallocator/controller/repair.go b/pkg/registry/service/ipallocator/controller/repair.go index b0a2b90a5d..dc37a5a4a6 100644 --- a/pkg/registry/service/ipallocator/controller/repair.go +++ b/pkg/registry/service/ipallocator/controller/repair.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/ipallocator/controller/repair_test.go b/pkg/registry/service/ipallocator/controller/repair_test.go index 4d80f10b55..5ccd76b4ac 100644 --- a/pkg/registry/service/ipallocator/controller/repair_test.go +++ b/pkg/registry/service/ipallocator/controller/repair_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/ipallocator/etcd/etcd.go b/pkg/registry/service/ipallocator/etcd/etcd.go index 35118afbdf..00e07055a1 100644 --- a/pkg/registry/service/ipallocator/etcd/etcd.go +++ b/pkg/registry/service/ipallocator/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/ipallocator/etcd/etcd_test.go b/pkg/registry/service/ipallocator/etcd/etcd_test.go index 94aa14ac62..bfe27b2d4b 100644 --- a/pkg/registry/service/ipallocator/etcd/etcd_test.go +++ b/pkg/registry/service/ipallocator/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/portallocator/allocator.go b/pkg/registry/service/portallocator/allocator.go index 765ac8f3c0..a6d565b099 100644 --- a/pkg/registry/service/portallocator/allocator.go +++ b/pkg/registry/service/portallocator/allocator.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/portallocator/allocator_test.go b/pkg/registry/service/portallocator/allocator_test.go index 38904cb866..d060528b2c 100644 --- a/pkg/registry/service/portallocator/allocator_test.go +++ b/pkg/registry/service/portallocator/allocator_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/portallocator/controller/repair.go b/pkg/registry/service/portallocator/controller/repair.go index cff3f5f3ed..d80c06d099 100644 --- a/pkg/registry/service/portallocator/controller/repair.go +++ b/pkg/registry/service/portallocator/controller/repair.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/portallocator/operation.go b/pkg/registry/service/portallocator/operation.go index a435010434..08d9d58781 100644 --- a/pkg/registry/service/portallocator/operation.go +++ b/pkg/registry/service/portallocator/operation.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/proxy.go b/pkg/registry/service/proxy.go index 77ff95331a..47f3be6606 100644 --- a/pkg/registry/service/proxy.go +++ b/pkg/registry/service/proxy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/registry.go b/pkg/registry/service/registry.go index fa7df32af5..34b955bbb3 100644 --- a/pkg/registry/service/registry.go +++ b/pkg/registry/service/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/rest.go b/pkg/registry/service/rest.go index 875d15779c..77da71bbb0 100644 --- a/pkg/registry/service/rest.go +++ b/pkg/registry/service/rest.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/rest_test.go b/pkg/registry/service/rest_test.go index fd22db12f0..fec181b44a 100644 --- a/pkg/registry/service/rest_test.go +++ b/pkg/registry/service/rest_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/strategy.go b/pkg/registry/service/strategy.go index bc87a81071..fd794cfd42 100644 --- a/pkg/registry/service/strategy.go +++ b/pkg/registry/service/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/service/strategy_test.go b/pkg/registry/service/strategy_test.go index 13b6eeb479..c2f43ec936 100644 --- a/pkg/registry/service/strategy_test.go +++ b/pkg/registry/service/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/serviceaccount/doc.go b/pkg/registry/serviceaccount/doc.go index 40606205d3..ea714a980f 100644 --- a/pkg/registry/serviceaccount/doc.go +++ b/pkg/registry/serviceaccount/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/serviceaccount/etcd/etcd.go b/pkg/registry/serviceaccount/etcd/etcd.go index 354a07558c..99cd46dff1 100644 --- a/pkg/registry/serviceaccount/etcd/etcd.go +++ b/pkg/registry/serviceaccount/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/serviceaccount/etcd/etcd_test.go b/pkg/registry/serviceaccount/etcd/etcd_test.go index 515d3071b0..4798fbbab2 100644 --- a/pkg/registry/serviceaccount/etcd/etcd_test.go +++ b/pkg/registry/serviceaccount/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/serviceaccount/registry.go b/pkg/registry/serviceaccount/registry.go index 2a7a1c7dd5..7e5635dad0 100644 --- a/pkg/registry/serviceaccount/registry.go +++ b/pkg/registry/serviceaccount/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/serviceaccount/strategy.go b/pkg/registry/serviceaccount/strategy.go index 1d1f208f8c..27c0f16391 100644 --- a/pkg/registry/serviceaccount/strategy.go +++ b/pkg/registry/serviceaccount/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/serviceaccount/strategy_test.go b/pkg/registry/serviceaccount/strategy_test.go index 8530d24ff2..64c4063b42 100644 --- a/pkg/registry/serviceaccount/strategy_test.go +++ b/pkg/registry/serviceaccount/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresource/doc.go b/pkg/registry/thirdpartyresource/doc.go index 7f52880dac..331c94cb0a 100644 --- a/pkg/registry/thirdpartyresource/doc.go +++ b/pkg/registry/thirdpartyresource/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresource/etcd/etcd.go b/pkg/registry/thirdpartyresource/etcd/etcd.go index d371addc73..8b9e0708fd 100644 --- a/pkg/registry/thirdpartyresource/etcd/etcd.go +++ b/pkg/registry/thirdpartyresource/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresource/etcd/etcd_test.go b/pkg/registry/thirdpartyresource/etcd/etcd_test.go index df27a99154..dbdbacec32 100644 --- a/pkg/registry/thirdpartyresource/etcd/etcd_test.go +++ b/pkg/registry/thirdpartyresource/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresource/strategy.go b/pkg/registry/thirdpartyresource/strategy.go index 38a256d6d8..3f553aa9ef 100644 --- a/pkg/registry/thirdpartyresource/strategy.go +++ b/pkg/registry/thirdpartyresource/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresource/strategy_test.go b/pkg/registry/thirdpartyresource/strategy_test.go index cbe8f43903..927d2713b5 100644 --- a/pkg/registry/thirdpartyresource/strategy_test.go +++ b/pkg/registry/thirdpartyresource/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresourcedata/codec.go b/pkg/registry/thirdpartyresourcedata/codec.go index 758ffd4662..c763067541 100644 --- a/pkg/registry/thirdpartyresourcedata/codec.go +++ b/pkg/registry/thirdpartyresourcedata/codec.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresourcedata/codec_test.go b/pkg/registry/thirdpartyresourcedata/codec_test.go index 4b79a4bf9c..634f9d5378 100644 --- a/pkg/registry/thirdpartyresourcedata/codec_test.go +++ b/pkg/registry/thirdpartyresourcedata/codec_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresourcedata/doc.go b/pkg/registry/thirdpartyresourcedata/doc.go index 62e2dc1e3e..d9988ccb08 100644 --- a/pkg/registry/thirdpartyresourcedata/doc.go +++ b/pkg/registry/thirdpartyresourcedata/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresourcedata/etcd/etcd.go b/pkg/registry/thirdpartyresourcedata/etcd/etcd.go index 55eaf09b17..6185532d3d 100644 --- a/pkg/registry/thirdpartyresourcedata/etcd/etcd.go +++ b/pkg/registry/thirdpartyresourcedata/etcd/etcd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresourcedata/etcd/etcd_test.go b/pkg/registry/thirdpartyresourcedata/etcd/etcd_test.go index 6b4eabf8ac..eee2d19f0e 100644 --- a/pkg/registry/thirdpartyresourcedata/etcd/etcd_test.go +++ b/pkg/registry/thirdpartyresourcedata/etcd/etcd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresourcedata/registry.go b/pkg/registry/thirdpartyresourcedata/registry.go index 058276d1e2..87f1156ec1 100644 --- a/pkg/registry/thirdpartyresourcedata/registry.go +++ b/pkg/registry/thirdpartyresourcedata/registry.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresourcedata/strategy.go b/pkg/registry/thirdpartyresourcedata/strategy.go index 9f7673d7c0..12108c39e4 100644 --- a/pkg/registry/thirdpartyresourcedata/strategy.go +++ b/pkg/registry/thirdpartyresourcedata/strategy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresourcedata/strategy_test.go b/pkg/registry/thirdpartyresourcedata/strategy_test.go index 75e821944b..52079c0bb0 100644 --- a/pkg/registry/thirdpartyresourcedata/strategy_test.go +++ b/pkg/registry/thirdpartyresourcedata/strategy_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresourcedata/util.go b/pkg/registry/thirdpartyresourcedata/util.go index 120981e85e..d8e91b1572 100644 --- a/pkg/registry/thirdpartyresourcedata/util.go +++ b/pkg/registry/thirdpartyresourcedata/util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/registry/thirdpartyresourcedata/util_test.go b/pkg/registry/thirdpartyresourcedata/util_test.go index a18722c179..c0cd4c1a47 100644 --- a/pkg/registry/thirdpartyresourcedata/util_test.go +++ b/pkg/registry/thirdpartyresourcedata/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/codec.go b/pkg/runtime/codec.go index 9cd7e15368..3f7681c002 100644 --- a/pkg/runtime/codec.go +++ b/pkg/runtime/codec.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/codec_check.go b/pkg/runtime/codec_check.go index 09e7d51ad9..b0126963d3 100644 --- a/pkg/runtime/codec_check.go +++ b/pkg/runtime/codec_check.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/conversion.go b/pkg/runtime/conversion.go index 69cf00fea5..dd6e26af7d 100644 --- a/pkg/runtime/conversion.go +++ b/pkg/runtime/conversion.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/conversion_test.go b/pkg/runtime/conversion_test.go index 6105e5aad5..c364d8fd2d 100644 --- a/pkg/runtime/conversion_test.go +++ b/pkg/runtime/conversion_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/deep_copy_generated.go b/pkg/runtime/deep_copy_generated.go index fad426daa6..3456eabeb3 100644 --- a/pkg/runtime/deep_copy_generated.go +++ b/pkg/runtime/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/doc.go b/pkg/runtime/doc.go index 08e18891bf..7bdc70a2f7 100644 --- a/pkg/runtime/doc.go +++ b/pkg/runtime/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/embedded.go b/pkg/runtime/embedded.go index a62080e39a..eb1f573db6 100644 --- a/pkg/runtime/embedded.go +++ b/pkg/runtime/embedded.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/embedded_test.go b/pkg/runtime/embedded_test.go index 6a143fb086..0600d6b8c5 100644 --- a/pkg/runtime/embedded_test.go +++ b/pkg/runtime/embedded_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/error.go b/pkg/runtime/error.go index ca60ee8133..4041b4d96c 100644 --- a/pkg/runtime/error.go +++ b/pkg/runtime/error.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/extension.go b/pkg/runtime/extension.go index eca82986ea..4d23ee9ee3 100644 --- a/pkg/runtime/extension.go +++ b/pkg/runtime/extension.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/extension_test.go b/pkg/runtime/extension_test.go index 3545284e99..40e677b47a 100644 --- a/pkg/runtime/extension_test.go +++ b/pkg/runtime/extension_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/generated.pb.go b/pkg/runtime/generated.pb.go index 2892684836..889dbfb15b 100644 --- a/pkg/runtime/generated.pb.go +++ b/pkg/runtime/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/generated.proto b/pkg/runtime/generated.proto index 852721228f..ce55c88ec4 100644 --- a/pkg/runtime/generated.proto +++ b/pkg/runtime/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/helper.go b/pkg/runtime/helper.go index b131fdcd90..827cff1b84 100644 --- a/pkg/runtime/helper.go +++ b/pkg/runtime/helper.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/helper_test.go b/pkg/runtime/helper_test.go index e15a0e799f..5d805a92d5 100644 --- a/pkg/runtime/helper_test.go +++ b/pkg/runtime/helper_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/interfaces.go b/pkg/runtime/interfaces.go index 7239ac44ce..e46324608e 100644 --- a/pkg/runtime/interfaces.go +++ b/pkg/runtime/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/register.go b/pkg/runtime/register.go index 5201a15ffd..39a1eb14b8 100644 --- a/pkg/runtime/register.go +++ b/pkg/runtime/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/scheme.go b/pkg/runtime/scheme.go index c49c43e93f..f98ec54ab1 100644 --- a/pkg/runtime/scheme.go +++ b/pkg/runtime/scheme.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/scheme_test.go b/pkg/runtime/scheme_test.go index 61d6bb1315..b81b9528f5 100644 --- a/pkg/runtime/scheme_test.go +++ b/pkg/runtime/scheme_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/codec_factory.go b/pkg/runtime/serializer/codec_factory.go index 4432e48960..758aa6b74a 100644 --- a/pkg/runtime/serializer/codec_factory.go +++ b/pkg/runtime/serializer/codec_factory.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/codec_test.go b/pkg/runtime/serializer/codec_test.go index 384aabc266..0982fb3aae 100644 --- a/pkg/runtime/serializer/codec_test.go +++ b/pkg/runtime/serializer/codec_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/json/json.go b/pkg/runtime/serializer/json/json.go index c226448f37..c26fa50d81 100644 --- a/pkg/runtime/serializer/json/json.go +++ b/pkg/runtime/serializer/json/json.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/json/json_test.go b/pkg/runtime/serializer/json/json_test.go index 8b0fcac67c..85f74fb23e 100644 --- a/pkg/runtime/serializer/json/json_test.go +++ b/pkg/runtime/serializer/json/json_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/json/meta.go b/pkg/runtime/serializer/json/meta.go index 91df105ed6..b9bea21eb9 100644 --- a/pkg/runtime/serializer/json/meta.go +++ b/pkg/runtime/serializer/json/meta.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/json/meta_test.go b/pkg/runtime/serializer/json/meta_test.go index 4b6351286f..f4e34a22d5 100644 --- a/pkg/runtime/serializer/json/meta_test.go +++ b/pkg/runtime/serializer/json/meta_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/negotiated_codec.go b/pkg/runtime/serializer/negotiated_codec.go index 6f6a56dd3f..59b078ce8b 100644 --- a/pkg/runtime/serializer/negotiated_codec.go +++ b/pkg/runtime/serializer/negotiated_codec.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/protobuf/doc.go b/pkg/runtime/serializer/protobuf/doc.go index 91b86af6cd..381748d69f 100644 --- a/pkg/runtime/serializer/protobuf/doc.go +++ b/pkg/runtime/serializer/protobuf/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/protobuf/protobuf.go b/pkg/runtime/serializer/protobuf/protobuf.go index a202a18d66..b9eb9e5db8 100644 --- a/pkg/runtime/serializer/protobuf/protobuf.go +++ b/pkg/runtime/serializer/protobuf/protobuf.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/protobuf/protobuf_test.go b/pkg/runtime/serializer/protobuf/protobuf_test.go index 03bf2b2541..54c92bf42a 100644 --- a/pkg/runtime/serializer/protobuf/protobuf_test.go +++ b/pkg/runtime/serializer/protobuf/protobuf_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/protobuf_extension.go b/pkg/runtime/serializer/protobuf_extension.go index a93708c45d..5846d94d53 100644 --- a/pkg/runtime/serializer/protobuf_extension.go +++ b/pkg/runtime/serializer/protobuf_extension.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/recognizer/recognizer.go b/pkg/runtime/serializer/recognizer/recognizer.go index 4b8b1e204e..310002a242 100644 --- a/pkg/runtime/serializer/recognizer/recognizer.go +++ b/pkg/runtime/serializer/recognizer/recognizer.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/recognizer/recognizer_test.go b/pkg/runtime/serializer/recognizer/recognizer_test.go index 9998f942cc..4b68cd1b63 100644 --- a/pkg/runtime/serializer/recognizer/recognizer_test.go +++ b/pkg/runtime/serializer/recognizer/recognizer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/streaming/streaming.go b/pkg/runtime/serializer/streaming/streaming.go index c34f9a570d..ac17138e43 100644 --- a/pkg/runtime/serializer/streaming/streaming.go +++ b/pkg/runtime/serializer/streaming/streaming.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/streaming/streaming_test.go b/pkg/runtime/serializer/streaming/streaming_test.go index b3d500c986..9866edb9c5 100644 --- a/pkg/runtime/serializer/streaming/streaming_test.go +++ b/pkg/runtime/serializer/streaming/streaming_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/versioning/versioning.go b/pkg/runtime/serializer/versioning/versioning.go index f69d126c8c..6e67964b16 100644 --- a/pkg/runtime/serializer/versioning/versioning.go +++ b/pkg/runtime/serializer/versioning/versioning.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/versioning/versioning_test.go b/pkg/runtime/serializer/versioning/versioning_test.go index 4d0f71e917..2dfae4921a 100644 --- a/pkg/runtime/serializer/versioning/versioning_test.go +++ b/pkg/runtime/serializer/versioning/versioning_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/serializer/yaml/yaml.go b/pkg/runtime/serializer/yaml/yaml.go index 637c777be9..d953976ecf 100644 --- a/pkg/runtime/serializer/yaml/yaml.go +++ b/pkg/runtime/serializer/yaml/yaml.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/swagger_doc_generator.go b/pkg/runtime/swagger_doc_generator.go index 19b8378a49..29722d52e7 100644 --- a/pkg/runtime/swagger_doc_generator.go +++ b/pkg/runtime/swagger_doc_generator.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/swagger_doc_generator_test.go b/pkg/runtime/swagger_doc_generator_test.go index 095dddff58..a6f338d311 100644 --- a/pkg/runtime/swagger_doc_generator_test.go +++ b/pkg/runtime/swagger_doc_generator_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/types.go b/pkg/runtime/types.go index e646d2afaf..3e810bc054 100644 --- a/pkg/runtime/types.go +++ b/pkg/runtime/types.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/types_proto.go b/pkg/runtime/types_proto.go index 142dd05daa..ead96ee055 100644 --- a/pkg/runtime/types_proto.go +++ b/pkg/runtime/types_proto.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/unstructured.go b/pkg/runtime/unstructured.go index 4a15142c12..048e6dc148 100644 --- a/pkg/runtime/unstructured.go +++ b/pkg/runtime/unstructured.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/unstructured_test.go b/pkg/runtime/unstructured_test.go index cf808185c6..df0217aa7d 100644 --- a/pkg/runtime/unstructured_test.go +++ b/pkg/runtime/unstructured_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/runtime/unversioned_test.go b/pkg/runtime/unversioned_test.go index 7943581ea5..5eb525dc94 100644 --- a/pkg/runtime/unversioned_test.go +++ b/pkg/runtime/unversioned_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/doc.go b/pkg/security/doc.go index 7638b29591..1652dbeaab 100644 --- a/pkg/security/doc.go +++ b/pkg/security/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/capabilities/mustrunas.go b/pkg/security/podsecuritypolicy/capabilities/mustrunas.go index 1ffc55fdba..8c71833d95 100644 --- a/pkg/security/podsecuritypolicy/capabilities/mustrunas.go +++ b/pkg/security/podsecuritypolicy/capabilities/mustrunas.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/capabilities/mustrunas_test.go b/pkg/security/podsecuritypolicy/capabilities/mustrunas_test.go index 46cd2a2a4e..b8cbafecaf 100644 --- a/pkg/security/podsecuritypolicy/capabilities/mustrunas_test.go +++ b/pkg/security/podsecuritypolicy/capabilities/mustrunas_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/capabilities/types.go b/pkg/security/podsecuritypolicy/capabilities/types.go index 428f245584..0d1e6e2c1f 100644 --- a/pkg/security/podsecuritypolicy/capabilities/types.go +++ b/pkg/security/podsecuritypolicy/capabilities/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/factory.go b/pkg/security/podsecuritypolicy/factory.go index 477845f147..b2e99d810f 100644 --- a/pkg/security/podsecuritypolicy/factory.go +++ b/pkg/security/podsecuritypolicy/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/group/mustrunas.go b/pkg/security/podsecuritypolicy/group/mustrunas.go index bcb2edade9..a6c64e7627 100644 --- a/pkg/security/podsecuritypolicy/group/mustrunas.go +++ b/pkg/security/podsecuritypolicy/group/mustrunas.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/group/mustrunas_test.go b/pkg/security/podsecuritypolicy/group/mustrunas_test.go index 31c2c21098..e3473aef90 100644 --- a/pkg/security/podsecuritypolicy/group/mustrunas_test.go +++ b/pkg/security/podsecuritypolicy/group/mustrunas_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/group/runasany.go b/pkg/security/podsecuritypolicy/group/runasany.go index 2398a2ab53..edf6d0b124 100644 --- a/pkg/security/podsecuritypolicy/group/runasany.go +++ b/pkg/security/podsecuritypolicy/group/runasany.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/group/runasany_test.go b/pkg/security/podsecuritypolicy/group/runasany_test.go index be8b239b57..86c1066224 100644 --- a/pkg/security/podsecuritypolicy/group/runasany_test.go +++ b/pkg/security/podsecuritypolicy/group/runasany_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/group/types.go b/pkg/security/podsecuritypolicy/group/types.go index be19fe9b9d..7d4c2e31d3 100644 --- a/pkg/security/podsecuritypolicy/group/types.go +++ b/pkg/security/podsecuritypolicy/group/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/provider.go b/pkg/security/podsecuritypolicy/provider.go index bf606a3384..bcb6e33d23 100644 --- a/pkg/security/podsecuritypolicy/provider.go +++ b/pkg/security/podsecuritypolicy/provider.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/provider_test.go b/pkg/security/podsecuritypolicy/provider_test.go index 70c89b7e54..5e0d83dbfb 100644 --- a/pkg/security/podsecuritypolicy/provider_test.go +++ b/pkg/security/podsecuritypolicy/provider_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/selinux/mustrunas.go b/pkg/security/podsecuritypolicy/selinux/mustrunas.go index 4b59211bb4..4b1f30ee5e 100644 --- a/pkg/security/podsecuritypolicy/selinux/mustrunas.go +++ b/pkg/security/podsecuritypolicy/selinux/mustrunas.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/selinux/mustrunas_test.go b/pkg/security/podsecuritypolicy/selinux/mustrunas_test.go index 153c3e5072..b7a48bf626 100644 --- a/pkg/security/podsecuritypolicy/selinux/mustrunas_test.go +++ b/pkg/security/podsecuritypolicy/selinux/mustrunas_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/selinux/runasany.go b/pkg/security/podsecuritypolicy/selinux/runasany.go index 1418fc331c..5203b9a303 100644 --- a/pkg/security/podsecuritypolicy/selinux/runasany.go +++ b/pkg/security/podsecuritypolicy/selinux/runasany.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/selinux/runasany_test.go b/pkg/security/podsecuritypolicy/selinux/runasany_test.go index 4f5db4e68f..0eab0ad81b 100644 --- a/pkg/security/podsecuritypolicy/selinux/runasany_test.go +++ b/pkg/security/podsecuritypolicy/selinux/runasany_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/selinux/types.go b/pkg/security/podsecuritypolicy/selinux/types.go index 25613d62a1..b93acba27b 100644 --- a/pkg/security/podsecuritypolicy/selinux/types.go +++ b/pkg/security/podsecuritypolicy/selinux/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/types.go b/pkg/security/podsecuritypolicy/types.go index 64535ee4af..1e318662ae 100644 --- a/pkg/security/podsecuritypolicy/types.go +++ b/pkg/security/podsecuritypolicy/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/user/mustrunas.go b/pkg/security/podsecuritypolicy/user/mustrunas.go index f48c803c99..26da58cab7 100644 --- a/pkg/security/podsecuritypolicy/user/mustrunas.go +++ b/pkg/security/podsecuritypolicy/user/mustrunas.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/user/mustrunas_test.go b/pkg/security/podsecuritypolicy/user/mustrunas_test.go index 1a8c7eb026..82b7dcd1ff 100644 --- a/pkg/security/podsecuritypolicy/user/mustrunas_test.go +++ b/pkg/security/podsecuritypolicy/user/mustrunas_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/user/nonroot.go b/pkg/security/podsecuritypolicy/user/nonroot.go index fc7c356a0b..8a7afe2461 100644 --- a/pkg/security/podsecuritypolicy/user/nonroot.go +++ b/pkg/security/podsecuritypolicy/user/nonroot.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/user/nonroot_test.go b/pkg/security/podsecuritypolicy/user/nonroot_test.go index 73e2b1abe7..041333ae55 100644 --- a/pkg/security/podsecuritypolicy/user/nonroot_test.go +++ b/pkg/security/podsecuritypolicy/user/nonroot_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/user/runasany.go b/pkg/security/podsecuritypolicy/user/runasany.go index 6fbf1e0321..052b00ed64 100644 --- a/pkg/security/podsecuritypolicy/user/runasany.go +++ b/pkg/security/podsecuritypolicy/user/runasany.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/user/runasany_test.go b/pkg/security/podsecuritypolicy/user/runasany_test.go index 8da79fffc4..d2a2915bb7 100644 --- a/pkg/security/podsecuritypolicy/user/runasany_test.go +++ b/pkg/security/podsecuritypolicy/user/runasany_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/user/types.go b/pkg/security/podsecuritypolicy/user/types.go index ee691c7bec..21cd18ab1e 100644 --- a/pkg/security/podsecuritypolicy/user/types.go +++ b/pkg/security/podsecuritypolicy/user/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/util/util.go b/pkg/security/podsecuritypolicy/util/util.go index 097b1a6c21..0af4ad060b 100644 --- a/pkg/security/podsecuritypolicy/util/util.go +++ b/pkg/security/podsecuritypolicy/util/util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/security/podsecuritypolicy/util/util_test.go b/pkg/security/podsecuritypolicy/util/util_test.go index 5c32b7487f..63a2dd3de0 100644 --- a/pkg/security/podsecuritypolicy/util/util_test.go +++ b/pkg/security/podsecuritypolicy/util/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/securitycontext/doc.go b/pkg/securitycontext/doc.go index 9e9a84ba10..529451e50c 100644 --- a/pkg/securitycontext/doc.go +++ b/pkg/securitycontext/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/securitycontext/fake.go b/pkg/securitycontext/fake.go index 804f169059..829679a36e 100644 --- a/pkg/securitycontext/fake.go +++ b/pkg/securitycontext/fake.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/securitycontext/provider.go b/pkg/securitycontext/provider.go index e31914960f..2663ef77e2 100644 --- a/pkg/securitycontext/provider.go +++ b/pkg/securitycontext/provider.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/securitycontext/provider_test.go b/pkg/securitycontext/provider_test.go index 5d70c338de..0f31d62ab3 100644 --- a/pkg/securitycontext/provider_test.go +++ b/pkg/securitycontext/provider_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/securitycontext/types.go b/pkg/securitycontext/types.go index 6f45b19684..9f27ca7d05 100644 --- a/pkg/securitycontext/types.go +++ b/pkg/securitycontext/types.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/securitycontext/util.go b/pkg/securitycontext/util.go index 32b97af238..13d48a258f 100644 --- a/pkg/securitycontext/util.go +++ b/pkg/securitycontext/util.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/securitycontext/util_test.go b/pkg/securitycontext/util_test.go index 3d525010ae..523a7f52d2 100644 --- a/pkg/securitycontext/util_test.go +++ b/pkg/securitycontext/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/serviceaccount/jwt.go b/pkg/serviceaccount/jwt.go index d26349d861..1ce3934750 100644 --- a/pkg/serviceaccount/jwt.go +++ b/pkg/serviceaccount/jwt.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/serviceaccount/jwt_test.go b/pkg/serviceaccount/jwt_test.go index 690eef8e12..9698969765 100644 --- a/pkg/serviceaccount/jwt_test.go +++ b/pkg/serviceaccount/jwt_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/serviceaccount/util.go b/pkg/serviceaccount/util.go index 487b0f1569..712b086ad4 100644 --- a/pkg/serviceaccount/util.go +++ b/pkg/serviceaccount/util.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/serviceaccount/util_test.go b/pkg/serviceaccount/util_test.go index 3a458d33f1..14784b16cd 100644 --- a/pkg/serviceaccount/util_test.go +++ b/pkg/serviceaccount/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/ssh/ssh.go b/pkg/ssh/ssh.go index ea6c7955e3..69dbec685b 100644 --- a/pkg/ssh/ssh.go +++ b/pkg/ssh/ssh.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/ssh/ssh_test.go b/pkg/ssh/ssh_test.go index d8ce2d9a61..52cdfc504d 100644 --- a/pkg/ssh/ssh_test.go +++ b/pkg/ssh/ssh_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/cacher.go b/pkg/storage/cacher.go index 31264cf93b..10760d9965 100644 --- a/pkg/storage/cacher.go +++ b/pkg/storage/cacher.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/cacher_test.go b/pkg/storage/cacher_test.go index 37408f876c..b723a5ac24 100644 --- a/pkg/storage/cacher_test.go +++ b/pkg/storage/cacher_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/doc.go b/pkg/storage/doc.go index dca0d5b709..d2c5dbfc45 100644 --- a/pkg/storage/doc.go +++ b/pkg/storage/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/errors.go b/pkg/storage/errors.go index 61b3cba52c..26985fa073 100644 --- a/pkg/storage/errors.go +++ b/pkg/storage/errors.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/api_object_versioner.go b/pkg/storage/etcd/api_object_versioner.go index 639f24a8af..59839b9367 100644 --- a/pkg/storage/etcd/api_object_versioner.go +++ b/pkg/storage/etcd/api_object_versioner.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/api_object_versioner_test.go b/pkg/storage/etcd/api_object_versioner_test.go index 86767c8e07..18a2090125 100644 --- a/pkg/storage/etcd/api_object_versioner_test.go +++ b/pkg/storage/etcd/api_object_versioner_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/doc.go b/pkg/storage/etcd/doc.go index 44a2b9d445..73e2f50c41 100644 --- a/pkg/storage/etcd/doc.go +++ b/pkg/storage/etcd/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/etcd_helper.go b/pkg/storage/etcd/etcd_helper.go index 3de6037439..00cecf7b95 100644 --- a/pkg/storage/etcd/etcd_helper.go +++ b/pkg/storage/etcd/etcd_helper.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/etcd_helper_test.go b/pkg/storage/etcd/etcd_helper_test.go index a5e7f57538..c3d7f4cda2 100644 --- a/pkg/storage/etcd/etcd_helper_test.go +++ b/pkg/storage/etcd/etcd_helper_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/etcd_watcher.go b/pkg/storage/etcd/etcd_watcher.go index c856b59ccf..e290e8ac42 100644 --- a/pkg/storage/etcd/etcd_watcher.go +++ b/pkg/storage/etcd/etcd_watcher.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/etcd_watcher_test.go b/pkg/storage/etcd/etcd_watcher_test.go index c1aa0f11cb..80c95975e7 100644 --- a/pkg/storage/etcd/etcd_watcher_test.go +++ b/pkg/storage/etcd/etcd_watcher_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/etcdtest/doc.go b/pkg/storage/etcd/etcdtest/doc.go index ef9e6ce860..dde65fb9c9 100644 --- a/pkg/storage/etcd/etcdtest/doc.go +++ b/pkg/storage/etcd/etcdtest/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/etcdtest/etcdtest.go b/pkg/storage/etcd/etcdtest/etcdtest.go index d248eedb27..a4a9ce2436 100644 --- a/pkg/storage/etcd/etcdtest/etcdtest.go +++ b/pkg/storage/etcd/etcdtest/etcdtest.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/metrics/metrics.go b/pkg/storage/etcd/metrics/metrics.go index 7e88e43c2e..119e2e8fc6 100644 --- a/pkg/storage/etcd/metrics/metrics.go +++ b/pkg/storage/etcd/metrics/metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/testing/certificates.go b/pkg/storage/etcd/testing/certificates.go index c3fea5ffc1..8b1df576a1 100644 --- a/pkg/storage/etcd/testing/certificates.go +++ b/pkg/storage/etcd/testing/certificates.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/testing/utils.go b/pkg/storage/etcd/testing/utils.go index aaa7b67a82..bcdb46af58 100644 --- a/pkg/storage/etcd/testing/utils.go +++ b/pkg/storage/etcd/testing/utils.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/util/doc.go b/pkg/storage/etcd/util/doc.go index aa1039fafa..48a70cb737 100644 --- a/pkg/storage/etcd/util/doc.go +++ b/pkg/storage/etcd/util/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/util/etcd_util.go b/pkg/storage/etcd/util/etcd_util.go index b15ec5bd01..7c71fe24fc 100644 --- a/pkg/storage/etcd/util/etcd_util.go +++ b/pkg/storage/etcd/util/etcd_util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd/util/etcd_util_test.go b/pkg/storage/etcd/util/etcd_util_test.go index cc41958ad0..de764795d4 100644 --- a/pkg/storage/etcd/util/etcd_util_test.go +++ b/pkg/storage/etcd/util/etcd_util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd3/compact.go b/pkg/storage/etcd3/compact.go index ddd8e312c3..fcaf83aae5 100644 --- a/pkg/storage/etcd3/compact.go +++ b/pkg/storage/etcd3/compact.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd3/compact_test.go b/pkg/storage/etcd3/compact_test.go index af5a3ed4d1..3992940b37 100644 --- a/pkg/storage/etcd3/compact_test.go +++ b/pkg/storage/etcd3/compact_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd3/event.go b/pkg/storage/etcd3/event.go index 58072bd7b4..93f994346b 100644 --- a/pkg/storage/etcd3/event.go +++ b/pkg/storage/etcd3/event.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd3/store.go b/pkg/storage/etcd3/store.go index 4ac455df5d..689b8ac0d7 100644 --- a/pkg/storage/etcd3/store.go +++ b/pkg/storage/etcd3/store.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd3/store_test.go b/pkg/storage/etcd3/store_test.go index e66f859e98..fe5aabd5e7 100644 --- a/pkg/storage/etcd3/store_test.go +++ b/pkg/storage/etcd3/store_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd3/watcher.go b/pkg/storage/etcd3/watcher.go index 1e13d59b58..5b1c5dc90f 100644 --- a/pkg/storage/etcd3/watcher.go +++ b/pkg/storage/etcd3/watcher.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/etcd3/watcher_test.go b/pkg/storage/etcd3/watcher_test.go index aafef5792e..44b22c8323 100644 --- a/pkg/storage/etcd3/watcher_test.go +++ b/pkg/storage/etcd3/watcher_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/interfaces.go b/pkg/storage/interfaces.go index 89290e29ab..8673a101fb 100644 --- a/pkg/storage/interfaces.go +++ b/pkg/storage/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/storagebackend/config.go b/pkg/storage/storagebackend/config.go index d1e17c87ca..9b3c469a40 100644 --- a/pkg/storage/storagebackend/config.go +++ b/pkg/storage/storagebackend/config.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/storagebackend/factory/etcd2.go b/pkg/storage/storagebackend/factory/etcd2.go index 4ac526d999..b5a5ee2938 100644 --- a/pkg/storage/storagebackend/factory/etcd2.go +++ b/pkg/storage/storagebackend/factory/etcd2.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/storagebackend/factory/etcd3.go b/pkg/storage/storagebackend/factory/etcd3.go index add091a069..73f9913d72 100644 --- a/pkg/storage/storagebackend/factory/etcd3.go +++ b/pkg/storage/storagebackend/factory/etcd3.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/storagebackend/factory/factory.go b/pkg/storage/storagebackend/factory/factory.go index cc7ae052e9..f6bb263da9 100644 --- a/pkg/storage/storagebackend/factory/factory.go +++ b/pkg/storage/storagebackend/factory/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/testing/types.generated.go b/pkg/storage/testing/types.generated.go index 2c64c8f4ed..b95079b99f 100644 --- a/pkg/storage/testing/types.generated.go +++ b/pkg/storage/testing/types.generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/testing/types.go b/pkg/storage/testing/types.go index a1377aa04e..eb1e02180b 100644 --- a/pkg/storage/testing/types.go +++ b/pkg/storage/testing/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/testing/utils.go b/pkg/storage/testing/utils.go index 8858e33007..a65cff7d2e 100644 --- a/pkg/storage/testing/utils.go +++ b/pkg/storage/testing/utils.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/util.go b/pkg/storage/util.go index 6595a67638..86ebc0e42e 100644 --- a/pkg/storage/util.go +++ b/pkg/storage/util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/util_test.go b/pkg/storage/util_test.go index 7d0675ccee..bcc31b08c2 100644 --- a/pkg/storage/util_test.go +++ b/pkg/storage/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/watch_cache.go b/pkg/storage/watch_cache.go index 3e5ce5d730..1fd43fc00b 100644 --- a/pkg/storage/watch_cache.go +++ b/pkg/storage/watch_cache.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/storage/watch_cache_test.go b/pkg/storage/watch_cache_test.go index 8d9327e3cb..bdee7a58d3 100644 --- a/pkg/storage/watch_cache_test.go +++ b/pkg/storage/watch_cache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/types/doc.go b/pkg/types/doc.go index 239a9a5f51..783cbcdc8d 100644 --- a/pkg/types/doc.go +++ b/pkg/types/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/types/namespacedname.go b/pkg/types/namespacedname.go index 895d7c5beb..70a9ac3e24 100644 --- a/pkg/types/namespacedname.go +++ b/pkg/types/namespacedname.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/types/uid.go b/pkg/types/uid.go index de6cd18fbe..869339222e 100644 --- a/pkg/types/uid.go +++ b/pkg/types/uid.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/types/unix_user_id.go b/pkg/types/unix_user_id.go index b59792abff..dc770c11e2 100644 --- a/pkg/types/unix_user_id.go +++ b/pkg/types/unix_user_id.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/ui/data/swagger/datafile.go b/pkg/ui/data/swagger/datafile.go index 1a49fe6779..0ccd806f73 100644 --- a/pkg/ui/data/swagger/datafile.go +++ b/pkg/ui/data/swagger/datafile.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/ui/doc.go b/pkg/ui/doc.go index 7e566d3246..4a1abc71c7 100644 --- a/pkg/ui/doc.go +++ b/pkg/ui/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/ui/installsupport.go b/pkg/ui/installsupport.go index 15d1bb30a6..49a1267167 100644 --- a/pkg/ui/installsupport.go +++ b/pkg/ui/installsupport.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/bandwidth/doc.go b/pkg/util/bandwidth/doc.go index 5ae73e8be6..289b17fe29 100644 --- a/pkg/util/bandwidth/doc.go +++ b/pkg/util/bandwidth/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/bandwidth/fake_shaper.go b/pkg/util/bandwidth/fake_shaper.go index 12798bde18..ad8712d5b8 100644 --- a/pkg/util/bandwidth/fake_shaper.go +++ b/pkg/util/bandwidth/fake_shaper.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/bandwidth/interfaces.go b/pkg/util/bandwidth/interfaces.go index 62b20d87d0..a6792afe21 100644 --- a/pkg/util/bandwidth/interfaces.go +++ b/pkg/util/bandwidth/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/bandwidth/linux.go b/pkg/util/bandwidth/linux.go index edb480c697..ab68141d62 100644 --- a/pkg/util/bandwidth/linux.go +++ b/pkg/util/bandwidth/linux.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/bandwidth/linux_test.go b/pkg/util/bandwidth/linux_test.go index b6d2b559cd..831afa65ea 100644 --- a/pkg/util/bandwidth/linux_test.go +++ b/pkg/util/bandwidth/linux_test.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/bandwidth/unsupported.go b/pkg/util/bandwidth/unsupported.go index 7f980a2655..21ed2ad283 100644 --- a/pkg/util/bandwidth/unsupported.go +++ b/pkg/util/bandwidth/unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/bandwidth/utils.go b/pkg/util/bandwidth/utils.go index b501e9b5c8..77447b4840 100644 --- a/pkg/util/bandwidth/utils.go +++ b/pkg/util/bandwidth/utils.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/cache/cache.go b/pkg/util/cache/cache.go index 1f96c9b9aa..9a09fe54d6 100644 --- a/pkg/util/cache/cache.go +++ b/pkg/util/cache/cache.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/cache/cache_test.go b/pkg/util/cache/cache_test.go index e08c27911d..42a58a93dc 100644 --- a/pkg/util/cache/cache_test.go +++ b/pkg/util/cache/cache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/cache/lruexpirecache.go b/pkg/util/cache/lruexpirecache.go index 22f7f27679..7e1bb65a87 100644 --- a/pkg/util/cache/lruexpirecache.go +++ b/pkg/util/cache/lruexpirecache.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/cache/lruexpirecache_test.go b/pkg/util/cache/lruexpirecache_test.go index 07465ea564..4c55c1aedd 100644 --- a/pkg/util/cache/lruexpirecache_test.go +++ b/pkg/util/cache/lruexpirecache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/certificates/csr.go b/pkg/util/certificates/csr.go index be1f7651c3..86b037df42 100644 --- a/pkg/util/certificates/csr.go +++ b/pkg/util/certificates/csr.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/chmod/chmod.go b/pkg/util/chmod/chmod.go index 5b646c95bc..d051137d0b 100644 --- a/pkg/util/chmod/chmod.go +++ b/pkg/util/chmod/chmod.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/chmod/doc.go b/pkg/util/chmod/doc.go index a230e98fdc..4e39125419 100644 --- a/pkg/util/chmod/doc.go +++ b/pkg/util/chmod/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/chown/chown.go b/pkg/util/chown/chown.go index 0d90629de8..8a99084c3d 100644 --- a/pkg/util/chown/chown.go +++ b/pkg/util/chown/chown.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/chown/doc.go b/pkg/util/chown/doc.go index 3c41f5ed3b..cf71fd1568 100644 --- a/pkg/util/chown/doc.go +++ b/pkg/util/chown/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/clock.go b/pkg/util/clock.go index 474cbb68d1..71aca9eda4 100644 --- a/pkg/util/clock.go +++ b/pkg/util/clock.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/clock_test.go b/pkg/util/clock_test.go index ee60fcb0d2..61092dee00 100644 --- a/pkg/util/clock_test.go +++ b/pkg/util/clock_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/codeinspector/codeinspector.go b/pkg/util/codeinspector/codeinspector.go index 6ec21be716..ebd87ed52a 100644 --- a/pkg/util/codeinspector/codeinspector.go +++ b/pkg/util/codeinspector/codeinspector.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/config/config.go b/pkg/util/config/config.go index 37f6f6ab18..30defee87d 100644 --- a/pkg/util/config/config.go +++ b/pkg/util/config/config.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/config/config_test.go b/pkg/util/config/config_test.go index 4ebab7bf99..667288b9d0 100644 --- a/pkg/util/config/config_test.go +++ b/pkg/util/config/config_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/config/configuration_map.go b/pkg/util/config/configuration_map.go index e7ad4fadb3..0acbde56f8 100644 --- a/pkg/util/config/configuration_map.go +++ b/pkg/util/config/configuration_map.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/config/doc.go b/pkg/util/config/doc.go index 697f3ab566..5dbb37d448 100644 --- a/pkg/util/config/doc.go +++ b/pkg/util/config/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/configz/configz.go b/pkg/util/configz/configz.go index e8954a4a8f..bed7c96148 100644 --- a/pkg/util/configz/configz.go +++ b/pkg/util/configz/configz.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/configz/configz_test.go b/pkg/util/configz/configz_test.go index 7e52020501..78f22593d1 100644 --- a/pkg/util/configz/configz_test.go +++ b/pkg/util/configz/configz_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/crlf/crlf.go b/pkg/util/crlf/crlf.go index e098e86007..c08fe6f310 100644 --- a/pkg/util/crlf/crlf.go +++ b/pkg/util/crlf/crlf.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/crypto/crypto.go b/pkg/util/crypto/crypto.go index f43664369f..b573c8a594 100644 --- a/pkg/util/crypto/crypto.go +++ b/pkg/util/crypto/crypto.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/dbus/dbus.go b/pkg/util/dbus/dbus.go index 13da1469e5..702d16e5dc 100644 --- a/pkg/util/dbus/dbus.go +++ b/pkg/util/dbus/dbus.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/dbus/dbus_test.go b/pkg/util/dbus/dbus_test.go index 96670373b6..3f22d5982f 100644 --- a/pkg/util/dbus/dbus_test.go +++ b/pkg/util/dbus/dbus_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/dbus/doc.go b/pkg/util/dbus/doc.go index 59bec0e560..e09ad3e5c8 100644 --- a/pkg/util/dbus/doc.go +++ b/pkg/util/dbus/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/dbus/fake_dbus.go b/pkg/util/dbus/fake_dbus.go index eb97febae4..44131272e7 100644 --- a/pkg/util/dbus/fake_dbus.go +++ b/pkg/util/dbus/fake_dbus.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/deployment/deployment.go b/pkg/util/deployment/deployment.go index 05b2a83df4..43fd59bb9f 100644 --- a/pkg/util/deployment/deployment.go +++ b/pkg/util/deployment/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/deployment/deployment_test.go b/pkg/util/deployment/deployment_test.go index ef26617d7c..6dde0377aa 100644 --- a/pkg/util/deployment/deployment_test.go +++ b/pkg/util/deployment/deployment_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/diff/diff.go b/pkg/util/diff/diff.go index c1fd723752..a95a1d0055 100644 --- a/pkg/util/diff/diff.go +++ b/pkg/util/diff/diff.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/diff/diff_test.go b/pkg/util/diff/diff_test.go index 925b4a3129..0f51f00a1c 100644 --- a/pkg/util/diff/diff_test.go +++ b/pkg/util/diff/diff_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/doc.go b/pkg/util/doc.go index cd3f0823e7..1747db5506 100644 --- a/pkg/util/doc.go +++ b/pkg/util/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/env/env.go b/pkg/util/env/env.go index ad4310c25c..dee544f7c6 100644 --- a/pkg/util/env/env.go +++ b/pkg/util/env/env.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/env/env_test.go b/pkg/util/env/env_test.go index f7ff0a2351..eb55a9f21d 100644 --- a/pkg/util/env/env_test.go +++ b/pkg/util/env/env_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/errors/doc.go b/pkg/util/errors/doc.go index b0af0f0558..b3b39bc388 100644 --- a/pkg/util/errors/doc.go +++ b/pkg/util/errors/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/errors/errors.go b/pkg/util/errors/errors.go index df3adaf3e8..0445c142be 100644 --- a/pkg/util/errors/errors.go +++ b/pkg/util/errors/errors.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/errors/errors_test.go b/pkg/util/errors/errors_test.go index 7ecf919ffb..6698651c49 100644 --- a/pkg/util/errors/errors_test.go +++ b/pkg/util/errors/errors_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/exec/doc.go b/pkg/util/exec/doc.go index 64c1541bf7..8b824d2445 100644 --- a/pkg/util/exec/doc.go +++ b/pkg/util/exec/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/exec/exec.go b/pkg/util/exec/exec.go index 80444a9d86..f40e7fd377 100644 --- a/pkg/util/exec/exec.go +++ b/pkg/util/exec/exec.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/exec/exec_test.go b/pkg/util/exec/exec_test.go index d24f9cc193..833cef8b1a 100644 --- a/pkg/util/exec/exec_test.go +++ b/pkg/util/exec/exec_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/exec/fake_exec.go b/pkg/util/exec/fake_exec.go index 40df52921b..79bfce6ee6 100644 --- a/pkg/util/exec/fake_exec.go +++ b/pkg/util/exec/fake_exec.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/flag/flags.go b/pkg/util/flag/flags.go index 94b9f733f5..24e961f27c 100644 --- a/pkg/util/flag/flags.go +++ b/pkg/util/flag/flags.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/flag/tristate.go b/pkg/util/flag/tristate.go index a9359695f5..cf16376bf9 100644 --- a/pkg/util/flag/tristate.go +++ b/pkg/util/flag/tristate.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/flock/flock_other.go b/pkg/util/flock/flock_other.go index b80981882d..069a5b3a2c 100644 --- a/pkg/util/flock/flock_other.go +++ b/pkg/util/flock/flock_other.go @@ -1,7 +1,7 @@ // +build !linux,!darwin,!freebsd,!openbsd,!netbsd,!dragonfly /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/flock/flock_unix.go b/pkg/util/flock/flock_unix.go index 88ca8d700f..366090ccfd 100644 --- a/pkg/util/flock/flock_unix.go +++ b/pkg/util/flock/flock_unix.go @@ -1,7 +1,7 @@ // +build linux darwin freebsd openbsd netbsd dragonfly /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/flowcontrol/backoff.go b/pkg/util/flowcontrol/backoff.go index 1898c55c99..59b9976f1a 100644 --- a/pkg/util/flowcontrol/backoff.go +++ b/pkg/util/flowcontrol/backoff.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/flowcontrol/backoff_test.go b/pkg/util/flowcontrol/backoff_test.go index 350c5b790e..7bf2535bc2 100644 --- a/pkg/util/flowcontrol/backoff_test.go +++ b/pkg/util/flowcontrol/backoff_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/flowcontrol/throttle.go b/pkg/util/flowcontrol/throttle.go index a63817ca8c..482ba7d14a 100644 --- a/pkg/util/flowcontrol/throttle.go +++ b/pkg/util/flowcontrol/throttle.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/flowcontrol/throttle_test.go b/pkg/util/flowcontrol/throttle_test.go index 30b792ec0b..b3a216341f 100644 --- a/pkg/util/flowcontrol/throttle_test.go +++ b/pkg/util/flowcontrol/throttle_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/flushwriter/doc.go b/pkg/util/flushwriter/doc.go index 485b999265..1e7e324a15 100644 --- a/pkg/util/flushwriter/doc.go +++ b/pkg/util/flushwriter/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/flushwriter/writer.go b/pkg/util/flushwriter/writer.go index 0a9d88a789..748bd01085 100644 --- a/pkg/util/flushwriter/writer.go +++ b/pkg/util/flushwriter/writer.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/flushwriter/writer_test.go b/pkg/util/flushwriter/writer_test.go index d40b0bb004..35bbf7da4e 100644 --- a/pkg/util/flushwriter/writer_test.go +++ b/pkg/util/flushwriter/writer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/framer/framer.go b/pkg/util/framer/framer.go index 7ca806fa05..066680f443 100644 --- a/pkg/util/framer/framer.go +++ b/pkg/util/framer/framer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/framer/framer_test.go b/pkg/util/framer/framer_test.go index c5e4ba874e..b7ed00f538 100644 --- a/pkg/util/framer/framer_test.go +++ b/pkg/util/framer/framer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/goroutinemap/goroutinemap.go b/pkg/util/goroutinemap/goroutinemap.go index af9c1eeb84..445d4dfce8 100644 --- a/pkg/util/goroutinemap/goroutinemap.go +++ b/pkg/util/goroutinemap/goroutinemap.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/goroutinemap/goroutinemap_test.go b/pkg/util/goroutinemap/goroutinemap_test.go index e0057a5965..f4a1957069 100644 --- a/pkg/util/goroutinemap/goroutinemap_test.go +++ b/pkg/util/goroutinemap/goroutinemap_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/hash/hash.go b/pkg/util/hash/hash.go index 95fd32abe7..803f066a44 100644 --- a/pkg/util/hash/hash.go +++ b/pkg/util/hash/hash.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/hash/hash_test.go b/pkg/util/hash/hash_test.go index 3bba3b074b..bd211aa108 100644 --- a/pkg/util/hash/hash_test.go +++ b/pkg/util/hash/hash_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/homedir/homedir.go b/pkg/util/homedir/homedir.go index 57171e109b..403475491a 100644 --- a/pkg/util/homedir/homedir.go +++ b/pkg/util/homedir/homedir.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/httpstream/doc.go b/pkg/util/httpstream/doc.go index b474fc572e..1da83f14b1 100644 --- a/pkg/util/httpstream/doc.go +++ b/pkg/util/httpstream/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/httpstream/httpstream.go b/pkg/util/httpstream/httpstream.go index 3ce3b02a01..7c9b791d4f 100644 --- a/pkg/util/httpstream/httpstream.go +++ b/pkg/util/httpstream/httpstream.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/httpstream/httpstream_test.go b/pkg/util/httpstream/httpstream_test.go index d21e60c0ee..b528089bf5 100644 --- a/pkg/util/httpstream/httpstream_test.go +++ b/pkg/util/httpstream/httpstream_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/httpstream/spdy/connection.go b/pkg/util/httpstream/spdy/connection.go index 0330e20381..da63a02982 100644 --- a/pkg/util/httpstream/spdy/connection.go +++ b/pkg/util/httpstream/spdy/connection.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/httpstream/spdy/connection_test.go b/pkg/util/httpstream/spdy/connection_test.go index 36b096402b..d402785e2e 100644 --- a/pkg/util/httpstream/spdy/connection_test.go +++ b/pkg/util/httpstream/spdy/connection_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/httpstream/spdy/roundtripper.go b/pkg/util/httpstream/spdy/roundtripper.go index 6091c4e4b1..7aa10f26ee 100644 --- a/pkg/util/httpstream/spdy/roundtripper.go +++ b/pkg/util/httpstream/spdy/roundtripper.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/httpstream/spdy/roundtripper_test.go b/pkg/util/httpstream/spdy/roundtripper_test.go index c80a24a69b..58d472ece9 100644 --- a/pkg/util/httpstream/spdy/roundtripper_test.go +++ b/pkg/util/httpstream/spdy/roundtripper_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/httpstream/spdy/upgrade.go b/pkg/util/httpstream/spdy/upgrade.go index b7d126a5d8..0ae4a15191 100644 --- a/pkg/util/httpstream/spdy/upgrade.go +++ b/pkg/util/httpstream/spdy/upgrade.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/httpstream/spdy/upgrade_test.go b/pkg/util/httpstream/spdy/upgrade_test.go index 4e111407e8..5a514dd5bf 100644 --- a/pkg/util/httpstream/spdy/upgrade_test.go +++ b/pkg/util/httpstream/spdy/upgrade_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/integer/integer.go b/pkg/util/integer/integer.go index 99cde5d363..c6ea106f9b 100644 --- a/pkg/util/integer/integer.go +++ b/pkg/util/integer/integer.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/integer/integer_test.go b/pkg/util/integer/integer_test.go index 93ae44c4aa..e9f586888c 100644 --- a/pkg/util/integer/integer_test.go +++ b/pkg/util/integer/integer_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/interrupt/interrupt.go b/pkg/util/interrupt/interrupt.go index e9fbfd56f0..0265b9fb17 100644 --- a/pkg/util/interrupt/interrupt.go +++ b/pkg/util/interrupt/interrupt.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/intstr/deep_copy_generated.go b/pkg/util/intstr/deep_copy_generated.go index 29aef02234..793b1ebd18 100644 --- a/pkg/util/intstr/deep_copy_generated.go +++ b/pkg/util/intstr/deep_copy_generated.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/intstr/generated.pb.go b/pkg/util/intstr/generated.pb.go index ef39cd5865..3c2bf4fb1c 100644 --- a/pkg/util/intstr/generated.pb.go +++ b/pkg/util/intstr/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/intstr/generated.proto b/pkg/util/intstr/generated.proto index 32ad1b6b1b..b29579a0de 100644 --- a/pkg/util/intstr/generated.proto +++ b/pkg/util/intstr/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/intstr/intstr.go b/pkg/util/intstr/intstr.go index 8f29f32c6f..c50d14fad5 100644 --- a/pkg/util/intstr/intstr.go +++ b/pkg/util/intstr/intstr.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/intstr/intstr_test.go b/pkg/util/intstr/intstr_test.go index d4ccb6d286..4faba46f8d 100644 --- a/pkg/util/intstr/intstr_test.go +++ b/pkg/util/intstr/intstr_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/io/io.go b/pkg/util/io/io.go index d600c08c19..d7eb6d57f9 100644 --- a/pkg/util/io/io.go +++ b/pkg/util/io/io.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/io/io_test.go b/pkg/util/io/io_test.go index 1b9d4c67a3..67d339b965 100644 --- a/pkg/util/io/io_test.go +++ b/pkg/util/io/io_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/io/writer.go b/pkg/util/io/writer.go index 3046c4d9b2..086508c90d 100644 --- a/pkg/util/io/writer.go +++ b/pkg/util/io/writer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/iptables/doc.go b/pkg/util/iptables/doc.go index 5824f3b4e3..90d1b45b16 100644 --- a/pkg/util/iptables/doc.go +++ b/pkg/util/iptables/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/iptables/iptables.go b/pkg/util/iptables/iptables.go index 801cc8bf72..3b9a00336c 100644 --- a/pkg/util/iptables/iptables.go +++ b/pkg/util/iptables/iptables.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/iptables/iptables_test.go b/pkg/util/iptables/iptables_test.go index d5bb346910..374b0a939a 100644 --- a/pkg/util/iptables/iptables_test.go +++ b/pkg/util/iptables/iptables_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/iptables/save_restore.go b/pkg/util/iptables/save_restore.go index d86eb755ce..435a54bebd 100644 --- a/pkg/util/iptables/save_restore.go +++ b/pkg/util/iptables/save_restore.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/iptables/testing/fake.go b/pkg/util/iptables/testing/fake.go index ac99677273..8b8b75331f 100644 --- a/pkg/util/iptables/testing/fake.go +++ b/pkg/util/iptables/testing/fake.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/json/json.go b/pkg/util/json/json.go index 1ff8cc0d44..e8054a12ed 100644 --- a/pkg/util/json/json.go +++ b/pkg/util/json/json.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/json/json_test.go b/pkg/util/json/json_test.go index e41f6ce048..1896a3e3e7 100644 --- a/pkg/util/json/json_test.go +++ b/pkg/util/json/json_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/jsonpath/doc.go b/pkg/util/jsonpath/doc.go index 6bdf4ac59a..2a6e170617 100644 --- a/pkg/util/jsonpath/doc.go +++ b/pkg/util/jsonpath/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/jsonpath/jsonpath.go b/pkg/util/jsonpath/jsonpath.go index 7a402af49b..80e3d8eee4 100644 --- a/pkg/util/jsonpath/jsonpath.go +++ b/pkg/util/jsonpath/jsonpath.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/jsonpath/jsonpath_test.go b/pkg/util/jsonpath/jsonpath_test.go index e01a9a4588..8e1532834f 100644 --- a/pkg/util/jsonpath/jsonpath_test.go +++ b/pkg/util/jsonpath/jsonpath_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/jsonpath/node.go b/pkg/util/jsonpath/node.go index ddf015c049..f0a27853d8 100644 --- a/pkg/util/jsonpath/node.go +++ b/pkg/util/jsonpath/node.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/jsonpath/parser.go b/pkg/util/jsonpath/parser.go index bd1f5ecd43..1ff82a3b9c 100644 --- a/pkg/util/jsonpath/parser.go +++ b/pkg/util/jsonpath/parser.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/jsonpath/parser_test.go b/pkg/util/jsonpath/parser_test.go index a061043b83..48dd4f610a 100644 --- a/pkg/util/jsonpath/parser_test.go +++ b/pkg/util/jsonpath/parser_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/keymutex/keymutex.go b/pkg/util/keymutex/keymutex.go index 2bcc951759..fcffa99bfc 100644 --- a/pkg/util/keymutex/keymutex.go +++ b/pkg/util/keymutex/keymutex.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/keymutex/keymutex_test.go b/pkg/util/keymutex/keymutex_test.go index faa3be16aa..2f9bd3e268 100644 --- a/pkg/util/keymutex/keymutex_test.go +++ b/pkg/util/keymutex/keymutex_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/labels/doc.go b/pkg/util/labels/doc.go index 0746d878db..c87305fb09 100644 --- a/pkg/util/labels/doc.go +++ b/pkg/util/labels/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/labels/labels.go b/pkg/util/labels/labels.go index 624d5ad688..262f66e6e9 100644 --- a/pkg/util/labels/labels.go +++ b/pkg/util/labels/labels.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/labels/labels_test.go b/pkg/util/labels/labels_test.go index 9adbd4554a..34f385ae95 100644 --- a/pkg/util/labels/labels_test.go +++ b/pkg/util/labels/labels_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/limitwriter/doc.go b/pkg/util/limitwriter/doc.go index 7daff9c079..84e693e160 100644 --- a/pkg/util/limitwriter/doc.go +++ b/pkg/util/limitwriter/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/limitwriter/limitwriter.go b/pkg/util/limitwriter/limitwriter.go index 88890a9fa2..e4b374c4f3 100644 --- a/pkg/util/limitwriter/limitwriter.go +++ b/pkg/util/limitwriter/limitwriter.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/line_delimiter.go b/pkg/util/line_delimiter.go index b48478df8a..9f64260c86 100644 --- a/pkg/util/line_delimiter.go +++ b/pkg/util/line_delimiter.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/line_delimiter_test.go b/pkg/util/line_delimiter_test.go index 728d0abeae..a3a036c5c6 100644 --- a/pkg/util/line_delimiter_test.go +++ b/pkg/util/line_delimiter_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/logs.go b/pkg/util/logs.go index c79c4903d1..ea27f484f0 100644 --- a/pkg/util/logs.go +++ b/pkg/util/logs.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/metrics/util.go b/pkg/util/metrics/util.go index ab74e35c46..0fbc3ae08c 100644 --- a/pkg/util/metrics/util.go +++ b/pkg/util/metrics/util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/mount/doc.go b/pkg/util/mount/doc.go index 839c0a69a5..0e225e0a1b 100644 --- a/pkg/util/mount/doc.go +++ b/pkg/util/mount/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/mount/fake.go b/pkg/util/mount/fake.go index 115293813b..84a462dd01 100644 --- a/pkg/util/mount/fake.go +++ b/pkg/util/mount/fake.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/mount/mount.go b/pkg/util/mount/mount.go index 9c1d8d4f26..33dc3c71de 100644 --- a/pkg/util/mount/mount.go +++ b/pkg/util/mount/mount.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/mount/mount_linux.go b/pkg/util/mount/mount_linux.go index 66959697c5..17c9318224 100644 --- a/pkg/util/mount/mount_linux.go +++ b/pkg/util/mount/mount_linux.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/mount/mount_linux_test.go b/pkg/util/mount/mount_linux_test.go index cd802d7744..4c7acbe439 100644 --- a/pkg/util/mount/mount_linux_test.go +++ b/pkg/util/mount/mount_linux_test.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/mount/mount_unsupported.go b/pkg/util/mount/mount_unsupported.go index 8942c00363..e99bce79b3 100644 --- a/pkg/util/mount/mount_unsupported.go +++ b/pkg/util/mount/mount_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/mount/nsenter_mount.go b/pkg/util/mount/nsenter_mount.go index 9a64ae440b..7800fb1367 100644 --- a/pkg/util/mount/nsenter_mount.go +++ b/pkg/util/mount/nsenter_mount.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/mount/nsenter_mount_unsupported.go b/pkg/util/mount/nsenter_mount_unsupported.go index 210fab851a..eb9e40d850 100644 --- a/pkg/util/mount/nsenter_mount_unsupported.go +++ b/pkg/util/mount/nsenter_mount_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/mount/safe_format_and_mount_test.go b/pkg/util/mount/safe_format_and_mount_test.go index 03c0b8442b..8ce48335d4 100644 --- a/pkg/util/mount/safe_format_and_mount_test.go +++ b/pkg/util/mount/safe_format_and_mount_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/net/http.go b/pkg/util/net/http.go index 497e33ef5d..582fb9a58f 100644 --- a/pkg/util/net/http.go +++ b/pkg/util/net/http.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/net/http_test.go b/pkg/util/net/http_test.go index 08cc858816..0fb8a011f3 100644 --- a/pkg/util/net/http_test.go +++ b/pkg/util/net/http_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/net/interface.go b/pkg/util/net/interface.go index cdf5ddb54a..a1e53d2e43 100644 --- a/pkg/util/net/interface.go +++ b/pkg/util/net/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/net/interface_test.go b/pkg/util/net/interface_test.go index 9571e5b48b..fc66904c57 100644 --- a/pkg/util/net/interface_test.go +++ b/pkg/util/net/interface_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/net/port_range.go b/pkg/util/net/port_range.go index 527552571e..6afdbf25fa 100644 --- a/pkg/util/net/port_range.go +++ b/pkg/util/net/port_range.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/net/port_range_test.go b/pkg/util/net/port_range_test.go index 9eb081aa7d..e35e26798c 100644 --- a/pkg/util/net/port_range_test.go +++ b/pkg/util/net/port_range_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/net/port_split.go b/pkg/util/net/port_split.go index be40eb75f4..29c985edc3 100644 --- a/pkg/util/net/port_split.go +++ b/pkg/util/net/port_split.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/net/port_split_test.go b/pkg/util/net/port_split_test.go index 2e9e135c07..d15c6e46be 100644 --- a/pkg/util/net/port_split_test.go +++ b/pkg/util/net/port_split_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/net/sets/ipnet.go b/pkg/util/net/sets/ipnet.go index db117f63ec..5b6fe933f1 100644 --- a/pkg/util/net/sets/ipnet.go +++ b/pkg/util/net/sets/ipnet.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/net/sets/ipnet_test.go b/pkg/util/net/sets/ipnet_test.go index 0223d1651c..524bd685bf 100644 --- a/pkg/util/net/sets/ipnet_test.go +++ b/pkg/util/net/sets/ipnet_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/net/util.go b/pkg/util/net/util.go index 92d5d0b98d..1348f4deeb 100644 --- a/pkg/util/net/util.go +++ b/pkg/util/net/util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/net/util_test.go b/pkg/util/net/util_test.go index ead640934f..bcbef753b7 100644 --- a/pkg/util/net/util_test.go +++ b/pkg/util/net/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/node/node.go b/pkg/util/node/node.go index cbc062fc97..b6b6ab188f 100644 --- a/pkg/util/node/node.go +++ b/pkg/util/node/node.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/oom/doc.go b/pkg/util/oom/doc.go index 539d6c43b2..9825a53f2a 100644 --- a/pkg/util/oom/doc.go +++ b/pkg/util/oom/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/oom/oom.go b/pkg/util/oom/oom.go index c6d563ab23..a5b1ea0ffc 100644 --- a/pkg/util/oom/oom.go +++ b/pkg/util/oom/oom.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/oom/oom_fake.go b/pkg/util/oom/oom_fake.go index bd0bf6f455..2712c5d0b8 100644 --- a/pkg/util/oom/oom_fake.go +++ b/pkg/util/oom/oom_fake.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/oom/oom_linux.go b/pkg/util/oom/oom_linux.go index c054682bdd..5aec834989 100644 --- a/pkg/util/oom/oom_linux.go +++ b/pkg/util/oom/oom_linux.go @@ -1,7 +1,7 @@ // +build cgo,linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/oom/oom_linux_test.go b/pkg/util/oom/oom_linux_test.go index 10e9f3d9ec..82a18b66bd 100644 --- a/pkg/util/oom/oom_linux_test.go +++ b/pkg/util/oom/oom_linux_test.go @@ -1,7 +1,7 @@ // +build cgo,linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/oom/oom_unsupported.go b/pkg/util/oom/oom_unsupported.go index 9c4473f7e0..063839d6b2 100644 --- a/pkg/util/oom/oom_unsupported.go +++ b/pkg/util/oom/oom_unsupported.go @@ -1,7 +1,7 @@ // +build !cgo !linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/parsers/parsers.go b/pkg/util/parsers/parsers.go index a02f18d3eb..4e70cc6827 100644 --- a/pkg/util/parsers/parsers.go +++ b/pkg/util/parsers/parsers.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/parsers/parsers_test.go b/pkg/util/parsers/parsers_test.go index 371eee758a..3f62473c92 100644 --- a/pkg/util/parsers/parsers_test.go +++ b/pkg/util/parsers/parsers_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/pod/doc.go b/pkg/util/pod/doc.go index 3bad7d0b71..d7a8ff226e 100644 --- a/pkg/util/pod/doc.go +++ b/pkg/util/pod/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/pod/pod.go b/pkg/util/pod/pod.go index 9c57aaebbc..e2286c7a02 100644 --- a/pkg/util/pod/pod.go +++ b/pkg/util/pod/pod.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/procfs/doc.go b/pkg/util/procfs/doc.go index d94e6687c1..2e99311d02 100644 --- a/pkg/util/procfs/doc.go +++ b/pkg/util/procfs/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/procfs/procfs.go b/pkg/util/procfs/procfs.go index d0c38bf21e..11550b6674 100644 --- a/pkg/util/procfs/procfs.go +++ b/pkg/util/procfs/procfs.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/procfs/procfs_fake.go b/pkg/util/procfs/procfs_fake.go index 8d16aa53cc..ab480ed0e4 100644 --- a/pkg/util/procfs/procfs_fake.go +++ b/pkg/util/procfs/procfs_fake.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/procfs/procfs_interface.go b/pkg/util/procfs/procfs_interface.go index d3bf14f0c7..f75a839983 100644 --- a/pkg/util/procfs/procfs_interface.go +++ b/pkg/util/procfs/procfs_interface.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/procfs/procfs_test.go b/pkg/util/procfs/procfs_test.go index 609543dca7..09340245a4 100644 --- a/pkg/util/procfs/procfs_test.go +++ b/pkg/util/procfs/procfs_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/proxy/dial.go b/pkg/util/proxy/dial.go index 33cecb7ea1..aae95975d7 100644 --- a/pkg/util/proxy/dial.go +++ b/pkg/util/proxy/dial.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/proxy/doc.go b/pkg/util/proxy/doc.go index 0d7519a0c5..06bb03f04e 100644 --- a/pkg/util/proxy/doc.go +++ b/pkg/util/proxy/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/proxy/transport.go b/pkg/util/proxy/transport.go index 079670c0aa..af12e3d589 100644 --- a/pkg/util/proxy/transport.go +++ b/pkg/util/proxy/transport.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/proxy/transport_test.go b/pkg/util/proxy/transport_test.go index fca115526b..544d4b96df 100644 --- a/pkg/util/proxy/transport_test.go +++ b/pkg/util/proxy/transport_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/rand/rand.go b/pkg/util/rand/rand.go index f2647af337..134c152605 100644 --- a/pkg/util/rand/rand.go +++ b/pkg/util/rand/rand.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/rand/rand_test.go b/pkg/util/rand/rand_test.go index 12cdb008e2..40fdb7d68d 100644 --- a/pkg/util/rand/rand_test.go +++ b/pkg/util/rand/rand_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/replicaset/replicaset.go b/pkg/util/replicaset/replicaset.go index e5dd26517b..206bba2dc1 100644 --- a/pkg/util/replicaset/replicaset.go +++ b/pkg/util/replicaset/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/resource_container_linux.go b/pkg/util/resource_container_linux.go index 8d166045e0..a844e4c145 100644 --- a/pkg/util/resource_container_linux.go +++ b/pkg/util/resource_container_linux.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/resource_container_unsupported.go b/pkg/util/resource_container_unsupported.go index a8ee51927b..ba861b0dfe 100644 --- a/pkg/util/resource_container_unsupported.go +++ b/pkg/util/resource_container_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/runner.go b/pkg/util/runner.go index 60645cf0ec..9e977ee1e9 100644 --- a/pkg/util/runner.go +++ b/pkg/util/runner.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/runner_test.go b/pkg/util/runner_test.go index 35ffdf76d5..d05db5eddc 100644 --- a/pkg/util/runner_test.go +++ b/pkg/util/runner_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/runtime/runtime.go b/pkg/util/runtime/runtime.go index f404d25d19..464d3ee129 100644 --- a/pkg/util/runtime/runtime.go +++ b/pkg/util/runtime/runtime.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/runtime/runtime_test.go b/pkg/util/runtime/runtime_test.go index 83a07d04d9..f56d847039 100644 --- a/pkg/util/runtime/runtime_test.go +++ b/pkg/util/runtime/runtime_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/selinux/doc.go b/pkg/util/selinux/doc.go index 9b99015044..c379043875 100644 --- a/pkg/util/selinux/doc.go +++ b/pkg/util/selinux/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/selinux/selinux.go b/pkg/util/selinux/selinux.go index 4343b78f57..c8c42afbd8 100644 --- a/pkg/util/selinux/selinux.go +++ b/pkg/util/selinux/selinux.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/selinux/selinux_linux.go b/pkg/util/selinux/selinux_linux.go index 4a6214ad10..f3c720561a 100644 --- a/pkg/util/selinux/selinux_linux.go +++ b/pkg/util/selinux/selinux_linux.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/selinux/selinux_unsupported.go b/pkg/util/selinux/selinux_unsupported.go index 4fc7496bfd..22a2f1a94b 100644 --- a/pkg/util/selinux/selinux_unsupported.go +++ b/pkg/util/selinux/selinux_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/sets/byte.go b/pkg/util/sets/byte.go index fe1068cdfe..45f5d4f67f 100644 --- a/pkg/util/sets/byte.go +++ b/pkg/util/sets/byte.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/sets/doc.go b/pkg/util/sets/doc.go index a27cb62f59..c5e541621f 100644 --- a/pkg/util/sets/doc.go +++ b/pkg/util/sets/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/sets/empty.go b/pkg/util/sets/empty.go index 73ac74c14f..5654edd773 100644 --- a/pkg/util/sets/empty.go +++ b/pkg/util/sets/empty.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/sets/int.go b/pkg/util/sets/int.go index e7a2b5db18..4b8c331b53 100644 --- a/pkg/util/sets/int.go +++ b/pkg/util/sets/int.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/sets/int64.go b/pkg/util/sets/int64.go index f31da77501..b6a97e70d8 100644 --- a/pkg/util/sets/int64.go +++ b/pkg/util/sets/int64.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/sets/set_test.go b/pkg/util/sets/set_test.go index 69415000a2..df722ec271 100644 --- a/pkg/util/sets/set_test.go +++ b/pkg/util/sets/set_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/sets/string.go b/pkg/util/sets/string.go index 572aa91576..2094b3205e 100644 --- a/pkg/util/sets/string.go +++ b/pkg/util/sets/string.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/sets/types/types.go b/pkg/util/sets/types/types.go index e0ea0514b4..6759b8ca88 100644 --- a/pkg/util/sets/types/types.go +++ b/pkg/util/sets/types/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/slice/slice.go b/pkg/util/slice/slice.go index f32dbabcf4..2e1d7ccb53 100644 --- a/pkg/util/slice/slice.go +++ b/pkg/util/slice/slice.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/slice/slice_test.go b/pkg/util/slice/slice_test.go index bdfee47cb8..7d74437df1 100644 --- a/pkg/util/slice/slice_test.go +++ b/pkg/util/slice/slice_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/strategicpatch/patch.go b/pkg/util/strategicpatch/patch.go index 676713bc86..9f1e9c5ffc 100644 --- a/pkg/util/strategicpatch/patch.go +++ b/pkg/util/strategicpatch/patch.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/strategicpatch/patch_test.go b/pkg/util/strategicpatch/patch_test.go index ec10fd43dc..c8ec0a0520 100644 --- a/pkg/util/strategicpatch/patch_test.go +++ b/pkg/util/strategicpatch/patch_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/string_flag.go b/pkg/util/string_flag.go index 4208bf5f6d..9d6a00a159 100644 --- a/pkg/util/string_flag.go +++ b/pkg/util/string_flag.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/strings/escape.go b/pkg/util/strings/escape.go index d00207bf87..ba7f8504b4 100644 --- a/pkg/util/strings/escape.go +++ b/pkg/util/strings/escape.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/strings/strings.go b/pkg/util/strings/strings.go index db5abb45ee..2bcb174afc 100644 --- a/pkg/util/strings/strings.go +++ b/pkg/util/strings/strings.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/strings/strings_test.go b/pkg/util/strings/strings_test.go index eefd0e68b9..0e87fee754 100644 --- a/pkg/util/strings/strings_test.go +++ b/pkg/util/strings/strings_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/sysctl/sysctl.go b/pkg/util/sysctl/sysctl.go index 9398a7ac31..bbf52736c1 100644 --- a/pkg/util/sysctl/sysctl.go +++ b/pkg/util/sysctl/sysctl.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/system/system_utils.go b/pkg/util/system/system_utils.go index 57576abebd..e0998872bf 100644 --- a/pkg/util/system/system_utils.go +++ b/pkg/util/system/system_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/template.go b/pkg/util/template.go index 1f9668533b..d09d7dc867 100644 --- a/pkg/util/template.go +++ b/pkg/util/template.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/template_test.go b/pkg/util/template_test.go index f644df55ef..8f075d1adb 100644 --- a/pkg/util/template_test.go +++ b/pkg/util/template_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/term/term.go b/pkg/util/term/term.go index e8727d4476..68f99774df 100644 --- a/pkg/util/term/term.go +++ b/pkg/util/term/term.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/testing/fake_handler.go b/pkg/util/testing/fake_handler.go index d25b2c25c7..64a357fd79 100644 --- a/pkg/util/testing/fake_handler.go +++ b/pkg/util/testing/fake_handler.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/testing/fake_handler_test.go b/pkg/util/testing/fake_handler_test.go index bd0d28429d..0d2c3e42f9 100644 --- a/pkg/util/testing/fake_handler_test.go +++ b/pkg/util/testing/fake_handler_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/testing/tmpdir.go b/pkg/util/testing/tmpdir.go index 8ad6733e66..3b2d885fce 100644 --- a/pkg/util/testing/tmpdir.go +++ b/pkg/util/testing/tmpdir.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/threading/deadlock-detector.go b/pkg/util/threading/deadlock-detector.go index cb9afc1882..535dd906bc 100644 --- a/pkg/util/threading/deadlock-detector.go +++ b/pkg/util/threading/deadlock-detector.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/threading/deadlock-detector_test.go b/pkg/util/threading/deadlock-detector_test.go index 5f6b389139..51444aa0b2 100644 --- a/pkg/util/threading/deadlock-detector_test.go +++ b/pkg/util/threading/deadlock-detector_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/trace.go b/pkg/util/trace.go index ed9da94b32..fe93db8df6 100644 --- a/pkg/util/trace.go +++ b/pkg/util/trace.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/umask.go b/pkg/util/umask.go index 48311f4e33..35ccce50bd 100644 --- a/pkg/util/umask.go +++ b/pkg/util/umask.go @@ -1,7 +1,7 @@ // +build !windows /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/umask_windows.go b/pkg/util/umask_windows.go index 0f97c26edb..8c1b2cbc7d 100644 --- a/pkg/util/umask_windows.go +++ b/pkg/util/umask_windows.go @@ -1,7 +1,7 @@ // +build windows /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/util.go b/pkg/util/util.go index 4826a448b1..7a94149578 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/util_test.go b/pkg/util/util_test.go index a79fe291b4..36a6641dad 100644 --- a/pkg/util/util_test.go +++ b/pkg/util/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/uuid.go b/pkg/util/uuid.go index 7e1396f128..23abe11569 100644 --- a/pkg/util/uuid.go +++ b/pkg/util/uuid.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/validation/field/errors.go b/pkg/util/validation/field/errors.go index 203f7cc8f5..b4a6c5cd59 100644 --- a/pkg/util/validation/field/errors.go +++ b/pkg/util/validation/field/errors.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/validation/field/errors_test.go b/pkg/util/validation/field/errors_test.go index 49c7638014..da8baa37e3 100644 --- a/pkg/util/validation/field/errors_test.go +++ b/pkg/util/validation/field/errors_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/validation/field/path.go b/pkg/util/validation/field/path.go index 30ff5a8f78..2efc8eec76 100644 --- a/pkg/util/validation/field/path.go +++ b/pkg/util/validation/field/path.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/validation/field/path_test.go b/pkg/util/validation/field/path_test.go index 42a16e4bdc..d2f568c36f 100644 --- a/pkg/util/validation/field/path_test.go +++ b/pkg/util/validation/field/path_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/validation/validation.go b/pkg/util/validation/validation.go index 9361a4bfac..135c5e9082 100644 --- a/pkg/util/validation/validation.go +++ b/pkg/util/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/validation/validation_test.go b/pkg/util/validation/validation_test.go index ace4335b8b..6af22f5b1d 100644 --- a/pkg/util/validation/validation_test.go +++ b/pkg/util/validation/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/wait/doc.go b/pkg/util/wait/doc.go index 240397a221..ff89dc170e 100644 --- a/pkg/util/wait/doc.go +++ b/pkg/util/wait/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/wait/wait.go b/pkg/util/wait/wait.go index b56560e75c..bd4543eb1d 100644 --- a/pkg/util/wait/wait.go +++ b/pkg/util/wait/wait.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/wait/wait_test.go b/pkg/util/wait/wait_test.go index da532cf325..4a13634fea 100644 --- a/pkg/util/wait/wait_test.go +++ b/pkg/util/wait/wait_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/workqueue/default_rate_limiters.go b/pkg/util/workqueue/default_rate_limiters.go index 6ca484b62c..cf3c4d94ea 100644 --- a/pkg/util/workqueue/default_rate_limiters.go +++ b/pkg/util/workqueue/default_rate_limiters.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/workqueue/default_rate_limiters_test.go b/pkg/util/workqueue/default_rate_limiters_test.go index 8a96fb04e2..3ce3144ff6 100644 --- a/pkg/util/workqueue/default_rate_limiters_test.go +++ b/pkg/util/workqueue/default_rate_limiters_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/workqueue/delaying_queue.go b/pkg/util/workqueue/delaying_queue.go index 429d15c4a1..1bffccb95c 100644 --- a/pkg/util/workqueue/delaying_queue.go +++ b/pkg/util/workqueue/delaying_queue.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/workqueue/delaying_queue_test.go b/pkg/util/workqueue/delaying_queue_test.go index 5a3f9db97c..696a8bc241 100644 --- a/pkg/util/workqueue/delaying_queue_test.go +++ b/pkg/util/workqueue/delaying_queue_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/workqueue/doc.go b/pkg/util/workqueue/doc.go index d53d36d9f2..2a00c74ac5 100644 --- a/pkg/util/workqueue/doc.go +++ b/pkg/util/workqueue/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/workqueue/parallelizer.go b/pkg/util/workqueue/parallelizer.go index 9b773d5388..a9305935bb 100644 --- a/pkg/util/workqueue/parallelizer.go +++ b/pkg/util/workqueue/parallelizer.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/workqueue/queue.go b/pkg/util/workqueue/queue.go index 40f2ba2fa7..63fdd81910 100644 --- a/pkg/util/workqueue/queue.go +++ b/pkg/util/workqueue/queue.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/workqueue/queue_test.go b/pkg/util/workqueue/queue_test.go index 14f26c36bb..625f4545fd 100644 --- a/pkg/util/workqueue/queue_test.go +++ b/pkg/util/workqueue/queue_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/workqueue/rate_limitting_queue.go b/pkg/util/workqueue/rate_limitting_queue.go index 272ba52d9e..a4f86eb10a 100644 --- a/pkg/util/workqueue/rate_limitting_queue.go +++ b/pkg/util/workqueue/rate_limitting_queue.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/workqueue/rate_limitting_queue_test.go b/pkg/util/workqueue/rate_limitting_queue_test.go index deca140a43..c6a2ef930b 100644 --- a/pkg/util/workqueue/rate_limitting_queue_test.go +++ b/pkg/util/workqueue/rate_limitting_queue_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/wsstream/conn.go b/pkg/util/wsstream/conn.go index 84e6196716..eb0b4b28bb 100644 --- a/pkg/util/wsstream/conn.go +++ b/pkg/util/wsstream/conn.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/wsstream/conn_test.go b/pkg/util/wsstream/conn_test.go index c77d037b05..88c84bf162 100644 --- a/pkg/util/wsstream/conn_test.go +++ b/pkg/util/wsstream/conn_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/wsstream/doc.go b/pkg/util/wsstream/doc.go index e94e8b271c..e5770acfb0 100644 --- a/pkg/util/wsstream/doc.go +++ b/pkg/util/wsstream/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/wsstream/stream.go b/pkg/util/wsstream/stream.go index 034c1216e0..d16d99817e 100644 --- a/pkg/util/wsstream/stream.go +++ b/pkg/util/wsstream/stream.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/wsstream/stream_test.go b/pkg/util/wsstream/stream_test.go index 365a39ae47..aa37b2ddfe 100644 --- a/pkg/util/wsstream/stream_test.go +++ b/pkg/util/wsstream/stream_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/yaml/decoder.go b/pkg/util/yaml/decoder.go index a48a6ce864..6a9f05a587 100644 --- a/pkg/util/yaml/decoder.go +++ b/pkg/util/yaml/decoder.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/util/yaml/decoder_test.go b/pkg/util/yaml/decoder_test.go index 047ea36036..6d66d54e60 100644 --- a/pkg/util/yaml/decoder_test.go +++ b/pkg/util/yaml/decoder_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/version/base.go b/pkg/version/base.go index fd6404775c..475bd0660c 100644 --- a/pkg/version/base.go +++ b/pkg/version/base.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/version/doc.go b/pkg/version/doc.go index c0397829d4..ccedec76f6 100644 --- a/pkg/version/doc.go +++ b/pkg/version/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/version/semver.go b/pkg/version/semver.go index 1b5a845ad2..1f4067e217 100644 --- a/pkg/version/semver.go +++ b/pkg/version/semver.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/version/semver_test.go b/pkg/version/semver_test.go index 4f4de75891..1b17e1758b 100644 --- a/pkg/version/semver_test.go +++ b/pkg/version/semver_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/version/verflag/verflag.go b/pkg/version/verflag/verflag.go index eed730ba4e..d1f08da069 100644 --- a/pkg/version/verflag/verflag.go +++ b/pkg/version/verflag/verflag.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/version/version.go b/pkg/version/version.go index b8ac0d6c35..1e93132177 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/aws_ebs/attacher.go b/pkg/volume/aws_ebs/attacher.go index 9b254655e6..e4a710e08f 100644 --- a/pkg/volume/aws_ebs/attacher.go +++ b/pkg/volume/aws_ebs/attacher.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/aws_ebs/attacher_test.go b/pkg/volume/aws_ebs/attacher_test.go index 49a12fe2e3..2fc4048a50 100644 --- a/pkg/volume/aws_ebs/attacher_test.go +++ b/pkg/volume/aws_ebs/attacher_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/aws_ebs/aws_ebs.go b/pkg/volume/aws_ebs/aws_ebs.go index 43ba109794..01c54dca55 100644 --- a/pkg/volume/aws_ebs/aws_ebs.go +++ b/pkg/volume/aws_ebs/aws_ebs.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/aws_ebs/aws_ebs_test.go b/pkg/volume/aws_ebs/aws_ebs_test.go index 405a34692e..212d8504d1 100644 --- a/pkg/volume/aws_ebs/aws_ebs_test.go +++ b/pkg/volume/aws_ebs/aws_ebs_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/aws_ebs/aws_util.go b/pkg/volume/aws_ebs/aws_util.go index 76ebe72adc..f79fc6edf8 100644 --- a/pkg/volume/aws_ebs/aws_util.go +++ b/pkg/volume/aws_ebs/aws_util.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/aws_ebs/doc.go b/pkg/volume/aws_ebs/doc.go index 09c41729f2..8632d39c4e 100644 --- a/pkg/volume/aws_ebs/doc.go +++ b/pkg/volume/aws_ebs/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/azure_file/azure_file.go b/pkg/volume/azure_file/azure_file.go index 24e5ce27a5..9201abb16a 100644 --- a/pkg/volume/azure_file/azure_file.go +++ b/pkg/volume/azure_file/azure_file.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/azure_file/azure_file_test.go b/pkg/volume/azure_file/azure_file_test.go index b041a8a919..eb62919a6c 100644 --- a/pkg/volume/azure_file/azure_file_test.go +++ b/pkg/volume/azure_file/azure_file_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/azure_file/azure_util.go b/pkg/volume/azure_file/azure_util.go index 5d068c2c84..12ee098a09 100644 --- a/pkg/volume/azure_file/azure_util.go +++ b/pkg/volume/azure_file/azure_util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/azure_file/doc.go b/pkg/volume/azure_file/doc.go index 119e457901..91fe54372e 100644 --- a/pkg/volume/azure_file/doc.go +++ b/pkg/volume/azure_file/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/cephfs/cephfs.go b/pkg/volume/cephfs/cephfs.go index 9fe57b0b74..18574ee9ae 100644 --- a/pkg/volume/cephfs/cephfs.go +++ b/pkg/volume/cephfs/cephfs.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/cephfs/cephfs_test.go b/pkg/volume/cephfs/cephfs_test.go index 1eccea4d87..7ceb499caf 100644 --- a/pkg/volume/cephfs/cephfs_test.go +++ b/pkg/volume/cephfs/cephfs_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/cephfs/doc.go b/pkg/volume/cephfs/doc.go index 7ce1ec7467..0805915467 100644 --- a/pkg/volume/cephfs/doc.go +++ b/pkg/volume/cephfs/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/cinder/attacher.go b/pkg/volume/cinder/attacher.go index e3f031c672..de294689df 100644 --- a/pkg/volume/cinder/attacher.go +++ b/pkg/volume/cinder/attacher.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/cinder/attacher_test.go b/pkg/volume/cinder/attacher_test.go index cf146b029b..dbc19273a8 100644 --- a/pkg/volume/cinder/attacher_test.go +++ b/pkg/volume/cinder/attacher_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/cinder/cinder.go b/pkg/volume/cinder/cinder.go index 1f3e32b15d..9d314bc13e 100644 --- a/pkg/volume/cinder/cinder.go +++ b/pkg/volume/cinder/cinder.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/cinder/cinder_test.go b/pkg/volume/cinder/cinder_test.go index 89f43ebabb..66217ac205 100644 --- a/pkg/volume/cinder/cinder_test.go +++ b/pkg/volume/cinder/cinder_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/cinder/cinder_util.go b/pkg/volume/cinder/cinder_util.go index 8f513cb6a1..afd22d2cb3 100644 --- a/pkg/volume/cinder/cinder_util.go +++ b/pkg/volume/cinder/cinder_util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/cinder/doc.go b/pkg/volume/cinder/doc.go index a3c5da052f..08559bc147 100644 --- a/pkg/volume/cinder/doc.go +++ b/pkg/volume/cinder/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/configmap/configmap.go b/pkg/volume/configmap/configmap.go index bd6c3407ec..cd5995e55f 100644 --- a/pkg/volume/configmap/configmap.go +++ b/pkg/volume/configmap/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/configmap/configmap_test.go b/pkg/volume/configmap/configmap_test.go index 5078fc3eb9..924cc63140 100644 --- a/pkg/volume/configmap/configmap_test.go +++ b/pkg/volume/configmap/configmap_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/configmap/doc.go b/pkg/volume/configmap/doc.go index 7d5c6c8730..565a192604 100644 --- a/pkg/volume/configmap/doc.go +++ b/pkg/volume/configmap/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/doc.go b/pkg/volume/doc.go index e75b8a3142..df39f32913 100644 --- a/pkg/volume/doc.go +++ b/pkg/volume/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/downwardapi/downwardapi.go b/pkg/volume/downwardapi/downwardapi.go index 6b5fbf8ab0..7c5f3db788 100644 --- a/pkg/volume/downwardapi/downwardapi.go +++ b/pkg/volume/downwardapi/downwardapi.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/downwardapi/downwardapi_test.go b/pkg/volume/downwardapi/downwardapi_test.go index c3ba680ad3..931c0c156d 100644 --- a/pkg/volume/downwardapi/downwardapi_test.go +++ b/pkg/volume/downwardapi/downwardapi_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/empty_dir/doc.go b/pkg/volume/empty_dir/doc.go index 143ed0ec35..10d7abd212 100644 --- a/pkg/volume/empty_dir/doc.go +++ b/pkg/volume/empty_dir/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/empty_dir/empty_dir.go b/pkg/volume/empty_dir/empty_dir.go index 04f5bfa64b..0653b2556f 100644 --- a/pkg/volume/empty_dir/empty_dir.go +++ b/pkg/volume/empty_dir/empty_dir.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/empty_dir/empty_dir_linux.go b/pkg/volume/empty_dir/empty_dir_linux.go index d1ecf2b934..41e474f9d7 100644 --- a/pkg/volume/empty_dir/empty_dir_linux.go +++ b/pkg/volume/empty_dir/empty_dir_linux.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/empty_dir/empty_dir_test.go b/pkg/volume/empty_dir/empty_dir_test.go index fa1bf2cdc3..1d56465b26 100644 --- a/pkg/volume/empty_dir/empty_dir_test.go +++ b/pkg/volume/empty_dir/empty_dir_test.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/empty_dir/empty_dir_unsupported.go b/pkg/volume/empty_dir/empty_dir_unsupported.go index c73a8b777d..32ab046f1b 100644 --- a/pkg/volume/empty_dir/empty_dir_unsupported.go +++ b/pkg/volume/empty_dir/empty_dir_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/fc/disk_manager.go b/pkg/volume/fc/disk_manager.go index 8221f6b62d..7a0e210fb7 100644 --- a/pkg/volume/fc/disk_manager.go +++ b/pkg/volume/fc/disk_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/fc/doc.go b/pkg/volume/fc/doc.go index 454597efd5..3f23662adb 100644 --- a/pkg/volume/fc/doc.go +++ b/pkg/volume/fc/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/fc/fc.go b/pkg/volume/fc/fc.go index 6ebd645323..96e8518794 100644 --- a/pkg/volume/fc/fc.go +++ b/pkg/volume/fc/fc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/fc/fc_test.go b/pkg/volume/fc/fc_test.go index 91361d1501..a8341a3636 100644 --- a/pkg/volume/fc/fc_test.go +++ b/pkg/volume/fc/fc_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/fc/fc_util.go b/pkg/volume/fc/fc_util.go index 3da5396687..ab3c5ca45f 100644 --- a/pkg/volume/fc/fc_util.go +++ b/pkg/volume/fc/fc_util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/fc/fc_util_test.go b/pkg/volume/fc/fc_util_test.go index dd47cf6ee7..e6ae7a6f2c 100644 --- a/pkg/volume/fc/fc_util_test.go +++ b/pkg/volume/fc/fc_util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/flexvolume/flexvolume.go b/pkg/volume/flexvolume/flexvolume.go index 1fa75c742a..8c4d13ab9c 100644 --- a/pkg/volume/flexvolume/flexvolume.go +++ b/pkg/volume/flexvolume/flexvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/flexvolume/flexvolume_test.go b/pkg/volume/flexvolume/flexvolume_test.go index 767dd0bfac..d22bee2ab7 100644 --- a/pkg/volume/flexvolume/flexvolume_test.go +++ b/pkg/volume/flexvolume/flexvolume_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/flexvolume/flexvolume_util.go b/pkg/volume/flexvolume/flexvolume_util.go index 094a107fbf..80a490a01d 100644 --- a/pkg/volume/flexvolume/flexvolume_util.go +++ b/pkg/volume/flexvolume/flexvolume_util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/flocker/doc.go b/pkg/volume/flocker/doc.go index e07a0d519a..440e74ed14 100644 --- a/pkg/volume/flocker/doc.go +++ b/pkg/volume/flocker/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/flocker/plugin.go b/pkg/volume/flocker/plugin.go index 6f31c304a6..b23ad38502 100644 --- a/pkg/volume/flocker/plugin.go +++ b/pkg/volume/flocker/plugin.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/flocker/plugin_test.go b/pkg/volume/flocker/plugin_test.go index 1597b74744..3b0f4f35f4 100644 --- a/pkg/volume/flocker/plugin_test.go +++ b/pkg/volume/flocker/plugin_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/gce_pd/attacher.go b/pkg/volume/gce_pd/attacher.go index a84cf9ed8c..c60a02aeae 100644 --- a/pkg/volume/gce_pd/attacher.go +++ b/pkg/volume/gce_pd/attacher.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/gce_pd/attacher_test.go b/pkg/volume/gce_pd/attacher_test.go index c3c4b596b4..fc3283f68a 100644 --- a/pkg/volume/gce_pd/attacher_test.go +++ b/pkg/volume/gce_pd/attacher_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/gce_pd/doc.go b/pkg/volume/gce_pd/doc.go index 7d9f99f010..39b5db1d9a 100644 --- a/pkg/volume/gce_pd/doc.go +++ b/pkg/volume/gce_pd/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/gce_pd/gce_pd.go b/pkg/volume/gce_pd/gce_pd.go index b165f34e01..aba50f2a4e 100644 --- a/pkg/volume/gce_pd/gce_pd.go +++ b/pkg/volume/gce_pd/gce_pd.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/gce_pd/gce_pd_test.go b/pkg/volume/gce_pd/gce_pd_test.go index e0bf8e6598..e5ca63ff4f 100644 --- a/pkg/volume/gce_pd/gce_pd_test.go +++ b/pkg/volume/gce_pd/gce_pd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/gce_pd/gce_util.go b/pkg/volume/gce_pd/gce_util.go index 717b9b0df1..ebc2f989dd 100644 --- a/pkg/volume/gce_pd/gce_util.go +++ b/pkg/volume/gce_pd/gce_util.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/git_repo/doc.go b/pkg/volume/git_repo/doc.go index 07ec8382a0..349182085e 100644 --- a/pkg/volume/git_repo/doc.go +++ b/pkg/volume/git_repo/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/git_repo/git_repo.go b/pkg/volume/git_repo/git_repo.go index 3662222a01..09d9300dac 100644 --- a/pkg/volume/git_repo/git_repo.go +++ b/pkg/volume/git_repo/git_repo.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/git_repo/git_repo_test.go b/pkg/volume/git_repo/git_repo_test.go index fe52422c02..8ef0be9acb 100644 --- a/pkg/volume/git_repo/git_repo_test.go +++ b/pkg/volume/git_repo/git_repo_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/glusterfs/doc.go b/pkg/volume/glusterfs/doc.go index 7b910e5927..8184f296a4 100644 --- a/pkg/volume/glusterfs/doc.go +++ b/pkg/volume/glusterfs/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/glusterfs/glusterfs.go b/pkg/volume/glusterfs/glusterfs.go index 5983290c5b..bbaea800af 100644 --- a/pkg/volume/glusterfs/glusterfs.go +++ b/pkg/volume/glusterfs/glusterfs.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/glusterfs/glusterfs_test.go b/pkg/volume/glusterfs/glusterfs_test.go index 76939ba365..4cb3f28079 100644 --- a/pkg/volume/glusterfs/glusterfs_test.go +++ b/pkg/volume/glusterfs/glusterfs_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/glusterfs/glusterfs_util.go b/pkg/volume/glusterfs/glusterfs_util.go index c5872dac8f..40cbd61ab6 100644 --- a/pkg/volume/glusterfs/glusterfs_util.go +++ b/pkg/volume/glusterfs/glusterfs_util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/host_path/doc.go b/pkg/volume/host_path/doc.go index 76ab89d0a3..94f5690f21 100644 --- a/pkg/volume/host_path/doc.go +++ b/pkg/volume/host_path/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/host_path/host_path.go b/pkg/volume/host_path/host_path.go index 7f0b26a4c2..93d20d62e4 100644 --- a/pkg/volume/host_path/host_path.go +++ b/pkg/volume/host_path/host_path.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/host_path/host_path_test.go b/pkg/volume/host_path/host_path_test.go index 77946b0201..3e6b40945a 100644 --- a/pkg/volume/host_path/host_path_test.go +++ b/pkg/volume/host_path/host_path_test.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/iscsi/disk_manager.go b/pkg/volume/iscsi/disk_manager.go index bd34ca9c98..960f6c0826 100644 --- a/pkg/volume/iscsi/disk_manager.go +++ b/pkg/volume/iscsi/disk_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/iscsi/doc.go b/pkg/volume/iscsi/doc.go index d9d146a108..e0588b2cf6 100644 --- a/pkg/volume/iscsi/doc.go +++ b/pkg/volume/iscsi/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/iscsi/iscsi.go b/pkg/volume/iscsi/iscsi.go index 3f5ab03d2d..9ca787c183 100644 --- a/pkg/volume/iscsi/iscsi.go +++ b/pkg/volume/iscsi/iscsi.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/iscsi/iscsi_test.go b/pkg/volume/iscsi/iscsi_test.go index 2dd5a6126d..fda3e8aab9 100644 --- a/pkg/volume/iscsi/iscsi_test.go +++ b/pkg/volume/iscsi/iscsi_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/iscsi/iscsi_util.go b/pkg/volume/iscsi/iscsi_util.go index c9c92beb40..bdeec6c0df 100644 --- a/pkg/volume/iscsi/iscsi_util.go +++ b/pkg/volume/iscsi/iscsi_util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/iscsi/iscsi_util_test.go b/pkg/volume/iscsi/iscsi_util_test.go index 1244004868..7030947431 100644 --- a/pkg/volume/iscsi/iscsi_util_test.go +++ b/pkg/volume/iscsi/iscsi_util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/metrics_cached.go b/pkg/volume/metrics_cached.go index cec488dd0f..ac0dc9b7a5 100644 --- a/pkg/volume/metrics_cached.go +++ b/pkg/volume/metrics_cached.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/metrics_du.go b/pkg/volume/metrics_du.go index 843cfd65df..95d24caecc 100644 --- a/pkg/volume/metrics_du.go +++ b/pkg/volume/metrics_du.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/metrics_du_test.go b/pkg/volume/metrics_du_test.go index 3610e6a022..a866897c3d 100644 --- a/pkg/volume/metrics_du_test.go +++ b/pkg/volume/metrics_du_test.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/metrics_nil.go b/pkg/volume/metrics_nil.go index 1c6626c17a..38b81fcd74 100644 --- a/pkg/volume/metrics_nil.go +++ b/pkg/volume/metrics_nil.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/metrics_nil_test.go b/pkg/volume/metrics_nil_test.go index 9f5bb61ae1..e6a25d1ff6 100644 --- a/pkg/volume/metrics_nil_test.go +++ b/pkg/volume/metrics_nil_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/metrics_statfs.go b/pkg/volume/metrics_statfs.go index 856c695475..d98d36b81f 100644 --- a/pkg/volume/metrics_statfs.go +++ b/pkg/volume/metrics_statfs.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/nfs/doc.go b/pkg/volume/nfs/doc.go index a735737346..df5a513c7f 100644 --- a/pkg/volume/nfs/doc.go +++ b/pkg/volume/nfs/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/nfs/nfs.go b/pkg/volume/nfs/nfs.go index 2cd8bdcc21..463addc6b7 100644 --- a/pkg/volume/nfs/nfs.go +++ b/pkg/volume/nfs/nfs.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/nfs/nfs_test.go b/pkg/volume/nfs/nfs_test.go index b5175f6b61..b140e406c3 100644 --- a/pkg/volume/nfs/nfs_test.go +++ b/pkg/volume/nfs/nfs_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/plugins.go b/pkg/volume/plugins.go index 6a58b68812..669aff661b 100644 --- a/pkg/volume/plugins.go +++ b/pkg/volume/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/plugins_test.go b/pkg/volume/plugins_test.go index 4e264705d4..578e0e2785 100644 --- a/pkg/volume/plugins_test.go +++ b/pkg/volume/plugins_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/rbd/disk_manager.go b/pkg/volume/rbd/disk_manager.go index d03b831561..b23aa7984f 100644 --- a/pkg/volume/rbd/disk_manager.go +++ b/pkg/volume/rbd/disk_manager.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/rbd/doc.go b/pkg/volume/rbd/doc.go index e9220fb892..66f6222259 100644 --- a/pkg/volume/rbd/doc.go +++ b/pkg/volume/rbd/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/rbd/rbd.go b/pkg/volume/rbd/rbd.go index 790e9482b4..239c981b89 100644 --- a/pkg/volume/rbd/rbd.go +++ b/pkg/volume/rbd/rbd.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/rbd/rbd_test.go b/pkg/volume/rbd/rbd_test.go index ac2d9b1de7..9bc9119dd5 100644 --- a/pkg/volume/rbd/rbd_test.go +++ b/pkg/volume/rbd/rbd_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/rbd/rbd_util.go b/pkg/volume/rbd/rbd_util.go index 133eaea967..1cfc42b5d7 100644 --- a/pkg/volume/rbd/rbd_util.go +++ b/pkg/volume/rbd/rbd_util.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/secret/doc.go b/pkg/volume/secret/doc.go index 99b0964758..3e0ec33d2f 100644 --- a/pkg/volume/secret/doc.go +++ b/pkg/volume/secret/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/secret/secret.go b/pkg/volume/secret/secret.go index e99229ba49..fa041f7734 100644 --- a/pkg/volume/secret/secret.go +++ b/pkg/volume/secret/secret.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/secret/secret_test.go b/pkg/volume/secret/secret_test.go index 645d1e08e5..eb8aa6676b 100644 --- a/pkg/volume/secret/secret_test.go +++ b/pkg/volume/secret/secret_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/testing/mock_volume.go b/pkg/volume/testing/mock_volume.go index ce04d54b55..0304e951ec 100644 --- a/pkg/volume/testing/mock_volume.go +++ b/pkg/volume/testing/mock_volume.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/testing/testing.go b/pkg/volume/testing/testing.go index 1a537181af..646c7b02a1 100644 --- a/pkg/volume/testing/testing.go +++ b/pkg/volume/testing/testing.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util.go b/pkg/volume/util.go index 9c2b352b93..b36632c9f5 100644 --- a/pkg/volume/util.go +++ b/pkg/volume/util.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/atomic_writer.go b/pkg/volume/util/atomic_writer.go index 4d7a4d2671..542378a85d 100644 --- a/pkg/volume/util/atomic_writer.go +++ b/pkg/volume/util/atomic_writer.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/atomic_writer_test.go b/pkg/volume/util/atomic_writer_test.go index ab741ebe5a..dafe86fc87 100644 --- a/pkg/volume/util/atomic_writer_test.go +++ b/pkg/volume/util/atomic_writer_test.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/device_util.go b/pkg/volume/util/device_util.go index 5f18806158..9098d7b859 100644 --- a/pkg/volume/util/device_util.go +++ b/pkg/volume/util/device_util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/device_util_linux.go b/pkg/volume/util/device_util_linux.go index 8933087cc6..0d9851140f 100644 --- a/pkg/volume/util/device_util_linux.go +++ b/pkg/volume/util/device_util_linux.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/device_util_linux_test.go b/pkg/volume/util/device_util_linux_test.go index 83bc8f1a71..5d76c61464 100644 --- a/pkg/volume/util/device_util_linux_test.go +++ b/pkg/volume/util/device_util_linux_test.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/device_util_unsupported.go b/pkg/volume/util/device_util_unsupported.go index dbc03874a5..6afb1f1391 100644 --- a/pkg/volume/util/device_util_unsupported.go +++ b/pkg/volume/util/device_util_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/doc.go b/pkg/volume/util/doc.go index 2240950397..82c976e7df 100644 --- a/pkg/volume/util/doc.go +++ b/pkg/volume/util/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/fs.go b/pkg/volume/util/fs.go index b200eed0c9..be8773bbd6 100644 --- a/pkg/volume/util/fs.go +++ b/pkg/volume/util/fs.go @@ -1,7 +1,7 @@ // +build linux darwin /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/fs_unsupported.go b/pkg/volume/util/fs_unsupported.go index 1349523ee7..3df7ef2da5 100644 --- a/pkg/volume/util/fs_unsupported.go +++ b/pkg/volume/util/fs_unsupported.go @@ -1,7 +1,7 @@ // +build !linux,!darwin /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/io_util.go b/pkg/volume/util/io_util.go index 309a408f5c..e1f30f5c32 100644 --- a/pkg/volume/util/io_util.go +++ b/pkg/volume/util/io_util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/operationexecutor/operation_executor.go b/pkg/volume/util/operationexecutor/operation_executor.go index 30eebab13e..c18f83c0c6 100644 --- a/pkg/volume/util/operationexecutor/operation_executor.go +++ b/pkg/volume/util/operationexecutor/operation_executor.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/types/types.go b/pkg/volume/util/types/types.go index 219d9dd4ec..dfbba42496 100644 --- a/pkg/volume/util/types/types.go +++ b/pkg/volume/util/types/types.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/util.go b/pkg/volume/util/util.go index 6b85dec4c0..ca16b12d3d 100644 --- a/pkg/volume/util/util.go +++ b/pkg/volume/util/util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util/volumehelper/volumehelper.go b/pkg/volume/util/volumehelper/volumehelper.go index 9ddc363735..fd7fa9c518 100644 --- a/pkg/volume/util/volumehelper/volumehelper.go +++ b/pkg/volume/util/volumehelper/volumehelper.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/util_test.go b/pkg/volume/util_test.go index aab1be192e..e992705b24 100644 --- a/pkg/volume/util_test.go +++ b/pkg/volume/util_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/volume.go b/pkg/volume/volume.go index 4070770ace..af60cf1351 100644 --- a/pkg/volume/volume.go +++ b/pkg/volume/volume.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/volume_linux.go b/pkg/volume/volume_linux.go index 07bad5969c..cd8b6b2b82 100644 --- a/pkg/volume/volume_linux.go +++ b/pkg/volume/volume_linux.go @@ -1,7 +1,7 @@ // +build linux /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/volume_unsupported.go b/pkg/volume/volume_unsupported.go index fdd52df912..45a6cc5ca7 100644 --- a/pkg/volume/volume_unsupported.go +++ b/pkg/volume/volume_unsupported.go @@ -1,7 +1,7 @@ // +build !linux /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/vsphere_volume/vsphere_volume.go b/pkg/volume/vsphere_volume/vsphere_volume.go index ecf983547a..a640342a75 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume.go +++ b/pkg/volume/vsphere_volume/vsphere_volume.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/vsphere_volume/vsphere_volume_test.go b/pkg/volume/vsphere_volume/vsphere_volume_test.go index c2f470fb74..eed3dacf0c 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume_test.go +++ b/pkg/volume/vsphere_volume/vsphere_volume_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/volume/vsphere_volume/vsphere_volume_util.go b/pkg/volume/vsphere_volume/vsphere_volume_util.go index f54d10d586..e0546ee6e2 100644 --- a/pkg/volume/vsphere_volume/vsphere_volume_util.go +++ b/pkg/volume/vsphere_volume/vsphere_volume_util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/doc.go b/pkg/watch/doc.go index fd9b437e11..5fde5e7427 100644 --- a/pkg/watch/doc.go +++ b/pkg/watch/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/filter.go b/pkg/watch/filter.go index 1eff5b9496..3ca27f22c5 100644 --- a/pkg/watch/filter.go +++ b/pkg/watch/filter.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/filter_test.go b/pkg/watch/filter_test.go index ab5dc19258..63cea87883 100644 --- a/pkg/watch/filter_test.go +++ b/pkg/watch/filter_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/json/doc.go b/pkg/watch/json/doc.go index 32ce7c098d..e9fb0fce1f 100644 --- a/pkg/watch/json/doc.go +++ b/pkg/watch/json/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/json/types.go b/pkg/watch/json/types.go index d1b638b52f..b1e966b02c 100644 --- a/pkg/watch/json/types.go +++ b/pkg/watch/json/types.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/mux.go b/pkg/watch/mux.go index 700c26bcad..ec6de050e5 100644 --- a/pkg/watch/mux.go +++ b/pkg/watch/mux.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/mux_test.go b/pkg/watch/mux_test.go index 23976c0659..a503938e42 100644 --- a/pkg/watch/mux_test.go +++ b/pkg/watch/mux_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/streamwatcher.go b/pkg/watch/streamwatcher.go index 2802a9e01f..26cf61d052 100644 --- a/pkg/watch/streamwatcher.go +++ b/pkg/watch/streamwatcher.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/streamwatcher_test.go b/pkg/watch/streamwatcher_test.go index 90d0665cb8..259ce37f49 100644 --- a/pkg/watch/streamwatcher_test.go +++ b/pkg/watch/streamwatcher_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/until.go b/pkg/watch/until.go index 9f34f9d001..4259f51bb5 100644 --- a/pkg/watch/until.go +++ b/pkg/watch/until.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/until_test.go b/pkg/watch/until_test.go index d411040523..bfd5ce70fa 100644 --- a/pkg/watch/until_test.go +++ b/pkg/watch/until_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/versioned/decoder.go b/pkg/watch/versioned/decoder.go index 2d13ca809f..e5865273e2 100644 --- a/pkg/watch/versioned/decoder.go +++ b/pkg/watch/versioned/decoder.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/versioned/decoder_test.go b/pkg/watch/versioned/decoder_test.go index 1ccb38108b..c2200deb9e 100644 --- a/pkg/watch/versioned/decoder_test.go +++ b/pkg/watch/versioned/decoder_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/versioned/encoder.go b/pkg/watch/versioned/encoder.go index 8438ee984f..df23e0bd16 100644 --- a/pkg/watch/versioned/encoder.go +++ b/pkg/watch/versioned/encoder.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/versioned/encoder_test.go b/pkg/watch/versioned/encoder_test.go index cc0e615019..170a4075a5 100644 --- a/pkg/watch/versioned/encoder_test.go +++ b/pkg/watch/versioned/encoder_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/versioned/generated.pb.go b/pkg/watch/versioned/generated.pb.go index c1cbbd8ba5..d2576ebd25 100644 --- a/pkg/watch/versioned/generated.pb.go +++ b/pkg/watch/versioned/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/versioned/generated.proto b/pkg/watch/versioned/generated.proto index 5bb702210e..8d5506552d 100644 --- a/pkg/watch/versioned/generated.proto +++ b/pkg/watch/versioned/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/versioned/register.go b/pkg/watch/versioned/register.go index feaea3b6b7..e90a021a43 100644 --- a/pkg/watch/versioned/register.go +++ b/pkg/watch/versioned/register.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/versioned/types.go b/pkg/watch/versioned/types.go index ba608aeab0..f8e968ccc0 100644 --- a/pkg/watch/versioned/types.go +++ b/pkg/watch/versioned/types.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/watch.go b/pkg/watch/watch.go index e8fca0a624..96b2fe3de2 100644 --- a/pkg/watch/watch.go +++ b/pkg/watch/watch.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/watch/watch_test.go b/pkg/watch/watch_test.go index 33b6e5cc09..d58a24885a 100644 --- a/pkg/watch/watch_test.go +++ b/pkg/watch/watch_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/cmd/kube-scheduler/app/options/options.go b/plugin/cmd/kube-scheduler/app/options/options.go index b54bc1e2e7..30747a483a 100644 --- a/plugin/cmd/kube-scheduler/app/options/options.go +++ b/plugin/cmd/kube-scheduler/app/options/options.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/cmd/kube-scheduler/app/server.go b/plugin/cmd/kube-scheduler/app/server.go index 16d5e87eb6..70a9907efa 100644 --- a/plugin/cmd/kube-scheduler/app/server.go +++ b/plugin/cmd/kube-scheduler/app/server.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/cmd/kube-scheduler/scheduler.go b/plugin/cmd/kube-scheduler/scheduler.go index f3fca7b7f5..5d05a222d0 100644 --- a/plugin/cmd/kube-scheduler/scheduler.go +++ b/plugin/cmd/kube-scheduler/scheduler.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/admit/admission.go b/plugin/pkg/admission/admit/admission.go index dfbad5f71d..b7b528aedf 100644 --- a/plugin/pkg/admission/admit/admission.go +++ b/plugin/pkg/admission/admit/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/admit/admission_test.go b/plugin/pkg/admission/admit/admission_test.go index d5ea78ccd1..650b6b7866 100644 --- a/plugin/pkg/admission/admit/admission_test.go +++ b/plugin/pkg/admission/admit/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/alwayspullimages/admission.go b/plugin/pkg/admission/alwayspullimages/admission.go index 2d2b5147ef..c0e36709bf 100644 --- a/plugin/pkg/admission/alwayspullimages/admission.go +++ b/plugin/pkg/admission/alwayspullimages/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/alwayspullimages/admission_test.go b/plugin/pkg/admission/alwayspullimages/admission_test.go index ffd5435ae2..cdbf596826 100644 --- a/plugin/pkg/admission/alwayspullimages/admission_test.go +++ b/plugin/pkg/admission/alwayspullimages/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/antiaffinity/admission.go b/plugin/pkg/admission/antiaffinity/admission.go index 00c2ac71b1..f211022b3a 100644 --- a/plugin/pkg/admission/antiaffinity/admission.go +++ b/plugin/pkg/admission/antiaffinity/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/antiaffinity/admission_test.go b/plugin/pkg/admission/antiaffinity/admission_test.go index 3073d6d81c..3c8d2b9e55 100644 --- a/plugin/pkg/admission/antiaffinity/admission_test.go +++ b/plugin/pkg/admission/antiaffinity/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/antiaffinity/doc.go b/plugin/pkg/admission/antiaffinity/doc.go index a2a1acd050..9fc189b15e 100644 --- a/plugin/pkg/admission/antiaffinity/doc.go +++ b/plugin/pkg/admission/antiaffinity/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/deny/admission.go b/plugin/pkg/admission/deny/admission.go index 4eef85326e..7b62ea81b3 100644 --- a/plugin/pkg/admission/deny/admission.go +++ b/plugin/pkg/admission/deny/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/deny/admission_test.go b/plugin/pkg/admission/deny/admission_test.go index 3571b82633..d9281e3b2d 100644 --- a/plugin/pkg/admission/deny/admission_test.go +++ b/plugin/pkg/admission/deny/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/exec/admission.go b/plugin/pkg/admission/exec/admission.go index d98bff6759..25aecca11b 100644 --- a/plugin/pkg/admission/exec/admission.go +++ b/plugin/pkg/admission/exec/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/exec/admission_test.go b/plugin/pkg/admission/exec/admission_test.go index 0934491cad..ddc59959f4 100644 --- a/plugin/pkg/admission/exec/admission_test.go +++ b/plugin/pkg/admission/exec/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/initialresources/admission.go b/plugin/pkg/admission/initialresources/admission.go index 8db5bf07a3..f1df68dc2a 100644 --- a/plugin/pkg/admission/initialresources/admission.go +++ b/plugin/pkg/admission/initialresources/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/initialresources/admission_test.go b/plugin/pkg/admission/initialresources/admission_test.go index 3f8736036b..0b699d88d3 100644 --- a/plugin/pkg/admission/initialresources/admission_test.go +++ b/plugin/pkg/admission/initialresources/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/initialresources/data_source.go b/plugin/pkg/admission/initialresources/data_source.go index a8b41621d5..2836dd81c5 100644 --- a/plugin/pkg/admission/initialresources/data_source.go +++ b/plugin/pkg/admission/initialresources/data_source.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/initialresources/gcm.go b/plugin/pkg/admission/initialresources/gcm.go index 4a55c03a3c..a60d4519a9 100644 --- a/plugin/pkg/admission/initialresources/gcm.go +++ b/plugin/pkg/admission/initialresources/gcm.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/initialresources/hawkular.go b/plugin/pkg/admission/initialresources/hawkular.go index 1d276d7cfc..4599b41228 100644 --- a/plugin/pkg/admission/initialresources/hawkular.go +++ b/plugin/pkg/admission/initialresources/hawkular.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/initialresources/hawkular_test.go b/plugin/pkg/admission/initialresources/hawkular_test.go index 6b526173bd..5c5cb8d9b2 100644 --- a/plugin/pkg/admission/initialresources/hawkular_test.go +++ b/plugin/pkg/admission/initialresources/hawkular_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/initialresources/influxdb.go b/plugin/pkg/admission/initialresources/influxdb.go index d72f16fcb0..357b28a22d 100644 --- a/plugin/pkg/admission/initialresources/influxdb.go +++ b/plugin/pkg/admission/initialresources/influxdb.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/limitranger/admission.go b/plugin/pkg/admission/limitranger/admission.go index 6b6d8331fe..0177cb1c78 100644 --- a/plugin/pkg/admission/limitranger/admission.go +++ b/plugin/pkg/admission/limitranger/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/limitranger/admission_test.go b/plugin/pkg/admission/limitranger/admission_test.go index 8d4e36e924..cac27b8380 100644 --- a/plugin/pkg/admission/limitranger/admission_test.go +++ b/plugin/pkg/admission/limitranger/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/limitranger/interfaces.go b/plugin/pkg/admission/limitranger/interfaces.go index b5eb6632f2..8f1222851b 100644 --- a/plugin/pkg/admission/limitranger/interfaces.go +++ b/plugin/pkg/admission/limitranger/interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/namespace/autoprovision/admission.go b/plugin/pkg/admission/namespace/autoprovision/admission.go index 9ffb530b7a..76291927b2 100644 --- a/plugin/pkg/admission/namespace/autoprovision/admission.go +++ b/plugin/pkg/admission/namespace/autoprovision/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/namespace/autoprovision/admission_test.go b/plugin/pkg/admission/namespace/autoprovision/admission_test.go index d0b5852b3a..7592e5ffa3 100644 --- a/plugin/pkg/admission/namespace/autoprovision/admission_test.go +++ b/plugin/pkg/admission/namespace/autoprovision/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/namespace/exists/admission.go b/plugin/pkg/admission/namespace/exists/admission.go index 0986fabe4d..42b6c7811c 100644 --- a/plugin/pkg/admission/namespace/exists/admission.go +++ b/plugin/pkg/admission/namespace/exists/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/namespace/exists/admission_test.go b/plugin/pkg/admission/namespace/exists/admission_test.go index aea034fb2d..5153a5d2df 100644 --- a/plugin/pkg/admission/namespace/exists/admission_test.go +++ b/plugin/pkg/admission/namespace/exists/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/namespace/lifecycle/admission.go b/plugin/pkg/admission/namespace/lifecycle/admission.go index 997ee263b5..e75f56397c 100644 --- a/plugin/pkg/admission/namespace/lifecycle/admission.go +++ b/plugin/pkg/admission/namespace/lifecycle/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/namespace/lifecycle/admission_test.go b/plugin/pkg/admission/namespace/lifecycle/admission_test.go index ff26f18bb7..99597f48c1 100644 --- a/plugin/pkg/admission/namespace/lifecycle/admission_test.go +++ b/plugin/pkg/admission/namespace/lifecycle/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/persistentvolume/label/admission.go b/plugin/pkg/admission/persistentvolume/label/admission.go index 915ea63a5a..a2c92ebc87 100644 --- a/plugin/pkg/admission/persistentvolume/label/admission.go +++ b/plugin/pkg/admission/persistentvolume/label/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/persistentvolume/label/admission_test.go b/plugin/pkg/admission/persistentvolume/label/admission_test.go index 79d108a0c1..8bdcf617a2 100644 --- a/plugin/pkg/admission/persistentvolume/label/admission_test.go +++ b/plugin/pkg/admission/persistentvolume/label/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/persistentvolume/label/doc.go b/plugin/pkg/admission/persistentvolume/label/doc.go index 65d520bbad..22f486b5c3 100644 --- a/plugin/pkg/admission/persistentvolume/label/doc.go +++ b/plugin/pkg/admission/persistentvolume/label/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/resourcequota/admission.go b/plugin/pkg/admission/resourcequota/admission.go index ddc90994bc..41eaae64b0 100644 --- a/plugin/pkg/admission/resourcequota/admission.go +++ b/plugin/pkg/admission/resourcequota/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/resourcequota/admission_test.go b/plugin/pkg/admission/resourcequota/admission_test.go index 7d337047b5..95242bdd98 100644 --- a/plugin/pkg/admission/resourcequota/admission_test.go +++ b/plugin/pkg/admission/resourcequota/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/resourcequota/controller.go b/plugin/pkg/admission/resourcequota/controller.go index 31fe1a1990..9d3aa18d27 100644 --- a/plugin/pkg/admission/resourcequota/controller.go +++ b/plugin/pkg/admission/resourcequota/controller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/resourcequota/doc.go b/plugin/pkg/admission/resourcequota/doc.go index 69d9610957..28923b16d8 100644 --- a/plugin/pkg/admission/resourcequota/doc.go +++ b/plugin/pkg/admission/resourcequota/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/resourcequota/resource_access.go b/plugin/pkg/admission/resourcequota/resource_access.go index 48882281c1..dfa08106bf 100644 --- a/plugin/pkg/admission/resourcequota/resource_access.go +++ b/plugin/pkg/admission/resourcequota/resource_access.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/security/doc.go b/plugin/pkg/admission/security/doc.go index 846a4d55cf..6b13aeda92 100644 --- a/plugin/pkg/admission/security/doc.go +++ b/plugin/pkg/admission/security/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/security/podsecuritypolicy/admission.go b/plugin/pkg/admission/security/podsecuritypolicy/admission.go index e3bc36805b..aa61609c1c 100644 --- a/plugin/pkg/admission/security/podsecuritypolicy/admission.go +++ b/plugin/pkg/admission/security/podsecuritypolicy/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go b/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go index b875997efb..4ea65d5d57 100644 --- a/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go +++ b/plugin/pkg/admission/security/podsecuritypolicy/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/securitycontext/scdeny/admission.go b/plugin/pkg/admission/securitycontext/scdeny/admission.go index c7fa390169..941a277cf7 100644 --- a/plugin/pkg/admission/securitycontext/scdeny/admission.go +++ b/plugin/pkg/admission/securitycontext/scdeny/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/securitycontext/scdeny/admission_test.go b/plugin/pkg/admission/securitycontext/scdeny/admission_test.go index e7c1ee1134..a8ef6ee644 100644 --- a/plugin/pkg/admission/securitycontext/scdeny/admission_test.go +++ b/plugin/pkg/admission/securitycontext/scdeny/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/serviceaccount/admission.go b/plugin/pkg/admission/serviceaccount/admission.go index 82e1bfacca..c61ba2d576 100644 --- a/plugin/pkg/admission/serviceaccount/admission.go +++ b/plugin/pkg/admission/serviceaccount/admission.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/serviceaccount/admission_test.go b/plugin/pkg/admission/serviceaccount/admission_test.go index 7f78a5329e..10fd88e53b 100644 --- a/plugin/pkg/admission/serviceaccount/admission_test.go +++ b/plugin/pkg/admission/serviceaccount/admission_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/admission/serviceaccount/doc.go b/plugin/pkg/admission/serviceaccount/doc.go index 50a8b06149..54d763bb90 100644 --- a/plugin/pkg/admission/serviceaccount/doc.go +++ b/plugin/pkg/admission/serviceaccount/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/doc.go b/plugin/pkg/auth/authenticator/doc.go index 6155791909..9146200820 100644 --- a/plugin/pkg/auth/authenticator/doc.go +++ b/plugin/pkg/auth/authenticator/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/password/allow/allow.go b/plugin/pkg/auth/authenticator/password/allow/allow.go index df4f92580d..f577c446a0 100644 --- a/plugin/pkg/auth/authenticator/password/allow/allow.go +++ b/plugin/pkg/auth/authenticator/password/allow/allow.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/password/allow/allow_test.go b/plugin/pkg/auth/authenticator/password/allow/allow_test.go index ad07edbaa9..58d2170919 100644 --- a/plugin/pkg/auth/authenticator/password/allow/allow_test.go +++ b/plugin/pkg/auth/authenticator/password/allow/allow_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/password/doc.go b/plugin/pkg/auth/authenticator/password/doc.go index 241d9a3ee4..84c1fb8919 100644 --- a/plugin/pkg/auth/authenticator/password/doc.go +++ b/plugin/pkg/auth/authenticator/password/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/password/keystone/doc.go b/plugin/pkg/auth/authenticator/password/keystone/doc.go index d4b0f43cbb..6f6a93034c 100644 --- a/plugin/pkg/auth/authenticator/password/keystone/doc.go +++ b/plugin/pkg/auth/authenticator/password/keystone/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/password/keystone/keystone.go b/plugin/pkg/auth/authenticator/password/keystone/keystone.go index 6a7c8c8014..2ba449edeb 100644 --- a/plugin/pkg/auth/authenticator/password/keystone/keystone.go +++ b/plugin/pkg/auth/authenticator/password/keystone/keystone.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/password/passwordfile/passwordfile.go b/plugin/pkg/auth/authenticator/password/passwordfile/passwordfile.go index 8daf1efb36..2042416840 100644 --- a/plugin/pkg/auth/authenticator/password/passwordfile/passwordfile.go +++ b/plugin/pkg/auth/authenticator/password/passwordfile/passwordfile.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/password/passwordfile/passwordfile_test.go b/plugin/pkg/auth/authenticator/password/passwordfile/passwordfile_test.go index 7a07e23aac..9c343d6e80 100644 --- a/plugin/pkg/auth/authenticator/password/passwordfile/passwordfile_test.go +++ b/plugin/pkg/auth/authenticator/password/passwordfile/passwordfile_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/request/basicauth/basicauth.go b/plugin/pkg/auth/authenticator/request/basicauth/basicauth.go index 62d78a7254..a43a751b5e 100644 --- a/plugin/pkg/auth/authenticator/request/basicauth/basicauth.go +++ b/plugin/pkg/auth/authenticator/request/basicauth/basicauth.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/request/basicauth/basicauth_test.go b/plugin/pkg/auth/authenticator/request/basicauth/basicauth_test.go index 1030f75fe6..6af0c1befc 100644 --- a/plugin/pkg/auth/authenticator/request/basicauth/basicauth_test.go +++ b/plugin/pkg/auth/authenticator/request/basicauth/basicauth_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/request/union/union.go b/plugin/pkg/auth/authenticator/request/union/union.go index c0b8a0b9a2..5c34b4d5fc 100644 --- a/plugin/pkg/auth/authenticator/request/union/union.go +++ b/plugin/pkg/auth/authenticator/request/union/union.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/request/union/unionauth_test.go b/plugin/pkg/auth/authenticator/request/union/unionauth_test.go index 48d9698ee2..62fa0c0da5 100644 --- a/plugin/pkg/auth/authenticator/request/union/unionauth_test.go +++ b/plugin/pkg/auth/authenticator/request/union/unionauth_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/request/x509/doc.go b/plugin/pkg/auth/authenticator/request/x509/doc.go index 6c92c97837..570c1ac599 100644 --- a/plugin/pkg/auth/authenticator/request/x509/doc.go +++ b/plugin/pkg/auth/authenticator/request/x509/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/request/x509/x509.go b/plugin/pkg/auth/authenticator/request/x509/x509.go index 310898dd84..a86b4c576f 100644 --- a/plugin/pkg/auth/authenticator/request/x509/x509.go +++ b/plugin/pkg/auth/authenticator/request/x509/x509.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/request/x509/x509_test.go b/plugin/pkg/auth/authenticator/request/x509/x509_test.go index 4ead5fe428..7a6d313565 100644 --- a/plugin/pkg/auth/authenticator/request/x509/x509_test.go +++ b/plugin/pkg/auth/authenticator/request/x509/x509_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/token/oidc/oidc.go b/plugin/pkg/auth/authenticator/token/oidc/oidc.go index 52ea1de4ae..17000bd8ff 100644 --- a/plugin/pkg/auth/authenticator/token/oidc/oidc.go +++ b/plugin/pkg/auth/authenticator/token/oidc/oidc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/token/oidc/oidc_test.go b/plugin/pkg/auth/authenticator/token/oidc/oidc_test.go index f0dab980aa..f114373c23 100644 --- a/plugin/pkg/auth/authenticator/token/oidc/oidc_test.go +++ b/plugin/pkg/auth/authenticator/token/oidc/oidc_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go b/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go index ee2735d539..b3cbdc7a3a 100644 --- a/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go +++ b/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/token/tokenfile/tokenfile.go b/plugin/pkg/auth/authenticator/token/tokenfile/tokenfile.go index 52520741e6..24f76da80d 100644 --- a/plugin/pkg/auth/authenticator/token/tokenfile/tokenfile.go +++ b/plugin/pkg/auth/authenticator/token/tokenfile/tokenfile.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/token/tokenfile/tokenfile_test.go b/plugin/pkg/auth/authenticator/token/tokenfile/tokenfile_test.go index 1e4a28ef03..8bb7a56265 100644 --- a/plugin/pkg/auth/authenticator/token/tokenfile/tokenfile_test.go +++ b/plugin/pkg/auth/authenticator/token/tokenfile/tokenfile_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/token/tokentest/tokentest.go b/plugin/pkg/auth/authenticator/token/tokentest/tokentest.go index bf69e1094a..be4d55b976 100644 --- a/plugin/pkg/auth/authenticator/token/tokentest/tokentest.go +++ b/plugin/pkg/auth/authenticator/token/tokentest/tokentest.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/token/webhook/certs_test.go b/plugin/pkg/auth/authenticator/token/webhook/certs_test.go index b4afcd2689..d498817a2e 100644 --- a/plugin/pkg/auth/authenticator/token/webhook/certs_test.go +++ b/plugin/pkg/auth/authenticator/token/webhook/certs_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/token/webhook/webhook.go b/plugin/pkg/auth/authenticator/token/webhook/webhook.go index b6a4108301..2c55e1b156 100644 --- a/plugin/pkg/auth/authenticator/token/webhook/webhook.go +++ b/plugin/pkg/auth/authenticator/token/webhook/webhook.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go b/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go index 5cfdcd3d7e..e960ab05bd 100644 --- a/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go +++ b/plugin/pkg/auth/authenticator/token/webhook/webhook_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authorizer/doc.go b/plugin/pkg/auth/authorizer/doc.go index 40ee1c8e43..448590585c 100644 --- a/plugin/pkg/auth/authorizer/doc.go +++ b/plugin/pkg/auth/authorizer/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authorizer/rbac/rbac.go b/plugin/pkg/auth/authorizer/rbac/rbac.go index afd415da7d..d46e178d27 100644 --- a/plugin/pkg/auth/authorizer/rbac/rbac.go +++ b/plugin/pkg/auth/authorizer/rbac/rbac.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authorizer/rbac/rbac_test.go b/plugin/pkg/auth/authorizer/rbac/rbac_test.go index fc4f22de60..025e2c856a 100644 --- a/plugin/pkg/auth/authorizer/rbac/rbac_test.go +++ b/plugin/pkg/auth/authorizer/rbac/rbac_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authorizer/webhook/certs_test.go b/plugin/pkg/auth/authorizer/webhook/certs_test.go index c26ba703f2..816eef6b79 100644 --- a/plugin/pkg/auth/authorizer/webhook/certs_test.go +++ b/plugin/pkg/auth/authorizer/webhook/certs_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authorizer/webhook/gencerts.sh b/plugin/pkg/auth/authorizer/webhook/gencerts.sh index 7983d38796..8d7896fa5e 100755 --- a/plugin/pkg/auth/authorizer/webhook/gencerts.sh +++ b/plugin/pkg/auth/authorizer/webhook/gencerts.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ outfile=certs_test.go cat > $outfile << EOF /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authorizer/webhook/webhook.go b/plugin/pkg/auth/authorizer/webhook/webhook.go index c9153d2c33..e6044e48d2 100644 --- a/plugin/pkg/auth/authorizer/webhook/webhook.go +++ b/plugin/pkg/auth/authorizer/webhook/webhook.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/authorizer/webhook/webhook_test.go b/plugin/pkg/auth/authorizer/webhook/webhook_test.go index 7d3db49988..7210287dfe 100644 --- a/plugin/pkg/auth/authorizer/webhook/webhook_test.go +++ b/plugin/pkg/auth/authorizer/webhook/webhook_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/auth/doc.go b/plugin/pkg/auth/doc.go index 165f493186..de816611eb 100644 --- a/plugin/pkg/auth/doc.go +++ b/plugin/pkg/auth/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/client/auth/gcp/gcp.go b/plugin/pkg/client/auth/gcp/gcp.go index 1efbb20f11..32cbb36255 100644 --- a/plugin/pkg/client/auth/gcp/gcp.go +++ b/plugin/pkg/client/auth/gcp/gcp.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/client/auth/oidc/oidc.go b/plugin/pkg/client/auth/oidc/oidc.go index 3ad279c106..690a452307 100644 --- a/plugin/pkg/client/auth/oidc/oidc.go +++ b/plugin/pkg/client/auth/oidc/oidc.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/client/auth/oidc/oidc_test.go b/plugin/pkg/client/auth/oidc/oidc_test.go index 42c8c71c9e..4e15113b95 100644 --- a/plugin/pkg/client/auth/oidc/oidc_test.go +++ b/plugin/pkg/client/auth/oidc/oidc_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/client/auth/plugins.go b/plugin/pkg/client/auth/plugins.go index 2b422ddda0..17d3ad4278 100644 --- a/plugin/pkg/client/auth/plugins.go +++ b/plugin/pkg/client/auth/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/doc.go b/plugin/pkg/scheduler/algorithm/doc.go index 6a23039404..6d63763f42 100644 --- a/plugin/pkg/scheduler/algorithm/doc.go +++ b/plugin/pkg/scheduler/algorithm/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/listers.go b/plugin/pkg/scheduler/algorithm/listers.go index 7db0e8bebc..32b4665603 100644 --- a/plugin/pkg/scheduler/algorithm/listers.go +++ b/plugin/pkg/scheduler/algorithm/listers.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/predicates/error.go b/plugin/pkg/scheduler/algorithm/predicates/error.go index fd4777ccde..72e86a1ba9 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/error.go +++ b/plugin/pkg/scheduler/algorithm/predicates/error.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates.go b/plugin/pkg/scheduler/algorithm/predicates/predicates.go index f97b3c0078..c8710d495a 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go b/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go index bbf5a54c32..80e234932c 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity.go b/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity.go index c1a84862a0..6b7a60af46 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity.go +++ b/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go b/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go index c130f1e752..77c2133e6f 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/interpod_affinity_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/priorities/node_affinity.go b/plugin/pkg/scheduler/algorithm/priorities/node_affinity.go index e511c40021..abe064a301 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/node_affinity.go +++ b/plugin/pkg/scheduler/algorithm/priorities/node_affinity.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go b/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go index 12a7fb521a..ae78ae039a 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/node_affinity_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/priorities/priorities.go b/plugin/pkg/scheduler/algorithm/priorities/priorities.go index bd03178946..d761ce96fd 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/priorities.go +++ b/plugin/pkg/scheduler/algorithm/priorities/priorities.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/priorities/priorities_test.go b/plugin/pkg/scheduler/algorithm/priorities/priorities_test.go index b3d8c32052..db96feffd4 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/priorities_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/priorities_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/priorities/selector_spreading.go b/plugin/pkg/scheduler/algorithm/priorities/selector_spreading.go index caea010e9c..25e94954a9 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/selector_spreading.go +++ b/plugin/pkg/scheduler/algorithm/priorities/selector_spreading.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/priorities/selector_spreading_test.go b/plugin/pkg/scheduler/algorithm/priorities/selector_spreading_test.go index 49bdcb0b02..cb3c598ec3 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/selector_spreading_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/selector_spreading_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/priorities/taint_toleration.go b/plugin/pkg/scheduler/algorithm/priorities/taint_toleration.go index 35a372d68e..3ea7f10f6d 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/taint_toleration.go +++ b/plugin/pkg/scheduler/algorithm/priorities/taint_toleration.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/priorities/taint_toleration_test.go b/plugin/pkg/scheduler/algorithm/priorities/taint_toleration_test.go index 7c2fbbbbcb..6300ca40cc 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/taint_toleration_test.go +++ b/plugin/pkg/scheduler/algorithm/priorities/taint_toleration_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/priorities/util/non_zero.go b/plugin/pkg/scheduler/algorithm/priorities/util/non_zero.go index 0e9bee1b5f..c7e810c8ad 100644 --- a/plugin/pkg/scheduler/algorithm/priorities/util/non_zero.go +++ b/plugin/pkg/scheduler/algorithm/priorities/util/non_zero.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/scheduler_interface.go b/plugin/pkg/scheduler/algorithm/scheduler_interface.go index b47f50e23f..84f1040d91 100644 --- a/plugin/pkg/scheduler/algorithm/scheduler_interface.go +++ b/plugin/pkg/scheduler/algorithm/scheduler_interface.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/scheduler_interface_test.go b/plugin/pkg/scheduler/algorithm/scheduler_interface_test.go index ec637d5d30..f8073090aa 100644 --- a/plugin/pkg/scheduler/algorithm/scheduler_interface_test.go +++ b/plugin/pkg/scheduler/algorithm/scheduler_interface_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithm/types.go b/plugin/pkg/scheduler/algorithm/types.go index 210670b24c..ac4ebcf1b5 100644 --- a/plugin/pkg/scheduler/algorithm/types.go +++ b/plugin/pkg/scheduler/algorithm/types.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithmprovider/defaults/compatibility_test.go b/plugin/pkg/scheduler/algorithmprovider/defaults/compatibility_test.go index dbd61054aa..0f0580de2e 100644 --- a/plugin/pkg/scheduler/algorithmprovider/defaults/compatibility_test.go +++ b/plugin/pkg/scheduler/algorithmprovider/defaults/compatibility_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go b/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go index 21e8e22990..8e0fba8cfb 100644 --- a/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go +++ b/plugin/pkg/scheduler/algorithmprovider/defaults/defaults.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithmprovider/plugins.go b/plugin/pkg/scheduler/algorithmprovider/plugins.go index f4075928ae..f85cf05553 100644 --- a/plugin/pkg/scheduler/algorithmprovider/plugins.go +++ b/plugin/pkg/scheduler/algorithmprovider/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/algorithmprovider/plugins_test.go b/plugin/pkg/scheduler/algorithmprovider/plugins_test.go index b1236e5e69..3759fcbdc9 100644 --- a/plugin/pkg/scheduler/algorithmprovider/plugins_test.go +++ b/plugin/pkg/scheduler/algorithmprovider/plugins_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/api/latest/latest.go b/plugin/pkg/scheduler/api/latest/latest.go index e28ae26b9f..dbea2a8af5 100644 --- a/plugin/pkg/scheduler/api/latest/latest.go +++ b/plugin/pkg/scheduler/api/latest/latest.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/api/register.go b/plugin/pkg/scheduler/api/register.go index 3b988f25bf..2cb08fba7e 100644 --- a/plugin/pkg/scheduler/api/register.go +++ b/plugin/pkg/scheduler/api/register.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/api/types.go b/plugin/pkg/scheduler/api/types.go index 89bbe63738..29d98a3b28 100644 --- a/plugin/pkg/scheduler/api/types.go +++ b/plugin/pkg/scheduler/api/types.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/api/v1/register.go b/plugin/pkg/scheduler/api/v1/register.go index 8e6d754376..2c4507270c 100644 --- a/plugin/pkg/scheduler/api/v1/register.go +++ b/plugin/pkg/scheduler/api/v1/register.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/api/v1/types.go b/plugin/pkg/scheduler/api/v1/types.go index 89618a56e8..7eef7b5a86 100644 --- a/plugin/pkg/scheduler/api/v1/types.go +++ b/plugin/pkg/scheduler/api/v1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/api/validation/validation.go b/plugin/pkg/scheduler/api/validation/validation.go index 0ca60c6128..d7d2b28851 100644 --- a/plugin/pkg/scheduler/api/validation/validation.go +++ b/plugin/pkg/scheduler/api/validation/validation.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/api/validation/validation_test.go b/plugin/pkg/scheduler/api/validation/validation_test.go index 680cf7b72f..6cc3da4e18 100644 --- a/plugin/pkg/scheduler/api/validation/validation_test.go +++ b/plugin/pkg/scheduler/api/validation/validation_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/extender.go b/plugin/pkg/scheduler/extender.go index 30b403f36e..043223769a 100644 --- a/plugin/pkg/scheduler/extender.go +++ b/plugin/pkg/scheduler/extender.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/extender_test.go b/plugin/pkg/scheduler/extender_test.go index 4b68ad400c..f1cd58df3a 100644 --- a/plugin/pkg/scheduler/extender_test.go +++ b/plugin/pkg/scheduler/extender_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/factory/factory.go b/plugin/pkg/scheduler/factory/factory.go index 0bbbcbf332..5bd5286632 100644 --- a/plugin/pkg/scheduler/factory/factory.go +++ b/plugin/pkg/scheduler/factory/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/factory/factory_test.go b/plugin/pkg/scheduler/factory/factory_test.go index 8439a5540b..7dad6f9171 100644 --- a/plugin/pkg/scheduler/factory/factory_test.go +++ b/plugin/pkg/scheduler/factory/factory_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/factory/plugins.go b/plugin/pkg/scheduler/factory/plugins.go index 9744a49dff..75eb83ce43 100644 --- a/plugin/pkg/scheduler/factory/plugins.go +++ b/plugin/pkg/scheduler/factory/plugins.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/factory/plugins_test.go b/plugin/pkg/scheduler/factory/plugins_test.go index c9fdbbd479..dbfe166303 100644 --- a/plugin/pkg/scheduler/factory/plugins_test.go +++ b/plugin/pkg/scheduler/factory/plugins_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/generic_scheduler.go b/plugin/pkg/scheduler/generic_scheduler.go index 56f56bee4c..e188c6a41c 100644 --- a/plugin/pkg/scheduler/generic_scheduler.go +++ b/plugin/pkg/scheduler/generic_scheduler.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/generic_scheduler_test.go b/plugin/pkg/scheduler/generic_scheduler_test.go index c9d1b473f1..68ceb53707 100644 --- a/plugin/pkg/scheduler/generic_scheduler_test.go +++ b/plugin/pkg/scheduler/generic_scheduler_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/metrics/metrics.go b/plugin/pkg/scheduler/metrics/metrics.go index 8491be52d7..cd50ceddc9 100644 --- a/plugin/pkg/scheduler/metrics/metrics.go +++ b/plugin/pkg/scheduler/metrics/metrics.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/scheduler.go b/plugin/pkg/scheduler/scheduler.go index 067cd41a0b..6e578ad758 100644 --- a/plugin/pkg/scheduler/scheduler.go +++ b/plugin/pkg/scheduler/scheduler.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/scheduler_test.go b/plugin/pkg/scheduler/scheduler_test.go index a2a08c6d10..f17a1d18a1 100644 --- a/plugin/pkg/scheduler/scheduler_test.go +++ b/plugin/pkg/scheduler/scheduler_test.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/schedulercache/cache.go b/plugin/pkg/scheduler/schedulercache/cache.go index a55b0e9fea..c8ffe18ff0 100644 --- a/plugin/pkg/scheduler/schedulercache/cache.go +++ b/plugin/pkg/scheduler/schedulercache/cache.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/schedulercache/cache_test.go b/plugin/pkg/scheduler/schedulercache/cache_test.go index 950ff38bcb..2484fcf589 100644 --- a/plugin/pkg/scheduler/schedulercache/cache_test.go +++ b/plugin/pkg/scheduler/schedulercache/cache_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/schedulercache/interface.go b/plugin/pkg/scheduler/schedulercache/interface.go index 07330a2a89..604e7cedbd 100644 --- a/plugin/pkg/scheduler/schedulercache/interface.go +++ b/plugin/pkg/scheduler/schedulercache/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/schedulercache/node_info.go b/plugin/pkg/scheduler/schedulercache/node_info.go index 79890cd3d2..d66a6ad4b5 100644 --- a/plugin/pkg/scheduler/schedulercache/node_info.go +++ b/plugin/pkg/scheduler/schedulercache/node_info.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/schedulercache/util.go b/plugin/pkg/scheduler/schedulercache/util.go index 7d840b59cd..d39d0caf30 100644 --- a/plugin/pkg/scheduler/schedulercache/util.go +++ b/plugin/pkg/scheduler/schedulercache/util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/testing/fake_cache.go b/plugin/pkg/scheduler/testing/fake_cache.go index 02c76d3d65..7f98e7e1e7 100644 --- a/plugin/pkg/scheduler/testing/fake_cache.go +++ b/plugin/pkg/scheduler/testing/fake_cache.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/scheduler/testing/pods_to_cache.go b/plugin/pkg/scheduler/testing/pods_to_cache.go index 99fe15ee70..b43a5da442 100644 --- a/plugin/pkg/scheduler/testing/pods_to_cache.go +++ b/plugin/pkg/scheduler/testing/pods_to_cache.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/plugin/pkg/webhook/webhook.go b/plugin/pkg/webhook/webhook.go index a907444b95..103e37c5e2 100644 --- a/plugin/pkg/webhook/webhook.go +++ b/plugin/pkg/webhook/webhook.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/release/build-official-release.sh b/release/build-official-release.sh index 0e888bb5ba..8577352e80 100755 --- a/release/build-official-release.sh +++ b/release/build-official-release.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/release/cut-official-release.sh b/release/cut-official-release.sh index 9f101d88d6..f122560654 100755 --- a/release/cut-official-release.sh +++ b/release/cut-official-release.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/component/scheduler/perf/scheduler_bench_test.go b/test/component/scheduler/perf/scheduler_bench_test.go index e51b2e8e6a..0ce6b8b343 100644 --- a/test/component/scheduler/perf/scheduler_bench_test.go +++ b/test/component/scheduler/perf/scheduler_bench_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/component/scheduler/perf/scheduler_test.go b/test/component/scheduler/perf/scheduler_test.go index b076b7c0e9..06ead4d9ad 100644 --- a/test/component/scheduler/perf/scheduler_test.go +++ b/test/component/scheduler/perf/scheduler_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/component/scheduler/perf/test-performance.sh b/test/component/scheduler/perf/test-performance.sh index aa9a47e0d7..7f255ec2b9 100755 --- a/test/component/scheduler/perf/test-performance.sh +++ b/test/component/scheduler/perf/test-performance.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2014 The Kubernetes Authors All rights reserved. +# Copyright 2014 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/component/scheduler/perf/util.go b/test/component/scheduler/perf/util.go index 371baa3c83..d7d256a1b5 100644 --- a/test/component/scheduler/perf/util.go +++ b/test/component/scheduler/perf/util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/addon_update.go b/test/e2e/addon_update.go index c99c20901c..c4496e10c3 100644 --- a/test/e2e/addon_update.go +++ b/test/e2e/addon_update.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/autoscaling_utils.go b/test/e2e/autoscaling_utils.go index 5f813e6569..12cccfcc29 100644 --- a/test/e2e/autoscaling_utils.go +++ b/test/e2e/autoscaling_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/batch_v1_jobs.go b/test/e2e/batch_v1_jobs.go index 5a907cf4e8..e3b207c6fb 100644 --- a/test/e2e/batch_v1_jobs.go +++ b/test/e2e/batch_v1_jobs.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/cadvisor.go b/test/e2e/cadvisor.go index 3ab90a5278..56f110e134 100644 --- a/test/e2e/cadvisor.go +++ b/test/e2e/cadvisor.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/chaosmonkey/chaosmonkey.go b/test/e2e/chaosmonkey/chaosmonkey.go index 2b28a521de..97e37e3a03 100644 --- a/test/e2e/chaosmonkey/chaosmonkey.go +++ b/test/e2e/chaosmonkey/chaosmonkey.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/chaosmonkey/chaosmonkey_test.go b/test/e2e/chaosmonkey/chaosmonkey_test.go index 70c7f70b16..ead8db2456 100644 --- a/test/e2e/chaosmonkey/chaosmonkey_test.go +++ b/test/e2e/chaosmonkey/chaosmonkey_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/cleanup/cleanup.go b/test/e2e/cleanup/cleanup.go index 1729268728..bbb4fce08d 100644 --- a/test/e2e/cleanup/cleanup.go +++ b/test/e2e/cleanup/cleanup.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/cluster_size_autoscaling.go b/test/e2e/cluster_size_autoscaling.go index 8872abd9ea..02347f5914 100644 --- a/test/e2e/cluster_size_autoscaling.go +++ b/test/e2e/cluster_size_autoscaling.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/cluster_upgrade.go b/test/e2e/cluster_upgrade.go index 676309e463..8ace0ce776 100644 --- a/test/e2e/cluster_upgrade.go +++ b/test/e2e/cluster_upgrade.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/configmap.go b/test/e2e/configmap.go index 205a4c2f37..1d25e961f7 100644 --- a/test/e2e/configmap.go +++ b/test/e2e/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/container_probe.go b/test/e2e/container_probe.go index 33408a7dd4..4e63962406 100644 --- a/test/e2e/container_probe.go +++ b/test/e2e/container_probe.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/daemon_restart.go b/test/e2e/daemon_restart.go index 43ef6749c9..32a8dbe1dc 100644 --- a/test/e2e/daemon_restart.go +++ b/test/e2e/daemon_restart.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/daemon_set.go b/test/e2e/daemon_set.go index 2ea6072cd6..b412e29a75 100644 --- a/test/e2e/daemon_set.go +++ b/test/e2e/daemon_set.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/dashboard.go b/test/e2e/dashboard.go index 306e690290..fecad0d8cc 100644 --- a/test/e2e/dashboard.go +++ b/test/e2e/dashboard.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/density.go b/test/e2e/density.go index 147e213d86..b4f5fa3fd0 100644 --- a/test/e2e/density.go +++ b/test/e2e/density.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/deployment.go b/test/e2e/deployment.go index d5f268ff10..e9f16f4dc6 100644 --- a/test/e2e/deployment.go +++ b/test/e2e/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/dns.go b/test/e2e/dns.go index 6e92bf6170..bc57f85bb9 100644 --- a/test/e2e/dns.go +++ b/test/e2e/dns.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/docker_containers.go b/test/e2e/docker_containers.go index b38cb93f2d..b70eab83c4 100644 --- a/test/e2e/docker_containers.go +++ b/test/e2e/docker_containers.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/downward_api.go b/test/e2e/downward_api.go index e75f787f45..d28e1c3610 100644 --- a/test/e2e/downward_api.go +++ b/test/e2e/downward_api.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/downwardapi_volume.go b/test/e2e/downwardapi_volume.go index be7a75b1f4..7a40f51a77 100644 --- a/test/e2e/downwardapi_volume.go +++ b/test/e2e/downwardapi_volume.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/e2e.go b/test/e2e/e2e.go index 0b65f7d207..b95a734d63 100644 --- a/test/e2e/e2e.go +++ b/test/e2e/e2e.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 3697aeb1b6..30136f3015 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/empty_dir.go b/test/e2e/empty_dir.go index ed1fc40977..2513f8b696 100644 --- a/test/e2e/empty_dir.go +++ b/test/e2e/empty_dir.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/empty_dir_wrapper.go b/test/e2e/empty_dir_wrapper.go index ec5dad8c69..9b2a39f645 100644 --- a/test/e2e/empty_dir_wrapper.go +++ b/test/e2e/empty_dir_wrapper.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/es_cluster_logging.go b/test/e2e/es_cluster_logging.go index b12b24c1a8..f226d26d49 100644 --- a/test/e2e/es_cluster_logging.go +++ b/test/e2e/es_cluster_logging.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/etcd_failure.go b/test/e2e/etcd_failure.go index 0fb6a0c66e..ac2fa63805 100644 --- a/test/e2e/etcd_failure.go +++ b/test/e2e/etcd_failure.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/events.go b/test/e2e/events.go index ee655500fa..4d8aec8dba 100644 --- a/test/e2e/events.go +++ b/test/e2e/events.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/example_cluster_dns.go b/test/e2e/example_cluster_dns.go index a94c6795e9..9697c19c9c 100644 --- a/test/e2e/example_cluster_dns.go +++ b/test/e2e/example_cluster_dns.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/example_k8petstore.go b/test/e2e/example_k8petstore.go index a3558ac4ac..10fa4c5f93 100644 --- a/test/e2e/example_k8petstore.go +++ b/test/e2e/example_k8petstore.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/examples.go b/test/e2e/examples.go index f9ad759166..dddcfdb218 100644 --- a/test/e2e/examples.go +++ b/test/e2e/examples.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/expansion.go b/test/e2e/expansion.go index f0a5f44cb9..24dec05b17 100644 --- a/test/e2e/expansion.go +++ b/test/e2e/expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/federated-service.go b/test/e2e/federated-service.go index 95385b58e6..57e5f674f2 100644 --- a/test/e2e/federated-service.go +++ b/test/e2e/federated-service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/federation-apiserver.go b/test/e2e/federation-apiserver.go index 26b115219a..9be08a8416 100644 --- a/test/e2e/federation-apiserver.go +++ b/test/e2e/federation-apiserver.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/federation-util.go b/test/e2e/federation-util.go index 2082a122a5..460180072a 100644 --- a/test/e2e/federation-util.go +++ b/test/e2e/federation-util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/cleanup.go b/test/e2e/framework/cleanup.go index deffc4e49a..55fa1d4a4c 100644 --- a/test/e2e/framework/cleanup.go +++ b/test/e2e/framework/cleanup.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/federation_util.go b/test/e2e/framework/federation_util.go index a018d2b602..831206cbb3 100644 --- a/test/e2e/framework/federation_util.go +++ b/test/e2e/framework/federation_util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index cdc7e27a8c..4ca5c5ebde 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/gobindata_util.go b/test/e2e/framework/gobindata_util.go index 2353297b32..e26cca9348 100644 --- a/test/e2e/framework/gobindata_util.go +++ b/test/e2e/framework/gobindata_util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/kubelet_stats.go b/test/e2e/framework/kubelet_stats.go index 4b796b2ff7..4be8e02121 100644 --- a/test/e2e/framework/kubelet_stats.go +++ b/test/e2e/framework/kubelet_stats.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/log_size_monitoring.go b/test/e2e/framework/log_size_monitoring.go index 2ab7457e31..ea7110401f 100644 --- a/test/e2e/framework/log_size_monitoring.go +++ b/test/e2e/framework/log_size_monitoring.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/metrics_util.go b/test/e2e/framework/metrics_util.go index 87338aee4d..753e8f2387 100644 --- a/test/e2e/framework/metrics_util.go +++ b/test/e2e/framework/metrics_util.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/nodes_util.go b/test/e2e/framework/nodes_util.go index 1a9399aace..a7184f8db0 100644 --- a/test/e2e/framework/nodes_util.go +++ b/test/e2e/framework/nodes_util.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/perf_util.go b/test/e2e/framework/perf_util.go index 71e5bde41f..83f15c8aa9 100644 --- a/test/e2e/framework/perf_util.go +++ b/test/e2e/framework/perf_util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/pods.go b/test/e2e/framework/pods.go index 8530c2fc77..8762eec853 100644 --- a/test/e2e/framework/pods.go +++ b/test/e2e/framework/pods.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/prompush.go b/test/e2e/framework/prompush.go index 246387a0a2..9d6b17fa01 100644 --- a/test/e2e/framework/prompush.go +++ b/test/e2e/framework/prompush.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/resource_usage_gatherer.go b/test/e2e/framework/resource_usage_gatherer.go index ac1ff5a3fe..45691e5c4e 100644 --- a/test/e2e/framework/resource_usage_gatherer.go +++ b/test/e2e/framework/resource_usage_gatherer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/test_context.go b/test/e2e/framework/test_context.go index 05dd829ab6..2eeb188fb1 100644 --- a/test/e2e/framework/test_context.go +++ b/test/e2e/framework/test_context.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 76ef5fd4b9..acaac1cd81 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/generated_clientset.go b/test/e2e/generated_clientset.go index 78fd4b9162..2cdd22f850 100644 --- a/test/e2e/generated_clientset.go +++ b/test/e2e/generated_clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/gke_local_ssd.go b/test/e2e/gke_local_ssd.go index ea0d43d021..3e596b86ca 100644 --- a/test/e2e/gke_local_ssd.go +++ b/test/e2e/gke_local_ssd.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/gke_node_pools.go b/test/e2e/gke_node_pools.go index 3955b5d315..18103b3142 100644 --- a/test/e2e/gke_node_pools.go +++ b/test/e2e/gke_node_pools.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/google_compute.go b/test/e2e/google_compute.go index 7a8d144fc3..19f067fab6 100644 --- a/test/e2e/google_compute.go +++ b/test/e2e/google_compute.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/horizontal_pod_autoscaling.go b/test/e2e/horizontal_pod_autoscaling.go index 48a55e6297..b5d85c6193 100644 --- a/test/e2e/horizontal_pod_autoscaling.go +++ b/test/e2e/horizontal_pod_autoscaling.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/host_path.go b/test/e2e/host_path.go index 3f264b6b88..2c6aab684d 100644 --- a/test/e2e/host_path.go +++ b/test/e2e/host_path.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/ingress.go b/test/e2e/ingress.go index 8e39b7590b..593c8ce79b 100644 --- a/test/e2e/ingress.go +++ b/test/e2e/ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/ingress_utils.go b/test/e2e/ingress_utils.go index c3fb1e73a5..33cbe017d9 100644 --- a/test/e2e/ingress_utils.go +++ b/test/e2e/ingress_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/initial_resources.go b/test/e2e/initial_resources.go index 8a6322075c..1c548fb6f2 100644 --- a/test/e2e/initial_resources.go +++ b/test/e2e/initial_resources.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/job.go b/test/e2e/job.go index 59c9565354..65224d846e 100644 --- a/test/e2e/job.go +++ b/test/e2e/job.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/kibana_logging.go b/test/e2e/kibana_logging.go index a5defbc044..594248437a 100644 --- a/test/e2e/kibana_logging.go +++ b/test/e2e/kibana_logging.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index 111b71d53e..3baedde6f0 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/kubelet.go b/test/e2e/kubelet.go index 0889a9cdc5..c128f6aaf5 100644 --- a/test/e2e/kubelet.go +++ b/test/e2e/kubelet.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/kubelet_etc_hosts.go b/test/e2e/kubelet_etc_hosts.go index 677b90a7df..cd4e32da5c 100644 --- a/test/e2e/kubelet_etc_hosts.go +++ b/test/e2e/kubelet_etc_hosts.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/kubelet_perf.go b/test/e2e/kubelet_perf.go index fb728631b0..5b7621e447 100644 --- a/test/e2e/kubelet_perf.go +++ b/test/e2e/kubelet_perf.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/kubeproxy.go b/test/e2e/kubeproxy.go index 258d72e6f0..0e808d0b25 100644 --- a/test/e2e/kubeproxy.go +++ b/test/e2e/kubeproxy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/limit_range.go b/test/e2e/limit_range.go index 11cfd0c8c9..fc0c5ed8cc 100644 --- a/test/e2e/limit_range.go +++ b/test/e2e/limit_range.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/load.go b/test/e2e/load.go index 26410e1f4f..f8d23497c0 100644 --- a/test/e2e/load.go +++ b/test/e2e/load.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/mesos.go b/test/e2e/mesos.go index de6096f6df..03447f5bb1 100644 --- a/test/e2e/mesos.go +++ b/test/e2e/mesos.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/metrics_grabber_test.go b/test/e2e/metrics_grabber_test.go index 4d966f54b0..683f62b3d6 100644 --- a/test/e2e/metrics_grabber_test.go +++ b/test/e2e/metrics_grabber_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/monitoring.go b/test/e2e/monitoring.go index 137c5b0f27..6cc4f08f9b 100644 --- a/test/e2e/monitoring.go +++ b/test/e2e/monitoring.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/namespace.go b/test/e2e/namespace.go index 44b5f290a8..27ed243a52 100644 --- a/test/e2e/namespace.go +++ b/test/e2e/namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/networking.go b/test/e2e/networking.go index d00fd6ccf4..a09fba670b 100644 --- a/test/e2e/networking.go +++ b/test/e2e/networking.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/networking_perf.go b/test/e2e/networking_perf.go index 775bf3bdb5..b351df449c 100644 --- a/test/e2e/networking_perf.go +++ b/test/e2e/networking_perf.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/node_problem_detector.go b/test/e2e/node_problem_detector.go index 529c411f73..6f744466e0 100644 --- a/test/e2e/node_problem_detector.go +++ b/test/e2e/node_problem_detector.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/nodeoutofdisk.go b/test/e2e/nodeoutofdisk.go index c700d7c024..cc520149df 100644 --- a/test/e2e/nodeoutofdisk.go +++ b/test/e2e/nodeoutofdisk.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/pd.go b/test/e2e/pd.go index 41de6602d3..19b7827ee9 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/perftype/perftype.go b/test/e2e/perftype/perftype.go index 99e48e3fd7..c39585de43 100644 --- a/test/e2e/perftype/perftype.go +++ b/test/e2e/perftype/perftype.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/persistent_volumes.go b/test/e2e/persistent_volumes.go index 4cee35d196..7e9299a13b 100644 --- a/test/e2e/persistent_volumes.go +++ b/test/e2e/persistent_volumes.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/petset.go b/test/e2e/petset.go index db177e4653..648d1ee274 100644 --- a/test/e2e/petset.go +++ b/test/e2e/petset.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/pod_gc.go b/test/e2e/pod_gc.go index 707d8db233..ed545608eb 100644 --- a/test/e2e/pod_gc.go +++ b/test/e2e/pod_gc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/pods.go b/test/e2e/pods.go index 8af49303b7..430e27007a 100644 --- a/test/e2e/pods.go +++ b/test/e2e/pods.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/portforward.go b/test/e2e/portforward.go index 6ba46eeffe..5502e65962 100644 --- a/test/e2e/portforward.go +++ b/test/e2e/portforward.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/pre_stop.go b/test/e2e/pre_stop.go index e2bfa51bbe..2ab2f9686a 100644 --- a/test/e2e/pre_stop.go +++ b/test/e2e/pre_stop.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/privileged.go b/test/e2e/privileged.go index 38104adeea..c606552dbb 100644 --- a/test/e2e/privileged.go +++ b/test/e2e/privileged.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/proxy.go b/test/e2e/proxy.go index c752a2e147..adc071e93a 100644 --- a/test/e2e/proxy.go +++ b/test/e2e/proxy.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/rc.go b/test/e2e/rc.go index 87efda2f14..19637b03ed 100644 --- a/test/e2e/rc.go +++ b/test/e2e/rc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/reboot.go b/test/e2e/reboot.go index a81f1b9317..5c483d8fd7 100644 --- a/test/e2e/reboot.go +++ b/test/e2e/reboot.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/replica_set.go b/test/e2e/replica_set.go index 9fae8d198c..0e68ae33ce 100644 --- a/test/e2e/replica_set.go +++ b/test/e2e/replica_set.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/resize_nodes.go b/test/e2e/resize_nodes.go index 867831cc5f..8eef9023eb 100644 --- a/test/e2e/resize_nodes.go +++ b/test/e2e/resize_nodes.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/resource_quota.go b/test/e2e/resource_quota.go index 24b860ba4f..b383818345 100644 --- a/test/e2e/resource_quota.go +++ b/test/e2e/resource_quota.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/restart.go b/test/e2e/restart.go index d0b3d8ed7c..683390dafd 100644 --- a/test/e2e/restart.go +++ b/test/e2e/restart.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/scheduler_predicates.go b/test/e2e/scheduler_predicates.go index f7de6ecd43..5daa06b8ce 100644 --- a/test/e2e/scheduler_predicates.go +++ b/test/e2e/scheduler_predicates.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/secrets.go b/test/e2e/secrets.go index ea46413ee5..f501c81f77 100644 --- a/test/e2e/secrets.go +++ b/test/e2e/secrets.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/security_context.go b/test/e2e/security_context.go index f9a64f758c..a18dbad14a 100644 --- a/test/e2e/security_context.go +++ b/test/e2e/security_context.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/service.go b/test/e2e/service.go index d18560f053..ce4533970c 100644 --- a/test/e2e/service.go +++ b/test/e2e/service.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/service_accounts.go b/test/e2e/service_accounts.go index c60d867f01..9c4da13a09 100644 --- a/test/e2e/service_accounts.go +++ b/test/e2e/service_accounts.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/service_latency.go b/test/e2e/service_latency.go index e309a33a96..1a833841ee 100644 --- a/test/e2e/service_latency.go +++ b/test/e2e/service_latency.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/serviceloadbalancers.go b/test/e2e/serviceloadbalancers.go index a8c50311d6..5071154c1d 100644 --- a/test/e2e/serviceloadbalancers.go +++ b/test/e2e/serviceloadbalancers.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/ssh.go b/test/e2e/ssh.go index 0a6896b66c..f4ce5ecd93 100644 --- a/test/e2e/ssh.go +++ b/test/e2e/ssh.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/third-party.go b/test/e2e/third-party.go index db7c299818..c9a0814270 100644 --- a/test/e2e/third-party.go +++ b/test/e2e/third-party.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/ubernetes_lite.go b/test/e2e/ubernetes_lite.go index 220d295fcc..ffa74f20ef 100644 --- a/test/e2e/ubernetes_lite.go +++ b/test/e2e/ubernetes_lite.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/util_iperf.go b/test/e2e/util_iperf.go index ccf4a70e04..0e568a0778 100644 --- a/test/e2e/util_iperf.go +++ b/test/e2e/util_iperf.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/volume_provisioning.go b/test/e2e/volume_provisioning.go index 30bfa7bf46..0def8e8b06 100644 --- a/test/e2e/volume_provisioning.go +++ b/test/e2e/volume_provisioning.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e/volumes.go b/test/e2e/volumes.go index ed1b6080a6..d6c0dcb664 100644 --- a/test/e2e/volumes.go +++ b/test/e2e/volumes.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/configmap.go b/test/e2e_node/configmap.go index 53b377105b..1107b1648f 100644 --- a/test/e2e_node/configmap.go +++ b/test/e2e_node/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/container.go b/test/e2e_node/container.go index faaa6d6727..02c7ca5f73 100644 --- a/test/e2e_node/container.go +++ b/test/e2e_node/container.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/container_list.go b/test/e2e_node/container_list.go index 0a75e6f265..8bbd839b97 100644 --- a/test/e2e_node/container_list.go +++ b/test/e2e_node/container_list.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/container_manager_test.go b/test/e2e_node/container_manager_test.go index dec3151f5a..029687e479 100644 --- a/test/e2e_node/container_manager_test.go +++ b/test/e2e_node/container_manager_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/doc.go b/test/e2e_node/doc.go index b80586bcf0..c4714893ba 100644 --- a/test/e2e_node/doc.go +++ b/test/e2e_node/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/downward_api_test.go b/test/e2e_node/downward_api_test.go index 41f1913508..a348c6beb0 100644 --- a/test/e2e_node/downward_api_test.go +++ b/test/e2e_node/downward_api_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/e2e_build.go b/test/e2e_node/e2e_build.go index 5cb2d3d126..f798013dc7 100644 --- a/test/e2e_node/e2e_build.go +++ b/test/e2e_node/e2e_build.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/e2e_node_suite_test.go b/test/e2e_node/e2e_node_suite_test.go index 450d2abb62..b4a93ba5ef 100644 --- a/test/e2e_node/e2e_node_suite_test.go +++ b/test/e2e_node/e2e_node_suite_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/e2e_remote.go b/test/e2e_node/e2e_remote.go index a9ae1de2a6..70ffb81e32 100644 --- a/test/e2e_node/e2e_remote.go +++ b/test/e2e_node/e2e_remote.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/e2e_service.go b/test/e2e_node/e2e_service.go index bb73b67084..27cd489a79 100644 --- a/test/e2e_node/e2e_service.go +++ b/test/e2e_node/e2e_service.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/environment/conformance.go b/test/e2e_node/environment/conformance.go index ad9ac4a14c..c5022c8343 100644 --- a/test/e2e_node/environment/conformance.go +++ b/test/e2e_node/environment/conformance.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/environment/setup_host.sh b/test/e2e_node/environment/setup_host.sh index 48393469cc..b67063019d 100755 --- a/test/e2e_node/environment/setup_host.sh +++ b/test/e2e_node/environment/setup_host.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/e2e_node/exec_util.go b/test/e2e_node/exec_util.go index dce6482b6a..31afc64a68 100644 --- a/test/e2e_node/exec_util.go +++ b/test/e2e_node/exec_util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/image.go b/test/e2e_node/image.go index dfbbac5e78..614b686b31 100644 --- a/test/e2e_node/image.go +++ b/test/e2e_node/image.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/image_conformance_test.go b/test/e2e_node/image_conformance_test.go index c8046257e0..17708ec0a6 100644 --- a/test/e2e_node/image_conformance_test.go +++ b/test/e2e_node/image_conformance_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/jenkins/copy-e2e-image.sh b/test/e2e_node/jenkins/copy-e2e-image.sh index 48c0b2c430..b32805c99c 100755 --- a/test/e2e_node/jenkins/copy-e2e-image.sh +++ b/test/e2e_node/jenkins/copy-e2e-image.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/e2e_node/jenkins/e2e-node-jenkins.sh b/test/e2e_node/jenkins/e2e-node-jenkins.sh index c5e5e8f24f..862fb088fd 100755 --- a/test/e2e_node/jenkins/e2e-node-jenkins.sh +++ b/test/e2e_node/jenkins/e2e-node-jenkins.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/e2e_node/kubelet_test.go b/test/e2e_node/kubelet_test.go index 4ae05c5b6a..89c89907aa 100644 --- a/test/e2e_node/kubelet_test.go +++ b/test/e2e_node/kubelet_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/mirror_pod_test.go b/test/e2e_node/mirror_pod_test.go index 9a02996b0e..e7a38390a1 100644 --- a/test/e2e_node/mirror_pod_test.go +++ b/test/e2e_node/mirror_pod_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/privileged_test.go b/test/e2e_node/privileged_test.go index bff719a1e2..08939804c2 100644 --- a/test/e2e_node/privileged_test.go +++ b/test/e2e_node/privileged_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/runner/run_e2e.go b/test/e2e_node/runner/run_e2e.go index ac0ee95af8..0dca4e2126 100644 --- a/test/e2e_node/runner/run_e2e.go +++ b/test/e2e_node/runner/run_e2e.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/runtime_conformance_test.go b/test/e2e_node/runtime_conformance_test.go index bf92786908..baf4d71e9f 100644 --- a/test/e2e_node/runtime_conformance_test.go +++ b/test/e2e_node/runtime_conformance_test.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/e2e_node/util.go b/test/e2e_node/util.go index d5431d186a..00f12a13fb 100644 --- a/test/e2e_node/util.go +++ b/test/e2e_node/util.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/clusterapi-tester/Dockerfile b/test/images/clusterapi-tester/Dockerfile index 54f820dbc3..298258a351 100644 --- a/test/images/clusterapi-tester/Dockerfile +++ b/test/images/clusterapi-tester/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/clusterapi-tester/Makefile b/test/images/clusterapi-tester/Makefile index 9edf60f2fc..56ea5271b3 100644 --- a/test/images/clusterapi-tester/Makefile +++ b/test/images/clusterapi-tester/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/clusterapi-tester/main.go b/test/images/clusterapi-tester/main.go index b38e3986b4..f366b9a8d3 100644 --- a/test/images/clusterapi-tester/main.go +++ b/test/images/clusterapi-tester/main.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/dnsutils/Dockerfile b/test/images/dnsutils/Dockerfile index 538bcb97ac..75cd5c1c46 100644 --- a/test/images/dnsutils/Dockerfile +++ b/test/images/dnsutils/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/dnsutils/Makefile b/test/images/dnsutils/Makefile index 3224dc3aa0..2ec14dbf95 100644 --- a/test/images/dnsutils/Makefile +++ b/test/images/dnsutils/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/entrypoint-tester/Dockerfile b/test/images/entrypoint-tester/Dockerfile index 66c517d5b5..92dfe72999 100644 --- a/test/images/entrypoint-tester/Dockerfile +++ b/test/images/entrypoint-tester/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/entrypoint-tester/Makefile b/test/images/entrypoint-tester/Makefile index 31c703378e..76ac870120 100644 --- a/test/images/entrypoint-tester/Makefile +++ b/test/images/entrypoint-tester/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/entrypoint-tester/ep.go b/test/images/entrypoint-tester/ep.go index 05cc747114..e76fd31c0d 100644 --- a/test/images/entrypoint-tester/ep.go +++ b/test/images/entrypoint-tester/ep.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/fakegitserver/Dockerfile b/test/images/fakegitserver/Dockerfile index da8d0ffefa..8ec3654f01 100644 --- a/test/images/fakegitserver/Dockerfile +++ b/test/images/fakegitserver/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/fakegitserver/Makefile b/test/images/fakegitserver/Makefile index 514d1aa05f..8fa4e68d88 100644 --- a/test/images/fakegitserver/Makefile +++ b/test/images/fakegitserver/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/fakegitserver/gitserver.go b/test/images/fakegitserver/gitserver.go index b10ff1ecfe..6077fb661c 100644 --- a/test/images/fakegitserver/gitserver.go +++ b/test/images/fakegitserver/gitserver.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/fakegitserver/prepare.sh b/test/images/fakegitserver/prepare.sh index 326a63078d..414e044797 100755 --- a/test/images/fakegitserver/prepare.sh +++ b/test/images/fakegitserver/prepare.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/goproxy/Dockerfile b/test/images/goproxy/Dockerfile index f5a9540ae1..d72ac441f6 100644 --- a/test/images/goproxy/Dockerfile +++ b/test/images/goproxy/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/goproxy/Makefile b/test/images/goproxy/Makefile index 314ce07387..5e5ab3d79c 100644 --- a/test/images/goproxy/Makefile +++ b/test/images/goproxy/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/goproxy/goproxy.go b/test/images/goproxy/goproxy.go index b3b1f6e243..28e25c5c4d 100644 --- a/test/images/goproxy/goproxy.go +++ b/test/images/goproxy/goproxy.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/hostexec/Dockerfile b/test/images/hostexec/Dockerfile index daac6b00fc..98f2565f7c 100644 --- a/test/images/hostexec/Dockerfile +++ b/test/images/hostexec/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/hostexec/Makefile b/test/images/hostexec/Makefile index 6fd8a9da7d..f16626824d 100644 --- a/test/images/hostexec/Makefile +++ b/test/images/hostexec/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/iperf/Dockerfile b/test/images/iperf/Dockerfile index a0abaa1cee..6c5ccd9f55 100644 --- a/test/images/iperf/Dockerfile +++ b/test/images/iperf/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/iperf/Makefile b/test/images/iperf/Makefile index 451b145fe7..a97de240a8 100644 --- a/test/images/iperf/Makefile +++ b/test/images/iperf/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/jessie-dnsutils/Dockerfile b/test/images/jessie-dnsutils/Dockerfile index d796330d8a..97500dfdec 100644 --- a/test/images/jessie-dnsutils/Dockerfile +++ b/test/images/jessie-dnsutils/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/jessie-dnsutils/Makefile b/test/images/jessie-dnsutils/Makefile index fc6fabeef8..f89602843f 100644 --- a/test/images/jessie-dnsutils/Makefile +++ b/test/images/jessie-dnsutils/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/mount-tester-user/Dockerfile b/test/images/mount-tester-user/Dockerfile index 36b8ddf23d..6d974c0ac0 100644 --- a/test/images/mount-tester-user/Dockerfile +++ b/test/images/mount-tester-user/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/mount-tester-user/Makefile b/test/images/mount-tester-user/Makefile index ce80af9167..aec8d86005 100644 --- a/test/images/mount-tester-user/Makefile +++ b/test/images/mount-tester-user/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/mount-tester/Dockerfile b/test/images/mount-tester/Dockerfile index 4ee867c826..ab3b9e8d2e 100644 --- a/test/images/mount-tester/Dockerfile +++ b/test/images/mount-tester/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/mount-tester/Makefile b/test/images/mount-tester/Makefile index 857df90495..6344abe97d 100644 --- a/test/images/mount-tester/Makefile +++ b/test/images/mount-tester/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/mount-tester/mt.go b/test/images/mount-tester/mt.go index 01b6716e28..79ebdaeb99 100644 --- a/test/images/mount-tester/mt.go +++ b/test/images/mount-tester/mt.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/n-way-http/Dockerfile b/test/images/n-way-http/Dockerfile index c14b05ee6e..63c4066cf4 100644 --- a/test/images/n-way-http/Dockerfile +++ b/test/images/n-way-http/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/n-way-http/Makefile b/test/images/n-way-http/Makefile index b11518b65d..de23abd7ff 100644 --- a/test/images/n-way-http/Makefile +++ b/test/images/n-way-http/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/n-way-http/server.go b/test/images/n-way-http/server.go index 057cfef9f3..90e276cf2e 100644 --- a/test/images/n-way-http/server.go +++ b/test/images/n-way-http/server.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/netexec/Dockerfile b/test/images/netexec/Dockerfile index 4ea43d68fe..3bcda40708 100644 --- a/test/images/netexec/Dockerfile +++ b/test/images/netexec/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/netexec/Makefile b/test/images/netexec/Makefile index 92ce096795..e0d477c941 100644 --- a/test/images/netexec/Makefile +++ b/test/images/netexec/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/netexec/netexec.go b/test/images/netexec/netexec.go index 5c68a8d635..dd9a0a7206 100644 --- a/test/images/netexec/netexec.go +++ b/test/images/netexec/netexec.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/network-tester/Dockerfile b/test/images/network-tester/Dockerfile index aeb5aece6c..30a2be1448 100644 --- a/test/images/network-tester/Dockerfile +++ b/test/images/network-tester/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/network-tester/Makefile b/test/images/network-tester/Makefile index 238454a83a..31dfd02c93 100644 --- a/test/images/network-tester/Makefile +++ b/test/images/network-tester/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/network-tester/webserver.go b/test/images/network-tester/webserver.go index ee9c720363..c53f610c8e 100644 --- a/test/images/network-tester/webserver.go +++ b/test/images/network-tester/webserver.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/pets/redis/Dockerfile b/test/images/pets/redis/Dockerfile index bb2c018ded..fef4b588a2 100644 --- a/test/images/pets/redis/Dockerfile +++ b/test/images/pets/redis/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/pets/redis/Makefile b/test/images/pets/redis/Makefile index b2227f4d55..32bfc1549c 100644 --- a/test/images/pets/redis/Makefile +++ b/test/images/pets/redis/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/pets/redis/install.sh b/test/images/pets/redis/install.sh index f8f6909208..8b22703b8d 100755 --- a/test/images/pets/redis/install.sh +++ b/test/images/pets/redis/install.sh @@ -1,6 +1,6 @@ #! /bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/pets/redis/on-start.sh b/test/images/pets/redis/on-start.sh index 37d3be0326..8e9471e43d 100755 --- a/test/images/pets/redis/on-start.sh +++ b/test/images/pets/redis/on-start.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/pets/zookeeper/Dockerfile b/test/images/pets/zookeeper/Dockerfile index e0522f7b17..51a82eb835 100644 --- a/test/images/pets/zookeeper/Dockerfile +++ b/test/images/pets/zookeeper/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/pets/zookeeper/Makefile b/test/images/pets/zookeeper/Makefile index 035efbb874..07528197b0 100644 --- a/test/images/pets/zookeeper/Makefile +++ b/test/images/pets/zookeeper/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/pets/zookeeper/install.sh b/test/images/pets/zookeeper/install.sh index 5c44dc4d8f..e769cb0cb2 100755 --- a/test/images/pets/zookeeper/install.sh +++ b/test/images/pets/zookeeper/install.sh @@ -1,6 +1,6 @@ #! /bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/pets/zookeeper/on-start.sh b/test/images/pets/zookeeper/on-start.sh index 4430a25095..6b642f5f69 100755 --- a/test/images/pets/zookeeper/on-start.sh +++ b/test/images/pets/zookeeper/on-start.sh @@ -1,6 +1,6 @@ #! /bin/bash -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/port-forward-tester/Dockerfile b/test/images/port-forward-tester/Dockerfile index 1933d443d3..3d27fc50fb 100644 --- a/test/images/port-forward-tester/Dockerfile +++ b/test/images/port-forward-tester/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/port-forward-tester/Makefile b/test/images/port-forward-tester/Makefile index 8e29d6a30c..a077ea4f19 100644 --- a/test/images/port-forward-tester/Makefile +++ b/test/images/port-forward-tester/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/port-forward-tester/portforwardtester.go b/test/images/port-forward-tester/portforwardtester.go index 38f202bf52..66e82bc78c 100644 --- a/test/images/port-forward-tester/portforwardtester.go +++ b/test/images/port-forward-tester/portforwardtester.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/porter/Dockerfile b/test/images/porter/Dockerfile index 2d62b45235..6cde33b577 100644 --- a/test/images/porter/Dockerfile +++ b/test/images/porter/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/porter/Makefile b/test/images/porter/Makefile index 3b758429e4..747f1b8b21 100644 --- a/test/images/porter/Makefile +++ b/test/images/porter/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/porter/porter.go b/test/images/porter/porter.go index 0e5c73c59c..43ea56403b 100644 --- a/test/images/porter/porter.go +++ b/test/images/porter/porter.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/resource-consumer/Dockerfile b/test/images/resource-consumer/Dockerfile index d3eca617d2..523f68a17f 100644 --- a/test/images/resource-consumer/Dockerfile +++ b/test/images/resource-consumer/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/resource-consumer/Makefile b/test/images/resource-consumer/Makefile index f117558cd5..76a2cfcc68 100644 --- a/test/images/resource-consumer/Makefile +++ b/test/images/resource-consumer/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/resource-consumer/common/common.go b/test/images/resource-consumer/common/common.go index cce32781ce..a1423146f8 100644 --- a/test/images/resource-consumer/common/common.go +++ b/test/images/resource-consumer/common/common.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/resource-consumer/consume-cpu/consume_cpu.go b/test/images/resource-consumer/consume-cpu/consume_cpu.go index d859d9e24d..b7baf6e71b 100644 --- a/test/images/resource-consumer/consume-cpu/consume_cpu.go +++ b/test/images/resource-consumer/consume-cpu/consume_cpu.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/resource-consumer/controller/Dockerfile b/test/images/resource-consumer/controller/Dockerfile index e60734d15c..f8fe32eca9 100644 --- a/test/images/resource-consumer/controller/Dockerfile +++ b/test/images/resource-consumer/controller/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/resource-consumer/controller/controller.go b/test/images/resource-consumer/controller/controller.go index 404fb4e319..7e33ceeda8 100644 --- a/test/images/resource-consumer/controller/controller.go +++ b/test/images/resource-consumer/controller/controller.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/resource-consumer/resource_consumer.go b/test/images/resource-consumer/resource_consumer.go index a76dc1d186..957e74edd3 100644 --- a/test/images/resource-consumer/resource_consumer.go +++ b/test/images/resource-consumer/resource_consumer.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/resource-consumer/resource_consumer_handler.go b/test/images/resource-consumer/resource_consumer_handler.go index 4960b6a5f7..755daba32e 100644 --- a/test/images/resource-consumer/resource_consumer_handler.go +++ b/test/images/resource-consumer/resource_consumer_handler.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/resource-consumer/utils.go b/test/images/resource-consumer/utils.go index 806f4dd92b..2e11b2ee9f 100644 --- a/test/images/resource-consumer/utils.go +++ b/test/images/resource-consumer/utils.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/serve_hostname/Dockerfile b/test/images/serve_hostname/Dockerfile index 113ffd94d3..cf1d41beb3 100644 --- a/test/images/serve_hostname/Dockerfile +++ b/test/images/serve_hostname/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/serve_hostname/Makefile b/test/images/serve_hostname/Makefile index e015f842a4..e6aff5606c 100644 --- a/test/images/serve_hostname/Makefile +++ b/test/images/serve_hostname/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/serve_hostname/serve_hostname.go b/test/images/serve_hostname/serve_hostname.go index e00151ce80..ad8407430b 100644 --- a/test/images/serve_hostname/serve_hostname.go +++ b/test/images/serve_hostname/serve_hostname.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/ceph/Dockerfile b/test/images/volumes-tester/ceph/Dockerfile index a3e88faf4c..75cdab4c4d 100644 --- a/test/images/volumes-tester/ceph/Dockerfile +++ b/test/images/volumes-tester/ceph/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/ceph/Makefile b/test/images/volumes-tester/ceph/Makefile index 74b94ef43a..9333ade68f 100644 --- a/test/images/volumes-tester/ceph/Makefile +++ b/test/images/volumes-tester/ceph/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/ceph/init.sh b/test/images/volumes-tester/ceph/init.sh index 9cf3132939..213630dd2b 100755 --- a/test/images/volumes-tester/ceph/init.sh +++ b/test/images/volumes-tester/ceph/init.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/ceph/install.sh b/test/images/volumes-tester/ceph/install.sh index 4c86f3d1e6..6a96ad9740 100755 --- a/test/images/volumes-tester/ceph/install.sh +++ b/test/images/volumes-tester/ceph/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/gluster/Dockerfile b/test/images/volumes-tester/gluster/Dockerfile index d8e6b387f3..22b6550b3d 100644 --- a/test/images/volumes-tester/gluster/Dockerfile +++ b/test/images/volumes-tester/gluster/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/gluster/Makefile b/test/images/volumes-tester/gluster/Makefile index be24aed76b..8dbb463673 100644 --- a/test/images/volumes-tester/gluster/Makefile +++ b/test/images/volumes-tester/gluster/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/gluster/run_gluster.sh b/test/images/volumes-tester/gluster/run_gluster.sh index a961834ac2..a813098ff2 100755 --- a/test/images/volumes-tester/gluster/run_gluster.sh +++ b/test/images/volumes-tester/gluster/run_gluster.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/iscsi/Dockerfile b/test/images/volumes-tester/iscsi/Dockerfile index 4d8b91abab..d965ef7730 100644 --- a/test/images/volumes-tester/iscsi/Dockerfile +++ b/test/images/volumes-tester/iscsi/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/iscsi/Makefile b/test/images/volumes-tester/iscsi/Makefile index b912dba85f..353933c28f 100644 --- a/test/images/volumes-tester/iscsi/Makefile +++ b/test/images/volumes-tester/iscsi/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/iscsi/create_block.sh b/test/images/volumes-tester/iscsi/create_block.sh index b07e98c9b4..0fe90f7167 100755 --- a/test/images/volumes-tester/iscsi/create_block.sh +++ b/test/images/volumes-tester/iscsi/create_block.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/iscsi/run_iscsid.sh b/test/images/volumes-tester/iscsi/run_iscsid.sh index 644e338138..767f48d077 100755 --- a/test/images/volumes-tester/iscsi/run_iscsid.sh +++ b/test/images/volumes-tester/iscsi/run_iscsid.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/nfs/Dockerfile b/test/images/volumes-tester/nfs/Dockerfile index fc895178f2..38eb14aa23 100644 --- a/test/images/volumes-tester/nfs/Dockerfile +++ b/test/images/volumes-tester/nfs/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/nfs/Makefile b/test/images/volumes-tester/nfs/Makefile index 69734d4e38..85dd053b6a 100644 --- a/test/images/volumes-tester/nfs/Makefile +++ b/test/images/volumes-tester/nfs/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/nfs/run_nfs.sh b/test/images/volumes-tester/nfs/run_nfs.sh index 1714d35259..fa7b165c01 100755 --- a/test/images/volumes-tester/nfs/run_nfs.sh +++ b/test/images/volumes-tester/nfs/run_nfs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/rbd/Dockerfile b/test/images/volumes-tester/rbd/Dockerfile index ce6d1a6712..4fb70e53c8 100644 --- a/test/images/volumes-tester/rbd/Dockerfile +++ b/test/images/volumes-tester/rbd/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/rbd/Makefile b/test/images/volumes-tester/rbd/Makefile index cf4b87b549..97b86dcb42 100644 --- a/test/images/volumes-tester/rbd/Makefile +++ b/test/images/volumes-tester/rbd/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/rbd/bootstrap.sh b/test/images/volumes-tester/rbd/bootstrap.sh index b9f2acc8ab..bb670aca05 100755 --- a/test/images/volumes-tester/rbd/bootstrap.sh +++ b/test/images/volumes-tester/rbd/bootstrap.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/rbd/ceph.conf.sh b/test/images/volumes-tester/rbd/ceph.conf.sh index f3f557585c..ecafa43d6b 100755 --- a/test/images/volumes-tester/rbd/ceph.conf.sh +++ b/test/images/volumes-tester/rbd/ceph.conf.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/rbd/create_block.sh b/test/images/volumes-tester/rbd/create_block.sh index 87c7eeaba7..e865463a64 100755 --- a/test/images/volumes-tester/rbd/create_block.sh +++ b/test/images/volumes-tester/rbd/create_block.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/rbd/mon.sh b/test/images/volumes-tester/rbd/mon.sh index 8013044b89..e97baee5a8 100755 --- a/test/images/volumes-tester/rbd/mon.sh +++ b/test/images/volumes-tester/rbd/mon.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/images/volumes-tester/rbd/osd.sh b/test/images/volumes-tester/rbd/osd.sh index 8daf6492ce..fb18f9cb90 100755 --- a/test/images/volumes-tester/rbd/osd.sh +++ b/test/images/volumes-tester/rbd/osd.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/integration/auth_test.go b/test/integration/auth_test.go index b28244ec00..0871944618 100644 --- a/test/integration/auth_test.go +++ b/test/integration/auth_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/client_test.go b/test/integration/client_test.go index 338d9dc941..158437efd4 100644 --- a/test/integration/client_test.go +++ b/test/integration/client_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/configmap_test.go b/test/integration/configmap_test.go index 2cf1ff1223..8c02bbbeb9 100644 --- a/test/integration/configmap_test.go +++ b/test/integration/configmap_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/doc.go b/test/integration/doc.go index 9b933d1369..737533f58e 100644 --- a/test/integration/doc.go +++ b/test/integration/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/dynamic_client_test.go b/test/integration/dynamic_client_test.go index a9f44e2e81..28ae9a732d 100644 --- a/test/integration/dynamic_client_test.go +++ b/test/integration/dynamic_client_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/etcd_tools_test.go b/test/integration/etcd_tools_test.go index b8488e848f..2b07f810e6 100644 --- a/test/integration/etcd_tools_test.go +++ b/test/integration/etcd_tools_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/extender_test.go b/test/integration/extender_test.go index 61c2173a64..91bd9c36dc 100644 --- a/test/integration/extender_test.go +++ b/test/integration/extender_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/framework/etcd_utils.go b/test/integration/framework/etcd_utils.go index 6762f64638..ee40ed11aa 100644 --- a/test/integration/framework/etcd_utils.go +++ b/test/integration/framework/etcd_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/framework/master_utils.go b/test/integration/framework/master_utils.go index 56b8f96b4d..2469d3002a 100644 --- a/test/integration/framework/master_utils.go +++ b/test/integration/framework/master_utils.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/framework/serializer.go b/test/integration/framework/serializer.go index c958999cd8..dc5ac6ba44 100644 --- a/test/integration/framework/serializer.go +++ b/test/integration/framework/serializer.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/garbage_collector_test.go b/test/integration/garbage_collector_test.go index ca4592f97c..abfc37035e 100644 --- a/test/integration/garbage_collector_test.go +++ b/test/integration/garbage_collector_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/kubectl_test.go b/test/integration/kubectl_test.go index 8853c43468..9d84ee93dd 100644 --- a/test/integration/kubectl_test.go +++ b/test/integration/kubectl_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/master_benchmark_test.go b/test/integration/master_benchmark_test.go index b8847550a6..5309925266 100644 --- a/test/integration/master_benchmark_test.go +++ b/test/integration/master_benchmark_test.go @@ -1,7 +1,7 @@ // +build benchmark,!no-etcd,!integration /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/master_test.go b/test/integration/master_test.go index 35f9e5cafc..0bc051998b 100644 --- a/test/integration/master_test.go +++ b/test/integration/master_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/metrics_test.go b/test/integration/metrics_test.go index c7445a8057..2529c25486 100644 --- a/test/integration/metrics_test.go +++ b/test/integration/metrics_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd,linux /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/openshift_test.go b/test/integration/openshift_test.go index 90f058bdcd..bd552d4488 100644 --- a/test/integration/openshift_test.go +++ b/test/integration/openshift_test.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/persistent_volumes_test.go b/test/integration/persistent_volumes_test.go index c1631a2e34..a5cda99143 100644 --- a/test/integration/persistent_volumes_test.go +++ b/test/integration/persistent_volumes_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/pods_test.go b/test/integration/pods_test.go index beff9d335b..da8a722a22 100644 --- a/test/integration/pods_test.go +++ b/test/integration/pods_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/quota_test.go b/test/integration/quota_test.go index a1ae1cb895..e58f7b4dac 100644 --- a/test/integration/quota_test.go +++ b/test/integration/quota_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/rbac_test.go b/test/integration/rbac_test.go index 4488ed0c71..56c13c71a4 100644 --- a/test/integration/rbac_test.go +++ b/test/integration/rbac_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/scheduler_test.go b/test/integration/scheduler_test.go index 9fb635e421..0efe26fe1e 100644 --- a/test/integration/scheduler_test.go +++ b/test/integration/scheduler_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/secret_test.go b/test/integration/secret_test.go index a87d166dbd..7c95ce4c58 100644 --- a/test/integration/secret_test.go +++ b/test/integration/secret_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/service_account_test.go b/test/integration/service_account_test.go index c8a367db97..c180cabf60 100644 --- a/test/integration/service_account_test.go +++ b/test/integration/service_account_test.go @@ -1,7 +1,7 @@ // +build integration,!no-etcd /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/integration/utils.go b/test/integration/utils.go index 16070ba816..47c394beef 100644 --- a/test/integration/utils.go +++ b/test/integration/utils.go @@ -1,5 +1,5 @@ /* -Copyright 2014 The Kubernetes Authors All rights reserved. +Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/kubemark/common.sh b/test/kubemark/common.sh index 51561ca8c5..1367acc59d 100644 --- a/test/kubemark/common.sh +++ b/test/kubemark/common.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/kubemark/configure-kubectl.sh b/test/kubemark/configure-kubectl.sh index 8008b9a607..dac4a892b1 100644 --- a/test/kubemark/configure-kubectl.sh +++ b/test/kubemark/configure-kubectl.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/kubemark/get-real-pod-for-hollow-node.sh b/test/kubemark/get-real-pod-for-hollow-node.sh index 8e285884cd..76580f7df5 100755 --- a/test/kubemark/get-real-pod-for-hollow-node.sh +++ b/test/kubemark/get-real-pod-for-hollow-node.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/kubemark/run-e2e-tests.sh b/test/kubemark/run-e2e-tests.sh index cf5ec3cdff..bae28d988e 100755 --- a/test/kubemark/run-e2e-tests.sh +++ b/test/kubemark/run-e2e-tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/kubemark/start-kubemark-master.sh b/test/kubemark/start-kubemark-master.sh index 2d076cac3d..9a7d678d18 100644 --- a/test/kubemark/start-kubemark-master.sh +++ b/test/kubemark/start-kubemark-master.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/kubemark/start-kubemark.sh b/test/kubemark/start-kubemark.sh index e8368d38ac..2901ad489c 100755 --- a/test/kubemark/start-kubemark.sh +++ b/test/kubemark/start-kubemark.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/kubemark/stop-kubemark.sh b/test/kubemark/stop-kubemark.sh index eede8492fe..6c01fa6105 100755 --- a/test/kubemark/stop-kubemark.sh +++ b/test/kubemark/stop-kubemark.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015 The Kubernetes Authors All rights reserved. +# Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/soak/cauldron/Dockerfile b/test/soak/cauldron/Dockerfile index 7625b13794..36502d9e88 100644 --- a/test/soak/cauldron/Dockerfile +++ b/test/soak/cauldron/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/soak/cauldron/Makefile b/test/soak/cauldron/Makefile index 11934d9302..25084c2112 100644 --- a/test/soak/cauldron/Makefile +++ b/test/soak/cauldron/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/soak/cauldron/cauldron.go b/test/soak/cauldron/cauldron.go index f5d1dc8424..a6fc37d6ff 100644 --- a/test/soak/cauldron/cauldron.go +++ b/test/soak/cauldron/cauldron.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/soak/serve_hostnames/Makefile b/test/soak/serve_hostnames/Makefile index af3c16cba1..b0e2338888 100644 --- a/test/soak/serve_hostnames/Makefile +++ b/test/soak/serve_hostnames/Makefile @@ -1,4 +1,4 @@ -# Copyright 2016 The Kubernetes Authors All rights reserved. +# Copyright 2016 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/soak/serve_hostnames/serve_hostnames.go b/test/soak/serve_hostnames/serve_hostnames.go index 805bec4cb0..65efc6cf96 100644 --- a/test/soak/serve_hostnames/serve_hostnames.go +++ b/test/soak/serve_hostnames/serve_hostnames.go @@ -1,5 +1,5 @@ /* -Copyright 2015 The Kubernetes Authors All rights reserved. +Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/test/utils/tmpdir.go b/test/utils/tmpdir.go index e8cc23d4ce..7887a4de92 100644 --- a/test/utils/tmpdir.go +++ b/test/utils/tmpdir.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors All rights reserved. +Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From ea789e8612eb12161295998f01f5fbe8b3e991b3 Mon Sep 17 00:00:00 2001 From: Vishnu Kannan Date: Wed, 29 Jun 2016 15:30:20 -0700 Subject: [PATCH 296/339] Allow opting out of automatic cloud provider detection in kubelet Signed-off-by: Vishnu Kannan Signed-off-by: Vishnu kannan --- cmd/kubelet/app/options/options.go | 5 ++++- cmd/kubelet/app/server.go | 16 +++++++++++----- pkg/kubelet/kubelet.go | 21 +++++++++++++-------- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index d0001923ae..e16acb4f21 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -43,6 +43,8 @@ const ( // When these values are updated, also update test/e2e/framework/util.go defaultPodInfraContainerImageName = "gcr.io/google_containers/pause" defaultPodInfraContainerImageVersion = "3.0" + // Auto detect cloud provider. + AutoDetectCloudProvider = "auto-detect" ) // Returns the arch-specific pause image that kubelet should use as the default @@ -83,6 +85,7 @@ func NewKubeletServer() *KubeletServer { VolumeStatsAggPeriod: unversioned.Duration{Duration: time.Minute}, CertDirectory: "/var/run/kubernetes", CgroupRoot: "", + CloudProvider: AutoDetectCloudProvider, ConfigureCBR0: false, ContainerRuntime: "docker", RuntimeRequestTimeout: unversioned.Duration{Duration: 2 * time.Minute}, @@ -218,7 +221,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.NetworkPluginName, "network-plugin", s.NetworkPluginName, " The name of the network plugin to be invoked for various events in kubelet/pod lifecycle") fs.StringVar(&s.NetworkPluginDir, "network-plugin-dir", s.NetworkPluginDir, " The full path of the directory in which to search for network plugins") fs.StringVar(&s.VolumePluginDir, "volume-plugin-dir", s.VolumePluginDir, " The full path of the directory in which to search for additional third party volume plugins") - fs.StringVar(&s.CloudProvider, "cloud-provider", s.CloudProvider, "The provider for cloud services. Empty string for no provider.") + fs.StringVar(&s.CloudProvider, "cloud-provider", s.CloudProvider, "The provider for cloud services. By default, kubelet will attempt to auto-detect the cloud provider. Specify empty string for running with no cloud provider. [default=auto-detect]") fs.StringVar(&s.CloudConfigFile, "cloud-config", s.CloudConfigFile, "The path to the cloud provider configuration file. Empty string for no configuration file.") fs.StringVar(&s.KubeletCgroups, "resource-container", s.KubeletCgroups, "Optional absolute name of the resource-only container to create and run the Kubelet in.") diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index a106e37f0a..9ee4a8ea52 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -339,12 +339,16 @@ func run(s *options.KubeletServer, kcfg *KubeletConfig) (err error) { glog.Warningf("No API client: %v", err) } - cloud, err := cloudprovider.InitCloudProvider(s.CloudProvider, s.CloudConfigFile) - if err != nil { - return err + if s.CloudProvider == options.AutoDetectCloudProvider { + kcfg.AutoDetectCloudProvider = true + } else { + cloud, err := cloudprovider.InitCloudProvider(s.CloudProvider, s.CloudConfigFile) + if err != nil { + return err + } + glog.V(2).Infof("Successfully initialized cloud provider: %q from the config file: %q\n", s.CloudProvider, s.CloudConfigFile) + kcfg.Cloud = cloud } - glog.V(2).Infof("Successfully initialized cloud provider: %q from the config file: %q\n", s.CloudProvider, s.CloudConfigFile) - kcfg.Cloud = cloud } if kcfg.CAdvisorInterface == nil { @@ -773,6 +777,7 @@ type KubeletConfig struct { Address net.IP AllowPrivileged bool Auth server.AuthInterface + AutoDetectCloudProvider bool Builder KubeletBuilder CAdvisorInterface cadvisor.Interface VolumeStatsAggPeriod time.Duration @@ -920,6 +925,7 @@ func CreateAndInitKubelet(kc *KubeletConfig) (k KubeletBootstrap, pc *config.Pod kc.ImageGCPolicy, kc.DiskSpacePolicy, kc.Cloud, + kc.AutoDetectCloudProvider, kc.NodeLabels, kc.NodeStatusUpdateFrequency, kc.OSInterface, diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 6281aebdf4..8498df9c82 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -201,6 +201,7 @@ func NewMainKubelet( imageGCPolicy ImageGCPolicy, diskSpacePolicy DiskSpacePolicy, cloud cloudprovider.Interface, + autoDetectCloudProvider bool, nodeLabels map[string]string, nodeStatusUpdateFrequency time.Duration, osInterface kubecontainer.OSInterface, @@ -331,9 +332,10 @@ func NewMainKubelet( cadvisor: cadvisorInterface, diskSpaceManager: diskSpaceManager, cloud: cloud, - nodeRef: nodeRef, - nodeLabels: nodeLabels, - nodeStatusUpdateFrequency: nodeStatusUpdateFrequency, + autoDetectCloudProvider: autoDetectCloudProvider, + nodeRef: nodeRef, + nodeLabels: nodeLabels, + nodeStatusUpdateFrequency: nodeStatusUpdateFrequency, os: osInterface, oomWatcher: oomWatcher, cgroupRoot: cgroupRoot, @@ -688,7 +690,8 @@ type Kubelet struct { volumeManager kubeletvolume.VolumeManager // Cloud provider interface. - cloud cloudprovider.Interface + cloud cloudprovider.Interface + autoDetectCloudProvider bool // Reference to this node. nodeRef *api.ObjectReference @@ -1115,10 +1118,12 @@ func (kl *Kubelet) initialNodeStatus() (*api.Node, error) { } } else { node.Spec.ExternalID = kl.hostname - // If no cloud provider is defined - use the one detected by cadvisor - info, err := kl.GetCachedMachineInfo() - if err == nil { - kl.updateCloudProviderFromMachineInfo(node, info) + if kl.autoDetectCloudProvider { + // If no cloud provider is defined - use the one detected by cadvisor + info, err := kl.GetCachedMachineInfo() + if err == nil { + kl.updateCloudProviderFromMachineInfo(node, info) + } } } if err := kl.setNodeStatus(node); err != nil { From 270b8800c34c2d5c6d53e7e199ce2f757cf9a3f3 Mon Sep 17 00:00:00 2001 From: "Tim St. Clair" Date: Wed, 29 Jun 2016 18:24:27 -0700 Subject: [PATCH 297/339] Only build essential targets for node e2e --- test/e2e_node/e2e_build.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/e2e_node/e2e_build.go b/test/e2e_node/e2e_build.go index 5cb2d3d126..c2fe81cd99 100644 --- a/test/e2e_node/e2e_build.go +++ b/test/e2e_node/e2e_build.go @@ -30,13 +30,20 @@ import ( var k8sBinDir = flag.String("k8s-bin-dir", "", "Directory containing k8s kubelet and kube-apiserver binaries.") +var buildTargets = []string{ + "cmd/kubelet", + "cmd/kube-apiserver", + "test/e2e_node/e2e_node.test", + "vendor/github.com/onsi/ginkgo/ginkgo", +} + func buildGo() { glog.Infof("Building k8s binaries...") k8sRoot, err := getK8sRootDir() if err != nil { glog.Fatalf("Failed to locate kubernetes root directory %v.", err) } - cmd := exec.Command(filepath.Join(k8sRoot, "hack/build-go.sh")) + cmd := exec.Command(filepath.Join(k8sRoot, "hack/build-go.sh"), buildTargets...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err = cmd.Run() @@ -53,7 +60,7 @@ func getK8sBin(bin string) (string, error) { return "", err } if _, err := os.Stat(filepath.Join(*k8sBinDir, bin)); err != nil { - return "", fmt.Errorf("Could not find kube-apiserver under directory %s.", absPath) + return "", fmt.Errorf("Could not find %s under directory %s.", bin, absPath) } return filepath.Join(absPath, bin), nil } From c2e8099a811c53c7a2942ececc98f636ea4edf87 Mon Sep 17 00:00:00 2001 From: Matt Liggett Date: Wed, 29 Jun 2016 18:41:09 -0700 Subject: [PATCH 298/339] Create a PD volume when deploying the federation with federation-up. Tested only on GCE, where it worked. Fixes #28248. --- federation/cluster/common.sh | 5 +++-- .../federation-apiserver-deployment.yaml | 10 ++++++++++ federation/manifests/federation-etcd-pvc.yaml | 15 +++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 federation/manifests/federation-etcd-pvc.yaml diff --git a/federation/cluster/common.sh b/federation/cluster/common.sh index 7955dd6581..5b1964156c 100644 --- a/federation/cluster/common.sh +++ b/federation/cluster/common.sh @@ -174,8 +174,9 @@ function create-federation-api-objects { $host_kubectl create secret generic ${name} --from-file="${dir}/kubeconfig" --namespace="${FEDERATION_NAMESPACE}" done - $template "${manifests_root}/federation-apiserver-"{deployment,secrets}".yaml" | $host_kubectl create -f - - $template "${manifests_root}/federation-controller-manager-deployment.yaml" | $host_kubectl create -f - + for file in federation-etcd-pvc.yaml federation-apiserver-{deployment,secrets}.yaml federation-controller-manager-deployment.yaml; do + $template "${manifests_root}/${file}" | $host_kubectl create -f - + done # Update the users kubeconfig to include federation-apiserver credentials. CONTEXT=federation-cluster \ diff --git a/federation/manifests/federation-apiserver-deployment.yaml b/federation/manifests/federation-apiserver-deployment.yaml index 5656298b69..1b21dbb999 100644 --- a/federation/manifests/federation-apiserver-deployment.yaml +++ b/federation/manifests/federation-apiserver-deployment.yaml @@ -36,7 +36,17 @@ spec: readOnly: true - name: etcd image: quay.io/coreos/etcd:v2.3.3 + command: + - /etcd + - --data-dir + - /var/etcd/data + volumeMounts: + - mountPath: /var/etcd + name: varetcd volumes: - name: federation-apiserver-secrets secret: secretName: federation-apiserver-secrets + - name: varetcd + persistentVolumeClaim: + claimName: {{.FEDERATION_APISERVER_DEPLOYMENT_NAME}}-etcd-claim diff --git a/federation/manifests/federation-etcd-pvc.yaml b/federation/manifests/federation-etcd-pvc.yaml new file mode 100644 index 0000000000..c7a2822527 --- /dev/null +++ b/federation/manifests/federation-etcd-pvc.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{.FEDERATION_APISERVER_DEPLOYMENT_NAME}}-etcd-claim + annotations: + volume.alpha.kubernetes.io/storage-class: "yes" + namespace: {{.FEDERATION_NAMESPACE}} + labels: + app: federated-cluster +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi From 65180ea25a4594c794dc14c47193559f9fb27dae Mon Sep 17 00:00:00 2001 From: Christian Simon Date: Thu, 19 May 2016 13:03:59 +0000 Subject: [PATCH 299/339] Fix problems with container restarts and flocker * Removes meta dir, which prevents to detection of the correct mount path * Fixes #22436 --- pkg/volume/flocker/plugin.go | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/pkg/volume/flocker/plugin.go b/pkg/volume/flocker/plugin.go index b23ad38502..47e8bd79e9 100644 --- a/pkg/volume/flocker/plugin.go +++ b/pkg/volume/flocker/plugin.go @@ -18,18 +18,16 @@ package flocker import ( "fmt" - "path" "time" - flockerclient "github.com/ClusterHQ/flocker-go" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util/env" "k8s.io/kubernetes/pkg/util/exec" "k8s.io/kubernetes/pkg/util/mount" - "k8s.io/kubernetes/pkg/util/strings" "k8s.io/kubernetes/pkg/volume" - volumeutil "k8s.io/kubernetes/pkg/volume/util" + + flockerclient "github.com/ClusterHQ/flocker-go" ) const ( @@ -165,15 +163,6 @@ func (b flockerMounter) newFlockerClient() (*flockerclient.Client, error) { return c, err } -func (b *flockerMounter) getMetaDir() string { - return path.Join( - b.plugin.host.GetPodPluginDir( - b.flocker.pod.UID, strings.EscapeQualifiedNameForDisk(flockerPluginName), - ), - b.datasetName, - ) -} - /* SetUpAt will setup a Flocker volume following this flow of calls to the Flocker control service: @@ -186,10 +175,6 @@ control service: 5. Wait until the Primary UUID was updated or timeout. */ func (b flockerMounter) SetUpAt(dir string, fsGroup *int64) error { - if volumeutil.IsReady(b.getMetaDir()) { - return nil - } - if b.client == nil { c, err := b.newFlockerClient() if err != nil { @@ -226,7 +211,6 @@ func (b flockerMounter) SetUpAt(dir string, fsGroup *int64) error { b.flocker.path = s.Path } - volumeutil.SetReady(b.getMetaDir()) return nil } From 65ab7040a7f0f00f4eab5ca4cf603a60e1cdd1a8 Mon Sep 17 00:00:00 2001 From: CJ Cullen Date: Wed, 29 Jun 2016 22:49:26 -0700 Subject: [PATCH 300/339] Make GKE detect-instance-groups work on Mac. --- cluster/gke/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster/gke/util.sh b/cluster/gke/util.sh index e0f57f49c2..eeb20bad79 100755 --- a/cluster/gke/util.sh +++ b/cluster/gke/util.sh @@ -318,7 +318,7 @@ function detect-node-instance-groups { ALL_INSTANCE_GROUP_URLS=${urls[*]} NODE_INSTANCE_GROUPS=() for url in "${urls[@]:-}"; do - local igm_zone=$(expr match ${url} '.*/zones/\([a-z0-9-]*\)/') + local igm_zone=$(expr ${url} : '.*/zones/\([a-z0-9-]*\)/') if [[ "${igm_zone}" == "${ZONE}" ]]; then NODE_INSTANCE_GROUPS+=("${url##*/}") fi From 2f6db37ff5fb297574b1915ecfadf8d370fafa07 Mon Sep 17 00:00:00 2001 From: Eric Chiang Date: Fri, 24 Jun 2016 11:26:18 -0700 Subject: [PATCH 301/339] oidc auth plugin: don't hard fail if provider is unavailable When using OpenID Connect authentication, don't cause the API server to fail if the provider is unavailable. This allows installations to run OpenID Connect providers after starting the API server, a common case when the provider is running on the cluster itself. Errors are now deferred to the authenticate method. --- pkg/apiserver/authenticator/authn.go | 2 - .../pkg/auth/authenticator/token/oidc/oidc.go | 221 +++++++++++------- .../authenticator/token/oidc/oidc_test.go | 169 ++++++++------ 3 files changed, 235 insertions(+), 157 deletions(-) diff --git a/pkg/apiserver/authenticator/authn.go b/pkg/apiserver/authenticator/authn.go index 56dfcf8ad1..dd6ef0ca93 100644 --- a/pkg/apiserver/authenticator/authn.go +++ b/pkg/apiserver/authenticator/authn.go @@ -156,8 +156,6 @@ func newAuthenticatorFromOIDCIssuerURL(issuerURL, clientID, caFile, usernameClai CAFile: caFile, UsernameClaim: usernameClaim, GroupsClaim: groupsClaim, - MaxRetries: oidc.DefaultRetries, - RetryBackoff: oidc.DefaultBackoff, }) if err != nil { return nil, err diff --git a/plugin/pkg/auth/authenticator/token/oidc/oidc.go b/plugin/pkg/auth/authenticator/token/oidc/oidc.go index 52ea1de4ae..aafd68fbe3 100644 --- a/plugin/pkg/auth/authenticator/token/oidc/oidc.go +++ b/plugin/pkg/auth/authenticator/token/oidc/oidc.go @@ -14,17 +14,28 @@ See the License for the specific language governing permissions and limitations under the License. */ -// oidc implements the authenticator.Token interface using the OpenID Connect protocol. +/* +oidc implements the authenticator.Token interface using the OpenID Connect protocol. + + config := oidc.OIDCOptions{ + IssuerURL: "https://accounts.google.com", + ClientID: os.Getenv("GOOGLE_CLIENT_ID"), + UsernameClaim: "email", + } + tokenAuthenticator, err := oidc.New(config) +*/ package oidc import ( "crypto/tls" "crypto/x509" + "errors" "fmt" "net/http" "net/url" "strings" - "time" + "sync" + "sync/atomic" "github.com/coreos/go-oidc/jose" "github.com/coreos/go-oidc/oidc" @@ -32,43 +43,61 @@ import ( "k8s.io/kubernetes/pkg/auth/user" "k8s.io/kubernetes/pkg/util/crypto" "k8s.io/kubernetes/pkg/util/net" -) - -const ( - DefaultRetries = 5 - DefaultBackoff = time.Second * 3 + "k8s.io/kubernetes/pkg/util/runtime" ) type OIDCOptions struct { - IssuerURL string - ClientID string - CAFile string - UsernameClaim string - GroupsClaim string + // IssuerURL is the URL the provider signs ID Tokens as. This will be the "iss" + // field of all tokens produced by the provider and is used for configuration + // discovery. + // + // The URL is usually the provider's URL without a path, for example + // "https://accounts.google.com" or "https://login.salesforce.com". + // + // The provider must implement configuration discovery. + // See: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig + IssuerURL string - // 0 disables retry - MaxRetries int - RetryBackoff time.Duration + // ClientID the JWT must be issued for, the "sub" field. This plugin only trusts a single + // client to ensure the plugin can be used with public providers. + // + // The plugin supports the "authorized party" OpenID Connect claim, which allows + // specialized providers to issue tokens to a client for a different client. + // See: https://openid.net/specs/openid-connect-core-1_0.html#IDToken + ClientID string + + // Path to a PEM encoded root certificate of the provider. + CAFile string + + // UsernameClaim is the JWT field to use as the user's username. + UsernameClaim string + + // GroupsClaim, if specified, causes the OIDCAuthenticator to try to populate the user's + // groups with a ID Token field. If the GrouppClaim field is present in a ID Token the value + // must be a list of strings. + GroupsClaim string } type OIDCAuthenticator struct { - clientConfig oidc.ClientConfig - client *oidc.Client - usernameClaim string - groupsClaim string - stopSyncProvider chan struct{} - maxRetries int - retryBackoff time.Duration + issuerURL string + + trustedClientID string + + usernameClaim string + groupsClaim string + + httpClient *http.Client + + // Contains an *oidc.Client. Do not access directly. Use client() method. + oidcClient atomic.Value + + // Guards the close method and is used to lock during initialization and closing. + mu sync.Mutex + close func() // May be nil } -// New creates a new OpenID Connect client with the given issuerURL and clientID. -// NOTE(yifan): For now we assume the server provides the "jwks_uri" so we don't -// need to manager the key sets by ourselves. +// New creates a token authenticator which validates OpenID Connect ID Tokens. func New(opts OIDCOptions) (*OIDCAuthenticator, error) { - var cfg oidc.ProviderConfig - var err error - var roots *x509.CertPool - url, err := url.Parse(opts.IssuerURL) if err != nil { return nil, err @@ -78,14 +107,18 @@ func New(opts OIDCOptions) (*OIDCAuthenticator, error) { return nil, fmt.Errorf("'oidc-issuer-url' (%q) has invalid scheme (%q), require 'https'", opts.IssuerURL, url.Scheme) } + if opts.UsernameClaim == "" { + return nil, errors.New("no username claim provided") + } + + var roots *x509.CertPool if opts.CAFile != "" { roots, err = crypto.CertPoolFromFile(opts.CAFile) if err != nil { - glog.Errorf("Failed to read the CA file: %v", err) + return nil, fmt.Errorf("Failed to read the CA file: %v", err) } - } - if roots == nil { - glog.Info("No x509 certificates provided, will use host's root CA set") + } else { + glog.Info("OIDC: No x509 certificates provided, will use host's root CA set") } // Copied from http.DefaultTransport. @@ -95,61 +128,86 @@ func New(opts OIDCOptions) (*OIDCAuthenticator, error) { TLSClientConfig: &tls.Config{RootCAs: roots}, }) - hc := &http.Client{} - hc.Transport = tr - - maxRetries := opts.MaxRetries - if maxRetries < 0 { - maxRetries = DefaultRetries - } - retryBackoff := opts.RetryBackoff - if retryBackoff < 0 { - retryBackoff = DefaultBackoff + authenticator := &OIDCAuthenticator{ + issuerURL: opts.IssuerURL, + trustedClientID: opts.ClientID, + usernameClaim: opts.UsernameClaim, + groupsClaim: opts.GroupsClaim, + httpClient: &http.Client{Transport: tr}, } - for i := 0; i <= maxRetries; i++ { - if i == maxRetries { - return nil, fmt.Errorf("failed to fetch provider config after %v retries", maxRetries) - } + // Attempt to initialize the authenticator asynchronously. + // + // Ignore errors instead of returning it since the OpenID Connect provider might not be + // available yet, for instance if it's running on the cluster and needs the API server + // to come up first. Errors will be logged within the client() method. + go func() { + defer runtime.HandleCrash() + authenticator.client() + }() - cfg, err = oidc.FetchProviderConfig(hc, strings.TrimSuffix(opts.IssuerURL, "/")) - if err == nil { - break - } - glog.Errorf("Failed to fetch provider config, trying again in %v: %v", retryBackoff, err) - time.Sleep(retryBackoff) + return authenticator, nil +} + +// Close stops all goroutines used by the authenticator. +func (a *OIDCAuthenticator) Close() { + a.mu.Lock() + defer a.mu.Unlock() + + if a.close != nil { + a.close() + } + return +} + +func (a *OIDCAuthenticator) client() (*oidc.Client, error) { + // Fast check to see if client has already been initialized. + if client := a.oidcClient.Load(); client != nil { + return client.(*oidc.Client), nil } - glog.Infof("Fetched provider config from %s: %#v", opts.IssuerURL, cfg) - - ccfg := oidc.ClientConfig{ - HTTPClient: hc, - Credentials: oidc.ClientCredentials{ID: opts.ClientID}, - ProviderConfig: cfg, + // Acquire lock, then recheck initialization. + a.mu.Lock() + defer a.mu.Unlock() + if client := a.oidcClient.Load(); client != nil { + return client.(*oidc.Client), nil } - client, err := oidc.NewClient(ccfg) + // Try to initialize client. + providerConfig, err := oidc.FetchProviderConfig(a.httpClient, strings.TrimSuffix(a.issuerURL, "/")) if err != nil { - return nil, err + glog.Errorf("oidc authenticator: failed to fetch provider discovery data: %v", err) + return nil, fmt.Errorf("fetch provider config: %v", err) + } + + clientConfig := oidc.ClientConfig{ + HTTPClient: a.httpClient, + Credentials: oidc.ClientCredentials{ID: a.trustedClientID}, + ProviderConfig: providerConfig, + } + + client, err := oidc.NewClient(clientConfig) + if err != nil { + glog.Errorf("oidc authenticator: failed to create client: %v", err) + return nil, fmt.Errorf("create client: %v", err) } // SyncProviderConfig will start a goroutine to periodically synchronize the provider config. // The synchronization interval is set by the expiration length of the config, and has a mininum // and maximum threshold. - stop := client.SyncProviderConfig(opts.IssuerURL) - - return &OIDCAuthenticator{ - ccfg, - client, - opts.UsernameClaim, - opts.GroupsClaim, - stop, - maxRetries, - retryBackoff, - }, nil + stop := client.SyncProviderConfig(a.issuerURL) + a.oidcClient.Store(client) + a.close = func() { + // This assumes the stop is an unbuffered channel. + // So instead of closing the channel, we send am empty struct here. + // This guarantees that when this function returns, there is no flying requests, + // because a send to an unbuffered channel happens after the receive from the channel. + stop <- struct{}{} + } + return client, nil } -// AuthenticateToken decodes and verifies a JWT using the OIDC client, if the verification succeeds, +// AuthenticateToken decodes and verifies a ID Token using the OIDC client, if the verification succeeds, // then it will extract the user info from the JWT claims. func (a *OIDCAuthenticator) AuthenticateToken(value string) (user.Info, bool, error) { jwt, err := jose.ParseJWT(value) @@ -157,7 +215,11 @@ func (a *OIDCAuthenticator) AuthenticateToken(value string) (user.Info, bool, er return nil, false, err } - if err := a.client.VerifyJWT(jwt); err != nil { + client, err := a.client() + if err != nil { + return nil, false, err + } + if err := client.VerifyJWT(jwt); err != nil { return nil, false, err } @@ -181,7 +243,7 @@ func (a *OIDCAuthenticator) AuthenticateToken(value string) (user.Info, bool, er username = claim default: // For all other cases, use issuerURL + claim as the user name. - username = fmt.Sprintf("%s#%s", a.clientConfig.ProviderConfig.Issuer, claim) + username = fmt.Sprintf("%s#%s", a.issuerURL, claim) } // TODO(yifan): Add UID, also populate the issuer to upper layer. @@ -199,12 +261,3 @@ func (a *OIDCAuthenticator) AuthenticateToken(value string) (user.Info, bool, er } return info, true, nil } - -// Close closes the OIDC authenticator, this will close the provider sync goroutine. -func (a *OIDCAuthenticator) Close() { - // This assumes the s.stopSyncProvider is an unbuffered channel. - // So instead of closing the channel, we send am empty struct here. - // This guarantees that when this function returns, there is no flying requests, - // because a send to an unbuffered channel happens after the receive from the channel. - a.stopSyncProvider <- struct{}{} -} diff --git a/plugin/pkg/auth/authenticator/token/oidc/oidc_test.go b/plugin/pkg/auth/authenticator/token/oidc/oidc_test.go index f0dab980aa..f62795884a 100644 --- a/plugin/pkg/auth/authenticator/token/oidc/oidc_test.go +++ b/plugin/pkg/auth/authenticator/token/oidc/oidc_test.go @@ -18,10 +18,10 @@ package oidc import ( "fmt" - "net/http/httptest" "os" "path" "reflect" + "sort" "strings" "testing" "time" @@ -61,61 +61,7 @@ func generateExpiredToken(t *testing.T, op *oidctesting.OIDCProvider, iss, sub, return generateToken(t, op, iss, sub, aud, usernameClaim, value, groupsClaim, groups, time.Now().Add(-2*time.Hour), time.Now().Add(-1*time.Hour)) } -func TestOIDCDiscoveryTimeout(t *testing.T) { - expectErr := fmt.Errorf("failed to fetch provider config after 1 retries") - _, err := New(OIDCOptions{"https://127.0.0.1:9999/bar", "client-foo", "", "sub", "", 1, 100 * time.Millisecond}) - if !reflect.DeepEqual(err, expectErr) { - t.Errorf("Expecting %v, but got %v", expectErr, err) - } -} - -func TestOIDCDiscoveryNoKeyEndpoint(t *testing.T) { - var err error - expectErr := fmt.Errorf("failed to fetch provider config after 0 retries") - - cert := path.Join(os.TempDir(), "oidc-cert") - key := path.Join(os.TempDir(), "oidc-key") - - defer os.Remove(cert) - defer os.Remove(key) - - oidctesting.GenerateSelfSignedCert(t, "127.0.0.1", cert, key) - - op := oidctesting.NewOIDCProvider(t) - srv, err := op.ServeTLSWithKeyPair(cert, key) - if err != nil { - t.Fatalf("Cannot start server %v", err) - } - defer srv.Close() - - op.PCFG = oidc.ProviderConfig{ - Issuer: oidctesting.MustParseURL(srv.URL), // An invalid ProviderConfig. Keys endpoint is required. - } - - _, err = New(OIDCOptions{srv.URL, "client-foo", cert, "sub", "", 0, 0}) - if !reflect.DeepEqual(err, expectErr) { - t.Errorf("Expecting %v, but got %v", expectErr, err) - } -} - -func TestOIDCDiscoverySecureConnection(t *testing.T) { - // Verify that plain HTTP issuer URL is forbidden. - op := oidctesting.NewOIDCProvider(t) - srv := httptest.NewServer(op.Mux) - defer srv.Close() - - op.PCFG = oidc.ProviderConfig{ - Issuer: oidctesting.MustParseURL(srv.URL), - KeysEndpoint: oidctesting.MustParseURL(srv.URL + "/keys"), - } - - expectErr := fmt.Errorf("'oidc-issuer-url' (%q) has invalid scheme (%q), require 'https'", srv.URL, "http") - - _, err := New(OIDCOptions{srv.URL, "client-foo", "", "sub", "", 0, 0}) - if !reflect.DeepEqual(err, expectErr) { - t.Errorf("Expecting %v, but got %v", expectErr, err) - } - +func TestTLSConfig(t *testing.T) { // Verify the cert/key pair works. cert1 := path.Join(os.TempDir(), "oidc-cert-1") key1 := path.Join(os.TempDir(), "oidc-key-1") @@ -130,24 +76,105 @@ func TestOIDCDiscoverySecureConnection(t *testing.T) { oidctesting.GenerateSelfSignedCert(t, "127.0.0.1", cert1, key1) oidctesting.GenerateSelfSignedCert(t, "127.0.0.1", cert2, key2) - // Create a TLS server using cert/key pair 1. - tlsSrv, err := op.ServeTLSWithKeyPair(cert1, key1) - if err != nil { - t.Fatalf("Cannot start server: %v", err) - } - defer tlsSrv.Close() + tests := []struct { + testCase string - op.PCFG = oidc.ProviderConfig{ - Issuer: oidctesting.MustParseURL(tlsSrv.URL), - KeysEndpoint: oidctesting.MustParseURL(tlsSrv.URL + "/keys"), + serverCertFile string + serverKeyFile string + + trustedCertFile string + + wantErr bool + }{ + { + testCase: "provider using untrusted custom cert", + serverCertFile: cert1, + serverKeyFile: key1, + wantErr: true, + }, + { + testCase: "provider using untrusted cert", + serverCertFile: cert1, + serverKeyFile: key1, + trustedCertFile: cert2, + wantErr: true, + }, + { + testCase: "provider using trusted cert", + serverCertFile: cert1, + serverKeyFile: key1, + trustedCertFile: cert1, + wantErr: false, + }, } - // Create a client using cert2, should fail. - _, err = New(OIDCOptions{tlsSrv.URL, "client-foo", cert2, "sub", "", 0, 0}) - if err == nil { - t.Fatalf("Expecting error, but got nothing") - } + for _, tc := range tests { + func() { + op := oidctesting.NewOIDCProvider(t) + srv, err := op.ServeTLSWithKeyPair(tc.serverCertFile, tc.serverKeyFile) + if err != nil { + t.Errorf("%s: %v", tc.testCase, err) + return + } + defer srv.Close() + op.AddMinimalProviderConfig(srv) + issuer := srv.URL + clientID := "client-foo" + + options := OIDCOptions{ + IssuerURL: srv.URL, + ClientID: clientID, + CAFile: tc.trustedCertFile, + UsernameClaim: "email", + GroupsClaim: "groups", + } + + authenticator, err := New(options) + if err != nil { + t.Errorf("%s: failed to initialize authenticator: %v", tc.testCase, err) + return + } + defer authenticator.Close() + + email := "user-1@example.com" + groups := []string{"group1", "group2"} + sort.Strings(groups) + + token := generateGoodToken(t, op, issuer, "user-1", clientID, "email", email, "groups", groups) + + // Because this authenticator behaves differently for subsequent requests, run these + // tests multiple times (but expect the same result). + for i := 1; i < 4; i++ { + + user, ok, err := authenticator.AuthenticateToken(token) + if err != nil { + if !tc.wantErr { + t.Errorf("%s (req #%d): failed to authenticate token: %v", tc.testCase, i, err) + } + continue + } + + if tc.wantErr { + t.Errorf("%s (req #%d): expected error authenticating", tc.testCase, i) + continue + } + if !ok { + t.Errorf("%s (req #%d): did not get user or error", tc.testCase, i) + continue + } + + if gotUsername := user.GetName(); email != gotUsername { + t.Errorf("%s (req #%d): GetName() expected=%q got %q", tc.testCase, i, email, gotUsername) + } + gotGroups := user.GetGroups() + sort.Strings(gotGroups) + if !reflect.DeepEqual(gotGroups, groups) { + t.Errorf("%s (req #%d): GetGroups() expected=%q got %q", tc.testCase, i, groups, gotGroups) + } + } + }() + } } func TestOIDCAuthentication(t *testing.T) { @@ -252,7 +279,7 @@ func TestOIDCAuthentication(t *testing.T) { } for i, tt := range tests { - client, err := New(OIDCOptions{srv.URL, "client-foo", cert, tt.userClaim, tt.groupsClaim, 1, 100 * time.Millisecond}) + client, err := New(OIDCOptions{srv.URL, "client-foo", cert, tt.userClaim, tt.groupsClaim}) if err != nil { t.Errorf("Unexpected error: %v", err) continue From 7ba1e59d84b6f548fb0b844f33a11de9746a1bc2 Mon Sep 17 00:00:00 2001 From: Michal Fojtik Date: Mon, 27 Jun 2016 13:13:23 +0200 Subject: [PATCH 302/339] Describe container volume mounts --- pkg/kubectl/describe.go | 21 +++++++++++++++++++++ pkg/kubectl/sorted_resource_name_list.go | 14 ++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/pkg/kubectl/describe.go b/pkg/kubectl/describe.go index adf7593f3a..af9e893b0c 100644 --- a/pkg/kubectl/describe.go +++ b/pkg/kubectl/describe.go @@ -887,7 +887,28 @@ func describeContainers(label string, containers []api.Container, containerStatu probe := DescribeProbe(container.ReadinessProbe) fmt.Fprintf(out, " Readiness:\t%s\n", probe) } + none := "" + if len(container.VolumeMounts) == 0 { + none = "\t" + } + + fmt.Fprintf(out, " Volume Mounts:%s\n", none) + sort.Sort(SortableVolumeMounts(container.VolumeMounts)) + for _, mount := range container.VolumeMounts { + flags := []string{} + switch { + case mount.ReadOnly: + flags = append(flags, "ro") + case !mount.ReadOnly: + flags = append(flags, "rw") + case len(mount.SubPath) > 0: + flags = append(flags, fmt.Sprintf("path=%q", mount.SubPath)) + } + fmt.Fprintf(out, " %s from %s (%s)\n", mount.MountPath, mount.Name, strings.Join(flags, ",")) + } + + none = "" if len(container.Env) == 0 { none = "\t" } diff --git a/pkg/kubectl/sorted_resource_name_list.go b/pkg/kubectl/sorted_resource_name_list.go index bf25b1ceba..41a7ae9a4c 100644 --- a/pkg/kubectl/sorted_resource_name_list.go +++ b/pkg/kubectl/sorted_resource_name_list.go @@ -61,6 +61,20 @@ func (list SortableResourceQuotas) Less(i, j int) bool { return list[i].Name < list[j].Name } +type SortableVolumeMounts []api.VolumeMount + +func (list SortableVolumeMounts) Len() int { + return len(list) +} + +func (list SortableVolumeMounts) Swap(i, j int) { + list[i], list[j] = list[j], list[i] +} + +func (list SortableVolumeMounts) Less(i, j int) bool { + return list[i].MountPath < list[j].MountPath +} + // SortedQoSResourceNames returns the sorted resource names of a QoS list. func SortedQoSResourceNames(list qos.QoSList) []api.ResourceName { resources := make([]api.ResourceName, 0, len(list)) From 7ea28e42c0eae22c2f0d3e17f07565f65da4af04 Mon Sep 17 00:00:00 2001 From: Michal Fojtik Date: Mon, 27 Jun 2016 14:30:14 +0200 Subject: [PATCH 303/339] Add MinReadySeconds to rolling updater --- pkg/kubectl/rolling_updater.go | 30 ++++++++----- pkg/kubectl/rolling_updater_test.go | 66 ++++++++++++++++++++++++----- pkg/util/deployment/deployment.go | 7 +-- test/e2e/framework/util.go | 4 +- 4 files changed, 81 insertions(+), 26 deletions(-) diff --git a/pkg/kubectl/rolling_updater.go b/pkg/kubectl/rolling_updater.go index 0af1253ad6..85f302c63b 100644 --- a/pkg/kubectl/rolling_updater.go +++ b/pkg/kubectl/rolling_updater.go @@ -26,6 +26,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/errors" + "k8s.io/kubernetes/pkg/api/unversioned" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/labels" "k8s.io/kubernetes/pkg/runtime" @@ -58,6 +59,8 @@ type RollingUpdaterConfig struct { Interval time.Duration // Timeout is the time to wait for controller updates before giving up. Timeout time.Duration + // MinReadySeconds is the number of seconds to wait after the pods are ready + MinReadySeconds int32 // CleanupPolicy defines the cleanup action to take after the deployment is // complete. CleanupPolicy RollingUpdaterCleanupPolicy @@ -118,7 +121,9 @@ type RollingUpdater struct { // cleanup performs post deployment cleanup tasks for newRc and oldRc. cleanup func(oldRc, newRc *api.ReplicationController, config *RollingUpdaterConfig) error // getReadyPods returns the amount of old and new ready pods. - getReadyPods func(oldRc, newRc *api.ReplicationController) (int32, int32, error) + getReadyPods func(oldRc, newRc *api.ReplicationController, minReadySeconds int32) (int32, int32, error) + // nowFn returns the current time used to calculate the minReadySeconds + nowFn func() unversioned.Time } // NewRollingUpdater creates a RollingUpdater from a client. @@ -132,6 +137,7 @@ func NewRollingUpdater(namespace string, client client.Interface) *RollingUpdate updater.getOrCreateTargetController = updater.getOrCreateTargetControllerWithClient updater.getReadyPods = updater.readyPods updater.cleanup = updater.cleanupWithClients + updater.nowFn = func() unversioned.Time { return unversioned.Now() } return updater } @@ -340,7 +346,7 @@ func (r *RollingUpdater) scaleDown(newRc, oldRc *api.ReplicationController, desi // Get ready pods. We shouldn't block, otherwise in case both old and new // pods are unavailable then the rolling update process blocks. // Timeout-wise we are already covered by the progress check. - _, newAvailable, err := r.getReadyPods(oldRc, newRc) + _, newAvailable, err := r.getReadyPods(oldRc, newRc, config.MinReadySeconds) if err != nil { return nil, err } @@ -397,10 +403,13 @@ func (r *RollingUpdater) scaleAndWaitWithScaler(rc *api.ReplicationController, r // readyPods returns the old and new ready counts for their pods. // If a pod is observed as being ready, it's considered ready even // if it later becomes notReady. -func (r *RollingUpdater) readyPods(oldRc, newRc *api.ReplicationController) (int32, int32, error) { +func (r *RollingUpdater) readyPods(oldRc, newRc *api.ReplicationController, minReadySeconds int32) (int32, int32, error) { controllers := []*api.ReplicationController{oldRc, newRc} oldReady := int32(0) newReady := int32(0) + if r.nowFn == nil { + r.nowFn = func() unversioned.Time { return unversioned.Now() } + } for i := range controllers { controller := controllers[i] @@ -411,13 +420,14 @@ func (r *RollingUpdater) readyPods(oldRc, newRc *api.ReplicationController) (int return 0, 0, err } for _, pod := range pods.Items { - if api.IsPodReady(&pod) { - switch controller.Name { - case oldRc.Name: - oldReady++ - case newRc.Name: - newReady++ - } + if !deployment.IsPodAvailable(&pod, minReadySeconds, r.nowFn().Time) { + continue + } + switch controller.Name { + case oldRc.Name: + oldReady++ + case newRc.Name: + newReady++ } } } diff --git a/pkg/kubectl/rolling_updater_test.go b/pkg/kubectl/rolling_updater_test.go index 9abe440569..99a2ef9bc6 100644 --- a/pkg/kubectl/rolling_updater_test.go +++ b/pkg/kubectl/rolling_updater_test.go @@ -29,6 +29,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" apitesting "k8s.io/kubernetes/pkg/api/testing" + "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/client/restclient" client "k8s.io/kubernetes/pkg/client/unversioned" "k8s.io/kubernetes/pkg/client/unversioned/fake" @@ -810,7 +811,7 @@ Scaling foo-v2 up to 2 }, } // Set up a mock readiness check which handles the test assertions. - updater.getReadyPods = func(oldRc, newRc *api.ReplicationController) (int32, int32, error) { + updater.getReadyPods = func(oldRc, newRc *api.ReplicationController, minReadySecondsDeadline int32) (int32, int32, error) { // Return simulated readiness, and throw an error if this call has no // expectations defined. oldReady := next(&oldReady) @@ -860,7 +861,7 @@ func TestUpdate_progressTimeout(t *testing.T) { return nil }, } - updater.getReadyPods = func(oldRc, newRc *api.ReplicationController) (int32, int32, error) { + updater.getReadyPods = func(oldRc, newRc *api.ReplicationController, minReadySeconds int32) (int32, int32, error) { // Coerce a timeout by pods never becoming ready. return 0, 0, nil } @@ -913,7 +914,7 @@ func TestUpdate_assignOriginalAnnotation(t *testing.T) { cleanup: func(oldRc, newRc *api.ReplicationController, config *RollingUpdaterConfig) error { return nil }, - getReadyPods: func(oldRc, newRc *api.ReplicationController) (int32, int32, error) { + getReadyPods: func(oldRc, newRc *api.ReplicationController, minReadySeconds int32) (int32, int32, error) { return 1, 1, nil }, } @@ -1555,7 +1556,8 @@ func TestAddDeploymentHash(t *testing.T) { } func TestRollingUpdater_readyPods(t *testing.T) { - mkpod := func(owner *api.ReplicationController, ready bool) *api.Pod { + now := unversioned.Date(2016, time.April, 1, 1, 0, 0, 0, time.UTC) + mkpod := func(owner *api.ReplicationController, ready bool, readyTime unversioned.Time) *api.Pod { labels := map[string]string{} for k, v := range owner.Spec.Selector { labels[k] = v @@ -1572,8 +1574,9 @@ func TestRollingUpdater_readyPods(t *testing.T) { Status: api.PodStatus{ Conditions: []api.PodCondition{ { - Type: api.PodReady, - Status: status, + Type: api.PodReady, + Status: status, + LastTransitionTime: readyTime, }, }, }, @@ -1589,6 +1592,11 @@ func TestRollingUpdater_readyPods(t *testing.T) { // pods owned by the rcs; indicate whether they're ready oldPods []bool newPods []bool + // specify additional time to wait for deployment to wait on top of the + // pod ready time + minReadySeconds int32 + podReadyTimeFn func() unversioned.Time + nowFn func() unversioned.Time }{ { oldRc: oldRc(4, 4), @@ -1632,25 +1640,61 @@ func TestRollingUpdater_readyPods(t *testing.T) { false, }, }, + { + oldRc: oldRc(4, 4), + newRc: newRc(4, 4), + oldReady: 0, + newReady: 0, + oldPods: []bool{ + true, + }, + newPods: []bool{ + true, + }, + minReadySeconds: 5, + nowFn: func() unversioned.Time { return now }, + }, + { + oldRc: oldRc(4, 4), + newRc: newRc(4, 4), + oldReady: 1, + newReady: 1, + oldPods: []bool{ + true, + }, + newPods: []bool{ + true, + }, + minReadySeconds: 5, + nowFn: func() unversioned.Time { return unversioned.Time{Time: now.Add(time.Duration(6 * time.Second))} }, + podReadyTimeFn: func() unversioned.Time { return now }, + }, } for i, test := range tests { t.Logf("evaluating test %d", i) + if test.nowFn == nil { + test.nowFn = func() unversioned.Time { return now } + } + if test.podReadyTimeFn == nil { + test.podReadyTimeFn = test.nowFn + } // Populate the fake client with pods associated with their owners. pods := []runtime.Object{} for _, ready := range test.oldPods { - pods = append(pods, mkpod(test.oldRc, ready)) + pods = append(pods, mkpod(test.oldRc, ready, test.podReadyTimeFn())) } for _, ready := range test.newPods { - pods = append(pods, mkpod(test.newRc, ready)) + pods = append(pods, mkpod(test.newRc, ready, test.podReadyTimeFn())) } client := testclient.NewSimpleFake(pods...) updater := &RollingUpdater{ - ns: "default", - c: client, + ns: "default", + c: client, + nowFn: test.nowFn, } - oldReady, newReady, err := updater.readyPods(test.oldRc, test.newRc) + oldReady, newReady, err := updater.readyPods(test.oldRc, test.newRc, test.minReadySeconds) if err != nil { t.Errorf("unexpected error: %v", err) } diff --git a/pkg/util/deployment/deployment.go b/pkg/util/deployment/deployment.go index 05b2a83df4..a1ac20e553 100644 --- a/pkg/util/deployment/deployment.go +++ b/pkg/util/deployment/deployment.go @@ -354,14 +354,15 @@ func GetAvailablePodsForDeployment(c clientset.Interface, deployment *extensions func countAvailablePods(pods []api.Pod, minReadySeconds int32) int32 { availablePodCount := int32(0) for _, pod := range pods { - if IsPodAvailable(&pod, minReadySeconds) { + // TODO: Make the time.Now() as argument to allow unit test this. + if IsPodAvailable(&pod, minReadySeconds, time.Now()) { availablePodCount++ } } return availablePodCount } -func IsPodAvailable(pod *api.Pod, minReadySeconds int32) bool { +func IsPodAvailable(pod *api.Pod, minReadySeconds int32, now time.Time) bool { if !controller.IsPodActive(*pod) { return false } @@ -374,7 +375,7 @@ func IsPodAvailable(pod *api.Pod, minReadySeconds int32) bool { // 1. minReadySeconds == 0, or // 2. LastTransitionTime (is set) + minReadySeconds (>0) < current time minReadySecondsDuration := time.Duration(minReadySeconds) * time.Second - if minReadySeconds == 0 || !c.LastTransitionTime.IsZero() && c.LastTransitionTime.Add(minReadySecondsDuration).Before(time.Now()) { + if minReadySeconds == 0 || !c.LastTransitionTime.IsZero() && c.LastTransitionTime.Add(minReadySecondsDuration).Before(now) { return true } } diff --git a/test/e2e/framework/util.go b/test/e2e/framework/util.go index 76ef5fd4b9..b03b5979ec 100644 --- a/test/e2e/framework/util.go +++ b/test/e2e/framework/util.go @@ -3209,7 +3209,7 @@ func WaitForPodsReady(c *clientset.Clientset, ns, name string, minReadySeconds i return false, nil } for _, pod := range pods.Items { - if !deploymentutil.IsPodAvailable(&pod, int32(minReadySeconds)) { + if !deploymentutil.IsPodAvailable(&pod, int32(minReadySeconds), time.Now()) { return false, nil } } @@ -3260,7 +3260,7 @@ func logPodsOfDeployment(c clientset.Interface, deployment *extensions.Deploymen if err == nil { for _, pod := range podList.Items { availability := "not available" - if deploymentutil.IsPodAvailable(&pod, minReadySeconds) { + if deploymentutil.IsPodAvailable(&pod, minReadySeconds, time.Now()) { availability = "available" } Logf("Pod %s is %s: %+v", pod.Name, availability, pod) From 67d929a3d248fc6ad1a9435d07ffb2ef1a1e0f76 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Thu, 30 Jun 2016 11:23:48 -0400 Subject: [PATCH 304/339] Return immediately for singular get on error Return immediately when attempting to get a singular resource that isn't found, so that we avoid printing out a List if the output format is something like json or yaml. Before: ``` $ kubectl get pod/foo -o yaml apiVersion: v1 items: [] kind: List metadata: {} pods "foo" not found ``` After: ``` $ kubectl get pod/foo -o yaml pods "foo" not found ``` --- hack/test-cmd.sh | 14 ++++++++++++++ pkg/kubectl/cmd/get.go | 3 +++ 2 files changed, 17 insertions(+) diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 02f51e7e8a..16ae002227 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -975,6 +975,20 @@ __EOF__ # Post-condition: POD abc should error since it doesn't exist kube::test::if_has_string "${output_message}" 'pods "abc" not found' + ### Test retrieval of non-existing POD with json output flag specified + # Pre-condition: no POD exists + kube::test::get_object_assert pods "{{range.items}}{{$id_field}}:{{end}}" '' + # Command + output_message=$(! kubectl get pods abc 2>&1 "${kube_flags[@]}" -o json) + # Post-condition: POD abc should error since it doesn't exist + kube::test::if_has_string "${output_message}" 'pods "abc" not found' + # Post-condition: make sure we don't display an empty List + if kube::test::if_has_string "${output_message}" 'List'; then + echo 'Unexpected List output' + echo "${LINENO} $(basename $0)" + exit 1 + fi + ##################################### # Third Party Resources # ##################################### diff --git a/pkg/kubectl/cmd/get.go b/pkg/kubectl/cmd/get.go index 3aab52515f..8757f63f05 100644 --- a/pkg/kubectl/cmd/get.go +++ b/pkg/kubectl/cmd/get.go @@ -232,6 +232,9 @@ func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string singular := false infos, err := r.IntoSingular(&singular).Infos() if err != nil { + if singular { + return err + } allErrs = append(allErrs, err) } From 8cc6057c63b0081a355be09fa4716a1ae39107ef Mon Sep 17 00:00:00 2001 From: Ron Lai Date: Fri, 24 Jun 2016 14:16:11 -0700 Subject: [PATCH 305/339] Declare out of disk when there is no free inodes. --- pkg/kubelet/disk_manager.go | 15 ++-- pkg/kubelet/disk_manager_test.go | 127 ++++++++++++++++++++++--------- pkg/kubelet/kubelet_test.go | 4 +- 3 files changed, 102 insertions(+), 44 deletions(-) diff --git a/pkg/kubelet/disk_manager.go b/pkg/kubelet/disk_manager.go index b5b0d499dd..bbb2ea0bb8 100644 --- a/pkg/kubelet/disk_manager.go +++ b/pkg/kubelet/disk_manager.go @@ -46,10 +46,11 @@ type DiskSpacePolicy struct { } type fsInfo struct { - Usage int64 - Capacity int64 - Available int64 - Timestamp time.Time + Usage int64 + Capacity int64 + Available int64 + Timestamp time.Time + InodesFree int64 } type realDiskSpaceManager struct { @@ -78,6 +79,7 @@ func (dm *realDiskSpaceManager) getFsInfo(fsType string, f func() (cadvisorapi.F fsi.Usage = int64(fs.Usage) fsi.Capacity = int64(fs.Capacity) fsi.Available = int64(fs.Available) + fsi.InodesFree = int64(fs.InodesFree) dm.cachedInfo[fsType] = fsi } return fsi, nil @@ -102,11 +104,14 @@ func (dm *realDiskSpaceManager) isSpaceAvailable(fsType string, threshold int, f if fsInfo.Available < 0 { return true, fmt.Errorf("wrong available space for %q: %+v", fsType, fsInfo) } - if fsInfo.Available < int64(threshold)*mb { glog.Infof("Running out of space on disk for %q: available %d MB, threshold %d MB", fsType, fsInfo.Available/mb, threshold) return false, nil } + if fsInfo.InodesFree == 0 { + glog.Infof("Running out of inodes for %q", fsType) + return false, nil + } return true, nil } diff --git a/pkg/kubelet/disk_manager_test.go b/pkg/kubelet/disk_manager_test.go index e9ff9cf773..3e44d25b9c 100644 --- a/pkg/kubelet/disk_manager_test.go +++ b/pkg/kubelet/disk_manager_test.go @@ -62,13 +62,15 @@ func TestSpaceAvailable(t *testing.T) { assert.NoError(err) mockCadvisor.On("ImagesFsInfo").Return(cadvisorapi.FsInfo{ - Usage: 400 * mb, - Capacity: 1000 * mb, - Available: 600 * mb, + Usage: 400 * mb, + Capacity: 1000 * mb, + Available: 600 * mb, + InodesFree: 5, }, nil) mockCadvisor.On("RootFsInfo").Return(cadvisorapi.FsInfo{ - Usage: 9 * mb, - Capacity: 10 * mb, + Usage: 9 * mb, + Capacity: 10 * mb, + InodesFree: 5, }, nil) ok, err := dm.IsRuntimeDiskSpaceAvailable() @@ -81,7 +83,7 @@ func TestSpaceAvailable(t *testing.T) { } // TestIsRuntimeDiskSpaceAvailableWithSpace verifies IsRuntimeDiskSpaceAvailable results when -// space is available. +// space and inodes are available. func TestIsRuntimeDiskSpaceAvailableWithSpace(t *testing.T) { assert, policy, mockCadvisor := setUp(t) dm, err := newDiskSpaceManager(mockCadvisor, policy) @@ -89,9 +91,10 @@ func TestIsRuntimeDiskSpaceAvailableWithSpace(t *testing.T) { // 500MB available mockCadvisor.On("ImagesFsInfo").Return(cadvisorapi.FsInfo{ - Usage: 9500 * mb, - Capacity: 10000 * mb, - Available: 500 * mb, + Usage: 9500 * mb, + Capacity: 10000 * mb, + Available: 500 * mb, + InodesFree: 10, }, nil) ok, err := dm.IsRuntimeDiskSpaceAvailable() @@ -105,9 +108,30 @@ func TestIsRuntimeDiskSpaceAvailableWithoutSpace(t *testing.T) { // 1MB available assert, policy, mockCadvisor := setUp(t) mockCadvisor.On("ImagesFsInfo").Return(cadvisorapi.FsInfo{ - Usage: 999 * mb, - Capacity: 1000 * mb, - Available: 1 * mb, + Usage: 999 * mb, + Capacity: 1000 * mb, + Available: 1 * mb, + InodesFree: 10, + }, nil) + + dm, err := newDiskSpaceManager(mockCadvisor, policy) + require.NoError(t, err) + + ok, err := dm.IsRuntimeDiskSpaceAvailable() + assert.NoError(err) + assert.False(ok) +} + +// TestIsRuntimeDiskSpaceAvailableWithoutInode verifies IsRuntimeDiskSpaceAvailable results when +// inode is not available. +func TestIsRuntimeDiskSpaceAvailableWithoutInode(t *testing.T) { + // 1MB available + assert, policy, mockCadvisor := setUp(t) + mockCadvisor.On("ImagesFsInfo").Return(cadvisorapi.FsInfo{ + Usage: 999 * mb, + Capacity: 1000 * mb, + Available: 500 * mb, + InodesFree: 0, }, nil) dm, err := newDiskSpaceManager(mockCadvisor, policy) @@ -119,7 +143,7 @@ func TestIsRuntimeDiskSpaceAvailableWithoutSpace(t *testing.T) { } // TestIsRootDiskSpaceAvailableWithSpace verifies IsRootDiskSpaceAvailable results when -// space is available. +// space and inodes are available. func TestIsRootDiskSpaceAvailableWithSpace(t *testing.T) { assert, policy, mockCadvisor := setUp(t) policy.RootFreeDiskMB = 10 @@ -128,9 +152,10 @@ func TestIsRootDiskSpaceAvailableWithSpace(t *testing.T) { // 999MB available mockCadvisor.On("RootFsInfo").Return(cadvisorapi.FsInfo{ - Usage: 1 * mb, - Capacity: 1000 * mb, - Available: 999 * mb, + Usage: 1 * mb, + Capacity: 1000 * mb, + Available: 999 * mb, + InodesFree: 10, }, nil) ok, err := dm.IsRootDiskSpaceAvailable() @@ -148,9 +173,31 @@ func TestIsRootDiskSpaceAvailableWithoutSpace(t *testing.T) { // 9MB available mockCadvisor.On("RootFsInfo").Return(cadvisorapi.FsInfo{ - Usage: 990 * mb, - Capacity: 1000 * mb, - Available: 9 * mb, + Usage: 990 * mb, + Capacity: 1000 * mb, + Available: 9 * mb, + InodesFree: 10, + }, nil) + + ok, err := dm.IsRootDiskSpaceAvailable() + assert.NoError(err) + assert.False(ok) +} + +// TestIsRootDiskSpaceAvailableWithoutInode verifies IsRootDiskSpaceAvailable results when +// inode is not available. +func TestIsRootDiskSpaceAvailableWithoutInode(t *testing.T) { + assert, policy, mockCadvisor := setUp(t) + policy.RootFreeDiskMB = 10 + dm, err := newDiskSpaceManager(mockCadvisor, policy) + assert.NoError(err) + + // 9MB available + mockCadvisor.On("RootFsInfo").Return(cadvisorapi.FsInfo{ + Usage: 990 * mb, + Capacity: 1000 * mb, + Available: 500 * mb, + InodesFree: 0, }, nil) ok, err := dm.IsRootDiskSpaceAvailable() @@ -165,14 +212,16 @@ func TestCache(t *testing.T) { assert.NoError(err) mockCadvisor.On("ImagesFsInfo").Return(cadvisorapi.FsInfo{ - Usage: 400 * mb, - Capacity: 1000 * mb, - Available: 300 * mb, + Usage: 400 * mb, + Capacity: 1000 * mb, + Available: 300 * mb, + InodesFree: 10, }, nil).Once() mockCadvisor.On("RootFsInfo").Return(cadvisorapi.FsInfo{ - Usage: 500 * mb, - Capacity: 1000 * mb, - Available: 500 * mb, + Usage: 500 * mb, + Capacity: 1000 * mb, + Available: 500 * mb, + InodesFree: 5, }, nil).Once() // Initial calls which should be recorded in mockCadvisor @@ -224,9 +273,10 @@ func Test_getFsInfo(t *testing.T) { // Sunny day case mockCadvisor.On("RootFsInfo").Return(cadvisorapi.FsInfo{ - Usage: 10 * mb, - Capacity: 100 * mb, - Available: 90 * mb, + Usage: 10 * mb, + Capacity: 100 * mb, + Available: 90 * mb, + InodesFree: 5, }, nil).Once() dm := &realDiskSpaceManager{ @@ -242,9 +292,10 @@ func Test_getFsInfo(t *testing.T) { // Threshold case mockCadvisor = new(cadvisortest.Mock) mockCadvisor.On("RootFsInfo").Return(cadvisorapi.FsInfo{ - Usage: 9 * mb, - Capacity: 100 * mb, - Available: 9 * mb, + Usage: 9 * mb, + Capacity: 100 * mb, + Available: 9 * mb, + InodesFree: 5, }, nil).Once() dm = &realDiskSpaceManager{ @@ -258,9 +309,10 @@ func Test_getFsInfo(t *testing.T) { // Frozen case mockCadvisor.On("RootFsInfo").Return(cadvisorapi.FsInfo{ - Usage: 9 * mb, - Capacity: 10 * mb, - Available: 500 * mb, + Usage: 9 * mb, + Capacity: 10 * mb, + Available: 500 * mb, + InodesFree: 5, }, nil).Once() dm = &realDiskSpaceManager{ @@ -275,9 +327,10 @@ func Test_getFsInfo(t *testing.T) { // Capacity error case mockCadvisor = new(cadvisortest.Mock) mockCadvisor.On("RootFsInfo").Return(cadvisorapi.FsInfo{ - Usage: 9 * mb, - Capacity: 0, - Available: 500 * mb, + Usage: 9 * mb, + Capacity: 0, + Available: 500 * mb, + InodesFree: 5, }, nil).Once() dm = &realDiskSpaceManager{ diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index 8a6f9e8ecc..bf7bad4464 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -2695,8 +2695,8 @@ func TestValidateContainerLogStatus(t *testing.T) { // sufficient disk space or it is out of disk, depending on the capacity, availability and // threshold values. func updateDiskSpacePolicy(kubelet *Kubelet, mockCadvisor *cadvisortest.Mock, rootCap, dockerCap, rootAvail, dockerAvail uint64, rootThreshold, dockerThreshold int) error { - dockerimagesFsInfo := cadvisorapiv2.FsInfo{Capacity: rootCap * mb, Available: rootAvail * mb} - rootFsInfo := cadvisorapiv2.FsInfo{Capacity: dockerCap * mb, Available: dockerAvail * mb} + dockerimagesFsInfo := cadvisorapiv2.FsInfo{Capacity: rootCap * mb, Available: rootAvail * mb, InodesFree: 5} + rootFsInfo := cadvisorapiv2.FsInfo{Capacity: dockerCap * mb, Available: dockerAvail * mb, InodesFree: 5} mockCadvisor.On("ImagesFsInfo").Return(dockerimagesFsInfo, nil) mockCadvisor.On("RootFsInfo").Return(rootFsInfo, nil) From e5f8cd99738acf429e79a9c72dc27fba05051a75 Mon Sep 17 00:00:00 2001 From: Ron Lai Date: Tue, 28 Jun 2016 10:58:41 -0700 Subject: [PATCH 306/339] Includes the number of free indoes in summary --- pkg/kubelet/api/v1alpha1/stats/types.go | 2 ++ pkg/kubelet/server/stats/summary.go | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/kubelet/api/v1alpha1/stats/types.go b/pkg/kubelet/api/v1alpha1/stats/types.go index e0f5dfa62f..a752ab30b7 100644 --- a/pkg/kubelet/api/v1alpha1/stats/types.go +++ b/pkg/kubelet/api/v1alpha1/stats/types.go @@ -173,6 +173,8 @@ type FsStats struct { // This may differ from the total bytes used on the filesystem and may not equal CapacityBytes - AvailableBytes. // e.g. For ContainerStats.Rootfs this is the bytes used by the container rootfs on the filesystem. UsedBytes *uint64 `json:"usedBytes,omitempty"` + // InodesFree represents the free inodes in the filesystem. + InodesFree *uint64 `json:"inodesFree,omitempty"` } // UserDefinedMetricType defines how the metric should be interpreted by the user. diff --git a/pkg/kubelet/server/stats/summary.go b/pkg/kubelet/server/stats/summary.go index 00b8b82b59..a2f8c663b8 100644 --- a/pkg/kubelet/server/stats/summary.go +++ b/pkg/kubelet/server/stats/summary.go @@ -124,13 +124,15 @@ func (sb *summaryBuilder) build() (*stats.Summary, error) { Fs: &stats.FsStats{ AvailableBytes: &sb.rootFsInfo.Available, CapacityBytes: &sb.rootFsInfo.Capacity, - UsedBytes: &sb.rootFsInfo.Usage}, + UsedBytes: &sb.rootFsInfo.Usage, + InodesFree: &sb.rootFsInfo.InodesFree}, StartTime: rootStats.StartTime, Runtime: &stats.RuntimeStats{ ImageFs: &stats.FsStats{ AvailableBytes: &sb.imageFsInfo.Available, CapacityBytes: &sb.imageFsInfo.Capacity, UsedBytes: &sb.imageStats.TotalStorageBytes, + InodesFree: &sb.imageFsInfo.InodesFree, }, }, } From 930332751b885cee9b12ce8631e92aa030fc1324 Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Tue, 24 May 2016 17:47:23 -0700 Subject: [PATCH 307/339] Use `CreatedByAnnotation` contant A nit but didn't want the strings to get out of sync. Signed-off-by: Doug Davis --- pkg/api/helpers.go | 4 ++++ pkg/controller/controller_utils.go | 4 +--- pkg/kubectl/cmd/annotate_test.go | 4 ++-- pkg/kubectl/cmd/drain.go | 3 +-- pkg/kubectl/cmd/drain_test.go | 9 ++++----- pkg/kubectl/describe.go | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkg/api/helpers.go b/pkg/api/helpers.go index 1349ef62b0..047b4d63d3 100644 --- a/pkg/api/helpers.go +++ b/pkg/api/helpers.go @@ -424,6 +424,10 @@ const ( // SeccompContainerAnnotationKeyPrefix represents the key of a seccomp profile applied // to one container of a pod. SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/" + + // CreatedByAnnotation represents the key used to store the spec(json) + // used to create the resource. + CreatedByAnnotation = "kubernetes.io/created-by" ) // GetAffinityFromPod gets the json serialized affinity data from Pod.Annotations diff --git a/pkg/controller/controller_utils.go b/pkg/controller/controller_utils.go index efdab55c13..a4878a543a 100644 --- a/pkg/controller/controller_utils.go +++ b/pkg/controller/controller_utils.go @@ -40,8 +40,6 @@ import ( ) const ( - CreatedByAnnotation = "kubernetes.io/created-by" - // If a watch drops a delete event for a pod, it'll take this long // before a dormant controller waiting for those packets is woken up anyway. It is // specifically targeted at the case where some problem prevents an update @@ -392,7 +390,7 @@ func getPodsAnnotationSet(template *api.PodTemplateSpec, object runtime.Object) if err != nil { return desiredAnnotations, fmt.Errorf("unable to serialize controller reference: %v", err) } - desiredAnnotations[CreatedByAnnotation] = string(createdByRefJson) + desiredAnnotations[api.CreatedByAnnotation] = string(createdByRefJson) return desiredAnnotations, nil } diff --git a/pkg/kubectl/cmd/annotate_test.go b/pkg/kubectl/cmd/annotate_test.go index 58730662ab..bfb8877782 100644 --- a/pkg/kubectl/cmd/annotate_test.go +++ b/pkg/kubectl/cmd/annotate_test.go @@ -116,8 +116,8 @@ func TestParseAnnotations(t *testing.T) { expectErr: false, }, { - annotations: []string{"url=" + testURL, "kubernetes.io/created-by=" + testJSON}, - expected: map[string]string{"url": testURL, "kubernetes.io/created-by": testJSON}, + annotations: []string{"url=" + testURL, api.CreatedByAnnotation + "=" + testJSON}, + expected: map[string]string{"url": testURL, api.CreatedByAnnotation: testJSON}, expectedRemove: []string{}, scenario: "add annotations with special characters", expectErr: false, diff --git a/pkg/kubectl/cmd/drain.go b/pkg/kubectl/cmd/drain.go index 07e79d790c..667e962b6f 100644 --- a/pkg/kubectl/cmd/drain.go +++ b/pkg/kubectl/cmd/drain.go @@ -29,7 +29,6 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/meta" client "k8s.io/kubernetes/pkg/client/unversioned" - "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/fields" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/kubectl/resource" @@ -238,7 +237,7 @@ func (o *DrainOptions) getController(sr *api.SerializedReference) (interface{}, } func (o *DrainOptions) getPodCreator(pod api.Pod) (*api.SerializedReference, error) { - creatorRef, found := pod.ObjectMeta.Annotations[controller.CreatedByAnnotation] + creatorRef, found := pod.ObjectMeta.Annotations[api.CreatedByAnnotation] if !found { return nil, nil } diff --git a/pkg/kubectl/cmd/drain_test.go b/pkg/kubectl/cmd/drain_test.go index 4fb3bad4b8..f5c08f049f 100644 --- a/pkg/kubectl/cmd/drain_test.go +++ b/pkg/kubectl/cmd/drain_test.go @@ -36,7 +36,6 @@ import ( "k8s.io/kubernetes/pkg/apis/batch" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/unversioned/fake" - "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/conversion" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "k8s.io/kubernetes/pkg/runtime" @@ -219,7 +218,7 @@ func TestDrain(t *testing.T) { } rc_anno := make(map[string]string) - rc_anno[controller.CreatedByAnnotation] = refJson(t, &rc) + rc_anno[api.CreatedByAnnotation] = refJson(t, &rc) rc_pod := api.Pod{ ObjectMeta: api.ObjectMeta{ @@ -247,7 +246,7 @@ func TestDrain(t *testing.T) { } ds_anno := make(map[string]string) - ds_anno[controller.CreatedByAnnotation] = refJson(t, &ds) + ds_anno[api.CreatedByAnnotation] = refJson(t, &ds) ds_pod := api.Pod{ ObjectMeta: api.ObjectMeta{ @@ -280,7 +279,7 @@ func TestDrain(t *testing.T) { Namespace: "default", CreationTimestamp: unversioned.Time{Time: time.Now()}, Labels: labels, - Annotations: map[string]string{controller.CreatedByAnnotation: refJson(t, &job)}, + Annotations: map[string]string{api.CreatedByAnnotation: refJson(t, &job)}, }, } @@ -298,7 +297,7 @@ func TestDrain(t *testing.T) { } rs_anno := make(map[string]string) - rs_anno[controller.CreatedByAnnotation] = refJson(t, &rs) + rs_anno[api.CreatedByAnnotation] = refJson(t, &rs) rs_pod := api.Pod{ ObjectMeta: api.ObjectMeta{ diff --git a/pkg/kubectl/describe.go b/pkg/kubectl/describe.go index 2d6f79245b..231f71c41c 100644 --- a/pkg/kubectl/describe.go +++ b/pkg/kubectl/describe.go @@ -549,7 +549,7 @@ func describePod(pod *api.Pod, events *api.EventList) (string, error) { } func printControllers(annotation map[string]string) string { - value, ok := annotation["kubernetes.io/created-by"] + value, ok := annotation[api.CreatedByAnnotation] if ok { var r api.SerializedReference err := json.Unmarshal([]byte(value), &r) From 8614be3c714ddeafe4698b88ad2870d1a27af3ec Mon Sep 17 00:00:00 2001 From: Girish Kalele Date: Wed, 29 Jun 2016 15:07:43 -0700 Subject: [PATCH 308/339] Bump kubedns version to 1.6 with latest skynetservices/skydns code Built kube-dns for all architectures and pushed containers to gcr.io --- build/kube-dns/Makefile | 4 ++-- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base | 10 +++++----- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in | 10 +++++----- cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build/kube-dns/Makefile b/build/kube-dns/Makefile index 0ea431cb2d..896c0deb79 100644 --- a/build/kube-dns/Makefile +++ b/build/kube-dns/Makefile @@ -17,12 +17,12 @@ # If you update this image please bump the tag value before pushing. # # Usage: -# [ARCH=amd64] [TAG=1.5] [REGISTRY=gcr.io/google_containers] [BASEIMAGE=busybox] make (container|push) +# [ARCH=amd64] [TAG=1.6] [REGISTRY=gcr.io/google_containers] [BASEIMAGE=busybox] make (container|push) # Default registry, arch and tag. This can be overwritten by arguments to make PLATFORM?=linux ARCH?=amd64 -TAG?=1.5 +TAG?=1.6 REGISTRY?=gcr.io/google_containers GOLANG_VERSION=1.6 diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base index caf97c7088..5b66208988 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.base @@ -21,27 +21,27 @@ apiVersion: v1 kind: ReplicationController metadata: - name: kube-dns-v17 + name: kube-dns-v18 namespace: kube-system labels: k8s-app: kube-dns - version: v17 + version: v18 kubernetes.io/cluster-service: "true" spec: replicas: __PILLAR__DNS__REPLICAS__ selector: k8s-app: kube-dns - version: v17 + version: v18 template: metadata: labels: k8s-app: kube-dns - version: v17 + version: v18 kubernetes.io/cluster-service: "true" spec: containers: - name: kubedns - image: gcr.io/google_containers/kubedns-amd64:1.5 + image: gcr.io/google_containers/kubedns-amd64:1.6 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in index 138d3d9853..4fe4cd7ffa 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.in @@ -21,27 +21,27 @@ apiVersion: v1 kind: ReplicationController metadata: - name: kube-dns-v17 + name: kube-dns-v18 namespace: kube-system labels: k8s-app: kube-dns - version: v17 + version: v18 kubernetes.io/cluster-service: "true" spec: replicas: {{ pillar['dns_replicas'] }} selector: k8s-app: kube-dns - version: v17 + version: v18 template: metadata: labels: k8s-app: kube-dns - version: v17 + version: v18 kubernetes.io/cluster-service: "true" spec: containers: - name: kubedns - image: gcr.io/google_containers/kubedns-amd64:1.5 + image: gcr.io/google_containers/kubedns-amd64:1.6 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in diff --git a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed index 960a6c5e3d..fa4f67c6c1 100644 --- a/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed +++ b/cluster/saltbase/salt/kube-dns/skydns-rc.yaml.sed @@ -21,27 +21,27 @@ apiVersion: v1 kind: ReplicationController metadata: - name: kube-dns-v17 + name: kube-dns-v18 namespace: kube-system labels: k8s-app: kube-dns - version: v17 + version: v18 kubernetes.io/cluster-service: "true" spec: replicas: $DNS_REPLICAS selector: k8s-app: kube-dns - version: v17 + version: v18 template: metadata: labels: k8s-app: kube-dns - version: v17 + version: v18 kubernetes.io/cluster-service: "true" spec: containers: - name: kubedns - image: gcr.io/google_containers/kubedns-amd64:1.5 + image: gcr.io/google_containers/kubedns-amd64:1.6 resources: # TODO: Set memory limits when we've profiled the container for large # clusters, then set request = limit to keep this container in From 6db354b1ef4c4b21d4dcdd34fb92d3ef93791cf0 Mon Sep 17 00:00:00 2001 From: Minhan Xia Date: Thu, 30 Jun 2016 10:50:12 -0700 Subject: [PATCH 309/339] switch back to promiscuous-bridge mode --- test/e2e_node/e2e_service.go | 1 - 1 file changed, 1 deletion(-) diff --git a/test/e2e_node/e2e_service.go b/test/e2e_node/e2e_service.go index c39897c413..80cb51ef18 100644 --- a/test/e2e_node/e2e_service.go +++ b/test/e2e_node/e2e_service.go @@ -243,7 +243,6 @@ func (es *e2eService) startKubeletServer() (*killCmd, error) { "--v", LOG_VERBOSITY_LEVEL, "--logtostderr", "--network-plugin=kubenet", "--pod-cidr=10.180.0.0/24", // Assign a fixed CIDR to the node because there is no node controller. - "--hairpin-mode=hairpin-veth", ) cmd := exec.Command("sudo", cmdArgs...) hcc := newHealthCheckCommand( From 821e6ec2a72b8453813923ac71d1c54f8aef91a8 Mon Sep 17 00:00:00 2001 From: Jeff Grafton Date: Thu, 30 Jun 2016 11:25:40 -0700 Subject: [PATCH 310/339] Make node e2e exit nonzero on test failures --- test/e2e_node/e2e_remote.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/e2e_node/e2e_remote.go b/test/e2e_node/e2e_remote.go index c07484c368..e7617c75cd 100644 --- a/test/e2e_node/e2e_remote.go +++ b/test/e2e_node/e2e_remote.go @@ -226,14 +226,11 @@ func RunRemote(archive string, host string, cleanup bool, junitFileNumber int, s glog.Infof("Copying test artifacts from %s", host) scpErr := getTestArtifacts(host, tmp) - exitOk := true if scpErr != nil { - // Only exit non-0 if the scp failed - exitOk = false - aggErrs = append(aggErrs, err) + aggErrs = append(aggErrs, scpErr) } - return output, exitOk, utilerrors.NewAggregate(aggErrs) + return output, len(aggErrs) == 0, utilerrors.NewAggregate(aggErrs) } func getTestArtifacts(host, testDir string) error { From 993ab1d886cdea4565a8655a142ddda8d5709a5e Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Wed, 29 Jun 2016 23:07:53 -0400 Subject: [PATCH 311/339] Allow specifying secret data using strings --- api/swagger-spec/v1.json | 4 + docs/api-reference/v1/definitions.html | 7 + hack/test-cmd.sh | 24 +++ pkg/api/v1/conversion.go | 19 +++ pkg/api/v1/conversion_generated.go | 4 - pkg/api/v1/deep_copy_generated.go | 9 + pkg/api/v1/generated.pb.go | 136 +++++++++++++++ pkg/api/v1/generated.proto | 7 + pkg/api/v1/types.generated.go | 198 +++++++++++++++------- pkg/api/v1/types.go | 7 + pkg/api/v1/types_swagger_doc_generated.go | 9 +- 11 files changed, 351 insertions(+), 73 deletions(-) diff --git a/api/swagger-spec/v1.json b/api/swagger-spec/v1.json index a55b9a04f7..e4d0920bf8 100644 --- a/api/swagger-spec/v1.json +++ b/api/swagger-spec/v1.json @@ -19090,6 +19090,10 @@ "type": "object", "description": "Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4" }, + "stringData": { + "type": "object", + "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API." + }, "type": { "type": "string", "description": "Used to facilitate programmatic handling of secret data." diff --git a/docs/api-reference/v1/definitions.html b/docs/api-reference/v1/definitions.html index 904a97d2b0..05f2b18182 100755 --- a/docs/api-reference/v1/definitions.html +++ b/docs/api-reference/v1/definitions.html @@ -6930,6 +6930,13 @@ The resulting set of endpoints can be viewed as:
+

stringData

+

stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.

+

false

+

object

+ + +

type

Used to facilitate programmatic handling of secret data.

false

diff --git a/hack/test-cmd.sh b/hack/test-cmd.sh index 02f51e7e8a..d7329fee0b 100755 --- a/hack/test-cmd.sh +++ b/hack/test-cmd.sh @@ -1355,6 +1355,30 @@ __EOF__ # Clean-up kubectl delete secret test-secret --namespace=test-secrets + # Create a secret using stringData + kubectl create --namespace=test-secrets -f - "${kube_flags[@]}" << __EOF__ +{ + "kind": "Secret", + "apiVersion": "v1", + "metadata": { + "name": "secret-string-data" + }, + "data": { + "k1":"djE=", + "k2":"" + }, + "stringData": { + "k2":"v2" + } +} +__EOF__ + # Post-condition: secret-string-data secret is created with expected data, merged/overridden data from stringData, and a cleared stringData field + kube::test::get_object_assert 'secret/secret-string-data --namespace=test-secrets ' '{{.data}}' '.*k1:djE=.*' + kube::test::get_object_assert 'secret/secret-string-data --namespace=test-secrets ' '{{.data}}' '.*k2:djI=.*' + kube::test::get_object_assert 'secret/secret-string-data --namespace=test-secrets ' '{{.stringData}}' '' + # Clean up + kubectl delete secret secret-string-data --namespace=test-secrets + ### Create a secret using output flags # Pre-condition: no secret exists kube::test::get_object_assert 'secrets --namespace=test-secrets' "{{range.items}}{{$id_field}}:{{end}}" '' diff --git a/pkg/api/v1/conversion.go b/pkg/api/v1/conversion.go index c207e60e08..7e760a49da 100644 --- a/pkg/api/v1/conversion.go +++ b/pkg/api/v1/conversion.go @@ -43,6 +43,7 @@ func addConversionFuncs(scheme *runtime.Scheme) { Convert_v1_Pod_To_api_Pod, Convert_v1_PodSpec_To_api_PodSpec, Convert_v1_ReplicationControllerSpec_To_api_ReplicationControllerSpec, + Convert_v1_Secret_To_api_Secret, Convert_v1_ServiceSpec_To_api_ServiceSpec, Convert_v1_ResourceList_To_api_ResourceList, ) @@ -598,6 +599,24 @@ func Convert_api_ServiceSpec_To_v1_ServiceSpec(in *api.ServiceSpec, out *Service return nil } +func Convert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversion.Scope) error { + if err := autoConvert_v1_Secret_To_api_Secret(in, out, s); err != nil { + return err + } + + // StringData overwrites Data + if len(in.StringData) > 0 { + if out.Data == nil { + out.Data = map[string][]byte{} + } + for k, v := range in.StringData { + out.Data[k] = []byte(v) + } + } + + return nil +} + func Convert_v1_ServiceSpec_To_api_ServiceSpec(in *ServiceSpec, out *api.ServiceSpec, s conversion.Scope) error { if err := autoConvert_v1_ServiceSpec_To_api_ServiceSpec(in, out, s); err != nil { return err diff --git a/pkg/api/v1/conversion_generated.go b/pkg/api/v1/conversion_generated.go index e232fdf7a7..6c2516fe00 100644 --- a/pkg/api/v1/conversion_generated.go +++ b/pkg/api/v1/conversion_generated.go @@ -5647,10 +5647,6 @@ func autoConvert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversi return nil } -func Convert_v1_Secret_To_api_Secret(in *Secret, out *api.Secret, s conversion.Scope) error { - return autoConvert_v1_Secret_To_api_Secret(in, out, s) -} - func autoConvert_api_Secret_To_v1_Secret(in *api.Secret, out *Secret, s conversion.Scope) error { if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { return err diff --git a/pkg/api/v1/deep_copy_generated.go b/pkg/api/v1/deep_copy_generated.go index f4b604b90b..9bf00219ae 100644 --- a/pkg/api/v1/deep_copy_generated.go +++ b/pkg/api/v1/deep_copy_generated.go @@ -2750,6 +2750,15 @@ func DeepCopy_v1_Secret(in Secret, out *Secret, c *conversion.Cloner) error { } else { out.Data = nil } + if in.StringData != nil { + in, out := in.StringData, &out.StringData + *out = make(map[string]string) + for key, val := range in { + (*out)[key] = val + } + } else { + out.StringData = nil + } out.Type = in.Type return nil } diff --git a/pkg/api/v1/generated.pb.go b/pkg/api/v1/generated.pb.go index 99220e0d0e..16ac125d58 100644 --- a/pkg/api/v1/generated.pb.go +++ b/pkg/api/v1/generated.pb.go @@ -6713,6 +6713,23 @@ func (m *Secret) MarshalTo(data []byte) (int, error) { i++ i = encodeVarintGenerated(data, i, uint64(len(m.Type))) i += copy(data[i:], m.Type) + if len(m.StringData) > 0 { + for k := range m.StringData { + data[i] = 0x22 + i++ + v := m.StringData[k] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(data, i, uint64(mapSize)) + data[i] = 0xa + i++ + i = encodeVarintGenerated(data, i, uint64(len(k))) + i += copy(data[i:], k) + data[i] = 0x12 + i++ + i = encodeVarintGenerated(data, i, uint64(len(v))) + i += copy(data[i:], v) + } + } return i, nil } @@ -9870,6 +9887,14 @@ func (m *Secret) Size() (n int) { } l = len(m.Type) n += 1 + l + sovGenerated(uint64(l)) + if len(m.StringData) > 0 { + for k, v := range m.StringData { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } return n } @@ -31125,6 +31150,117 @@ func (m *Secret) Unmarshal(data []byte) error { } m.Type = SecretType(data[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringData", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(data[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := data[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(data[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + if m.StringData == nil { + m.StringData = make(map[string]string) + } + m.StringData[mapkey] = mapvalue + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(data[iNdEx:]) diff --git a/pkg/api/v1/generated.proto b/pkg/api/v1/generated.proto index d6a19d9faf..86fbcabb3e 100644 --- a/pkg/api/v1/generated.proto +++ b/pkg/api/v1/generated.proto @@ -2477,6 +2477,13 @@ message Secret { // Described in https://tools.ietf.org/html/rfc4648#section-4 map data = 2; + // stringData allows specifying non-binary secret data in string form. + // It is provided as a write-only convenience method. + // All keys and values are merged into the data field on write, overwriting any existing values. + // It is never output when reading from the API. + // +genconversion=false + map stringData = 4; + // Used to facilitate programmatic handling of secret data. optional string type = 3; } diff --git a/pkg/api/v1/types.generated.go b/pkg/api/v1/types.generated.go index 304ec2acd1..93c45dadf2 100644 --- a/pkg/api/v1/types.generated.go +++ b/pkg/api/v1/types.generated.go @@ -49484,17 +49484,18 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray - var yyq2 [5]bool + var yyq2 [6]bool _, _, _ = yysep2, yyq2, yy2arr2 const yyr2 bool = false yyq2[0] = true yyq2[1] = len(x.Data) != 0 - yyq2[2] = x.Type != "" - yyq2[3] = x.Kind != "" - yyq2[4] = x.APIVersion != "" + yyq2[2] = len(x.StringData) != 0 + yyq2[3] = x.Type != "" + yyq2[4] = x.Kind != "" + yyq2[5] = x.APIVersion != "" var yynn2 int if yyr2 || yy2arr2 { - r.EncodeArrayStart(5) + r.EncodeArrayStart(6) } else { yynn2 = 0 for _, b := range yyq2 { @@ -49558,41 +49559,49 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[2] { - x.Type.CodecEncodeSelf(e) + if x.StringData == nil { + r.EncodeNil() + } else { + yym12 := z.EncBinary() + _ = yym12 + if false { + } else { + z.F.EncMapStringStringV(x.StringData, false, e) + } + } } else { - r.EncodeString(codecSelferC_UTF81234, "") + r.EncodeNil() } } else { if yyq2[2] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("type")) + r.EncodeString(codecSelferC_UTF81234, string("stringData")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - x.Type.CodecEncodeSelf(e) + if x.StringData == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else { + z.F.EncMapStringStringV(x.StringData, false, e) + } + } } } if yyr2 || yy2arr2 { z.EncSendContainerState(codecSelfer_containerArrayElem1234) if yyq2[3] { - yym15 := z.EncBinary() - _ = yym15 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } + x.Type.CodecEncodeSelf(e) } else { r.EncodeString(codecSelferC_UTF81234, "") } } else { if yyq2[3] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("kind")) + r.EncodeString(codecSelferC_UTF81234, string("type")) z.EncSendContainerState(codecSelfer_containerMapValue1234) - yym16 := z.EncBinary() - _ = yym16 - if false { - } else { - r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) - } + x.Type.CodecEncodeSelf(e) } } if yyr2 || yy2arr2 { @@ -49602,7 +49611,7 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { _ = yym18 if false { } else { - r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) } } else { r.EncodeString(codecSelferC_UTF81234, "") @@ -49610,11 +49619,36 @@ func (x *Secret) CodecEncodeSelf(e *codec1978.Encoder) { } else { if yyq2[4] { z.EncSendContainerState(codecSelfer_containerMapKey1234) - r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + r.EncodeString(codecSelferC_UTF81234, string("kind")) z.EncSendContainerState(codecSelfer_containerMapValue1234) yym19 := z.EncBinary() _ = yym19 if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.Kind)) + } + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1234) + if yyq2[5] { + yym21 := z.EncBinary() + _ = yym21 + if false { + } else { + r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) + } + } else { + r.EncodeString(codecSelferC_UTF81234, "") + } + } else { + if yyq2[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1234) + r.EncodeString(codecSelferC_UTF81234, string("apiVersion")) + z.EncSendContainerState(codecSelfer_containerMapValue1234) + yym22 := z.EncBinary() + _ = yym22 + if false { } else { r.EncodeString(codecSelferC_UTF81234, string(x.APIVersion)) } @@ -49700,6 +49734,18 @@ func (x *Secret) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { h.decMapstringSliceuint8((*map[string][]uint8)(yyv5), d) } } + case "stringData": + if r.TryDecodeAsNil() { + x.StringData = nil + } else { + yyv7 := &x.StringData + yym8 := z.DecBinary() + _ = yym8 + if false { + } else { + z.F.DecMapStringStringX(yyv7, false, d) + } + } case "type": if r.TryDecodeAsNil() { x.Type = "" @@ -49729,16 +49775,16 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { var h codecSelfer1234 z, r := codec1978.GenHelperDecoder(d) _, _, _ = h, z, r - var yyj10 int - var yyb10 bool - var yyhl10 bool = l >= 0 - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + var yyj12 int + var yyb12 bool + var yyhl12 bool = l >= 0 + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49746,16 +49792,16 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.ObjectMeta = ObjectMeta{} } else { - yyv11 := &x.ObjectMeta - yyv11.CodecDecodeSelf(d) + yyv13 := &x.ObjectMeta + yyv13.CodecDecodeSelf(d) } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49763,21 +49809,43 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { if r.TryDecodeAsNil() { x.Data = nil } else { - yyv12 := &x.Data - yym13 := z.DecBinary() - _ = yym13 + yyv14 := &x.Data + yym15 := z.DecBinary() + _ = yym15 if false { } else { - h.decMapstringSliceuint8((*map[string][]uint8)(yyv12), d) + h.decMapstringSliceuint8((*map[string][]uint8)(yyv14), d) } } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1234) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1234) + if r.TryDecodeAsNil() { + x.StringData = nil + } else { + yyv16 := &x.StringData + yym17 := z.DecBinary() + _ = yym17 + if false { + } else { + z.F.DecMapStringStringX(yyv16, false, d) + } + } + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l + } else { + yyb12 = r.CheckBreak() + } + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49787,13 +49855,13 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Type = SecretType(r.DecodeString()) } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49803,13 +49871,13 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { } else { x.Kind = string(r.DecodeString()) } - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { z.DecSendContainerState(codecSelfer_containerArrayEnd1234) return } @@ -49820,17 +49888,17 @@ func (x *Secret) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { x.APIVersion = string(r.DecodeString()) } for { - yyj10++ - if yyhl10 { - yyb10 = yyj10 > l + yyj12++ + if yyhl12 { + yyb12 = yyj12 > l } else { - yyb10 = r.CheckBreak() + yyb12 = r.CheckBreak() } - if yyb10 { + if yyb12 { break } z.DecSendContainerState(codecSelfer_containerArrayElem1234) - z.DecStructFieldNotFound(yyj10-1, "") + z.DecStructFieldNotFound(yyj12-1, "") } z.DecSendContainerState(codecSelfer_containerArrayEnd1234) } @@ -59376,7 +59444,7 @@ func (x codecSelfer1234) decSliceSecret(v *[]Secret, d *codec1978.Decoder) { yyrg1 := len(yyv1) > 0 yyv21 := yyv1 - yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 264) + yyrl1, yyrt1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 272) if yyrt1 { if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] diff --git a/pkg/api/v1/types.go b/pkg/api/v1/types.go index 7a55940147..557a61a556 100644 --- a/pkg/api/v1/types.go +++ b/pkg/api/v1/types.go @@ -3089,6 +3089,13 @@ type Secret struct { // Described in https://tools.ietf.org/html/rfc4648#section-4 Data map[string][]byte `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"` + // stringData allows specifying non-binary secret data in string form. + // It is provided as a write-only convenience method. + // All keys and values are merged into the data field on write, overwriting any existing values. + // It is never output when reading from the API. + // +genconversion=false + StringData map[string]string `json:"stringData,omitempty" protobuf:"bytes,4,rep,name=stringData"` + // Used to facilitate programmatic handling of secret data. Type SecretType `json:"type,omitempty" protobuf:"bytes,3,opt,name=type,casttype=SecretType"` } diff --git a/pkg/api/v1/types_swagger_doc_generated.go b/pkg/api/v1/types_swagger_doc_generated.go index fcb047690b..7fe761a673 100644 --- a/pkg/api/v1/types_swagger_doc_generated.go +++ b/pkg/api/v1/types_swagger_doc_generated.go @@ -1485,10 +1485,11 @@ func (SELinuxOptions) SwaggerDoc() map[string]string { } var map_Secret = map[string]string{ - "": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", - "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "data": "Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", - "type": "Used to facilitate programmatic handling of secret data.", + "": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", + "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", + "data": "Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", + "stringData": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", + "type": "Used to facilitate programmatic handling of secret data.", } func (Secret) SwaggerDoc() map[string]string { From bc6e62658874e965591ca62bb0b980f0dda88f16 Mon Sep 17 00:00:00 2001 From: Quinton Hoole Date: Thu, 30 Jun 2016 13:33:20 -0700 Subject: [PATCH 312/339] Federated Services e2e: Simplify logic and logging around verification of services in underlying clusters. Fixes #28269 --- test/e2e/federated-service.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/e2e/federated-service.go b/test/e2e/federated-service.go index 57e5f674f2..3728b3afe1 100644 --- a/test/e2e/federated-service.go +++ b/test/e2e/federated-service.go @@ -322,17 +322,18 @@ func waitForServiceOrFail(clientset *release_1_3.Clientset, namespace string, se var clusterService *v1.Service err := wait.PollImmediate(framework.Poll, timeout, func() (bool, error) { clusterService, err := clientset.Services(namespace).Get(service.Name) - if err != nil && !errors.IsNotFound(err) { - return false, err + if (!present) && errors.IsNotFound(err) { // We want it gone, and it's gone. + By(fmt.Sprintf("Success: shard of federated service %q in namespace %q in cluster is absent", service.Name, namespace)) + return true, nil // Success } - if (clusterService != nil && err == nil && present) || (clusterService == nil && errors.IsNotFound(err) && !present) { - By(fmt.Sprintf("Success: federated service shard of service %q in namespace %q in cluster: %v", service.Name, namespace, present)) - return true, nil + if present && err == nil { // We want it present, and the Get succeeded, so we're all good. + By(fmt.Sprintf("Success: shard of federated service %q in namespace %q in cluster is present", service.Name, namespace)) + return true, nil // Success } - By(fmt.Sprintf("Service found: %v, waiting for service found: %v, trying again in %s", clusterService != nil, present, framework.Poll)) + By(fmt.Sprintf("Service %q in namespace %q in cluster. Found: %v, waiting for Found: %v, trying again in %s (err=%v)", service.Name, namespace, clusterService != nil && err == nil, present, framework.Poll, err)) return false, nil }) - framework.ExpectNoError(err, "Failed to get service %q in namespace %q", service.Name, namespace) + framework.ExpectNoError(err, "Failed to verify service %q in namespace %q in cluster: Present=%v", service.Name, namespace, present) if present && clusterService != nil { Expect(equivalent(*clusterService, *service)) From 48d47b1027c40be3dbab3f2e0fbe296e4b883330 Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Wed, 8 Jun 2016 18:12:54 +0300 Subject: [PATCH 313/339] Implement custom help command for kubectl Own implemenation of help command allows to print `Did you mean this?` with suggestions, which is missed in embed help command from github.com/spf13/cobra Also, it can be extended with different search features. At this patch, help command search query in short descriptions of commands in case of mismatch with commands names. fixes #25234 --- pkg/kubectl/cmd/cmd.go | 2 ++ pkg/kubectl/cmd/help.go | 79 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 pkg/kubectl/cmd/help.go diff --git a/pkg/kubectl/cmd/cmd.go b/pkg/kubectl/cmd/cmd.go index c8c58f06b9..5665725325 100644 --- a/pkg/kubectl/cmd/cmd.go +++ b/pkg/kubectl/cmd/cmd.go @@ -198,6 +198,8 @@ Find more information at https://github.com/kubernetes/kubernetes.`, f.BindFlags(cmds.PersistentFlags()) f.BindExternalFlags(cmds.PersistentFlags()) + cmds.SetHelpCommand(NewCmdHelp(f, out)) + // From this point and forward we get warnings on flags that contain "_" separators cmds.SetGlobalNormalizationFunc(flag.WarnWordSepNormalizeFunc) diff --git a/pkg/kubectl/cmd/help.go b/pkg/kubectl/cmd/help.go new file mode 100644 index 0000000000..b65b735dec --- /dev/null +++ b/pkg/kubectl/cmd/help.go @@ -0,0 +1,79 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cmd + +import ( + "io" + "strings" + + "github.com/spf13/cobra" + + cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" +) + +const help_long = `Help provides help for any command in the application. +Simply type kubectl help [path to command] for full details.` + +func NewCmdHelp(f *cmdutil.Factory, out io.Writer) *cobra.Command { + cmd := &cobra.Command{ + Use: "help [command] | STRING_TO_SEARCH", + Short: "Help about any command", + Long: help_long, + + Run: RunHelp, + } + + return cmd +} + +func RunHelp(cmd *cobra.Command, args []string) { + foundCmd, a, err := cmd.Root().Find(args) + + // NOTE(andreykurilin): actually, I did not find any cases when foundCmd can be nil, + // but let's make this check since it is included in original code of initHelpCmd + // from github.com/spf13/cobra + if foundCmd == nil { + cmd.Printf("Unknown help topic %#q.\n", args) + cmd.Root().Usage() + } else if err != nil { + // print error message at first, since it can contain suggestions + cmd.Println(err) + + argsString := strings.Join(args, " ") + var matchedMsgIsPrinted bool = false + for _, foundCmd := range foundCmd.Commands() { + if strings.Contains(foundCmd.Short, argsString) { + if !matchedMsgIsPrinted { + cmd.Printf("Matchers of string '%s' in short descriptions of commands: \n", argsString) + matchedMsgIsPrinted = true + } + cmd.Printf(" %-14s %s\n", foundCmd.Name(), foundCmd.Short) + } + } + + if !matchedMsgIsPrinted { + // if nothing is found, just print usage + cmd.Root().Usage() + } + } else if len(a) == 0 { + // help message for help command :) + cmd.Root().Usage() + } else { + helpFunc := foundCmd.HelpFunc() + helpFunc(foundCmd, args) + } +} From a8b1c2e903be8473c4851e3c8b8a634ac18835f9 Mon Sep 17 00:00:00 2001 From: Matt Liggett Date: Mon, 27 Jun 2016 14:59:02 -0700 Subject: [PATCH 314/339] Add printf formatting for rrset objects. Without this you just get two pointers in the debug log. Before: I0627 21:48:44.136615 1 dns.go:215] Existing recordset {0xc820168830 0xc820691540} is not equal to needed recordset &{0xc820168848 0xc820686040}, removing existing and adding needed. After: I0627 22:26:46.221856 1 dns.go:215] Existing recordset <(clouddns) "federated-service.e2e-tests-service-cuza5.federation.svc.us-central1-c.us-central1.kube.5yetis.net." type=CNAME rrdatas=["federated-service.e2e-tests-service-cuza5.federation.svc.us-central1.kube.5yetis.net."] ttl=180> I0627 22:26:46.221885 1 dns.go:216] ... not equal to needed recordset <(clouddns) "federated-service.e2e-tests-service-cuza5.federation.svc.us-central1-c.us-central1.kube.5yetis.net." type=CNAME rrdatas=["federated-service.e2e-tests-service-cuza5.federation.svc.us-central1.kube.5yetis.net."] ttl=180> I0627 22:26:46.221919 1 dns.go:217] ... removing existing and adding needed. --- .../pkg/dnsprovider/providers/google/clouddns/rrset.go | 6 ++++++ federation/pkg/federation-controller/service/dns.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/federation/pkg/dnsprovider/providers/google/clouddns/rrset.go b/federation/pkg/dnsprovider/providers/google/clouddns/rrset.go index 24076a22ad..d39a08b0b4 100644 --- a/federation/pkg/dnsprovider/providers/google/clouddns/rrset.go +++ b/federation/pkg/dnsprovider/providers/google/clouddns/rrset.go @@ -17,6 +17,8 @@ limitations under the License. package clouddns import ( + "fmt" + "k8s.io/kubernetes/federation/pkg/dnsprovider" "k8s.io/kubernetes/federation/pkg/dnsprovider/providers/google/clouddns/internal/interfaces" "k8s.io/kubernetes/federation/pkg/dnsprovider/rrstype" @@ -30,6 +32,10 @@ type ResourceRecordSet struct { rrsets *ResourceRecordSets } +func (rrset ResourceRecordSet) String() string { + return fmt.Sprintf("<(clouddns) %q type=%s rrdatas=%q ttl=%v>", rrset.Name(), rrset.Type(), rrset.Rrdatas(), rrset.Ttl()) +} + func (rrset ResourceRecordSet) Name() string { return rrset.impl.Name() } diff --git a/federation/pkg/federation-controller/service/dns.go b/federation/pkg/federation-controller/service/dns.go index 9c073c3a08..63454d3da8 100644 --- a/federation/pkg/federation-controller/service/dns.go +++ b/federation/pkg/federation-controller/service/dns.go @@ -212,7 +212,7 @@ func (s *ServiceController) ensureDnsRrsets(dnsZoneName, dnsName string, endpoin } else { // Need to replace the existing one with a better one (or just remove it if we have no healthy endpoints). // TODO: Ideally do these inside a transaction, or do an atomic update, but dnsprovider interface doesn't support that yet. - glog.V(4).Infof("Existing recordset %v is not equal to needed recordset %v, removing existing and adding needed.", rrset, newRrset) + glog.V(4).Infof("Existing recordset %v not equal to needed recordset %v removing existing and adding needed.", rrset, newRrset) if err = rrsets.Remove(rrset); err != nil { return err } From b5cef55af5176c91c8b59b67999de959dfa405c0 Mon Sep 17 00:00:00 2001 From: Random-Liu Date: Thu, 30 Jun 2016 17:00:22 -0700 Subject: [PATCH 315/339] fix pull image test flake --- test/e2e_node/runtime_conformance_test.go | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/test/e2e_node/runtime_conformance_test.go b/test/e2e_node/runtime_conformance_test.go index 6d74482d05..eb91f891db 100644 --- a/test/e2e_node/runtime_conformance_test.go +++ b/test/e2e_node/runtime_conformance_test.go @@ -261,14 +261,22 @@ while true; do sleep 1; done Expect(container.Create()).To(Succeed()) defer container.Delete() - By("check the pod phase") - Eventually(container.GetPhase, retryTimeout, pollInterval).Should(Equal(testCase.phase)) - Consistently(container.GetPhase, consistentCheckTimeout, pollInterval).Should(Equal(testCase.phase)) - + // We need to check container state first. The default pod status is pending, If we check + // pod phase first, and the expected pod phase is Pending, the container status may not + // even show up when we check it. By("check the container state") - status, err := container.GetStatus() - Expect(err).NotTo(HaveOccurred()) - Expect(GetContainerState(status.State)).To(Equal(testCase.state)) + getState := func() (ContainerState, error) { + status, err := container.GetStatus() + if err != nil { + return ContainerStateUnknown, err + } + return GetContainerState(status.State), nil + } + Eventually(getState, retryTimeout, pollInterval).Should(Equal(testCase.state)) + Consistently(getState, consistentCheckTimeout, pollInterval).Should(Equal(testCase.state)) + + By("check the pod phase") + Expect(container.GetPhase()).To(Equal(testCase.phase)) By("it should be possible to delete") Expect(container.Delete()).To(Succeed()) From 87f5251d0ded71e9d2042a58f1b28a89b972b421 Mon Sep 17 00:00:00 2001 From: Ron Lai Date: Fri, 24 Jun 2016 15:00:43 -0700 Subject: [PATCH 316/339] Adding inode availability in eviction policy --- docs/proposals/kubelet-eviction.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/proposals/kubelet-eviction.md b/docs/proposals/kubelet-eviction.md index 1eca8f4c95..4945cf4560 100644 --- a/docs/proposals/kubelet-eviction.md +++ b/docs/proposals/kubelet-eviction.md @@ -70,7 +70,9 @@ The `kubelet` will support the ability to trigger eviction decisions on the foll |------------------|---------------------------------------------------------------------------------| | memory.available | memory.available := node.status.capacity[memory] - node.stats.memory.workingSet | | nodefs.available | nodefs.available := node.stats.fs.available | +| nodefs.inodesFree | nodefs.inodesFree := node.fs.inodesFree | | imagefs.available | imagefs.available := node.stats.runtime.imagefs.available | +| imagefs.inodesFree | imagefs.inodesFree := node.runtime.imageFs.inodesFree | `kubelet` supports only two filesystem partitions. @@ -161,7 +163,7 @@ The following node conditions are defined that correspond to the specified evict | Node Condition | Eviction Signal | Description | |----------------|------------------|------------------------------------------------------------------| | MemoryPressure | memory.available | Available memory on the node has satisfied an eviction threshold | -| DiskPressure | nodefs.available (or) imagefs.available | Available disk space on either the node's root filesytem or image filesystem has satisfied an eviction threshold | +| DiskPressure | nodefs.available, nodefs.inodesFree, imagefs.available, or imagefs.inodesFree | Available disk space and inodes on either the node's root filesytem or image filesystem has satisfied an eviction threshold | The `kubelet` will continue to report node status updates at the frequency specified by `--node-status-update-frequency` which defaults to `10s`. @@ -212,20 +214,24 @@ reclaim the resource that has met its eviction threshold. Let's assume the operator started the `kubelet` with the following: ``` ---eviction-hard="nodefs.available<1Gi,imagefs.available<10Gi" ---eviction-soft="nodefs.available<1.5Gi,imagefs.available<20Gi" +--eviction-hard="nodefs.available<1Gi,nodefs.inodesFree<1,imagefs.available<10Gi,imagefs.inodesFree<10" +--eviction-soft="nodefs.available<1.5Gi,nodefs.inodesFree<10,imagefs.available<20Gi,imagefs.inodesFree<100" --eviction-soft-grace-period="nodefs.available=1m,imagefs.available=2m" ``` The `kubelet` will run a sync loop that looks at the available disk on the node's supported partitions as reported from `cAdvisor`. -If available disk space on the node's primary filesystem is observed to drop below 1Gi, +If available disk space on the node's primary filesystem is observed to drop below 1Gi +or the free inodes on the node's primary filesystem is less than 1, the `kubelet` will immediately initiate eviction. -If available disk space on the node's image filesystem is observed to drop below 10Gi, +If available disk space on the node's image filesystem is observed to drop below 10Gi +or the free inodes on the node's primary image filesystem is less than 10, the `kubelet` will immediately initiate eviction. If available disk space on the node's primary filesystem is observed as falling below `1.5Gi`, +or if the free inodes on the node's primary filesystem is less than 10, or if available disk space on the node's image filesystem is observed as falling below `20Gi`, +or if the free inodes on the node's image filesystem is less than 100, it will record when that signal was observed internally in a cache. If at the next sync, that criterion was no longer satisfied, the cache is cleared for that signal. If that signal is observed as being satisfied for longer than the From 251798d9aad643715da2b456ee5905429edeb1c1 Mon Sep 17 00:00:00 2001 From: David McMahon Date: Thu, 30 Jun 2016 17:51:40 -0700 Subject: [PATCH 317/339] Update CHANGELOG.md for v1.3.0-beta.3. --- CHANGELOG.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 206cc157bb..7f0f9a1eef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ +- [v1.3.0-beta.3](#v130-beta3) + - [Downloads](#downloads) + - [Changelog since v1.3.0-beta.2](#changelog-since-v130-beta2) + - [Action Required](#action-required) + - [Other notable changes](#other-notable-changes) - [v1.2.5](#v125) - [Downloads](#downloads) - [Changes since v1.2.4](#changes-since-v124) @@ -75,6 +80,50 @@ +# v1.3.0-beta.3 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.0-beta.3/kubernetes.tar.gz) | `9d18964a294f356bfdc841957dcad8ff35ed909c` | `ee5fcdf86645135ed132663967876dd6` + +## Changelog since v1.3.0-beta.2 + +### Action Required + +* [kubelet] Allow opting out of automatic cloud provider detection in kubelet. By default kubelet will auto-detect cloud providers ([#28258](https://github.com/kubernetes/kubernetes/pull/28258), [@vishh](https://github.com/vishh)) +* If you use one of the kube-dns replication controller manifest in `cluster/saltbase/salt/kube-dns`, i.e. `cluster/saltbase/salt/kube-dns/{skydns-rc.yaml.base,skydns-rc.yaml.in}`, either substitute one of `__PILLAR__FEDERATIONS__DOMAIN__MAP__` or `{{ pillar['federations_domain_map'] }}` with the corresponding federation name to domain name value or remove them if you do not support cluster federation at this time. If you plan to substitute the parameter with its value, here is an example for `{{ pillar['federations_domain_map'] }` ([#28132](https://github.com/kubernetes/kubernetes/pull/28132), [@madhusudancs](https://github.com/madhusudancs)) + * pillar['federations_domain_map'] = "- --federations=myfederation=federation.test" + * where `myfederation` is the name of the federation and `federation.test` is the domain name registered for the federation. +* federation: Upgrading the groupversion to v1beta1 ([#28186](https://github.com/kubernetes/kubernetes/pull/28186), [@nikhiljindal](https://github.com/nikhiljindal)) +* Set Dashboard UI version to v1.1.0 ([#27869](https://github.com/kubernetes/kubernetes/pull/27869), [@bryk](https://github.com/bryk)) + +### Other notable changes + +* Build: Add KUBE_GCS_RELEASE_BUCKET_MIRROR option to push-ci-build.sh ([#28172](https://github.com/kubernetes/kubernetes/pull/28172), [@zmerlynn](https://github.com/zmerlynn)) +* Image GC logic should compensate for reserved blocks ([#27996](https://github.com/kubernetes/kubernetes/pull/27996), [@ronnielai](https://github.com/ronnielai)) +* Bump minimum API version for docker to 1.21 ([#27208](https://github.com/kubernetes/kubernetes/pull/27208), [@yujuhong](https://github.com/yujuhong)) +* Adding lock files for kubeconfig updating ([#28034](https://github.com/kubernetes/kubernetes/pull/28034), [@krousey](https://github.com/krousey)) +* federation service controller: fixing the logic to update DNS records ([#27999](https://github.com/kubernetes/kubernetes/pull/27999), [@quinton-hoole](https://github.com/quinton-hoole)) +* federation: Updating KubeDNS to try finding a local service first for federation query ([#27708](https://github.com/kubernetes/kubernetes/pull/27708), [@nikhiljindal](https://github.com/nikhiljindal)) +* Support journal logs in fluentd-gcp on GCI ([#27981](https://github.com/kubernetes/kubernetes/pull/27981), [@a-robinson](https://github.com/a-robinson)) +* Copy and display source location prominently on Kubernetes instances ([#27985](https://github.com/kubernetes/kubernetes/pull/27985), [@maisem](https://github.com/maisem)) +* Federation e2e support for AWS ([#27791](https://github.com/kubernetes/kubernetes/pull/27791), [@colhom](https://github.com/colhom)) +* Copy and display source location prominently on Kubernetes instances ([#27840](https://github.com/kubernetes/kubernetes/pull/27840), [@zmerlynn](https://github.com/zmerlynn)) +* AWS/GCE: Spread PetSet volume creation across zones, create GCE volumes in non-master zones ([#27553](https://github.com/kubernetes/kubernetes/pull/27553), [@justinsb](https://github.com/justinsb)) +* GCE provider: Create TargetPool with 200 instances, then update with rest ([#27829](https://github.com/kubernetes/kubernetes/pull/27829), [@zmerlynn](https://github.com/zmerlynn)) +* Add sources to server tarballs. ([#27830](https://github.com/kubernetes/kubernetes/pull/27830), [@david-mcmahon](https://github.com/david-mcmahon)) +* Retry Pod/RC updates in kubectl rolling-update ([#27509](https://github.com/kubernetes/kubernetes/pull/27509), [@janetkuo](https://github.com/janetkuo)) +* AWS kube-up: Authorize route53 in the IAM policy ([#27794](https://github.com/kubernetes/kubernetes/pull/27794), [@justinsb](https://github.com/justinsb)) +* Allow conformance tests to run on non-GCE providers ([#26932](https://github.com/kubernetes/kubernetes/pull/26932), [@aaronlevy](https://github.com/aaronlevy)) +* AWS kube-up: move to Docker 1.11.2 ([#27676](https://github.com/kubernetes/kubernetes/pull/27676), [@justinsb](https://github.com/justinsb)) +* Fixed an issue that Deployment may be scaled down further than allowed by maxUnavailable when minReadySeconds is set. ([#27728](https://github.com/kubernetes/kubernetes/pull/27728), [@janetkuo](https://github.com/janetkuo)) + + + # v1.2.5 [Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.2/examples) From 92b3359aec9d43ddc5c74e5c6ee629f82e5680a7 Mon Sep 17 00:00:00 2001 From: Marcin Wielgus Date: Fri, 1 Jul 2016 11:02:44 +0200 Subject: [PATCH 318/339] E2e tests to check whether cluster autoscaling scale down works when one node pool is not autoscaled. --- test/e2e/cluster_size_autoscaling.go | 36 ++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/test/e2e/cluster_size_autoscaling.go b/test/e2e/cluster_size_autoscaling.go index 02347f5914..520651ad66 100644 --- a/test/e2e/cluster_size_autoscaling.go +++ b/test/e2e/cluster_size_autoscaling.go @@ -137,7 +137,7 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() { By("Creating new node-pool with one n1-standard-4 machine") const extraPoolName = "extra-pool" - addNodePool(extraPoolName, "n1-standard-4") + addNodePool(extraPoolName, "n1-standard-4", 1) defer deleteNodePool(extraPoolName) framework.ExpectNoError(framework.WaitForClusterSize(c, nodeCount+1, resizeTimeout)) glog.Infof("Not enabling cluster autoscaler for the node pool (on purpose).") @@ -156,7 +156,7 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() { By("Creating new node-pool with one n1-standard-4 machine") const extraPoolName = "extra-pool" - addNodePool(extraPoolName, "n1-standard-4") + addNodePool(extraPoolName, "n1-standard-4", 1) defer deleteNodePool(extraPoolName) framework.ExpectNoError(framework.WaitForClusterSize(c, nodeCount+1, resizeTimeout)) framework.ExpectNoError(enableAutoscaler(extraPoolName, 1, 2)) @@ -225,7 +225,7 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() { By("Creating new node-pool with one n1-standard-4 machine") const extraPoolName = "extra-pool" - addNodePool(extraPoolName, "n1-standard-4") + addNodePool(extraPoolName, "n1-standard-4", 1) defer deleteNodePool(extraPoolName) framework.ExpectNoError(framework.WaitForClusterSize(c, nodeCount+1, resizeTimeout)) framework.ExpectNoError(enableAutoscaler(extraPoolName, 1, 2)) @@ -252,6 +252,32 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() { framework.ExpectNoError(WaitForClusterSizeFunc(f.Client, func(size int) bool { return size < increasedSize }, scaleDownTimeout)) }) + + It("should correctly scale down after a node is not needed when there is non autoscaled pool[Feature:ClusterSizeAutoscalingScaleDown]", func() { + framework.SkipUnlessProviderIs("gke") + + By("Manually increase cluster size") + increasedSize := 0 + newSizes := make(map[string]int) + for key, val := range originalSizes { + newSizes[key] = val + 2 + increasedSize += val + 2 + } + setMigSizes(newSizes) + framework.ExpectNoError(WaitForClusterSizeFunc(f.Client, + func(size int) bool { return size >= increasedSize }, scaleUpTimeout)) + + const extraPoolName = "extra-pool" + addNodePool(extraPoolName, "n1-standard-1", 3) + defer deleteNodePool(extraPoolName) + + framework.ExpectNoError(WaitForClusterSizeFunc(f.Client, + func(size int) bool { return size >= increasedSize+3 }, scaleUpTimeout)) + + By("Some node should be removed") + framework.ExpectNoError(WaitForClusterSizeFunc(f.Client, + func(size int) bool { return size < increasedSize+3 }, scaleDownTimeout)) + }) }) func getGKEClusterUrl() string { @@ -378,10 +404,10 @@ func disableAutoscaler(nodePool string, minCount, maxCount int) error { return fmt.Errorf("autoscaler still enabled") } -func addNodePool(name string, machineType string) { +func addNodePool(name string, machineType string, numNodes int) { output, err := exec.Command("gcloud", "alpha", "container", "node-pools", "create", name, "--quiet", "--machine-type="+machineType, - "--num-nodes=1", + "--num-nodes="+strconv.Itoa(numNodes), "--project="+framework.TestContext.CloudConfig.ProjectID, "--zone="+framework.TestContext.CloudConfig.Zone, "--cluster="+framework.TestContext.CloudConfig.Cluster).CombinedOutput() From 638f4e1192aea09e6dc9aceb8efe194b4e411425 Mon Sep 17 00:00:00 2001 From: gmarek Date: Mon, 13 Jun 2016 14:21:12 +0200 Subject: [PATCH 319/339] Setting deletion timestamp bumps object's generation --- pkg/api/rest/delete.go | 14 ++++++++++-- pkg/api/rest/resttest/resttest.go | 17 +++++++++++++++ pkg/registry/generic/registry/store.go | 4 ++++ pkg/registry/generic/registry/store_test.go | 24 ++++++++++++++------- 4 files changed, 49 insertions(+), 10 deletions(-) diff --git a/pkg/api/rest/delete.go b/pkg/api/rest/delete.go index b695e830e8..b6ddf86242 100644 --- a/pkg/api/rest/delete.go +++ b/pkg/api/rest/delete.go @@ -44,7 +44,8 @@ type RESTGracefulDeleteStrategy interface { // should be gracefully deleted, if gracefulPending is set the object has already been gracefully deleted // (and the provided grace period is longer than the time to deletion), and an error is returned if the // condition cannot be checked or the gracePeriodSeconds is invalid. The options argument may be updated with -// default values if graceful is true. +// default values if graceful is true. Second place where we set deletionTimestamp is pkg/registry/generic/registry/store.go +// this function is responsible for setting deletionTimestamp during gracefulDeletion, other one for cascading deletions. func BeforeDelete(strategy RESTDeleteStrategy, ctx api.Context, obj runtime.Object, options *api.DeleteOptions) (graceful, gracefulPending bool, err error) { objectMeta, gvk, kerr := objectMetaAndKind(strategy, obj) if kerr != nil { @@ -56,9 +57,11 @@ func BeforeDelete(strategy RESTDeleteStrategy, ctx api.Context, obj runtime.Obje } gracefulStrategy, ok := strategy.(RESTGracefulDeleteStrategy) if !ok { + // If we're not deleting gracefully there's no point in updating Generation, as we won't update + // the obcject before deleting it. return false, false, nil } - // if the object is already being deleted + // if the object is already being deleted, no need to update generation. if objectMeta.DeletionTimestamp != nil { // if we are already being deleted, we may only shorten the deletion grace period // this means the object was gracefully deleted previously but deletionGracePeriodSeconds was not set, @@ -89,5 +92,12 @@ func BeforeDelete(strategy RESTDeleteStrategy, ctx api.Context, obj runtime.Obje now := unversioned.NewTime(unversioned.Now().Add(time.Second * time.Duration(*options.GracePeriodSeconds))) objectMeta.DeletionTimestamp = &now objectMeta.DeletionGracePeriodSeconds = options.GracePeriodSeconds + // If it's the first graceful deletion we are going to set the DeletionTimestamp to non-nil. + // Controllers of the object that's being deleted shouldn't take any nontrivial actions, hence its behavior changes. + // Thus we need to bump object's Generation (if set). This handles generation bump during graceful deletion. + // The bump for objects that don't support graceful deletion is handled in pkg/registry/generic/registry/store.go. + if objectMeta.Generation > 0 { + objectMeta.Generation++ + } return true, false, nil } diff --git a/pkg/api/rest/resttest/resttest.go b/pkg/api/rest/resttest/resttest.go index 6a7cd08a53..ade5d7170a 100644 --- a/pkg/api/rest/resttest/resttest.go +++ b/pkg/api/rest/resttest/resttest.go @@ -120,6 +120,7 @@ func (t *Tester) setObjectMeta(obj runtime.Object, name string) { meta.Namespace = api.NamespaceValue(t.TestContext()) } meta.GenerateName = "" + meta.Generation = 1 } func copyOrDie(obj runtime.Object) runtime.Object { @@ -742,6 +743,7 @@ func (t *Tester) testDeleteGracefulHasDefault(obj runtime.Object, createFn Creat t.Errorf("unexpected error: %v", err) } objectMeta := t.getObjectMetaOrFail(foo) + generation := objectMeta.Generation _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, &api.DeleteOptions{}) if err != nil { t.Errorf("unexpected error: %v", err) @@ -758,6 +760,9 @@ func (t *Tester) testDeleteGracefulHasDefault(obj runtime.Object, createFn Creat if objectMeta.DeletionTimestamp == nil || objectMeta.DeletionGracePeriodSeconds == nil || *objectMeta.DeletionGracePeriodSeconds != expectedGrace { t.Errorf("unexpected deleted meta: %#v", objectMeta) } + if generation >= objectMeta.Generation { + t.Error("Generation wasn't bumped when deletion timestamp was set") + } } func (t *Tester) testDeleteGracefulWithValue(obj runtime.Object, createFn CreateFunc, getFn GetFunc, expectedGrace int64) { @@ -769,6 +774,7 @@ func (t *Tester) testDeleteGracefulWithValue(obj runtime.Object, createFn Create t.Errorf("unexpected error: %v", err) } objectMeta := t.getObjectMetaOrFail(foo) + generation := objectMeta.Generation _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewDeleteOptions(expectedGrace+2)) if err != nil { t.Errorf("unexpected error: %v", err) @@ -785,6 +791,9 @@ func (t *Tester) testDeleteGracefulWithValue(obj runtime.Object, createFn Create if objectMeta.DeletionTimestamp == nil || objectMeta.DeletionGracePeriodSeconds == nil || *objectMeta.DeletionGracePeriodSeconds != expectedGrace+2 { t.Errorf("unexpected deleted meta: %#v", objectMeta) } + if generation >= objectMeta.Generation { + t.Error("Generation wasn't bumped when deletion timestamp was set") + } } func (t *Tester) testDeleteGracefulExtend(obj runtime.Object, createFn CreateFunc, getFn GetFunc, expectedGrace int64) { @@ -796,6 +805,7 @@ func (t *Tester) testDeleteGracefulExtend(obj runtime.Object, createFn CreateFun t.Errorf("unexpected error: %v", err) } objectMeta := t.getObjectMetaOrFail(foo) + generation := objectMeta.Generation _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewDeleteOptions(expectedGrace)) if err != nil { t.Errorf("unexpected error: %v", err) @@ -817,6 +827,9 @@ func (t *Tester) testDeleteGracefulExtend(obj runtime.Object, createFn CreateFun if objectMeta.DeletionTimestamp == nil || objectMeta.DeletionGracePeriodSeconds == nil || *objectMeta.DeletionGracePeriodSeconds != expectedGrace { t.Errorf("unexpected deleted meta: %#v", objectMeta) } + if generation >= objectMeta.Generation { + t.Error("Generation wasn't bumped when deletion timestamp was set") + } } func (t *Tester) testDeleteGracefulImmediate(obj runtime.Object, createFn CreateFunc, getFn GetFunc, expectedGrace int64) { @@ -828,6 +841,7 @@ func (t *Tester) testDeleteGracefulImmediate(obj runtime.Object, createFn Create t.Errorf("unexpected error: %v", err) } objectMeta := t.getObjectMetaOrFail(foo) + generation := objectMeta.Generation _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.Name, api.NewDeleteOptions(expectedGrace)) if err != nil { t.Errorf("unexpected error: %v", err) @@ -850,6 +864,9 @@ func (t *Tester) testDeleteGracefulImmediate(obj runtime.Object, createFn Create if objectMeta.DeletionTimestamp == nil || objectMeta.DeletionGracePeriodSeconds == nil || *objectMeta.DeletionGracePeriodSeconds != 0 { t.Errorf("unexpected deleted meta: %#v", objectMeta) } + if generation >= objectMeta.Generation { + t.Error("Generation wasn't bumped when deletion timestamp was set") + } } func (t *Tester) testDeleteGracefulUsesZeroOnNil(obj runtime.Object, createFn CreateFunc, expectedGrace int64) { diff --git a/pkg/registry/generic/registry/store.go b/pkg/registry/generic/registry/store.go index 6eb42032b8..c70359a605 100644 --- a/pkg/registry/generic/registry/store.go +++ b/pkg/registry/generic/registry/store.go @@ -479,6 +479,10 @@ func markAsDeleting(obj runtime.Object) (err error) { return kerr } now := unversioned.NewTime(time.Now()) + // This handles Generation bump for resources that don't support graceful deletion. For resources that support graceful deletion is handle in pkg/api/rest/delete.go + if objectMeta.DeletionTimestamp == nil && objectMeta.Generation > 0 { + objectMeta.Generation++ + } objectMeta.DeletionTimestamp = &now var zero int64 = 0 objectMeta.DeletionGracePeriodSeconds = &zero diff --git a/pkg/registry/generic/registry/store_test.go b/pkg/registry/generic/registry/store_test.go index 681a94343a..f70133b1aa 100644 --- a/pkg/registry/generic/registry/store_test.go +++ b/pkg/registry/generic/registry/store_test.go @@ -555,9 +555,10 @@ func TestStoreDelete(t *testing.T) { func TestStoreHandleFinalizers(t *testing.T) { EnableGarbageCollector = true + initialGeneration := int64(1) defer func() { EnableGarbageCollector = false }() podWithFinalizer := &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}}, + ObjectMeta: api.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } @@ -592,6 +593,9 @@ func TestStoreHandleFinalizers(t *testing.T) { if podWithFinalizer.ObjectMeta.DeletionGracePeriodSeconds == nil || *podWithFinalizer.ObjectMeta.DeletionGracePeriodSeconds != 0 { t.Errorf("Expect the object to have 0 DeletionGracePeriodSecond, but got %#v", podWithFinalizer.ObjectMeta) } + if podWithFinalizer.Generation <= initialGeneration { + t.Errorf("Deletion didn't increase Generation.") + } updatedPodWithFinalizer := &api.Pod{ ObjectMeta: api.ObjectMeta{Name: "foo", Finalizers: []string{"foo.com/x"}, ResourceVersion: podWithFinalizer.ObjectMeta.ResourceVersion}, @@ -629,28 +633,29 @@ func TestStoreHandleFinalizers(t *testing.T) { func TestStoreDeleteWithOrphanDependents(t *testing.T) { EnableGarbageCollector = true + initialGeneration := int64(1) defer func() { EnableGarbageCollector = false }() podWithOrphanFinalizer := func(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Finalizers: []string{"foo.com/x", api.FinalizerOrphan, "bar.com/y"}}, + ObjectMeta: api.ObjectMeta{Name: name, Finalizers: []string{"foo.com/x", api.FinalizerOrphan, "bar.com/y"}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } } podWithOtherFinalizers := func(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Finalizers: []string{"foo.com/x", "bar.com/y"}}, + ObjectMeta: api.ObjectMeta{Name: name, Finalizers: []string{"foo.com/x", "bar.com/y"}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } } podWithNoFinalizer := func(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name}, + ObjectMeta: api.ObjectMeta{Name: name, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } } podWithOnlyOrphanFinalizer := func(name string) *api.Pod { return &api.Pod{ - ObjectMeta: api.ObjectMeta{Name: name, Finalizers: []string{api.FinalizerOrphan}}, + ObjectMeta: api.ObjectMeta{Name: name, Finalizers: []string{api.FinalizerOrphan}, Generation: initialGeneration}, Spec: api.PodSpec{NodeName: "machine"}, } } @@ -794,13 +799,16 @@ func TestStoreDeleteWithOrphanDependents(t *testing.T) { t.Fatalf("Expect the object to be a pod, but got %#v", obj) } if pod.ObjectMeta.DeletionTimestamp == nil { - t.Errorf("Expect the object to have DeletionTimestamp set, but got %#v", pod.ObjectMeta) + t.Errorf("%v: Expect the object to have DeletionTimestamp set, but got %#v", pod.Name, pod.ObjectMeta) } if pod.ObjectMeta.DeletionGracePeriodSeconds == nil || *pod.ObjectMeta.DeletionGracePeriodSeconds != 0 { - t.Errorf("Expect the object to have 0 DeletionGracePeriodSecond, but got %#v", pod.ObjectMeta) + t.Errorf("%v: Expect the object to have 0 DeletionGracePeriodSecond, but got %#v", pod.Name, pod.ObjectMeta) + } + if pod.Generation <= initialGeneration { + t.Errorf("%v: Deletion didn't increase Generation.", pod.Name) } if e, a := tc.updatedFinalizers, pod.ObjectMeta.Finalizers; !reflect.DeepEqual(e, a) { - t.Errorf("Expect object %s to have finalizers %v, got %v", pod.ObjectMeta.Name, e, a) + t.Errorf("%v: Expect object %s to have finalizers %v, got %v", pod.Name, pod.ObjectMeta.Name, e, a) } } } From 7df60d6b640c263996e60286ff5497a2a0b3d33b Mon Sep 17 00:00:00 2001 From: juanvallejo Date: Wed, 29 Jun 2016 18:02:08 -0400 Subject: [PATCH 320/339] display resource type as part of its name --- hack/verify-flags/known-flags.txt | 1 + pkg/kubectl/cmd/get.go | 33 ++++- pkg/kubectl/kubectl.go | 13 ++ pkg/kubectl/resource_printer.go | 189 ++++++++++++++++++++++++--- pkg/kubectl/resource_printer_test.go | 44 +++++-- 5 files changed, 250 insertions(+), 30 deletions(-) diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index 2bc21c823b..0a9ce63dd2 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -423,6 +423,7 @@ session-affinity setup-node show-all show-events +show-kind show-labels shutdown-fd shutdown-fifo diff --git a/pkg/kubectl/cmd/get.go b/pkg/kubectl/cmd/get.go index 3aab52515f..18d38e89d9 100644 --- a/pkg/kubectl/cmd/get.go +++ b/pkg/kubectl/cmd/get.go @@ -103,6 +103,7 @@ func NewCmdGet(f *cmdutil.Factory, out io.Writer) *cobra.Command { cmd.Flags().StringP("selector", "l", "", "Selector (label query) to filter on") cmd.Flags().BoolP("watch", "w", false, "After listing/getting the requested object, watch for changes.") cmd.Flags().Bool("watch-only", false, "Watch for changes to the requested object(s), without listing/getting first.") + cmd.Flags().Bool("show-kind", false, "If present, list the resource type for the requested object(s).") cmd.Flags().Bool("all-namespaces", false, "If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.") cmd.Flags().StringSliceP("label-columns", "L", []string{}, "Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag statements like -L label1 -L label2...") cmd.Flags().Bool("export", false, "If true, use 'export' for the resources. Exported resources are stripped of cluster-specific information.") @@ -118,6 +119,7 @@ func NewCmdGet(f *cmdutil.Factory, out io.Writer) *cobra.Command { func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *GetOptions) error { selector := cmdutil.GetFlagString(cmd, "selector") allNamespaces := cmdutil.GetFlagBool(cmd, "all-namespaces") + allKinds := cmdutil.GetFlagBool(cmd, "show-kind") mapper, typer := f.Object(cmdutil.GetIncludeThirdPartyAPIs(cmd)) cmdNamespace, enforceNamespace, err := f.DefaultNamespace() @@ -294,9 +296,29 @@ func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string // use the default printer for each object printer = nil var lastMapping *meta.RESTMapping + var withKind bool = allKinds w := kubectl.GetNewTabWriter(out) defer w.Flush() + // determine if printing multiple kinds of + // objects and enforce "show-kinds" flag if so + for ix := range objs { + var mapping *meta.RESTMapping + if sorter != nil { + mapping = infos[sorter.OriginalPosition(ix)].Mapping + } else { + mapping = infos[ix].Mapping + } + + // display "kind" column only if we have mixed resources + if lastMapping != nil && mapping.Resource != lastMapping.Resource { + withKind = true + } + lastMapping = mapping + } + + lastMapping = nil + for ix := range objs { var mapping *meta.RESTMapping var original runtime.Object @@ -315,7 +337,16 @@ func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string } lastMapping = mapping } - if _, found := printer.(*kubectl.HumanReadablePrinter); found { + if resourcePrinter, found := printer.(*kubectl.HumanReadablePrinter); found { + resourceName := mapping.Resource + if alias, ok := kubectl.ResourceShortFormFor(mapping.Resource); ok { + resourceName = alias + } else if resourceName == "" { + resourceName = "none" + } + + resourcePrinter.Options.WithKind = withKind + resourcePrinter.Options.KindName = resourceName if err := printer.PrintObj(original, w); err != nil { allErrs = append(allErrs, err) } diff --git a/pkg/kubectl/kubectl.go b/pkg/kubectl/kubectl.go index 5b9726d5bb..a42bf28841 100644 --- a/pkg/kubectl/kubectl.go +++ b/pkg/kubectl/kubectl.go @@ -164,6 +164,19 @@ var shortForms = map[string]string{ "svc": "services", } +// Look-up for resource short forms by value +func ResourceShortFormFor(resource string) (string, bool) { + var alias string + exists := false + for k, val := range shortForms { + if val == resource { + alias = k + exists = true + } + } + return alias, exists +} + // expandResourceShortcut will return the expanded version of resource // (something that a pkg/api/meta.RESTMapper can understand), if it is // indeed a shortcut. Otherwise, will return resource unmodified. diff --git a/pkg/kubectl/resource_printer.go b/pkg/kubectl/resource_printer.go index f4da0941e1..811d5b289b 100644 --- a/pkg/kubectl/resource_printer.go +++ b/pkg/kubectl/resource_printer.go @@ -322,10 +322,12 @@ type handlerEntry struct { type PrintOptions struct { NoHeaders bool WithNamespace bool + WithKind bool Wide bool ShowAll bool ShowLabels bool AbsoluteTimestamps bool + KindName string ColumnLabels []string } @@ -335,7 +337,7 @@ type PrintOptions struct { // received from watches. type HumanReadablePrinter struct { handlerMap map[reflect.Type]*handlerEntry - options PrintOptions + Options PrintOptions lastType reflect.Type } @@ -343,9 +345,11 @@ type HumanReadablePrinter struct { func NewHumanReadablePrinter(noHeaders, withNamespace bool, wide bool, showAll bool, showLabels bool, absoluteTimestamps bool, columnLabels []string) *HumanReadablePrinter { printer := &HumanReadablePrinter{ handlerMap: make(map[reflect.Type]*handlerEntry), - options: PrintOptions{ + Options: PrintOptions{ NoHeaders: noHeaders, WithNamespace: withNamespace, + WithKind: false, + KindName: "", Wide: wide, ShowAll: showAll, ShowLabels: showLabels, @@ -599,6 +603,11 @@ func printPod(pod *api.Pod, w io.Writer, options PrintOptions) error { func printPodBase(pod *api.Pod, w io.Writer, options PrintOptions) error { name := pod.Name namespace := pod.Namespace + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } restarts := 0 totalContainers := len(pod.Spec.Containers) @@ -718,6 +727,11 @@ func printPodList(podList *api.PodList, w io.Writer, options PrintOptions) error func printPodTemplate(pod *api.PodTemplate, w io.Writer, options PrintOptions) error { name := pod.Name namespace := pod.Namespace + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } containers := pod.Template.Spec.Containers @@ -759,6 +773,11 @@ func printReplicationController(controller *api.ReplicationController, w io.Writ name := controller.Name namespace := controller.Namespace containers := controller.Spec.Template.Spec.Containers + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { @@ -808,6 +827,11 @@ func printReplicaSet(rs *extensions.ReplicaSet, w io.Writer, options PrintOption name := rs.Name namespace := rs.Namespace containers := rs.Spec.Template.Spec.Containers + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { @@ -853,6 +877,11 @@ func printReplicaSetList(list *extensions.ReplicaSetList, w io.Writer, options P } func printCluster(c *federation.Cluster, w io.Writer, options PrintOptions) error { + name := c.Name + kind := options.KindName + if options.WithKind { + name = kind + "/" + name + } var statuses []string for _, condition := range c.Status.Conditions { if condition.Status == api.ConditionTrue { @@ -866,7 +895,7 @@ func printCluster(c *federation.Cluster, w io.Writer, options PrintOptions) erro } if _, err := fmt.Fprintf(w, "%s\t%s\t%s\n", - c.Name, + name, strings.Join(statuses, ","), translateTimestamp(c.CreationTimestamp), ); err != nil { @@ -887,6 +916,11 @@ func printJob(job *batch.Job, w io.Writer, options PrintOptions) error { name := job.Name namespace := job.Namespace containers := job.Spec.Template.Spec.Containers + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { @@ -1005,6 +1039,11 @@ func printService(svc *api.Service, w io.Writer, options PrintOptions) error { internalIP := svc.Spec.ClusterIP externalIP := getServiceExternalIP(svc, options.Wide) + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { @@ -1081,6 +1120,11 @@ func formatPorts(tls []extensions.IngressTLS) string { func printIngress(ingress *extensions.Ingress, w io.Writer, options PrintOptions) error { name := ingress.Name namespace := ingress.Namespace + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { @@ -1120,6 +1164,11 @@ func printPetSet(ps *apps.PetSet, w io.Writer, options PrintOptions) error { name := ps.Name namespace := ps.Namespace containers := ps.Spec.Template.Spec.Containers + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { @@ -1166,6 +1215,11 @@ func printPetSetList(petSetList *apps.PetSetList, w io.Writer, options PrintOpti func printDaemonSet(ds *extensions.DaemonSet, w io.Writer, options PrintOptions) error { name := ds.Name namespace := ds.Namespace + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } containers := ds.Spec.Template.Spec.Containers @@ -1221,6 +1275,11 @@ func printDaemonSetList(list *extensions.DaemonSetList, w io.Writer, options Pri func printEndpoints(endpoints *api.Endpoints, w io.Writer, options PrintOptions) error { name := endpoints.Name namespace := endpoints.Namespace + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { @@ -1247,11 +1306,17 @@ func printEndpointsList(list *api.EndpointsList, w io.Writer, options PrintOptio } func printNamespace(item *api.Namespace, w io.Writer, options PrintOptions) error { + name := item.Name + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { return fmt.Errorf("namespace is not namespaced") } - if _, err := fmt.Fprintf(w, "%s\t%s\t%s", item.Name, item.Status.Phase, translateTimestamp(item.CreationTimestamp)); err != nil { + if _, err := fmt.Fprintf(w, "%s\t%s\t%s", name, item.Status.Phase, translateTimestamp(item.CreationTimestamp)); err != nil { return err } if _, err := fmt.Fprint(w, AppendLabels(item.Labels, options.ColumnLabels)); err != nil { @@ -1273,6 +1338,11 @@ func printNamespaceList(list *api.NamespaceList, w io.Writer, options PrintOptio func printSecret(item *api.Secret, w io.Writer, options PrintOptions) error { name := item.Name namespace := item.Namespace + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { @@ -1302,6 +1372,11 @@ func printSecretList(list *api.SecretList, w io.Writer, options PrintOptions) er func printServiceAccount(item *api.ServiceAccount, w io.Writer, options PrintOptions) error { name := item.Name namespace := item.Namespace + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { @@ -1329,6 +1404,12 @@ func printServiceAccountList(list *api.ServiceAccountList, w io.Writer, options } func printNode(node *api.Node, w io.Writer, options PrintOptions) error { + name := node.Name + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { return fmt.Errorf("node is not namespaced") } @@ -1355,7 +1436,7 @@ func printNode(node *api.Node, w io.Writer, options PrintOptions) error { status = append(status, "SchedulingDisabled") } - if _, err := fmt.Fprintf(w, "%s\t%s\t%s", node.Name, strings.Join(status, ","), translateTimestamp(node.CreationTimestamp)); err != nil { + if _, err := fmt.Fprintf(w, "%s\t%s\t%s", name, strings.Join(status, ","), translateTimestamp(node.CreationTimestamp)); err != nil { return err } // Display caller specify column labels first. @@ -1376,10 +1457,15 @@ func printNodeList(list *api.NodeList, w io.Writer, options PrintOptions) error } func printPersistentVolume(pv *api.PersistentVolume, w io.Writer, options PrintOptions) error { + name := pv.Name + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { return fmt.Errorf("persistentVolume is not namespaced") } - name := pv.Name claimRefUID := "" if pv.Spec.ClaimRef != nil { @@ -1422,6 +1508,11 @@ func printPersistentVolumeList(list *api.PersistentVolumeList, w io.Writer, opti func printPersistentVolumeClaim(pvc *api.PersistentVolumeClaim, w io.Writer, options PrintOptions) error { name := pvc.Name namespace := pvc.Namespace + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { @@ -1459,7 +1550,13 @@ func printPersistentVolumeClaimList(list *api.PersistentVolumeClaimList, w io.Wr } func printEvent(event *api.Event, w io.Writer, options PrintOptions) error { + name := event.InvolvedObject.Name namespace := event.Namespace + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { return err @@ -1481,7 +1578,7 @@ func printEvent(event *api.Event, w io.Writer, options PrintOptions) error { LastTimestamp, FirstTimestamp, event.Count, - event.InvolvedObject.Name, + name, event.InvolvedObject.Kind, event.InvolvedObject.FieldPath, event.Type, @@ -1525,6 +1622,12 @@ func printLimitRangeList(list *api.LimitRangeList, w io.Writer, options PrintOpt // printObjectMeta prints the object metadata of a given resource. func printObjectMeta(meta api.ObjectMeta, w io.Writer, options PrintOptions, namespaced bool) error { + name := meta.Name + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if namespaced && options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", meta.Namespace); err != nil { return err @@ -1533,7 +1636,7 @@ func printObjectMeta(meta api.ObjectMeta, w io.Writer, options PrintOptions, nam if _, err := fmt.Fprintf( w, "%s\t%s", - meta.Name, + name, translateTimestamp(meta.CreationTimestamp), ); err != nil { return err @@ -1616,6 +1719,12 @@ func printClusterRoleBindingList(list *rbac.ClusterRoleBindingList, w io.Writer, } func printComponentStatus(item *api.ComponentStatus, w io.Writer, options PrintOptions) error { + name := item.Name + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { return fmt.Errorf("componentStatus is not namespaced") } @@ -1635,7 +1744,7 @@ func printComponentStatus(item *api.ComponentStatus, w io.Writer, options PrintO } } - if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s", item.Name, status, message, error); err != nil { + if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s", name, status, message, error); err != nil { return err } if _, err := fmt.Fprint(w, AppendLabels(item.Labels, options.ColumnLabels)); err != nil { @@ -1656,13 +1765,20 @@ func printComponentStatusList(list *api.ComponentStatusList, w io.Writer, option } func printThirdPartyResource(rsrc *extensions.ThirdPartyResource, w io.Writer, options PrintOptions) error { + name := rsrc.Name + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } + versions := make([]string, len(rsrc.Versions)) for ix := range rsrc.Versions { version := &rsrc.Versions[ix] versions[ix] = fmt.Sprintf("%s", version.Name) } versionsString := strings.Join(versions, ",") - if _, err := fmt.Fprintf(w, "%s\t%s\t%s\n", rsrc.Name, rsrc.Description, versionsString); err != nil { + if _, err := fmt.Fprintf(w, "%s\t%s\t%s\n", name, rsrc.Description, versionsString); err != nil { return err } return nil @@ -1686,12 +1802,19 @@ func truncate(str string, maxLen int) string { } func printThirdPartyResourceData(rsrc *extensions.ThirdPartyResourceData, w io.Writer, options PrintOptions) error { + name := rsrc.Name + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } + l := labels.FormatLabels(rsrc.Labels) truncateCols := 50 if options.Wide { truncateCols = 100 } - if _, err := fmt.Fprintf(w, "%s\t%s\t%s\n", rsrc.Name, l, truncate(string(rsrc.Data), truncateCols)); err != nil { + if _, err := fmt.Fprintf(w, "%s\t%s\t%s\n", name, l, truncate(string(rsrc.Data), truncateCols)); err != nil { return err } return nil @@ -1708,6 +1831,12 @@ func printThirdPartyResourceDataList(list *extensions.ThirdPartyResourceDataList } func printDeployment(deployment *extensions.Deployment, w io.Writer, options PrintOptions) error { + name := deployment.Name + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", deployment.Namespace); err != nil { return err @@ -1719,7 +1848,7 @@ func printDeployment(deployment *extensions.Deployment, w io.Writer, options Pri updatedReplicas := deployment.Status.UpdatedReplicas availableReplicas := deployment.Status.AvailableReplicas age := translateTimestamp(deployment.CreationTimestamp) - if _, err := fmt.Fprintf(w, "%s\t%d\t%d\t%d\t%d\t%s", deployment.Name, desiredReplicas, currentReplicas, updatedReplicas, availableReplicas, age); err != nil { + if _, err := fmt.Fprintf(w, "%s\t%d\t%d\t%d\t%d\t%s", name, desiredReplicas, currentReplicas, updatedReplicas, availableReplicas, age); err != nil { return err } if _, err := fmt.Fprint(w, AppendLabels(deployment.Labels, options.ColumnLabels)); err != nil { @@ -1741,6 +1870,11 @@ func printDeploymentList(list *extensions.DeploymentList, w io.Writer, options P func printHorizontalPodAutoscaler(hpa *autoscaling.HorizontalPodAutoscaler, w io.Writer, options PrintOptions) error { namespace := hpa.Namespace name := hpa.Name + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } reference := fmt.Sprintf("%s/%s", hpa.Spec.ScaleTargetRef.Kind, hpa.Spec.ScaleTargetRef.Name) @@ -1757,6 +1891,7 @@ func printHorizontalPodAutoscaler(hpa *autoscaling.HorizontalPodAutoscaler, w io minPods = fmt.Sprintf("%d", *hpa.Spec.MinReplicas) } maxPods := hpa.Spec.MaxReplicas + if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { return err @@ -1793,6 +1928,11 @@ func printHorizontalPodAutoscalerList(list *autoscaling.HorizontalPodAutoscalerL func printConfigMap(configMap *api.ConfigMap, w io.Writer, options PrintOptions) error { name := configMap.Name namespace := configMap.Namespace + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { @@ -1819,7 +1959,13 @@ func printConfigMapList(list *api.ConfigMapList, w io.Writer, options PrintOptio } func printPodSecurityPolicy(item *extensions.PodSecurityPolicy, w io.Writer, options PrintOptions) error { - _, err := fmt.Fprintf(w, "%s\t%t\t%v\t%s\t%s\t%s\t%s\t%t\t%v\n", item.Name, item.Spec.Privileged, + name := item.Name + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } + _, err := fmt.Fprintf(w, "%s\t%t\t%v\t%s\t%s\t%s\t%s\t%t\t%v\n", name, item.Spec.Privileged, item.Spec.AllowedCapabilities, item.Spec.SELinux.Rule, item.Spec.RunAsUser.Rule, item.Spec.FSGroup.Rule, item.Spec.SupplementalGroups.Rule, item.Spec.ReadOnlyRootFilesystem, item.Spec.Volumes) return err @@ -1838,6 +1984,11 @@ func printPodSecurityPolicyList(list *extensions.PodSecurityPolicyList, w io.Wri func printNetworkPolicy(networkPolicy *extensions.NetworkPolicy, w io.Writer, options PrintOptions) error { name := networkPolicy.Name namespace := networkPolicy.Namespace + kind := options.KindName + + if options.WithKind { + name = kind + "/" + name + } if options.WithNamespace { if _, err := fmt.Fprintf(w, "%s\t", namespace); err != nil { @@ -1984,18 +2135,18 @@ func (h *HumanReadablePrinter) PrintObj(obj runtime.Object, output io.Writer) er } t := reflect.TypeOf(obj) if handler := h.handlerMap[t]; handler != nil { - if !h.options.NoHeaders && t != h.lastType { - headers := append(handler.columns, formatWideHeaders(h.options.Wide, t)...) - headers = append(headers, formatLabelHeaders(h.options.ColumnLabels)...) + if !h.Options.NoHeaders && t != h.lastType { + headers := append(handler.columns, formatWideHeaders(h.Options.Wide, t)...) + headers = append(headers, formatLabelHeaders(h.Options.ColumnLabels)...) // LABELS is always the last column. - headers = append(headers, formatShowLabelsHeader(h.options.ShowLabels, t)...) - if h.options.WithNamespace { + headers = append(headers, formatShowLabelsHeader(h.Options.ShowLabels, t)...) + if h.Options.WithNamespace { headers = append(withNamespacePrefixColumns, headers...) } h.printHeader(headers, w) h.lastType = t } - args := []reflect.Value{reflect.ValueOf(obj), reflect.ValueOf(w), reflect.ValueOf(h.options)} + args := []reflect.Value{reflect.ValueOf(obj), reflect.ValueOf(w), reflect.ValueOf(h.Options)} resultValue := handler.printFunc.Call(args)[0] if resultValue.IsNil() { return nil diff --git a/pkg/kubectl/resource_printer_test.go b/pkg/kubectl/resource_printer_test.go index c4e4940976..5e1f558acf 100644 --- a/pkg/kubectl/resource_printer_test.go +++ b/pkg/kubectl/resource_printer_test.go @@ -216,7 +216,12 @@ func TestJSONPrinter(t *testing.T) { } func PrintCustomType(obj *TestPrintType, w io.Writer, options PrintOptions) error { - _, err := fmt.Fprintf(w, "%s", obj.Data) + data := obj.Data + kind := options.KindName + if options.WithKind { + data = kind + "/" + data + } + _, err := fmt.Fprintf(w, "%s", data) return err } @@ -241,6 +246,25 @@ func TestCustomTypePrinting(t *testing.T) { } } +func TestCustomTypePrintingWithKind(t *testing.T) { + columns := []string{"Data"} + printer := NewHumanReadablePrinter(false, false, false, false, false, false, []string{}) + printer.Handler(columns, PrintCustomType) + printer.Options.WithKind = true + printer.Options.KindName = "test" + + obj := TestPrintType{"test object"} + buffer := &bytes.Buffer{} + err := printer.PrintObj(&obj, buffer) + if err != nil { + t.Fatalf("An error occurred printing the custom type: %#v", err) + } + expectedOutput := "Data\ntest/test object" + if buffer.String() != expectedOutput { + t.Errorf("The data was not printed as expected. Expected:\n%s\nGot:\n%s", expectedOutput, buffer.String()) + } +} + func TestPrintHandlerError(t *testing.T) { columns := []string{"Data"} printer := NewHumanReadablePrinter(false, false, false, false, false, false, []string{}) @@ -670,7 +694,7 @@ func TestPrintHunmanReadableIngressWithColumnLabels(t *testing.T) { }, } buff := bytes.Buffer{} - printIngress(&ingress, &buff, PrintOptions{false, false, false, false, false, false, []string{"app_name"}}) + printIngress(&ingress, &buff, PrintOptions{false, false, false, false, false, false, false, "", []string{"app_name"}}) output := string(buff.Bytes()) appName := ingress.ObjectMeta.Labels["app_name"] if !strings.Contains(output, appName) { @@ -793,7 +817,7 @@ func TestPrintHumanReadableService(t *testing.T) { for _, svc := range tests { for _, wide := range []bool{false, true} { buff := bytes.Buffer{} - printService(&svc, &buff, PrintOptions{false, false, wide, false, false, false, []string{}}) + printService(&svc, &buff, PrintOptions{false, false, false, wide, false, false, false, "", []string{}}) output := string(buff.Bytes()) ip := svc.Spec.ClusterIP if !strings.Contains(output, ip) { @@ -1084,7 +1108,7 @@ func TestPrintPod(t *testing.T) { buf := bytes.NewBuffer([]byte{}) for _, test := range tests { - printPod(&test.pod, buf, PrintOptions{false, false, false, true, false, false, []string{}}) + printPod(&test.pod, buf, PrintOptions{false, false, false, false, true, false, false, "", []string{}}) // We ignore time if !strings.HasPrefix(buf.String(), test.expect) { t.Fatalf("Expected: %s, got: %s", test.expect, buf.String()) @@ -1177,7 +1201,7 @@ func TestPrintNonTerminatedPod(t *testing.T) { buf := bytes.NewBuffer([]byte{}) for _, test := range tests { - printPod(&test.pod, buf, PrintOptions{false, false, false, false, false, false, []string{}}) + printPod(&test.pod, buf, PrintOptions{false, false, false, false, false, false, false, "", []string{}}) // We ignore time if !strings.HasPrefix(buf.String(), test.expect) { t.Fatalf("Expected: %s, got: %s", test.expect, buf.String()) @@ -1237,7 +1261,7 @@ func TestPrintPodWithLabels(t *testing.T) { buf := bytes.NewBuffer([]byte{}) for _, test := range tests { - printPod(&test.pod, buf, PrintOptions{false, false, false, false, false, false, test.labelColumns}) + printPod(&test.pod, buf, PrintOptions{false, false, false, false, false, false, false, "", test.labelColumns}) // We ignore time if !strings.HasPrefix(buf.String(), test.startsWith) || !strings.HasSuffix(buf.String(), test.endsWith) { t.Fatalf("Expected to start with: %s and end with: %s, but got: %s", test.startsWith, test.endsWith, buf.String()) @@ -1301,7 +1325,7 @@ func TestPrintDeployment(t *testing.T) { buf := bytes.NewBuffer([]byte{}) for _, test := range tests { - printDeployment(&test.deployment, buf, PrintOptions{false, false, false, true, false, false, []string{}}) + printDeployment(&test.deployment, buf, PrintOptions{false, false, false, false, true, false, false, "", []string{}}) if buf.String() != test.expect { t.Fatalf("Expected: %s, got: %s", test.expect, buf.String()) } @@ -1336,7 +1360,7 @@ func TestPrintDaemonSet(t *testing.T) { buf := bytes.NewBuffer([]byte{}) for _, test := range tests { - printDaemonSet(&test.ds, buf, PrintOptions{false, false, false, false, false, false, []string{}}) + printDaemonSet(&test.ds, buf, PrintOptions{false, false, false, false, false, false, false, "", []string{}}) if !strings.HasPrefix(buf.String(), test.startsWith) { t.Fatalf("Expected to start with %s but got %s", test.startsWith, buf.String()) } @@ -1384,7 +1408,7 @@ func TestPrintJob(t *testing.T) { buf := bytes.NewBuffer([]byte{}) for _, test := range tests { - printJob(&test.job, buf, PrintOptions{false, false, false, true, false, false, []string{}}) + printJob(&test.job, buf, PrintOptions{false, false, false, false, true, false, false, "", []string{}}) if buf.String() != test.expect { t.Fatalf("Expected: %s, got: %s", test.expect, buf.String()) } @@ -1443,7 +1467,7 @@ func TestPrintPodShowLabels(t *testing.T) { buf := bytes.NewBuffer([]byte{}) for _, test := range tests { - printPod(&test.pod, buf, PrintOptions{false, false, false, false, test.showLabels, false, []string{}}) + printPod(&test.pod, buf, PrintOptions{false, false, false, false, false, test.showLabels, false, "", []string{}}) // We ignore time if !strings.HasPrefix(buf.String(), test.startsWith) || !strings.HasSuffix(buf.String(), test.endsWith) { t.Fatalf("Expected to start with: %s and end with: %s, but got: %s", test.startsWith, test.endsWith, buf.String()) From b3c7c49098bc8d0b2b0b0ac83a126402006356c7 Mon Sep 17 00:00:00 2001 From: Quinton Hoole Date: Fri, 1 Jul 2016 11:23:29 -0700 Subject: [PATCH 321/339] Print kube-dns pod logs on federation e2e test failure. --- test/e2e/framework/framework.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 4ca5c5ebde..a7649e7c77 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -280,6 +280,8 @@ func (f *Framework) AfterEach() { if f.federated { // Print logs of federation control plane pods (federation-apiserver and federation-controller-manager) LogPodsWithLabels(f.Client, "federation", map[string]string{"app": "federated-cluster"}) + // Print logs of kube-dns pod + LogPodsWithLabels(f.Client, "kube-system", map[string]string{"k8s-app": "kube-dns"}) } } From bf1378514920aa6c52fe212e1d1096390190d7f9 Mon Sep 17 00:00:00 2001 From: Matt Liggett Date: Fri, 1 Jul 2016 11:26:23 -0700 Subject: [PATCH 322/339] Add version and flag logging to kube-dns. --- cmd/kube-dns/app/server.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/kube-dns/app/server.go b/cmd/kube-dns/app/server.go index 19e765e087..4960e8f925 100644 --- a/cmd/kube-dns/app/server.go +++ b/cmd/kube-dns/app/server.go @@ -26,12 +26,15 @@ import ( "github.com/golang/glog" "github.com/skynetservices/skydns/metrics" "github.com/skynetservices/skydns/server" + "github.com/spf13/pflag" + "k8s.io/kubernetes/cmd/kube-dns/app/options" "k8s.io/kubernetes/pkg/api/unversioned" clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/restclient" kclientcmd "k8s.io/kubernetes/pkg/client/unversioned/clientcmd" kdns "k8s.io/kubernetes/pkg/dns" + "k8s.io/kubernetes/pkg/version" ) type KubeDNSServer struct { @@ -94,6 +97,10 @@ func newKubeClient(dnsConfig *options.KubeDNSConfig) (clientset.Interface, error } func (server *KubeDNSServer) Run() { + glog.Infof("%+v", version.Get()) + pflag.VisitAll(func(flag *pflag.Flag) { + glog.Infof("FLAG: --%s=%q", flag.Name, flag.Value) + }) setupSignalHandlers() server.startSkyDNSServer() server.kd.Start() From 3313d6806656bb043926d2fced1f9ef47970e549 Mon Sep 17 00:00:00 2001 From: David McMahon Date: Fri, 1 Jul 2016 12:59:01 -0700 Subject: [PATCH 323/339] Update CHANGELOG.md for v1.3.0. --- CHANGELOG.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f0f9a1eef..69f87b8e9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ +- [v1.3.0](#v130) + - [Downloads](#downloads) + - [Major Themes](#major-themes) + - [Other notable improvements](#other-notable-improvements) + - [Known Issues](#known-issues) + - [Provider-specific Notes](#provider-specific-notes) + - [Changelog since v1.3.0-beta.3](#changelog-since-v130-beta3) + - [Previous Releases Included in v1.3.0](#previous-releases-included-in-v130) - [v1.3.0-beta.3](#v130-beta3) - [Downloads](#downloads) - [Changelog since v1.3.0-beta.2](#changelog-since-v130-beta2) @@ -80,6 +88,47 @@ +# v1.3.0 + +[Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) + +## Downloads + +binary | sha1 hash | md5 hash +------ | --------- | -------- +[kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.0/kubernetes.tar.gz) | `88249c443d438666928379aa7fe865b389ed72ea` | `9270f001aef8c03ff5db63456ca9eecc` + +## Major Themes + +* TBD + +## Other notable improvements + +* TBD + +## Known Issues + +* TBD + +## Provider-specific Notes + +* TBD + +## Changelog since v1.3.0-beta.3 + + +### Previous Releases Included in v1.3.0 + +- [v1.3.0-beta.2](CHANGELOG.md#v130-beta2) +- [v1.3.0-beta.1](CHANGELOG.md#v130-beta1) +- [v1.3.0-alpha.5](CHANGELOG.md#v130-alpha5) +- [v1.3.0-alpha.4](CHANGELOG.md#v130-alpha4) +- [v1.3.0-alpha.3](CHANGELOG.md#v130-alpha3) +- [v1.3.0-alpha.2](CHANGELOG.md#v130-alpha2) +- [v1.3.0-alpha.1](CHANGELOG.md#v130-alpha1) + + + # v1.3.0-beta.3 [Documentation](http://kubernetes.github.io) & [Examples](http://releases.k8s.io/release-1.3/examples) From 08dc66113399c89e31f6872f3c638695a6ec6a8d Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Wed, 11 May 2016 17:05:02 -0700 Subject: [PATCH 324/339] Container runtime interface This commit includes a proposal and a Go file to re-define the container runtime interface. Note that this is an experimental interface and is expected to go through multiple revisions once developers start implementing against it. As stated in the proposal, there are also individual issues to carry discussions of specific features. --- .../container-runtime-interface-v1.md | 281 ++++++++++++ pkg/kubelet/container/interface.go | 413 ++++++++++++++++++ pkg/kubelet/container/runtime.go | 2 + 3 files changed, 696 insertions(+) create mode 100644 docs/proposals/container-runtime-interface-v1.md create mode 100644 pkg/kubelet/container/interface.go diff --git a/docs/proposals/container-runtime-interface-v1.md b/docs/proposals/container-runtime-interface-v1.md new file mode 100644 index 0000000000..d8378e18f1 --- /dev/null +++ b/docs/proposals/container-runtime-interface-v1.md @@ -0,0 +1,281 @@ + + + + +WARNING +WARNING +WARNING +WARNING +WARNING + +

PLEASE NOTE: This document applies to the HEAD of the source tree

+ +If you are using a released version of Kubernetes, you should +refer to the docs that go with that version. + +Documentation for other releases can be found at +[releases.k8s.io](http://releases.k8s.io). + +-- + + + + + +# Redefine Container Runtime Interface + +The umbrella issue: [#22964](https://issues.k8s.io/22964) + +## Motivation + +Kubelet employs a declarative pod-level interface, which acts as the sole +integration point for container runtimes (e.g., `docker` and `rkt`). The +high-level, declarative interface has caused higher integration and maintenance +cost, and also slowed down feature velocity for the following reasons. + 1. **Not every container runtime supports the concept of pods natively**. + When integrating with Kubernetes, a significant amount of work needs to + go into implementing a shim of significant size to support all pod + features. This also adds maintenance overhead (e.g., `docker`). + 2. **High-level interface discourages code sharing and reuse among runtimes**. + E.g, each runtime today implements an all-encompassing `SyncPod()` + function, with the Pod Spec as the input argument. The runtime implements + logic to determine how to achieve the desired state based on the current + status, (re-)starts pods/containers and manages lifecycle hooks + accordingly. + 3. **Pod Spec is evolving rapidly**. New features are being added constantly. + Any pod-level change or addition requires changing of all container + runtime shims. E.g., init containers and volume containers. + +## Goals and Non-Goals + +The goals of defining the interface are to + - **improve extensibility**: Easier container runtime integration. + - **improve feature velocity** + - **improve code maintainability** + +The non-goals include + - proposing *how* to integrate with new runtimes, i.e., where the shim + resides. The discussion of adopting a client-server architecture is tracked + by [#13768](https://issues.k8s.io/13768), where benefits and shortcomings of + such an architecture is discussed. + - versioning the new interface/API. We intend to provide API versioning to + offer stability for runtime integrations, but the details are beyond the + scope of this proposal. + - adding support to Windows containers. Windows container support is a + parallel effort and is tracked by [#22623](https://issues.k8s.io/22623). + The new interface will not be augmented to support Windows containers, but + it will be made extensible such that the support can be added in the future. + - re-defining Kubelet's internal interfaces. These interfaces, though, may + affect Kubelet's maintainability, is not relevant to runtime integration. + - improving Kubelet's efficiency or performance, e.g., adopting event stream + from the container runtime [#8756](https://issues.k8s.io/8756), + [#16831](https://issues.k8s.io/16831). + +## Requirements + + * Support the already integrated container runtime: `docker` and `rkt` + * Support hypervisor-based container runtimes: `hyper`. + +The existing pod-level interface will remain as it is in the near future to +ensure supports of all existing runtimes are continued. Meanwhile, we will +work with all parties involved to switching to the proposed interface. + + +## Container Runtime Interface + +The main idea of this proposal is to adopt an imperative container-level +interface, which allows Kubelet to directly control the lifecycles of the +containers. + +Pod is composed of a group of containers in an isolated environment with +resource constraints. In Kubernetes, pod is also the smallest schedulable unit. +After a pod has been scheduled to the node, Kubelet will create the environment +for the pod, and add/update/remove containers in that environment to meet the +Pod Spec. To distinguish between the environment and the pod as a whole, we +will call the pod environment **PodSandbox.** + +The container runtimes may interpret the PodSandBox concept differently based +on how it operates internally. For runtimes relying on hypervisor, sandbox +represents a virtual machine naturally. For others, it can be Linux namespaces. + +In short, a PodSandbox should have the following features. + + * **Isolation**: E.g., Linux namespaces or a full virtual machine, or even + support additional security features. + * **Compute resource specifications**: A PodSandbox should implement pod-level + resource demands and restrictions. + +*NOTE: The resource specification does not include externalized costs to +container setup that are not currently trackable as Pod constraints, e.g., +filesystem setup, container image pulling, etc.* + +A container in a PodSandbox maps to an application in the Pod Spec. For Linux +containers, they are expected to share at least network and IPC namespaces, +with sharing more namespaces discussed in [#1615](https://issues.k8s.io/1615). + + +Below is an example of the proposed interfaces. + +```go +// PodSandboxManager contains basic operations for sandbox. +type PodSandboxManager interface { + Create(config *PodSandboxConfig) (string, error) + Delete(id string) (string, error) + List(filter PodSandboxFilter) []PodSandboxListItem + Status(id string) PodSandboxStatus +} + +// ContainerRuntime contains basic operations for containers. +type ContainerRuntime interface { + Create(config *ContainerConfig, sandboxConfig *PodSandboxConfig, PodSandboxID string) (string, error) + Start(id string) error + Stop(id string, timeout int) error + Remove(id string) error + List(filter ContainerFilter) ([]ContainerListItem, error) + Status(id string) (ContainerStatus, error) + Exec(id string, cmd []string, streamOpts StreamOptions) error +} + +// ImageService contains image-related operations. +type ImageService interface { + List() ([]Image, error) + Pull(image ImageSpec, auth AuthConfig) error + Remove(image ImageSpec) error + Status(image ImageSpec) (Image, error) + Metrics(image ImageSpec) (ImageMetrics, error) +} + +type ContainerMetricsGetter interface { + ContainerMetrics(id string) (ContainerMetrics, error) +} + +All functions listed above are expected to be thread-safe. +``` + +### Pod/Container Lifecycle + +The PodSandbox’s lifecycle is decoupled from the containers, i.e., a sandbox +is created before any containers, and can exist after all containers in it have +terminated. + +Assume there is a pod with a single container C. To start a pod: + +``` + create sandbox Foo --> create container C --> start container C +``` + +To delete a pod: + +``` + stop container C --> remove container C --> delete sandbox Foo +``` + +The restart policy in the Pod Spec defines how indiviual containers should +be handled when they terminated. Kubelet is responsible to ensure that the +restart policy is enforced. In other words, once Kubelet discovers that a +container terminates (e.g., through `List()`), it will create and start a new +container if needed. + +Kubelet is also responsible for gracefully terminating all the containers +in the sandbox before deleting the sandbox. If Kubelet chooses to delete +the sandbox with running containers in it, those containers should be forcibly +deleted. + +Note that every PodSandbox/container lifecycle operation (create, start, +stop, delete) should either return an error or block until the operation +succeeds. A successful operation should include a state transition of the +PodSandbox/container. E.g., if a `Create` call for a container does not +return an error, the container state should be "created" when the runtime is +queried. + +### Updates to PodSandbox or Containers + +Kubernetes support updates only to a very limited set of fields in the Pod +Spec. These updates may require containers to be re-created by Kubelet. This +can be achieved through the proposed, imperative container-level interface. +On the other hand, PodSandbox update currently is not required. + + +### Container Lifecycle Hooks + +Kubernetes supports post-start and pre-stop lifecycle hooks, with ongoing +discussion for supporting pre-start and post-stop hooks in +[#140](https://issues.k8s.io/140). + +These lifecycle hooks will be implemented by Kubelet via `Exec` calls to the +container runtime. This frees the runtimes from having to support hooks +natively. + +Illustration of the container lifecycle and hooks: + +``` + pre-start post-start pre-stop post-stop + | | | | + exec exec exec exec + | | | | + create --------> start ----------------> stop --------> remove +``` + +In order for the lifecycle hooks to function as expected, the `Exec` call +will need access to the container's filesystem (e.g., mount namespaces). + +### Extensibility + +There are several dimensions for container runtime extensibility. + - Host OS (e.g., Linux) + - PodSandbox isolation mechanism (e.g., namespaces or VM) + - PodSandbox OS (e.g., Linux) + +As mentioned previously, this proposal will only address the Linux based +PodSandbox and containers. All Linux-specific configuration will be grouped +into one field. A container runtime is required to enforce all configuration +applicable to its platform, and should return an error otherwise. + +### Keep it minimal + +The proposed interface is experimental, i.e., it will go through (many) changes +until it stabilizes. The principle is to to keep the interface minimal and +extend it later if needed. This includes a several features that are still in +discussion and may be achieved alternatively: + + * `AttachContainer`: [#23335](https://issues.k8s.io/23335) + * `PortForward`: [#25113](https://issues.k8s.io/25113) + +## Alternatives + +**[Status quo] Declarative pod-level interface** + - Pros: No changes needed. + - Cons: All the issues stated in #motivation + +**Allow integration at both pod- and container-level interfaces** + - Pros: Flexibility. + - Cons: All the issues stated in #motivation + +**Imperative pod-level interface** +The interface contains only CreatePod(), StartPod(), StopPod() and RemovePod(). +This implies that the runtime needs to take over container lifecycle +manangement (i.e., enforce restart policy), lifecycle hooks, liveness checks, +etc. Kubelet will mainly be responsible for interfacing with the apiserver, and +can potentially become a very thin daemon. + - Pros: Lower maintenance overhead for the Kubernetes maintainers if `Docker` + shim maintenance cost is discounted. + - Cons: This will incur higher integration cost because every new container + runtime needs to implement all the features and need to understand the + concept of pods. This would also lead to lower feature velocity because the + interface will need to be changed, and the new pod-level feature will need + to be supported in each runtime. + +## Related Issues + + * Metrics: [#27097](https://issues.k8s.io/27097) + * Log management: [#24677](https://issues.k8s.io/24677) + + + +[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/proposals/container-runtime-interface-v1.md?pixel)]() + diff --git a/pkg/kubelet/container/interface.go b/pkg/kubelet/container/interface.go new file mode 100644 index 0000000000..198545ecd2 --- /dev/null +++ b/pkg/kubelet/container/interface.go @@ -0,0 +1,413 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package container + +import ( + "io" + + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/resource" + "k8s.io/kubernetes/pkg/api/unversioned" +) + +type PodSandboxID string + +// PodSandboxManager provides basic operations to create/delete and examine the +// PodSandboxes. These methods should either return an error or block until the +// operation succeeds. +type PodSandboxManager interface { + // Create creates a sandbox based on the given config, and returns the + // the new sandbox. + Create(config *PodSandboxConfig) (PodSandboxID, error) + // Stop stops the sandbox by its ID. If there are any running + // containers in the sandbox, they will be terminated as a side-effect. + Stop(id PodSandboxID) error + // Delete deletes the sandbox by its ID. If there are any running + // containers in the sandbox, they will be deleted as a side-effect. + Delete(id PodSandboxID) error + // List lists existing sandboxes, filtered by the given PodSandboxFilter. + List(filter PodSandboxFilter) ([]PodSandboxListItem, error) + // Status gets the status of the sandbox by ID. + Status(id PodSandboxID) (PodSandboxStatus, error) +} + +// PodSandboxConfig holds all the required and optional fields for creating a +// sandbox. +type PodSandboxConfig struct { + // Name is the name of the sandbox. The string should conform to + // [a-zA-Z0-9_-]+. + Name string + // Hostname is the hostname of the sandbox. + Hostname string + // DNSOptions sets the DNS options for the sandbox. + DNSOptions DNSOptions + // PortMappings lists the port mappings for the sandbox. + PortMappings []PortMapping + // Resources specifies the resource limits for the sandbox (i.e., the + // aggregate cpu/memory resources limits of all containers). + // Note: On a Linux host, kubelet will create a pod-level cgroup and pass + // it as the cgroup parent for the PodSandbox. For some runtimes, this is + // sufficent. For others, e.g., hypervisor-based runtimes, explicit + // resource limits for the sandbox are needed at creation time. + Resources PodSandboxResources + // Path to the directory on the host in which container log files are + // stored. + // By default the Log of a container going into the LogDirectory will be + // hooked up to STDOUT and STDERR. However, the LogDirectory may contain + // binary log files with structured logging data from the individual + // containers. For example the files might be newline seperated JSON + // structured logs, systemd-journald journal files, gRPC trace files, etc. + // E.g., + // PodSandboxConfig.LogDirectory = `/var/log/pods//` + // ContainerConfig.LogPath = `containerName_Instance#.log` + // + // WARNING: Log managment and how kubelet should interface with the + // container logs are under active discussion in + // https://issues.k8s.io/24677. There *may* be future change of direction + // for logging as the discussion carries on. + LogDirectory string + // Labels are key value pairs that may be used to scope and select + // individual resources. + Labels Labels + // Annotations is an unstructured key value map that may be set by external + // tools to store and retrieve arbitrary metadata. + Annotations map[string]string + + // Linux contains configurations specific to Linux hosts. + Linux *LinuxPodSandboxConfig +} + +// Labels are key value pairs that may be used to scope and select individual +// resources. +// Label keys are of the form: +// label-key ::= prefixed-name | name +// prefixed-name ::= prefix '/' name +// prefix ::= DNS_SUBDOMAIN +// name ::= DNS_LABEL +type Labels map[string]string + +// LinuxPodSandboxConfig holds platform-specific configuraions for Linux +// host platforms and Linux-based containers. +type LinuxPodSandboxConfig struct { + // CgroupParent is the parent cgroup of the sandbox. The cgroupfs style + // syntax will be used, but the container runtime can convert it to systemd + // semantices if needed. + CgroupParent string + // NamespaceOptions contains configurations for the sandbox's namespaces. + // This will be used only if the PodSandbox uses namespace for isolation. + NamespaceOptions NamespaceOptions +} + +// NamespaceOptions provides options for Linux namespaces. +type NamespaceOptions struct { + // HostNetwork uses the host's network namespace. + HostNetwork bool + // HostPID uses the host's pid namesapce. + HostPID bool + // HostIPC uses the host's ipc namespace. + HostIPC bool +} + +// DNSOptions specifies the DNS servers and search domains. +type DNSOptions struct { + // Servers is a list of DNS servers of the cluster. + Servers []string + // Searches is a list of DNS search domains of the cluster. + Searches []string +} + +type PodSandboxState string + +const ( + // PodSandboxReady means the sandbox is functioning properly. + PodSandboxReady PodSandboxState = "Ready" + // PodSandboxInNotReady means the sandbox is not functioning properly. + PodSandboxNotReady PodSandboxState = "NotReady" +) + +// PodSandboxFilter is used to filter a list of PodSandboxes. +type PodSandboxFilter struct { + // Name of the sandbox. + Name *string + // ID of the sandbox. + ID *PodSandboxID + // State of the sandbox. + State *PodSandboxState + // LabelSelector to select matches. + // Only api.MatchLabels is supported for now and the requirements + // are ANDed. MatchExpressions is not supported yet. + LabelSelector unversioned.LabelSelector +} + +// PodSandboxListItem contains minimal information about a sandbox. +type PodSandboxListItem struct { + ID PodSandboxID + State PodSandboxState + // Labels are key value pairs that may be used to scope and select individual resources. + Labels Labels +} + +// PodSandboxStatus contains the status of the PodSandbox. +type PodSandboxStatus struct { + // ID of the sandbox. + ID PodSandboxID + // State of the sandbox. + State PodSandboxState + // Network contains network status if network is handled by the runtime. + Network *PodSandboxNetworkStatus + // Status specific to a Linux sandbox. + Linux *LinuxPodSandboxStatus + // Labels are key value pairs that may be used to scope and select individual resources. + Labels Labels + // Annotations is an unstructured key value map. + Annotations map[string]string +} + +// PodSandboxNetworkStatus is the status of the network for a PodSandbox. +type PodSandboxNetworkStatus struct { + IPs []string +} + +// Namespaces contains paths to the namespaces. +type Namespaces struct { + // Network is the path to the network namespace. + Network string +} + +// LinuxSandBoxStatus contains status specific to Linux sandboxes. +type LinuxPodSandboxStatus struct { + // Namespaces contains paths to the sandbox's namespaces. + Namespaces *Namespaces +} + +// PodSandboxResources contains the CPU/memory resource requirements. +type PodSandboxResources struct { + // CPU resource requirement. + CPU resource.Quantity + // Memory resource requirement. + Memory resource.Quantity +} + +// This is to distinguish with existing ContainerID type, which includes a +// runtime type prefix (e.g., docker://). We may rename this later. +type RawContainerID string + +// ContainerRuntime provides methods for container lifecycle operations, as +// well as listing or inspecting existing containers. These methods should +// either return an error or block until the operation succeeds. +type ContainerRuntime interface { + // Create creates a container in the sandbox, and returns the ID + // of the created container. + Create(config *ContainerConfig, sandboxConfig *PodSandboxConfig, sandboxID PodSandboxID) (RawContainerID, error) + // Start starts a created container. + Start(id RawContainerID) error + // Stop stops a running container with a grace period (i.e., timeout). + Stop(id RawContainerID, timeout int) error + // Remove removes the container. + Remove(id RawContainerID) error + // List lists the existing containers that match the ContainerFilter. + // The returned list should only include containers previously created + // by this ContainerRuntime. + List(filter ContainerFilter) ([]ContainerListItem, error) + // Status returns the status of the container. + Status(id RawContainerID) (RawContainerStatus, error) + // Exec executes a command in the container. + Exec(id RawContainerID, cmd []string, streamOpts StreamOptions) error +} + +// ContainerListItem provides the runtime information for a container returned +// by List(). +type ContainerListItem struct { + // The ID of the container, used by the container runtime to identify + // a container. + ID ContainerID + // The name of the container, which should be the same as specified by + // api.Container. + Name string + // Reference to the image in use. For most runtimes, this should be an + // image ID. + ImageRef string + // State is the state of the container. + State ContainerState + // Labels are key value pairs that may be used to scope and select individual resources. + Labels Labels +} + +type ContainerConfig struct { + // Name of the container. The string should conform to [a-zA-Z0-9_-]+. + Name string + // Image to use. + Image ImageSpec + // Command to execute (i.e., entrypoint for docker) + Command []string + // Args for the Command (i.e., command for docker) + Args []string + // Current working directory of the command. + WorkingDir string + // List of environment variable to set in the container + Env []KeyValue + // Mounts specifies mounts for the container + Mounts []Mount + // Labels are key value pairs that may be used to scope and select individual resources. + Labels Labels + // Annotations is an unstructured key value map that may be set by external + // tools to store and retrieve arbitrary metadata. + Annotations map[string]string + // Privileged runs the container in the privileged mode. + Privileged bool + // ReadOnlyRootFS sets the root filesystem of the container to be + // read-only. + ReadOnlyRootFS bool + // Path relative to PodSandboxConfig.LogDirectory for container to store + // the log (STDOUT and STDERR) on the host. + // E.g., + // PodSandboxConfig.LogDirectory = `/var/log/pods//` + // ContainerConfig.LogPath = `containerName_Instance#.log` + // + // WARNING: Log managment and how kubelet should interface with the + // container logs are under active discussion in + // https://issues.k8s.io/24677. There *may* be future change of direction + // for logging as the discussion carries on. + LogPath string + + // Variables for interactive containers, these have very specialized + // use-cases (e.g. debugging). + // TODO: Determine if we need to continue supporting these fields that are + // part of Kubernetes's Container Spec. + STDIN bool + STDINONCE bool + TTY bool + + // Linux contains configuration specific to Linux containers. + Linux *LinuxContainerConfig +} + +// RawContainerStatus represents the status of a container. +type RawContainerStatus struct { + // ID of the container. + ID ContainerID + // Name of the container. + Name string + // Status of the container. + State ContainerState + // Creation time of the container. + CreatedAt unversioned.Time + // Start time of the container. + StartedAt unversioned.Time + // Finish time of the container. + FinishedAt unversioned.Time + // Exit code of the container. + ExitCode int + // Reference to the image in use. For most runtimes, this should be an + // image ID. + ImageRef string + // Labels are key value pairs that may be used to scope and select individual resources. + Labels Labels + // Annotations is an unstructured key value map. + Annotations map[string]string + // A brief CamelCase string explains why container is in such a status. + Reason string +} + +// LinuxContainerConfig contains platform-specific configuration for +// Linux-based containers. +type LinuxContainerConfig struct { + // Resources specification for the container. + Resources *LinuxContainerResources + // Capabilities to add or drop. + Capabilities *api.Capabilities + // SELinux is the SELinux context to be applied. + SELinux *api.SELinuxOptions + // TODO: Add support for seccomp. +} + +// LinuxContainerResources specifies Linux specific configuration for +// resources. +// TODO: Consider using Resources from opencontainers/runtime-spec/specs-go +// directly. +type LinuxContainerResources struct { + // CPU CFS (Completely Fair Scheduler) period + CPUPeriod *int64 + // CPU CFS (Completely Fair Scheduler) quota + CPUQuota *int64 + // CPU shares (relative weight vs. other containers) + CPUShares *int64 + // Memory limit in bytes + MemoryLimitInBytes *int64 + // OOMScoreAdj adjusts the oom-killer score. + OOMScoreAdj *int64 +} + +// ContainerFilter is used to filter containers. +type ContainerFilter struct { + // Name of the container. + Name *string + // ID of the container. + ID *RawContainerID + // State of the contianer. + State *ContainerState + // ID of the PodSandbox. + PodSandboxID *PodSandboxID + // LabelSelector to select matches. + // Only api.MatchLabels is supported for now and the requirements + // are ANDed. MatchExpressions is not supported yet. + LabelSelector unversioned.LabelSelector +} + +type StreamOptions struct { + TTY bool + InputStream io.Reader + OutputStream io.Writer + ErrorStream io.Writer +} + +// KeyValue represents a key-value pair. +type KeyValue struct { + Key string + Value string +} + +// ImageService offers basic image operations. +type ImageService interface { + // List lists the existing images. + List() ([]Image, error) + // Pull pulls an image with authentication config. The PodSandboxConfig is + // passed so that the image service can charge the resources used for + // pulling to a sepcific pod. + Pull(image ImageSpec, auth AuthConfig, sandboxConfig *PodSandboxConfig) error + // Remove removes an image. + Remove(image ImageSpec) error + // Status returns the status of an image. + Status(image ImageSpec) (Image, error) +} + +// AuthConfig contains authorization information for connecting to a registry. +// TODO: This is copied from docker's Authconfig. We should re-evaluate to +// support other registries. +type AuthConfig struct { + Username string + Password string + Auth string + ServerAddress string + // IdentityToken is used to authenticate the user and get + // an access token for the registry. + IdentityToken string + // RegistryToken is a bearer token to be sent to a registry + RegistryToken string +} + +// TODO: Add ContainerMetricsGetter and ImageMetricsGetter. diff --git a/pkg/kubelet/container/runtime.go b/pkg/kubelet/container/runtime.go index e110a16d2a..df06a737b7 100644 --- a/pkg/kubelet/container/runtime.go +++ b/pkg/kubelet/container/runtime.go @@ -233,6 +233,8 @@ const ( ContainerStateExited ContainerState = "exited" // This unknown encompasses all the states that we currently don't care. ContainerStateUnknown ContainerState = "unknown" + // Not in use yet. + ContainerStateCreated ContainerState = "created" ) // Container provides the runtime information for a container, such as ID, hash, From e270ccf54310b47ee7fff20b75fdf19e78da9530 Mon Sep 17 00:00:00 2001 From: Hongchao Deng Date: Fri, 1 Jul 2016 16:26:17 -0700 Subject: [PATCH 325/339] integration: cleanup unused API --- test/integration/framework/etcd_utils.go | 39 ------------------------ 1 file changed, 39 deletions(-) diff --git a/test/integration/framework/etcd_utils.go b/test/integration/framework/etcd_utils.go index ee40ed11aa..e22caca0fe 100644 --- a/test/integration/framework/etcd_utils.go +++ b/test/integration/framework/etcd_utils.go @@ -24,10 +24,6 @@ import ( "github.com/golang/glog" "golang.org/x/net/context" - "k8s.io/kubernetes/pkg/api/testapi" - "k8s.io/kubernetes/pkg/storage" - etcdstorage "k8s.io/kubernetes/pkg/storage/etcd" - "k8s.io/kubernetes/pkg/storage/etcd/etcdtest" "k8s.io/kubernetes/pkg/util/env" ) @@ -55,41 +51,6 @@ func NewEtcdClient() etcd.Client { return client } -func NewAutoscalingEtcdStorage(client etcd.Client) storage.Interface { - if client == nil { - client = NewEtcdClient() - } - return etcdstorage.NewEtcdStorage(client, testapi.Autoscaling.Codec(), etcdtest.PathPrefix(), false, etcdtest.DeserializationCacheSize) -} - -func NewBatchEtcdStorage(client etcd.Client) storage.Interface { - if client == nil { - client = NewEtcdClient() - } - return etcdstorage.NewEtcdStorage(client, testapi.Batch.Codec(), etcdtest.PathPrefix(), false, etcdtest.DeserializationCacheSize) -} - -func NewAppsEtcdStorage(client etcd.Client) storage.Interface { - if client == nil { - client = NewEtcdClient() - } - return etcdstorage.NewEtcdStorage(client, testapi.Apps.Codec(), etcdtest.PathPrefix(), false, etcdtest.DeserializationCacheSize) -} - -func NewExtensionsEtcdStorage(client etcd.Client) storage.Interface { - if client == nil { - client = NewEtcdClient() - } - return etcdstorage.NewEtcdStorage(client, testapi.Extensions.Codec(), etcdtest.PathPrefix(), false, etcdtest.DeserializationCacheSize) -} - -func NewRbacEtcdStorage(client etcd.Client) storage.Interface { - if client == nil { - client = NewEtcdClient() - } - return etcdstorage.NewEtcdStorage(client, testapi.Rbac.Codec(), etcdtest.PathPrefix(), false, etcdtest.DeserializationCacheSize) -} - func RequireEtcd() { if _, err := etcd.NewKeysAPI(NewEtcdClient()).Get(context.TODO(), "/", nil); err != nil { glog.Fatalf("unable to connect to etcd for testing: %v", err) From 39423f2e02272006f7dd998b6ec9092321e0840e Mon Sep 17 00:00:00 2001 From: Eric Tune Date: Fri, 1 Jul 2016 15:03:42 -0700 Subject: [PATCH 326/339] trivial changes to CHANGELOG.md --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69f87b8e9b..29735f54fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -114,11 +114,10 @@ binary | sha1 hash | md5 hash * TBD -## Changelog since v1.3.0-beta.3 - ### Previous Releases Included in v1.3.0 +- [v1.3.0-beta.3](CHANGELOG.md#v130-beta3) - [v1.3.0-beta.2](CHANGELOG.md#v130-beta2) - [v1.3.0-beta.1](CHANGELOG.md#v130-beta1) - [v1.3.0-alpha.5](CHANGELOG.md#v130-alpha5) From e5f92b55d7d19a55b405f6f0028317960a1bfed6 Mon Sep 17 00:00:00 2001 From: Eric Tune Date: Fri, 1 Jul 2016 17:05:59 -0700 Subject: [PATCH 327/339] Manually improved release notes. Summarized what I thought were the most interesting changes for all users, and for specific cloud providers. Still need better list of breaking changes. --- CHANGELOG.md | 60 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29735f54fb..02a08dfa79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,22 +98,62 @@ binary | sha1 hash | md5 hash ------ | --------- | -------- [kubernetes.tar.gz](https://storage.googleapis.com/kubernetes-release/release/v1.3.0/kubernetes.tar.gz) | `88249c443d438666928379aa7fe865b389ed72ea` | `9270f001aef8c03ff5db63456ca9eecc` -## Major Themes +## Highlights -* TBD +* Authorization: + * **Alpha** RBAC authorization API group +* Federation + * federation api group is now **beta** + * Services from all federated clusters are now registered in Cloud DNS (AWS and GCP). +* Stateful Apps: + * **alpha** PetSets manage stateful apps + * **alpha** Init containers provide one-time setup for stateful containers +* Updating: + * Retry Pod/RC updates in kubectl rolling-update. + * Stop 'kubectl drain' deleting pods with local storage. + * Add `kubectl rollout status` +* Security/Auth + * L7 LB controller and disk attach controllers run on master, so nodes do not need those privileges. + * Setting TLS1.2 minimum + * `kubectl create secret tls` command + * Webhook Token Authenticator + * **beta** PodSecurityPolicy objects limits use of security-sensitive features by pods. +* Kubectl + * Display line number on JSON errors + * Add flag -t as shorthand for --tty +* Resources + * **alpha**: NVIDIA GPU support ([#24836](https://github.com/kubernetes/kubernetes/pull/24836), [@therc](https://github.com/therc)) + * Adding loadBalancer services and nodeports services to quota system -## Other notable improvements +## Known Issues and Important Steps before Upgrading -* TBD - -## Known Issues - -* TBD +* *Instructions coming soon* ## Provider-specific Notes -* TBD - +* AWS + * Support for ap-northeast-2 region (Seoul) + * Allow cross-region image pulling with ECR + * More reliable kube-up/kube-down + * Enable ICMP Type 3 Code 4 for ELBs + * ARP caching fix + * Use /dev/xvdXX names + * ELB: + * ELB proxy protocol support + * mixed plaintext/encrypted ports support in ELBs + * SSL support for ELB listeners + * Allow VPC CIDR to be specified (experimental) + * Fix problems with >2 security groups +* GCP: + * Enable using gcr.io as a Docker registry mirror. + * Make bigger master root disks in GCE for large clusters. + * Change default clusterCIDRs from /16 to /14 allowing 1000 Node clusters by default. + * Allow Debian Jessie on GCE. + * Node problem detector addon pod detects and reports kernel deadlocks. +* OpenStack + * Provider added. +* VSphere: + * Provider updated. ### Previous Releases Included in v1.3.0 From 1882a789ac4afdd91a04b77a04bbf3cdcc3f3654 Mon Sep 17 00:00:00 2001 From: saadali Date: Fri, 1 Jul 2016 17:50:23 -0700 Subject: [PATCH 328/339] Move ungraceful PD tests out of flaky --- test/e2e/pd.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/e2e/pd.go b/test/e2e/pd.go index 19b7827ee9..2470185aab 100644 --- a/test/e2e/pd.go +++ b/test/e2e/pd.go @@ -74,8 +74,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { mathrand.Seed(time.Now().UTC().UnixNano()) }) - // Flaky-- Issue #27691 - It("[Flaky] should schedule a pod w/ a RW PD, ungracefully remove it, then schedule it on another host [Slow]", func() { + It("should schedule a pod w/ a RW PD, ungracefully remove it, then schedule it on another host [Slow]", func() { framework.SkipUnlessProviderIs("gce", "gke", "aws") By("creating PD") @@ -195,8 +194,7 @@ var _ = framework.KubeDescribe("Pod Disks", func() { return }) - // Flaky-- Issue #27477 - It("[Flaky] should schedule a pod w/ a readonly PD on two hosts, then remove both ungracefully. [Slow]", func() { + It("should schedule a pod w/ a readonly PD on two hosts, then remove both ungracefully. [Slow]", func() { framework.SkipUnlessProviderIs("gce", "gke") By("creating PD") From 7074169a63b1fc9d5fb144363660d1f0349914d9 Mon Sep 17 00:00:00 2001 From: xiangpengzhao Date: Tue, 28 Jun 2016 04:08:11 -0400 Subject: [PATCH 329/339] Add link to issues referenced in nodeaffinity.md and podaffinity.md --- docs/design/nodeaffinity.md | 11 +++++---- docs/design/podaffinity.md | 47 ++++++++++++++++++++----------------- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/docs/design/nodeaffinity.md b/docs/design/nodeaffinity.md index 3d9266ae8b..3c29d6fe2f 100644 --- a/docs/design/nodeaffinity.md +++ b/docs/design/nodeaffinity.md @@ -211,7 +211,7 @@ Users should not start using `NodeAffinity` until the full implementation has been in Kubelet and the master for enough binary versions that we feel comfortable that we will not need to roll back either Kubelet or master to a version that does not support them. Longer-term we will use a programatic -approach to enforcing this (#4855). +approach to enforcing this ([#4855](https://github.com/kubernetes/kubernetes/issues/4855)). ## Implementation plan @@ -234,7 +234,7 @@ longer satisfies `RequiredDuringSchedulingRequiredDuringExecution` (see [this co We assume Kubelet publishes labels describing the node's membership in all of the relevant scheduling domains (e.g. node name, rack name, availability zone -name, etc.). See #9044. +name, etc.). See [#9044](https://github.com/kubernetes/kubernetes/issues/9044). ## Extensibility @@ -268,10 +268,11 @@ Are there any other fields we should convert from `map[string]string` to ## Related issues -The review for this proposal is in #18261. +The review for this proposal is in [#18261](https://github.com/kubernetes/kubernetes/issues/18261). -The main related issue is #341. Issue #367 is also related. Those issues -reference other related issues. +The main related issue is [#341](https://github.com/kubernetes/kubernetes/issues/341). +Issue [#367](https://github.com/kubernetes/kubernetes/issues/367) is also related. +Those issues reference other related issues. diff --git a/docs/design/podaffinity.md b/docs/design/podaffinity.md index fcc5fc870e..d72a6db8c1 100644 --- a/docs/design/podaffinity.md +++ b/docs/design/podaffinity.md @@ -430,8 +430,8 @@ foreach node A of {N} In this section we discuss three issues with RequiredDuringScheduling anti-affinity: Denial of Service (DoS), co-existing with daemons, and -determining which pod(s) to kill. See issue #18265 for additional discussion of -these topics. +determining which pod(s) to kill. See issue [#18265](https://github.com/kubernetes/kubernetes/issues/18265) +for additional discussion of these topics. ### Denial of Service @@ -501,8 +501,9 @@ A cluster administrator may wish to allow pods that express anti-affinity against all pods, to nonetheless co-exist with system daemon pods, such as those run by DaemonSet. In principle, we would like the specification for RequiredDuringScheduling inter-pod anti-affinity to allow "toleration" of one or -more other pods (see #18263 for a more detailed explanation of the toleration -concept). There are at least two ways to accomplish this: +more other pods (see [#18263](https://github.com/kubernetes/kubernetes/issues/18263) +for a more detailed explanation of the toleration concept). +There are at least two ways to accomplish this: * Scheduler special-cases the namespace(s) where daemons live, in the sense that it ignores pods in those namespaces when it is @@ -562,12 +563,12 @@ that trigger killing of P? More generally, how long should the system wait before declaring that P's affinity is violated? (Of course affinity is expressed in terms of label selectors, not for a specific pod, but the scenario is easier to describe using a concrete pod.) This is closely related to the concept of -forgiveness (see issue #1574). In theory we could make this time duration be -configurable by the user on a per-pod basis, but for the first version of this -feature we will make it a configurable property of whichever component does the -killing and that applies across all pods using the feature. Making it -configurable by the user would require a nontrivial change to the API syntax -(since the field would only apply to +forgiveness (see issue [#1574](https://github.com/kubernetes/kubernetes/issues/1574)). +In theory we could make this time duration be configurable by the user on a per-pod +basis, but for the first version of this feature we will make it a configurable +property of whichever component does the killing and that applies across all pods +using the feature. Making it configurable by the user would require a nontrivial +change to the API syntax (since the field would only apply to RequiredDuringSchedulingRequiredDuringExecution affinity). ## Implementation plan @@ -602,7 +603,7 @@ Do so in a way that addresses the "determining which pod(s) to kill" issue. We assume Kubelet publishes labels describing the node's membership in all of the relevant scheduling domains (e.g. node name, rack name, availability zone -name, etc.). See #9044. +name, etc.). See [#9044](https://github.com/kubernetes/kubernetes/issues/9044). ## Backward compatibility @@ -612,7 +613,7 @@ Users should not start using `Affinity` until the full implementation has been in Kubelet and the master for enough binary versions that we feel comfortable that we will not need to roll back either Kubelet or master to a version that does not support them. Longer-term we will use a programmatic approach to -enforcing this (#4855). +enforcing this ([#4855](https://github.com/kubernetes/kubernetes/issues/4855)). ## Extensibility @@ -673,23 +674,27 @@ pod to name the data rather than the node. ## Related issues -The review for this proposal is in #18265. +The review for this proposal is in [#18265](https://github.com/kubernetes/kubernetes/issues/18265). The topic of affinity/anti-affinity has generated a lot of discussion. The main -issue is #367 but #14484/#14485, #9560, #11369, #14543, #11707, #3945, #341, - -# 1965, and #2906 all have additional discussion and use cases. +issue is [#367](https://github.com/kubernetes/kubernetes/issues/367) +but [#14484](https://github.com/kubernetes/kubernetes/issues/14484)/[#14485](https://github.com/kubernetes/kubernetes/issues/14485), +[#9560](https://github.com/kubernetes/kubernetes/issues/9560), [#11369](https://github.com/kubernetes/kubernetes/issues/11369), +[#14543](https://github.com/kubernetes/kubernetes/issues/14543), [#11707](https://github.com/kubernetes/kubernetes/issues/11707), +[#3945](https://github.com/kubernetes/kubernetes/issues/3945), [#341](https://github.com/kubernetes/kubernetes/issues/341), +[#1965](https://github.com/kubernetes/kubernetes/issues/1965), and [#2906](https://github.com/kubernetes/kubernetes/issues/2906) +all have additional discussion and use cases. As the examples in this document have demonstrated, topological affinity is very useful in clusters that are spread across availability zones, e.g. to co-locate pods of a service in the same zone to avoid a wide-area network hop, or to -spread pods across zones for failure tolerance. #17059, #13056, #13063, and +spread pods across zones for failure tolerance. [#17059](https://github.com/kubernetes/kubernetes/issues/17059), +[#13056](https://github.com/kubernetes/kubernetes/issues/13056), [#13063](https://github.com/kubernetes/kubernetes/issues/13063), +and [#4235](https://github.com/kubernetes/kubernetes/issues/4235) are relevant. -# 4235 are relevant. +Issue [#15675](https://github.com/kubernetes/kubernetes/issues/15675) describes connection affinity, which is vaguely related. -Issue #15675 describes connection affinity, which is vaguely related. - -This proposal is to satisfy #14816. +This proposal is to satisfy [#14816](https://github.com/kubernetes/kubernetes/issues/14816). ## Related work From 6604bd20e8b56503caefbbe88b6355ece292aef7 Mon Sep 17 00:00:00 2001 From: xiangpengzhao Date: Fri, 1 Jul 2016 21:45:30 -0400 Subject: [PATCH 330/339] Add issue links to taint-toleration-dedicated.md --- docs/design/taint-toleration-dedicated.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/design/taint-toleration-dedicated.md b/docs/design/taint-toleration-dedicated.md index e5a569c971..e896519f0f 100644 --- a/docs/design/taint-toleration-dedicated.md +++ b/docs/design/taint-toleration-dedicated.md @@ -45,7 +45,8 @@ nodes with a particular piece of hardware could be reserved for pods that require that hardware, or a node could be marked as unschedulable when it is being drained before shutdown, or a node could trigger evictions when it experiences hardware or software problems or abnormal node configurations; see -issues #17190 and #3885 for more discussion. +issues [#17190](https://github.com/kubernetes/kubernetes/issues/17190) and +[#3885](https://github.com/kubernetes/kubernetes/issues/3885) for more discussion. ## Taints, tolerations, and dedicated nodes @@ -274,7 +275,8 @@ taints and tolerations. Obviously this makes it impossible to securely enforce rules like dedicated nodes. We need some mechanism that prevents regular users from mutating the `Taints` field of `NodeSpec` (probably we want to prevent them from mutating any fields of `NodeSpec`) and from mutating the `Tolerations` -field of their pods. #17549 is relevant. +field of their pods. [#17549](https://github.com/kubernetes/kubernetes/issues/17549) +is relevant. Another security vulnerability arises if nodes are added to the cluster before receiving their taint. Thus we need to ensure that a new node does not become @@ -303,14 +305,15 @@ Users should not start using taints and tolerations until the full implementation has been in Kubelet and the master for enough binary versions that we feel comfortable that we will not need to roll back either Kubelet or master to a version that does not support them. Longer-term we will use a -progamatic approach to enforcing this (#4855). +progamatic approach to enforcing this ([#4855](https://github.com/kubernetes/kubernetes/issues/4855)). ## Related issues -This proposal is based on the discussion in #17190. There are a number of other -related issues, all of which are linked to from #17190. +This proposal is based on the discussion in [#17190](https://github.com/kubernetes/kubernetes/issues/17190). +There are a number of other related issues, all of which are linked to from +[#17190](https://github.com/kubernetes/kubernetes/issues/17190). -The relationship between taints and node drains is discussed in #1574. +The relationship between taints and node drains is discussed in [#1574](https://github.com/kubernetes/kubernetes/issues/1574). The concepts of taints and tolerations were originally developed as part of the Omega project at Google. From 0dd17fff229d24a83976e6bdd17cae78c6bd7b98 Mon Sep 17 00:00:00 2001 From: saadali Date: Fri, 1 Jul 2016 18:50:25 -0700 Subject: [PATCH 331/339] Reorganize volume controllers and manager --- cmd/kube-controller-manager/app/controllermanager.go | 6 +++--- .../mesos/pkg/controllermanager/controllermanager.go | 2 +- pkg/controller/volume/attachdetach/OWNERS | 2 ++ .../{ => attachdetach}/attach_detach_controller.go | 10 +++++----- .../attach_detach_controller_test.go | 4 ++-- .../{ => attachdetach}/cache/actual_state_of_world.go | 0 .../cache/actual_state_of_world_test.go | 2 +- .../{ => attachdetach}/cache/desired_state_of_world.go | 0 .../cache/desired_state_of_world_test.go | 2 +- .../populator/desired_state_of_world_populator.go | 2 +- .../volume/{ => attachdetach}/reconciler/reconciler.go | 4 ++-- .../{ => attachdetach}/reconciler/reconciler_test.go | 6 +++--- .../statusupdater/fake_node_status_updater.go | 0 .../statusupdater/node_status_updater.go | 2 +- .../{ => attachdetach}/testing/testvolumespec.go | 0 pkg/controller/{ => volume}/persistentvolume/OWNERS | 1 + .../{ => volume}/persistentvolume/binder_test.go | 0 .../{ => volume}/persistentvolume/controller.go | 0 .../{ => volume}/persistentvolume/controller_base.go | 0 .../{ => volume}/persistentvolume/controller_test.go | 0 .../{ => volume}/persistentvolume/delete_test.go | 0 .../{ => volume}/persistentvolume/framework_test.go | 0 pkg/controller/{ => volume}/persistentvolume/index.go | 0 .../{ => volume}/persistentvolume/index_test.go | 0 .../{ => volume}/persistentvolume/options/options.go | 0 .../{ => volume}/persistentvolume/provision_test.go | 0 .../{ => volume}/persistentvolume/recycle_test.go | 0 .../{ => volume}/persistentvolume/volume_host.go | 0 pkg/kubelet/kubelet.go | 6 +++--- pkg/kubelet/kubelet_test.go | 2 +- pkg/kubelet/runonce_test.go | 4 ++-- pkg/kubelet/volumemanager/OWNERS | 2 ++ .../cache/actual_state_of_world.go | 0 .../cache/actual_state_of_world_test.go | 0 .../cache/desired_state_of_world.go | 0 .../cache/desired_state_of_world_test.go | 0 .../populator/desired_state_of_world_populator.go | 2 +- .../{volume => volumemanager}/reconciler/reconciler.go | 2 +- .../reconciler/reconciler_test.go | 2 +- .../{volume => volumemanager}/volume_manager.go | 6 +++--- pkg/util/goroutinemap/OWNERS | 2 ++ pkg/volume/util/operationexecutor/OWNERS | 2 ++ test/integration/persistent_volumes_test.go | 2 +- 43 files changed, 42 insertions(+), 33 deletions(-) create mode 100644 pkg/controller/volume/attachdetach/OWNERS rename pkg/controller/volume/{ => attachdetach}/attach_detach_controller.go (98%) rename pkg/controller/volume/{ => attachdetach}/attach_detach_controller_test.go (97%) rename pkg/controller/volume/{ => attachdetach}/cache/actual_state_of_world.go (100%) rename pkg/controller/volume/{ => attachdetach}/cache/actual_state_of_world_test.go (99%) rename pkg/controller/volume/{ => attachdetach}/cache/desired_state_of_world.go (100%) rename pkg/controller/volume/{ => attachdetach}/cache/desired_state_of_world_test.go (99%) rename pkg/controller/volume/{ => attachdetach}/populator/desired_state_of_world_populator.go (98%) rename pkg/controller/volume/{ => attachdetach}/reconciler/reconciler.go (98%) rename pkg/controller/volume/{ => attachdetach}/reconciler/reconciler_test.go (99%) rename pkg/controller/volume/{ => attachdetach}/statusupdater/fake_node_status_updater.go (100%) rename pkg/controller/volume/{ => attachdetach}/statusupdater/node_status_updater.go (98%) rename pkg/controller/volume/{ => attachdetach}/testing/testvolumespec.go (100%) rename pkg/controller/{ => volume}/persistentvolume/OWNERS (73%) rename pkg/controller/{ => volume}/persistentvolume/binder_test.go (100%) rename pkg/controller/{ => volume}/persistentvolume/controller.go (100%) rename pkg/controller/{ => volume}/persistentvolume/controller_base.go (100%) rename pkg/controller/{ => volume}/persistentvolume/controller_test.go (100%) rename pkg/controller/{ => volume}/persistentvolume/delete_test.go (100%) rename pkg/controller/{ => volume}/persistentvolume/framework_test.go (100%) rename pkg/controller/{ => volume}/persistentvolume/index.go (100%) rename pkg/controller/{ => volume}/persistentvolume/index_test.go (100%) rename pkg/controller/{ => volume}/persistentvolume/options/options.go (100%) rename pkg/controller/{ => volume}/persistentvolume/provision_test.go (100%) rename pkg/controller/{ => volume}/persistentvolume/recycle_test.go (100%) rename pkg/controller/{ => volume}/persistentvolume/volume_host.go (100%) create mode 100644 pkg/kubelet/volumemanager/OWNERS rename pkg/kubelet/{volume => volumemanager}/cache/actual_state_of_world.go (100%) rename pkg/kubelet/{volume => volumemanager}/cache/actual_state_of_world_test.go (100%) rename pkg/kubelet/{volume => volumemanager}/cache/desired_state_of_world.go (100%) rename pkg/kubelet/{volume => volumemanager}/cache/desired_state_of_world_test.go (100%) rename pkg/kubelet/{volume => volumemanager}/populator/desired_state_of_world_populator.go (99%) rename pkg/kubelet/{volume => volumemanager}/reconciler/reconciler.go (99%) rename pkg/kubelet/{volume => volumemanager}/reconciler/reconciler_test.go (99%) rename pkg/kubelet/{volume => volumemanager}/volume_manager.go (98%) create mode 100644 pkg/util/goroutinemap/OWNERS create mode 100644 pkg/volume/util/operationexecutor/OWNERS diff --git a/cmd/kube-controller-manager/app/controllermanager.go b/cmd/kube-controller-manager/app/controllermanager.go index 58c9a069b2..0c963bc137 100644 --- a/cmd/kube-controller-manager/app/controllermanager.go +++ b/cmd/kube-controller-manager/app/controllermanager.go @@ -55,7 +55,6 @@ import ( "k8s.io/kubernetes/pkg/controller/job" namespacecontroller "k8s.io/kubernetes/pkg/controller/namespace" nodecontroller "k8s.io/kubernetes/pkg/controller/node" - persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/persistentvolume" petset "k8s.io/kubernetes/pkg/controller/petset" "k8s.io/kubernetes/pkg/controller/podautoscaler" "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" @@ -66,7 +65,8 @@ import ( routecontroller "k8s.io/kubernetes/pkg/controller/route" servicecontroller "k8s.io/kubernetes/pkg/controller/service" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" - "k8s.io/kubernetes/pkg/controller/volume" + "k8s.io/kubernetes/pkg/controller/volume/attachdetach" + persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/volume/persistentvolume" "k8s.io/kubernetes/pkg/healthz" quotainstall "k8s.io/kubernetes/pkg/quota/install" "k8s.io/kubernetes/pkg/serviceaccount" @@ -405,7 +405,7 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig time.Sleep(wait.Jitter(s.ControllerStartInterval.Duration, ControllerStartJitter)) attachDetachController, attachDetachControllerErr := - volume.NewAttachDetachController( + attachdetach.NewAttachDetachController( clientset.NewForConfigOrDie(restclient.AddUserAgent(kubeconfig, "attachdetach-controller")), podInformer, nodeInformer, diff --git a/contrib/mesos/pkg/controllermanager/controllermanager.go b/contrib/mesos/pkg/controllermanager/controllermanager.go index f52bfd88ad..07d09e6c50 100644 --- a/contrib/mesos/pkg/controllermanager/controllermanager.go +++ b/contrib/mesos/pkg/controllermanager/controllermanager.go @@ -45,7 +45,6 @@ import ( "k8s.io/kubernetes/pkg/controller/job" namespacecontroller "k8s.io/kubernetes/pkg/controller/namespace" nodecontroller "k8s.io/kubernetes/pkg/controller/node" - persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/persistentvolume" "k8s.io/kubernetes/pkg/controller/podautoscaler" "k8s.io/kubernetes/pkg/controller/podautoscaler/metrics" "k8s.io/kubernetes/pkg/controller/podgc" @@ -55,6 +54,7 @@ import ( routecontroller "k8s.io/kubernetes/pkg/controller/route" servicecontroller "k8s.io/kubernetes/pkg/controller/service" serviceaccountcontroller "k8s.io/kubernetes/pkg/controller/serviceaccount" + persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/volume/persistentvolume" "k8s.io/kubernetes/pkg/healthz" quotainstall "k8s.io/kubernetes/pkg/quota/install" "k8s.io/kubernetes/pkg/serviceaccount" diff --git a/pkg/controller/volume/attachdetach/OWNERS b/pkg/controller/volume/attachdetach/OWNERS new file mode 100644 index 0000000000..73ab6a21c9 --- /dev/null +++ b/pkg/controller/volume/attachdetach/OWNERS @@ -0,0 +1,2 @@ +assignees: + - saad-ali diff --git a/pkg/controller/volume/attach_detach_controller.go b/pkg/controller/volume/attachdetach/attach_detach_controller.go similarity index 98% rename from pkg/controller/volume/attach_detach_controller.go rename to pkg/controller/volume/attachdetach/attach_detach_controller.go index 9a07437276..6799c1bdb6 100644 --- a/pkg/controller/volume/attach_detach_controller.go +++ b/pkg/controller/volume/attachdetach/attach_detach_controller.go @@ -16,7 +16,7 @@ limitations under the License. // Package volume implements a controller to manage volume attach and detach // operations. -package volume +package attachdetach import ( "fmt" @@ -28,10 +28,10 @@ import ( "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/cloudprovider" "k8s.io/kubernetes/pkg/controller/framework" - "k8s.io/kubernetes/pkg/controller/volume/cache" - "k8s.io/kubernetes/pkg/controller/volume/populator" - "k8s.io/kubernetes/pkg/controller/volume/reconciler" - "k8s.io/kubernetes/pkg/controller/volume/statusupdater" + "k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache" + "k8s.io/kubernetes/pkg/controller/volume/attachdetach/populator" + "k8s.io/kubernetes/pkg/controller/volume/attachdetach/reconciler" + "k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater" "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util/io" "k8s.io/kubernetes/pkg/util/mount" diff --git a/pkg/controller/volume/attach_detach_controller_test.go b/pkg/controller/volume/attachdetach/attach_detach_controller_test.go similarity index 97% rename from pkg/controller/volume/attach_detach_controller_test.go rename to pkg/controller/volume/attachdetach/attach_detach_controller_test.go index 3741c56bcd..dcf68470e4 100644 --- a/pkg/controller/volume/attach_detach_controller_test.go +++ b/pkg/controller/volume/attachdetach/attach_detach_controller_test.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -package volume +package attachdetach import ( "testing" "time" "k8s.io/kubernetes/pkg/controller/framework/informers" - controllervolumetesting "k8s.io/kubernetes/pkg/controller/volume/testing" + controllervolumetesting "k8s.io/kubernetes/pkg/controller/volume/attachdetach/testing" ) func Test_NewAttachDetachController_Positive(t *testing.T) { diff --git a/pkg/controller/volume/cache/actual_state_of_world.go b/pkg/controller/volume/attachdetach/cache/actual_state_of_world.go similarity index 100% rename from pkg/controller/volume/cache/actual_state_of_world.go rename to pkg/controller/volume/attachdetach/cache/actual_state_of_world.go diff --git a/pkg/controller/volume/cache/actual_state_of_world_test.go b/pkg/controller/volume/attachdetach/cache/actual_state_of_world_test.go similarity index 99% rename from pkg/controller/volume/cache/actual_state_of_world_test.go rename to pkg/controller/volume/attachdetach/cache/actual_state_of_world_test.go index ede15ee013..acd503b229 100644 --- a/pkg/controller/volume/cache/actual_state_of_world_test.go +++ b/pkg/controller/volume/attachdetach/cache/actual_state_of_world_test.go @@ -20,7 +20,7 @@ import ( "testing" "k8s.io/kubernetes/pkg/api" - controllervolumetesting "k8s.io/kubernetes/pkg/controller/volume/testing" + controllervolumetesting "k8s.io/kubernetes/pkg/controller/volume/attachdetach/testing" volumetesting "k8s.io/kubernetes/pkg/volume/testing" ) diff --git a/pkg/controller/volume/cache/desired_state_of_world.go b/pkg/controller/volume/attachdetach/cache/desired_state_of_world.go similarity index 100% rename from pkg/controller/volume/cache/desired_state_of_world.go rename to pkg/controller/volume/attachdetach/cache/desired_state_of_world.go diff --git a/pkg/controller/volume/cache/desired_state_of_world_test.go b/pkg/controller/volume/attachdetach/cache/desired_state_of_world_test.go similarity index 99% rename from pkg/controller/volume/cache/desired_state_of_world_test.go rename to pkg/controller/volume/attachdetach/cache/desired_state_of_world_test.go index b2de80f6cd..ccb98b2061 100644 --- a/pkg/controller/volume/cache/desired_state_of_world_test.go +++ b/pkg/controller/volume/attachdetach/cache/desired_state_of_world_test.go @@ -20,7 +20,7 @@ import ( "testing" "k8s.io/kubernetes/pkg/api" - controllervolumetesting "k8s.io/kubernetes/pkg/controller/volume/testing" + controllervolumetesting "k8s.io/kubernetes/pkg/controller/volume/attachdetach/testing" volumetesting "k8s.io/kubernetes/pkg/volume/testing" "k8s.io/kubernetes/pkg/volume/util/types" ) diff --git a/pkg/controller/volume/populator/desired_state_of_world_populator.go b/pkg/controller/volume/attachdetach/populator/desired_state_of_world_populator.go similarity index 98% rename from pkg/controller/volume/populator/desired_state_of_world_populator.go rename to pkg/controller/volume/attachdetach/populator/desired_state_of_world_populator.go index 371edb59fa..819e04be22 100644 --- a/pkg/controller/volume/populator/desired_state_of_world_populator.go +++ b/pkg/controller/volume/attachdetach/populator/desired_state_of_world_populator.go @@ -26,7 +26,7 @@ import ( "k8s.io/kubernetes/pkg/api" kcache "k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/controller/framework" - "k8s.io/kubernetes/pkg/controller/volume/cache" + "k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache" "k8s.io/kubernetes/pkg/util/wait" "k8s.io/kubernetes/pkg/volume/util/volumehelper" ) diff --git a/pkg/controller/volume/reconciler/reconciler.go b/pkg/controller/volume/attachdetach/reconciler/reconciler.go similarity index 98% rename from pkg/controller/volume/reconciler/reconciler.go rename to pkg/controller/volume/attachdetach/reconciler/reconciler.go index 60914004bb..0d7316ff1c 100644 --- a/pkg/controller/volume/reconciler/reconciler.go +++ b/pkg/controller/volume/attachdetach/reconciler/reconciler.go @@ -23,8 +23,8 @@ import ( "time" "github.com/golang/glog" - "k8s.io/kubernetes/pkg/controller/volume/cache" - "k8s.io/kubernetes/pkg/controller/volume/statusupdater" + "k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache" + "k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater" "k8s.io/kubernetes/pkg/util/goroutinemap" "k8s.io/kubernetes/pkg/util/wait" "k8s.io/kubernetes/pkg/volume/util/operationexecutor" diff --git a/pkg/controller/volume/reconciler/reconciler_test.go b/pkg/controller/volume/attachdetach/reconciler/reconciler_test.go similarity index 99% rename from pkg/controller/volume/reconciler/reconciler_test.go rename to pkg/controller/volume/attachdetach/reconciler/reconciler_test.go index 91d173f5d4..a1dce7d01f 100644 --- a/pkg/controller/volume/reconciler/reconciler_test.go +++ b/pkg/controller/volume/attachdetach/reconciler/reconciler_test.go @@ -22,9 +22,9 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/controller/framework/informers" - "k8s.io/kubernetes/pkg/controller/volume/cache" - "k8s.io/kubernetes/pkg/controller/volume/statusupdater" - controllervolumetesting "k8s.io/kubernetes/pkg/controller/volume/testing" + "k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache" + "k8s.io/kubernetes/pkg/controller/volume/attachdetach/statusupdater" + controllervolumetesting "k8s.io/kubernetes/pkg/controller/volume/attachdetach/testing" "k8s.io/kubernetes/pkg/util/wait" volumetesting "k8s.io/kubernetes/pkg/volume/testing" "k8s.io/kubernetes/pkg/volume/util/operationexecutor" diff --git a/pkg/controller/volume/statusupdater/fake_node_status_updater.go b/pkg/controller/volume/attachdetach/statusupdater/fake_node_status_updater.go similarity index 100% rename from pkg/controller/volume/statusupdater/fake_node_status_updater.go rename to pkg/controller/volume/attachdetach/statusupdater/fake_node_status_updater.go diff --git a/pkg/controller/volume/statusupdater/node_status_updater.go b/pkg/controller/volume/attachdetach/statusupdater/node_status_updater.go similarity index 98% rename from pkg/controller/volume/statusupdater/node_status_updater.go rename to pkg/controller/volume/attachdetach/statusupdater/node_status_updater.go index 463062297e..591f0275fa 100644 --- a/pkg/controller/volume/statusupdater/node_status_updater.go +++ b/pkg/controller/volume/attachdetach/statusupdater/node_status_updater.go @@ -27,7 +27,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/controller/framework" - "k8s.io/kubernetes/pkg/controller/volume/cache" + "k8s.io/kubernetes/pkg/controller/volume/attachdetach/cache" "k8s.io/kubernetes/pkg/util/strategicpatch" ) diff --git a/pkg/controller/volume/testing/testvolumespec.go b/pkg/controller/volume/attachdetach/testing/testvolumespec.go similarity index 100% rename from pkg/controller/volume/testing/testvolumespec.go rename to pkg/controller/volume/attachdetach/testing/testvolumespec.go diff --git a/pkg/controller/persistentvolume/OWNERS b/pkg/controller/volume/persistentvolume/OWNERS similarity index 73% rename from pkg/controller/persistentvolume/OWNERS rename to pkg/controller/volume/persistentvolume/OWNERS index b9e1568abd..1cdda19f30 100644 --- a/pkg/controller/persistentvolume/OWNERS +++ b/pkg/controller/volume/persistentvolume/OWNERS @@ -1,3 +1,4 @@ assignees: + - jsafrane - saad-ali - thockin diff --git a/pkg/controller/persistentvolume/binder_test.go b/pkg/controller/volume/persistentvolume/binder_test.go similarity index 100% rename from pkg/controller/persistentvolume/binder_test.go rename to pkg/controller/volume/persistentvolume/binder_test.go diff --git a/pkg/controller/persistentvolume/controller.go b/pkg/controller/volume/persistentvolume/controller.go similarity index 100% rename from pkg/controller/persistentvolume/controller.go rename to pkg/controller/volume/persistentvolume/controller.go diff --git a/pkg/controller/persistentvolume/controller_base.go b/pkg/controller/volume/persistentvolume/controller_base.go similarity index 100% rename from pkg/controller/persistentvolume/controller_base.go rename to pkg/controller/volume/persistentvolume/controller_base.go diff --git a/pkg/controller/persistentvolume/controller_test.go b/pkg/controller/volume/persistentvolume/controller_test.go similarity index 100% rename from pkg/controller/persistentvolume/controller_test.go rename to pkg/controller/volume/persistentvolume/controller_test.go diff --git a/pkg/controller/persistentvolume/delete_test.go b/pkg/controller/volume/persistentvolume/delete_test.go similarity index 100% rename from pkg/controller/persistentvolume/delete_test.go rename to pkg/controller/volume/persistentvolume/delete_test.go diff --git a/pkg/controller/persistentvolume/framework_test.go b/pkg/controller/volume/persistentvolume/framework_test.go similarity index 100% rename from pkg/controller/persistentvolume/framework_test.go rename to pkg/controller/volume/persistentvolume/framework_test.go diff --git a/pkg/controller/persistentvolume/index.go b/pkg/controller/volume/persistentvolume/index.go similarity index 100% rename from pkg/controller/persistentvolume/index.go rename to pkg/controller/volume/persistentvolume/index.go diff --git a/pkg/controller/persistentvolume/index_test.go b/pkg/controller/volume/persistentvolume/index_test.go similarity index 100% rename from pkg/controller/persistentvolume/index_test.go rename to pkg/controller/volume/persistentvolume/index_test.go diff --git a/pkg/controller/persistentvolume/options/options.go b/pkg/controller/volume/persistentvolume/options/options.go similarity index 100% rename from pkg/controller/persistentvolume/options/options.go rename to pkg/controller/volume/persistentvolume/options/options.go diff --git a/pkg/controller/persistentvolume/provision_test.go b/pkg/controller/volume/persistentvolume/provision_test.go similarity index 100% rename from pkg/controller/persistentvolume/provision_test.go rename to pkg/controller/volume/persistentvolume/provision_test.go diff --git a/pkg/controller/persistentvolume/recycle_test.go b/pkg/controller/volume/persistentvolume/recycle_test.go similarity index 100% rename from pkg/controller/persistentvolume/recycle_test.go rename to pkg/controller/volume/persistentvolume/recycle_test.go diff --git a/pkg/controller/persistentvolume/volume_host.go b/pkg/controller/volume/persistentvolume/volume_host.go similarity index 100% rename from pkg/controller/persistentvolume/volume_host.go rename to pkg/controller/volume/persistentvolume/volume_host.go diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 95dbcb86d1..d6f79a5d9c 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -71,7 +71,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/util/format" "k8s.io/kubernetes/pkg/kubelet/util/ioutils" "k8s.io/kubernetes/pkg/kubelet/util/queue" - kubeletvolume "k8s.io/kubernetes/pkg/kubelet/volume" + "k8s.io/kubernetes/pkg/kubelet/volumemanager" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/securitycontext" "k8s.io/kubernetes/pkg/types" @@ -501,7 +501,7 @@ func NewMainKubelet( return nil, err } - klet.volumeManager, err = kubeletvolume.NewVolumeManager( + klet.volumeManager, err = volumemanager.NewVolumeManager( enableControllerAttachDetach, hostname, klet.podManager, @@ -687,7 +687,7 @@ type Kubelet struct { // VolumeManager runs a set of asynchronous loops that figure out which // volumes need to be attached/mounted/unmounted/detached based on the pods // scheduled on this node and makes it so. - volumeManager kubeletvolume.VolumeManager + volumeManager volumemanager.VolumeManager // Cloud provider interface. cloud cloudprovider.Interface diff --git a/pkg/kubelet/kubelet_test.go b/pkg/kubelet/kubelet_test.go index 8a6f9e8ecc..27642a6b36 100644 --- a/pkg/kubelet/kubelet_test.go +++ b/pkg/kubelet/kubelet_test.go @@ -63,7 +63,7 @@ import ( "k8s.io/kubernetes/pkg/kubelet/status" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/queue" - kubeletvolume "k8s.io/kubernetes/pkg/kubelet/volume" + kubeletvolume "k8s.io/kubernetes/pkg/kubelet/volumemanager" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util" diff --git a/pkg/kubelet/runonce_test.go b/pkg/kubelet/runonce_test.go index ffe96f8036..7684e33f8c 100644 --- a/pkg/kubelet/runonce_test.go +++ b/pkg/kubelet/runonce_test.go @@ -38,7 +38,7 @@ import ( podtest "k8s.io/kubernetes/pkg/kubelet/pod/testing" "k8s.io/kubernetes/pkg/kubelet/server/stats" "k8s.io/kubernetes/pkg/kubelet/status" - kubeletvolume "k8s.io/kubernetes/pkg/kubelet/volume" + "k8s.io/kubernetes/pkg/kubelet/volumemanager" "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util" utiltesting "k8s.io/kubernetes/pkg/util/testing" @@ -92,7 +92,7 @@ func TestRunOnce(t *testing.T) { if err != nil { t.Fatalf("failed to initialize VolumePluginMgr: %v", err) } - kb.volumeManager, err = kubeletvolume.NewVolumeManager( + kb.volumeManager, err = volumemanager.NewVolumeManager( true, kb.hostname, kb.podManager, diff --git a/pkg/kubelet/volumemanager/OWNERS b/pkg/kubelet/volumemanager/OWNERS new file mode 100644 index 0000000000..73ab6a21c9 --- /dev/null +++ b/pkg/kubelet/volumemanager/OWNERS @@ -0,0 +1,2 @@ +assignees: + - saad-ali diff --git a/pkg/kubelet/volume/cache/actual_state_of_world.go b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go similarity index 100% rename from pkg/kubelet/volume/cache/actual_state_of_world.go rename to pkg/kubelet/volumemanager/cache/actual_state_of_world.go diff --git a/pkg/kubelet/volume/cache/actual_state_of_world_test.go b/pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go similarity index 100% rename from pkg/kubelet/volume/cache/actual_state_of_world_test.go rename to pkg/kubelet/volumemanager/cache/actual_state_of_world_test.go diff --git a/pkg/kubelet/volume/cache/desired_state_of_world.go b/pkg/kubelet/volumemanager/cache/desired_state_of_world.go similarity index 100% rename from pkg/kubelet/volume/cache/desired_state_of_world.go rename to pkg/kubelet/volumemanager/cache/desired_state_of_world.go diff --git a/pkg/kubelet/volume/cache/desired_state_of_world_test.go b/pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go similarity index 100% rename from pkg/kubelet/volume/cache/desired_state_of_world_test.go rename to pkg/kubelet/volumemanager/cache/desired_state_of_world_test.go diff --git a/pkg/kubelet/volume/populator/desired_state_of_world_populator.go b/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go similarity index 99% rename from pkg/kubelet/volume/populator/desired_state_of_world_populator.go rename to pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go index 4ef7788a8a..66ce288cc6 100644 --- a/pkg/kubelet/volume/populator/desired_state_of_world_populator.go +++ b/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go @@ -32,7 +32,7 @@ import ( kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/pod" "k8s.io/kubernetes/pkg/kubelet/util/format" - "k8s.io/kubernetes/pkg/kubelet/volume/cache" + "k8s.io/kubernetes/pkg/kubelet/volumemanager/cache" "k8s.io/kubernetes/pkg/types" "k8s.io/kubernetes/pkg/util/wait" "k8s.io/kubernetes/pkg/volume" diff --git a/pkg/kubelet/volume/reconciler/reconciler.go b/pkg/kubelet/volumemanager/reconciler/reconciler.go similarity index 99% rename from pkg/kubelet/volume/reconciler/reconciler.go rename to pkg/kubelet/volumemanager/reconciler/reconciler.go index 0df8c6a861..92b8afd45e 100644 --- a/pkg/kubelet/volume/reconciler/reconciler.go +++ b/pkg/kubelet/volumemanager/reconciler/reconciler.go @@ -24,7 +24,7 @@ import ( "github.com/golang/glog" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" - "k8s.io/kubernetes/pkg/kubelet/volume/cache" + "k8s.io/kubernetes/pkg/kubelet/volumemanager/cache" "k8s.io/kubernetes/pkg/util/goroutinemap" "k8s.io/kubernetes/pkg/util/wait" "k8s.io/kubernetes/pkg/volume/util/operationexecutor" diff --git a/pkg/kubelet/volume/reconciler/reconciler_test.go b/pkg/kubelet/volumemanager/reconciler/reconciler_test.go similarity index 99% rename from pkg/kubelet/volume/reconciler/reconciler_test.go rename to pkg/kubelet/volumemanager/reconciler/reconciler_test.go index 356bd95c58..53fad688bd 100644 --- a/pkg/kubelet/volume/reconciler/reconciler_test.go +++ b/pkg/kubelet/volumemanager/reconciler/reconciler_test.go @@ -25,7 +25,7 @@ import ( "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" "k8s.io/kubernetes/pkg/client/testing/core" - "k8s.io/kubernetes/pkg/kubelet/volume/cache" + "k8s.io/kubernetes/pkg/kubelet/volumemanager/cache" "k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/util/wait" "k8s.io/kubernetes/pkg/volume" diff --git a/pkg/kubelet/volume/volume_manager.go b/pkg/kubelet/volumemanager/volume_manager.go similarity index 98% rename from pkg/kubelet/volume/volume_manager.go rename to pkg/kubelet/volumemanager/volume_manager.go index d1864df0f8..54906491c0 100644 --- a/pkg/kubelet/volume/volume_manager.go +++ b/pkg/kubelet/volumemanager/volume_manager.go @@ -28,9 +28,9 @@ import ( kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" "k8s.io/kubernetes/pkg/kubelet/pod" "k8s.io/kubernetes/pkg/kubelet/util/format" - "k8s.io/kubernetes/pkg/kubelet/volume/cache" - "k8s.io/kubernetes/pkg/kubelet/volume/populator" - "k8s.io/kubernetes/pkg/kubelet/volume/reconciler" + "k8s.io/kubernetes/pkg/kubelet/volumemanager/cache" + "k8s.io/kubernetes/pkg/kubelet/volumemanager/populator" + "k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler" "k8s.io/kubernetes/pkg/util/runtime" "k8s.io/kubernetes/pkg/util/sets" "k8s.io/kubernetes/pkg/util/wait" diff --git a/pkg/util/goroutinemap/OWNERS b/pkg/util/goroutinemap/OWNERS new file mode 100644 index 0000000000..73ab6a21c9 --- /dev/null +++ b/pkg/util/goroutinemap/OWNERS @@ -0,0 +1,2 @@ +assignees: + - saad-ali diff --git a/pkg/volume/util/operationexecutor/OWNERS b/pkg/volume/util/operationexecutor/OWNERS new file mode 100644 index 0000000000..73ab6a21c9 --- /dev/null +++ b/pkg/volume/util/operationexecutor/OWNERS @@ -0,0 +1,2 @@ +assignees: + - saad-ali diff --git a/test/integration/persistent_volumes_test.go b/test/integration/persistent_volumes_test.go index a5cda99143..e55a3cc901 100644 --- a/test/integration/persistent_volumes_test.go +++ b/test/integration/persistent_volumes_test.go @@ -36,7 +36,7 @@ import ( clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" "k8s.io/kubernetes/pkg/client/restclient" fake_cloud "k8s.io/kubernetes/pkg/cloudprovider/providers/fake" - persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/persistentvolume" + persistentvolumecontroller "k8s.io/kubernetes/pkg/controller/volume/persistentvolume" "k8s.io/kubernetes/pkg/conversion" "k8s.io/kubernetes/pkg/volume" volumetest "k8s.io/kubernetes/pkg/volume/testing" From 332d151d615ca8dba838d98f0624fb0d88bf98e1 Mon Sep 17 00:00:00 2001 From: Michail Kargakis Date: Sat, 25 Jun 2016 11:31:32 +0200 Subject: [PATCH 332/339] Break deployment controller into separate self-contained files * rolling.go (has all the logic for rolling deployments) * recreate.go (has all the logic for recreate deployments) * sync.go (has all the logic for getting and scaling replica sets) * rollback.go (has all the logic for rolling back a deployment) * util.go (contains all the utilities used throughout the controller) Leave back at deployment_controller.go all the necessary bits for creating, setting up, and running the controller loop. Also add package documentation. --- .../deployment/deployment_controller.go | 980 +----------------- .../deployment/deployment_controller_test.go | 800 -------------- pkg/controller/deployment/recreate.go | 92 ++ pkg/controller/deployment/rollback.go | 105 ++ pkg/controller/deployment/rolling.go | 243 +++++ pkg/controller/deployment/rolling_test.go | 505 +++++++++ pkg/controller/deployment/sync.go | 527 ++++++++++ pkg/controller/deployment/sync_test.go | 348 +++++++ pkg/controller/deployment/util.go | 111 ++ 9 files changed, 1935 insertions(+), 1776 deletions(-) create mode 100644 pkg/controller/deployment/recreate.go create mode 100644 pkg/controller/deployment/rollback.go create mode 100644 pkg/controller/deployment/rolling.go create mode 100644 pkg/controller/deployment/rolling_test.go create mode 100644 pkg/controller/deployment/sync.go create mode 100644 pkg/controller/deployment/sync_test.go diff --git a/pkg/controller/deployment/deployment_controller.go b/pkg/controller/deployment/deployment_controller.go index 9e937b2b9d..25786fc175 100644 --- a/pkg/controller/deployment/deployment_controller.go +++ b/pkg/controller/deployment/deployment_controller.go @@ -14,19 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package deployment contains all the logic for handling Kubernetes Deployments. +// It implements a set of strategies (rolling, recreate) for deploying an application, +// the means to rollback to previous versions, proportional scaling for mitigating +// risk, cleanup policy, and other useful features of Deployments. package deployment import ( "fmt" "reflect" - "sort" - "strconv" "time" "github.com/golang/glog" "k8s.io/kubernetes/pkg/api" - "k8s.io/kubernetes/pkg/api/annotations" - "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/client/cache" @@ -36,13 +36,7 @@ import ( "k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller/framework" "k8s.io/kubernetes/pkg/runtime" - deploymentutil "k8s.io/kubernetes/pkg/util/deployment" - utilerrors "k8s.io/kubernetes/pkg/util/errors" - "k8s.io/kubernetes/pkg/util/integer" - labelsutil "k8s.io/kubernetes/pkg/util/labels" "k8s.io/kubernetes/pkg/util/metrics" - podutil "k8s.io/kubernetes/pkg/util/pod" - rsutil "k8s.io/kubernetes/pkg/util/replicaset" utilruntime "k8s.io/kubernetes/pkg/util/runtime" "k8s.io/kubernetes/pkg/util/wait" "k8s.io/kubernetes/pkg/util/workqueue" @@ -460,969 +454,3 @@ func (dc *DeploymentController) syncDeployment(key string) error { } return fmt.Errorf("unexpected deployment strategy type: %s", d.Spec.Strategy.Type) } - -// sync is responsible for reconciling deployments on scaling events or when they -// are paused. -func (dc *DeploymentController) sync(deployment *extensions.Deployment) error { - newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(deployment, false) - if err != nil { - return err - } - if err := dc.scale(deployment, newRS, oldRSs); err != nil { - // If we get an error while trying to scale, the deployment will be requeued - // so we can abort this resync - return err - } - dc.cleanupDeployment(oldRSs, deployment) - - allRSs := append(oldRSs, newRS) - return dc.syncDeploymentStatus(allRSs, newRS, deployment) -} - -// scale scales proportionally in order to mitigate risk. Otherwise, scaling up can increase the size -// of the new replica set and scaling down can decrease the sizes of the old ones, both of which would -// have the effect of hastening the rollout progress, which could produce a higher proportion of unavailable -// replicas in the event of a problem with the rolled out template. Should run only on scaling events or -// when a deployment is paused and not during the normal rollout process. -func (dc *DeploymentController) scale(deployment *extensions.Deployment, newRS *extensions.ReplicaSet, oldRSs []*extensions.ReplicaSet) error { - // If there is only one active replica set then we should scale that up to the full count of the - // deployment. If there is no active replica set, then we should scale up the newest replica set. - if activeOrLatest := findActiveOrLatest(newRS, oldRSs); activeOrLatest != nil { - if activeOrLatest.Spec.Replicas == deployment.Spec.Replicas { - return nil - } - _, _, err := dc.scaleReplicaSetAndRecordEvent(activeOrLatest, deployment.Spec.Replicas, deployment) - return err - } - - // If the new replica set is saturated, old replica sets should be fully scaled down. - // This case handles replica set adoption during a saturated new replica set. - if deploymentutil.IsSaturated(deployment, newRS) { - for _, old := range controller.FilterActiveReplicaSets(oldRSs) { - if _, _, err := dc.scaleReplicaSetAndRecordEvent(old, 0, deployment); err != nil { - return err - } - } - return nil - } - - // There are old replica sets with pods and the new replica set is not saturated. - // We need to proportionally scale all replica sets (new and old) in case of a - // rolling deployment. - if deploymentutil.IsRollingUpdate(deployment) { - allRSs := controller.FilterActiveReplicaSets(append(oldRSs, newRS)) - allRSsReplicas := deploymentutil.GetReplicaCountForReplicaSets(allRSs) - - allowedSize := int32(0) - if deployment.Spec.Replicas > 0 { - allowedSize = deployment.Spec.Replicas + maxSurge(*deployment) - } - - // Number of additional replicas that can be either added or removed from the total - // replicas count. These replicas should be distributed proportionally to the active - // replica sets. - deploymentReplicasToAdd := allowedSize - allRSsReplicas - - // The additional replicas should be distributed proportionally amongst the active - // replica sets from the larger to the smaller in size replica set. Scaling direction - // drives what happens in case we are trying to scale replica sets of the same size. - // In such a case when scaling up, we should scale up newer replica sets first, and - // when scaling down, we should scale down older replica sets first. - scalingOperation := "up" - switch { - case deploymentReplicasToAdd > 0: - sort.Sort(controller.ReplicaSetsBySizeNewer(allRSs)) - - case deploymentReplicasToAdd < 0: - sort.Sort(controller.ReplicaSetsBySizeOlder(allRSs)) - scalingOperation = "down" - - default: /* deploymentReplicasToAdd == 0 */ - // Nothing to add. - return nil - } - - // Iterate over all active replica sets and estimate proportions for each of them. - // The absolute value of deploymentReplicasAdded should never exceed the absolute - // value of deploymentReplicasToAdd. - deploymentReplicasAdded := int32(0) - for i := range allRSs { - rs := allRSs[i] - - proportion := getProportion(rs, *deployment, deploymentReplicasToAdd, deploymentReplicasAdded) - - rs.Spec.Replicas += proportion - deploymentReplicasAdded += proportion - } - - // Update all replica sets - for i := range allRSs { - rs := allRSs[i] - - // Add/remove any leftovers to the largest replica set. - if i == 0 { - leftover := deploymentReplicasToAdd - deploymentReplicasAdded - rs.Spec.Replicas += leftover - if rs.Spec.Replicas < 0 { - rs.Spec.Replicas = 0 - } - } - - if _, err := dc.scaleReplicaSet(rs, rs.Spec.Replicas, deployment, scalingOperation); err != nil { - // Return as soon as we fail, the deployment is requeued - return err - } - } - } - return nil -} - -// Rolling back to a revision; no-op if the toRevision is deployment's current revision -func (dc *DeploymentController) rollback(deployment *extensions.Deployment, toRevision *int64) (*extensions.Deployment, error) { - newRS, allOldRSs, err := dc.getAllReplicaSetsAndSyncRevision(deployment, true) - if err != nil { - return nil, err - } - allRSs := append(allOldRSs, newRS) - // If rollback revision is 0, rollback to the last revision - if *toRevision == 0 { - if *toRevision = lastRevision(allRSs); *toRevision == 0 { - // If we still can't find the last revision, gives up rollback - dc.emitRollbackWarningEvent(deployment, deploymentutil.RollbackRevisionNotFound, "Unable to find last revision.") - // Gives up rollback - return dc.updateDeploymentAndClearRollbackTo(deployment) - } - } - for _, rs := range allRSs { - v, err := deploymentutil.Revision(rs) - if err != nil { - glog.V(4).Infof("Unable to extract revision from deployment's replica set %q: %v", rs.Name, err) - continue - } - if v == *toRevision { - glog.V(4).Infof("Found replica set %q with desired revision %d", rs.Name, v) - // rollback by copying podTemplate.Spec from the replica set, and increment revision number by 1 - // no-op if the the spec matches current deployment's podTemplate.Spec - deployment, performedRollback, err := dc.rollbackToTemplate(deployment, rs) - if performedRollback && err == nil { - dc.emitRollbackNormalEvent(deployment, fmt.Sprintf("Rolled back deployment %q to revision %d", deployment.Name, *toRevision)) - } - return deployment, err - } - } - dc.emitRollbackWarningEvent(deployment, deploymentutil.RollbackRevisionNotFound, "Unable to find the revision to rollback to.") - // Gives up rollback - return dc.updateDeploymentAndClearRollbackTo(deployment) -} - -func (dc *DeploymentController) emitRollbackWarningEvent(deployment *extensions.Deployment, reason, message string) { - dc.eventRecorder.Eventf(deployment, api.EventTypeWarning, reason, message) -} - -func (dc *DeploymentController) emitRollbackNormalEvent(deployment *extensions.Deployment, message string) { - dc.eventRecorder.Eventf(deployment, api.EventTypeNormal, deploymentutil.RollbackDone, message) -} - -// updateDeploymentAndClearRollbackTo sets .spec.rollbackTo to nil and update the input deployment -func (dc *DeploymentController) updateDeploymentAndClearRollbackTo(deployment *extensions.Deployment) (*extensions.Deployment, error) { - glog.V(4).Infof("Cleans up rollbackTo of deployment %s", deployment.Name) - deployment.Spec.RollbackTo = nil - return dc.updateDeployment(deployment) -} - -func (dc *DeploymentController) rolloutRecreate(deployment *extensions.Deployment) error { - // Don't create a new RS if not already existed, so that we avoid scaling up before scaling down - newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(deployment, false) - if err != nil { - return err - } - allRSs := append(oldRSs, newRS) - - // scale down old replica sets - scaledDown, err := dc.scaleDownOldReplicaSetsForRecreate(controller.FilterActiveReplicaSets(oldRSs), deployment) - if err != nil { - return err - } - if scaledDown { - // Update DeploymentStatus - return dc.updateDeploymentStatus(allRSs, newRS, deployment) - } - - // If we need to create a new RS, create it now - // TODO: Create a new RS without re-listing all RSs. - if newRS == nil { - newRS, oldRSs, err = dc.getAllReplicaSetsAndSyncRevision(deployment, true) - if err != nil { - return err - } - allRSs = append(oldRSs, newRS) - } - - // scale up new replica set - scaledUp, err := dc.scaleUpNewReplicaSetForRecreate(newRS, deployment) - if err != nil { - return err - } - if scaledUp { - // Update DeploymentStatus - return dc.updateDeploymentStatus(allRSs, newRS, deployment) - } - - dc.cleanupDeployment(oldRSs, deployment) - - // Sync deployment status - return dc.syncDeploymentStatus(allRSs, newRS, deployment) -} - -func (dc *DeploymentController) rolloutRolling(deployment *extensions.Deployment) error { - newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(deployment, true) - if err != nil { - return err - } - allRSs := append(oldRSs, newRS) - - // Scale up, if we can. - scaledUp, err := dc.reconcileNewReplicaSet(allRSs, newRS, deployment) - if err != nil { - return err - } - if scaledUp { - // Update DeploymentStatus - return dc.updateDeploymentStatus(allRSs, newRS, deployment) - } - - // Scale down, if we can. - scaledDown, err := dc.reconcileOldReplicaSets(allRSs, controller.FilterActiveReplicaSets(oldRSs), newRS, deployment) - if err != nil { - return err - } - if scaledDown { - // Update DeploymentStatus - return dc.updateDeploymentStatus(allRSs, newRS, deployment) - } - - dc.cleanupDeployment(oldRSs, deployment) - - // Sync deployment status - return dc.syncDeploymentStatus(allRSs, newRS, deployment) -} - -// syncDeploymentStatus checks if the status is up-to-date and sync it if necessary -func (dc *DeploymentController) syncDeploymentStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, d *extensions.Deployment) error { - newStatus, err := dc.calculateStatus(allRSs, newRS, d) - if err != nil { - return err - } - if !reflect.DeepEqual(d.Status, newStatus) { - return dc.updateDeploymentStatus(allRSs, newRS, d) - } - return nil -} - -// getAllReplicaSetsAndSyncRevision returns all the replica sets for the provided deployment (new and all old), with new RS's and deployment's revision updated. -// 1. Get all old RSes this deployment targets, and calculate the max revision number among them (maxOldV). -// 2. Get new RS this deployment targets (whose pod template matches deployment's), and update new RS's revision number to (maxOldV + 1), -// only if its revision number is smaller than (maxOldV + 1). If this step failed, we'll update it in the next deployment sync loop. -// 3. Copy new RS's revision number to deployment (update deployment's revision). If this step failed, we'll update it in the next deployment sync loop. -// Note that currently the deployment controller is using caches to avoid querying the server for reads. -// This may lead to stale reads of replica sets, thus incorrect deployment status. -func (dc *DeploymentController) getAllReplicaSetsAndSyncRevision(deployment *extensions.Deployment, createIfNotExisted bool) (*extensions.ReplicaSet, []*extensions.ReplicaSet, error) { - // List the deployment's RSes & Pods and apply pod-template-hash info to deployment's adopted RSes/Pods - rsList, podList, err := dc.rsAndPodsWithHashKeySynced(deployment) - if err != nil { - return nil, nil, fmt.Errorf("error labeling replica sets and pods with pod-template-hash: %v", err) - } - _, allOldRSs, err := deploymentutil.FindOldReplicaSets(deployment, rsList, podList) - if err != nil { - return nil, nil, err - } - - // Calculate the max revision number among all old RSes - maxOldV := maxRevision(allOldRSs) - - // Get new replica set with the updated revision number - newRS, err := dc.getNewReplicaSet(deployment, rsList, maxOldV, allOldRSs, createIfNotExisted) - if err != nil { - return nil, nil, err - } - - // Sync deployment's revision number with new replica set - if newRS != nil && newRS.Annotations != nil && len(newRS.Annotations[deploymentutil.RevisionAnnotation]) > 0 && - (deployment.Annotations == nil || deployment.Annotations[deploymentutil.RevisionAnnotation] != newRS.Annotations[deploymentutil.RevisionAnnotation]) { - if err = dc.updateDeploymentRevision(deployment, newRS.Annotations[deploymentutil.RevisionAnnotation]); err != nil { - glog.V(4).Infof("Error: %v. Unable to update deployment revision, will retry later.", err) - } - } - - return newRS, allOldRSs, nil -} - -func maxRevision(allRSs []*extensions.ReplicaSet) int64 { - max := int64(0) - for _, rs := range allRSs { - if v, err := deploymentutil.Revision(rs); err != nil { - // Skip the replica sets when it failed to parse their revision information - glog.V(4).Infof("Error: %v. Couldn't parse revision for replica set %#v, deployment controller will skip it when reconciling revisions.", err, rs) - } else if v > max { - max = v - } - } - return max -} - -// lastRevision finds the second max revision number in all replica sets (the last revision) -func lastRevision(allRSs []*extensions.ReplicaSet) int64 { - max, secMax := int64(0), int64(0) - for _, rs := range allRSs { - if v, err := deploymentutil.Revision(rs); err != nil { - // Skip the replica sets when it failed to parse their revision information - glog.V(4).Infof("Error: %v. Couldn't parse revision for replica set %#v, deployment controller will skip it when reconciling revisions.", err, rs) - } else if v >= max { - secMax = max - max = v - } else if v > secMax { - secMax = v - } - } - return secMax -} - -// Returns a replica set that matches the intent of the given deployment. Returns nil if the new replica set doesn't exist yet. -// 1. Get existing new RS (the RS that the given deployment targets, whose pod template is the same as deployment's). -// 2. If there's existing new RS, update its revision number if it's smaller than (maxOldRevision + 1), where maxOldRevision is the max revision number among all old RSes. -// 3. If there's no existing new RS and createIfNotExisted is true, create one with appropriate revision number (maxOldRevision + 1) and replicas. -// Note that the pod-template-hash will be added to adopted RSes and pods. -func (dc *DeploymentController) getNewReplicaSet(deployment *extensions.Deployment, rsList []extensions.ReplicaSet, maxOldRevision int64, oldRSs []*extensions.ReplicaSet, createIfNotExisted bool) (*extensions.ReplicaSet, error) { - // Calculate revision number for this new replica set - newRevision := strconv.FormatInt(maxOldRevision+1, 10) - - existingNewRS, err := deploymentutil.FindNewReplicaSet(deployment, rsList) - if err != nil { - return nil, err - } else if existingNewRS != nil { - // Set existing new replica set's annotation - if setNewReplicaSetAnnotations(deployment, existingNewRS, newRevision, true) { - return dc.client.Extensions().ReplicaSets(deployment.ObjectMeta.Namespace).Update(existingNewRS) - } - return existingNewRS, nil - } - - if !createIfNotExisted { - return nil, nil - } - - // new ReplicaSet does not exist, create one. - namespace := deployment.ObjectMeta.Namespace - podTemplateSpecHash := podutil.GetPodTemplateSpecHash(deployment.Spec.Template) - newRSTemplate := deploymentutil.GetNewReplicaSetTemplate(deployment) - // Add podTemplateHash label to selector. - newRSSelector := labelsutil.CloneSelectorAndAddLabel(deployment.Spec.Selector, extensions.DefaultDeploymentUniqueLabelKey, podTemplateSpecHash) - - // Create new ReplicaSet - newRS := extensions.ReplicaSet{ - ObjectMeta: api.ObjectMeta{ - // Make the name deterministic, to ensure idempotence - Name: deployment.Name + "-" + fmt.Sprintf("%d", podTemplateSpecHash), - Namespace: namespace, - }, - Spec: extensions.ReplicaSetSpec{ - Replicas: 0, - Selector: newRSSelector, - Template: newRSTemplate, - }, - } - allRSs := append(oldRSs, &newRS) - newReplicasCount, err := deploymentutil.NewRSNewReplicas(deployment, allRSs, &newRS) - if err != nil { - return nil, err - } - - newRS.Spec.Replicas = newReplicasCount - // Set new replica set's annotation - setNewReplicaSetAnnotations(deployment, &newRS, newRevision, false) - createdRS, err := dc.client.Extensions().ReplicaSets(namespace).Create(&newRS) - if err != nil { - dc.enqueueDeployment(deployment) - return nil, fmt.Errorf("error creating replica set %v: %v", deployment.Name, err) - } - if newReplicasCount > 0 { - dc.eventRecorder.Eventf(deployment, api.EventTypeNormal, "ScalingReplicaSet", "Scaled %s replica set %s to %d", "up", createdRS.Name, newReplicasCount) - } - - return createdRS, dc.updateDeploymentRevision(deployment, newRevision) -} - -// rsAndPodsWithHashKeySynced returns the RSes and pods the given deployment targets, with pod-template-hash information synced. -func (dc *DeploymentController) rsAndPodsWithHashKeySynced(deployment *extensions.Deployment) ([]extensions.ReplicaSet, *api.PodList, error) { - rsList, err := deploymentutil.ListReplicaSets(deployment, - func(namespace string, options api.ListOptions) ([]extensions.ReplicaSet, error) { - return dc.rsStore.ReplicaSets(namespace).List(options.LabelSelector) - }) - if err != nil { - return nil, nil, fmt.Errorf("error listing ReplicaSets: %v", err) - } - syncedRSList := []extensions.ReplicaSet{} - for _, rs := range rsList { - // Add pod-template-hash information if it's not in the RS. - // Otherwise, new RS produced by Deployment will overlap with pre-existing ones - // that aren't constrained by the pod-template-hash. - syncedRS, err := dc.addHashKeyToRSAndPods(rs) - if err != nil { - return nil, nil, err - } - syncedRSList = append(syncedRSList, *syncedRS) - } - syncedPodList, err := dc.listPods(deployment) - if err != nil { - return nil, nil, err - } - return syncedRSList, syncedPodList, nil -} - -func (dc *DeploymentController) listPods(deployment *extensions.Deployment) (*api.PodList, error) { - return deploymentutil.ListPods(deployment, - func(namespace string, options api.ListOptions) (*api.PodList, error) { - podList, err := dc.podStore.Pods(namespace).List(options.LabelSelector) - return &podList, err - }) -} - -// addHashKeyToRSAndPods adds pod-template-hash information to the given rs, if it's not already there, with the following steps: -// 1. Add hash label to the rs's pod template, and make sure the controller sees this update so that no orphaned pods will be created -// 2. Add hash label to all pods this rs owns, wait until replicaset controller reports rs.Status.FullyLabeledReplicas equal to the desired number of replicas -// 3. Add hash label to the rs's label and selector -func (dc *DeploymentController) addHashKeyToRSAndPods(rs extensions.ReplicaSet) (updatedRS *extensions.ReplicaSet, err error) { - updatedRS = &rs - // If the rs already has the new hash label in its selector, it's done syncing - if labelsutil.SelectorHasLabel(rs.Spec.Selector, extensions.DefaultDeploymentUniqueLabelKey) { - return - } - namespace := rs.Namespace - hash := rsutil.GetPodTemplateSpecHash(rs) - rsUpdated := false - // 1. Add hash template label to the rs. This ensures that any newly created pods will have the new label. - updatedRS, rsUpdated, err = rsutil.UpdateRSWithRetries(dc.client.Extensions().ReplicaSets(namespace), updatedRS, - func(updated *extensions.ReplicaSet) error { - // Precondition: the RS doesn't contain the new hash in its pod template label. - if updated.Spec.Template.Labels[extensions.DefaultDeploymentUniqueLabelKey] == hash { - return utilerrors.ErrPreconditionViolated - } - updated.Spec.Template.Labels = labelsutil.AddLabel(updated.Spec.Template.Labels, extensions.DefaultDeploymentUniqueLabelKey, hash) - return nil - }) - if err != nil { - return nil, fmt.Errorf("error updating %s %s/%s pod template label with template hash: %v", updatedRS.Kind, updatedRS.Namespace, updatedRS.Name, err) - } - if !rsUpdated { - // If RS wasn't updated but didn't return error in step 1, we've hit a RS not found error. - // Return here and retry in the next sync loop. - return &rs, nil - } - // Make sure rs pod template is updated so that it won't create pods without the new label (orphaned pods). - if updatedRS.Generation > updatedRS.Status.ObservedGeneration { - if err = deploymentutil.WaitForReplicaSetUpdated(dc.client, updatedRS.Generation, namespace, updatedRS.Name); err != nil { - return nil, fmt.Errorf("error waiting for %s %s/%s generation %d observed by controller: %v", updatedRS.Kind, updatedRS.Namespace, updatedRS.Name, updatedRS.Generation, err) - } - } - glog.V(4).Infof("Observed the update of %s %s/%s's pod template with hash %s.", rs.Kind, rs.Namespace, rs.Name, hash) - - // 2. Update all pods managed by the rs to have the new hash label, so they will be correctly adopted. - selector, err := unversioned.LabelSelectorAsSelector(updatedRS.Spec.Selector) - if err != nil { - return nil, fmt.Errorf("error in converting selector to label selector for replica set %s: %s", updatedRS.Name, err) - } - options := api.ListOptions{LabelSelector: selector} - podList, err := dc.podStore.Pods(namespace).List(options.LabelSelector) - if err != nil { - return nil, fmt.Errorf("error in getting pod list for namespace %s and list options %+v: %s", namespace, options, err) - } - allPodsLabeled := false - if allPodsLabeled, err = deploymentutil.LabelPodsWithHash(&podList, updatedRS, dc.client, namespace, hash); err != nil { - return nil, fmt.Errorf("error in adding template hash label %s to pods %+v: %s", hash, podList, err) - } - // If not all pods are labeled but didn't return error in step 2, we've hit at least one pod not found error. - // Return here and retry in the next sync loop. - if !allPodsLabeled { - return updatedRS, nil - } - - // We need to wait for the replicaset controller to observe the pods being - // labeled with pod template hash. Because previously we've called - // WaitForReplicaSetUpdated, the replicaset controller should have dropped - // FullyLabeledReplicas to 0 already, we only need to wait it to increase - // back to the number of replicas in the spec. - if err = deploymentutil.WaitForPodsHashPopulated(dc.client, updatedRS.Generation, namespace, updatedRS.Name); err != nil { - return nil, fmt.Errorf("%s %s/%s: error waiting for replicaset controller to observe pods being labeled with template hash: %v", updatedRS.Kind, updatedRS.Namespace, updatedRS.Name, err) - } - - // 3. Update rs label and selector to include the new hash label - // Copy the old selector, so that we can scrub out any orphaned pods - if updatedRS, rsUpdated, err = rsutil.UpdateRSWithRetries(dc.client.Extensions().ReplicaSets(namespace), updatedRS, - func(updated *extensions.ReplicaSet) error { - // Precondition: the RS doesn't contain the new hash in its label or selector. - if updated.Labels[extensions.DefaultDeploymentUniqueLabelKey] == hash && updated.Spec.Selector.MatchLabels[extensions.DefaultDeploymentUniqueLabelKey] == hash { - return utilerrors.ErrPreconditionViolated - } - updated.Labels = labelsutil.AddLabel(updated.Labels, extensions.DefaultDeploymentUniqueLabelKey, hash) - updated.Spec.Selector = labelsutil.AddLabelToSelector(updated.Spec.Selector, extensions.DefaultDeploymentUniqueLabelKey, hash) - return nil - }); err != nil { - return nil, fmt.Errorf("error updating %s %s/%s label and selector with template hash: %v", updatedRS.Kind, updatedRS.Namespace, updatedRS.Name, err) - } - if rsUpdated { - glog.V(4).Infof("Updated %s %s/%s's selector and label with hash %s.", rs.Kind, rs.Namespace, rs.Name, hash) - } - // If the RS isn't actually updated in step 3, that's okay, we'll retry in the next sync loop since its selector isn't updated yet. - - // TODO: look for orphaned pods and label them in the background somewhere else periodically - - return updatedRS, nil -} - -// setNewReplicaSetAnnotations sets new replica set's annotations appropriately by updating its revision and -// copying required deployment annotations to it; it returns true if replica set's annotation is changed. -func setNewReplicaSetAnnotations(deployment *extensions.Deployment, newRS *extensions.ReplicaSet, newRevision string, exists bool) bool { - // First, copy deployment's annotations (except for apply and revision annotations) - annotationChanged := copyDeploymentAnnotationsToReplicaSet(deployment, newRS) - // Then, update replica set's revision annotation - if newRS.Annotations == nil { - newRS.Annotations = make(map[string]string) - } - // The newRS's revision should be the greatest among all RSes. Usually, its revision number is newRevision (the max revision number - // of all old RSes + 1). However, it's possible that some of the old RSes are deleted after the newRS revision being updated, and - // newRevision becomes smaller than newRS's revision. We should only update newRS revision when it's smaller than newRevision. - if newRS.Annotations[deploymentutil.RevisionAnnotation] < newRevision { - newRS.Annotations[deploymentutil.RevisionAnnotation] = newRevision - annotationChanged = true - glog.V(4).Infof("Updating replica set %q revision to %s", newRS.Name, newRevision) - } - if !exists && setReplicasAnnotations(newRS, deployment.Spec.Replicas, deployment.Spec.Replicas+maxSurge(*deployment)) { - annotationChanged = true - } - return annotationChanged -} - -var annotationsToSkip = map[string]bool{ - annotations.LastAppliedConfigAnnotation: true, - deploymentutil.RevisionAnnotation: true, - deploymentutil.DesiredReplicasAnnotation: true, - deploymentutil.MaxReplicasAnnotation: true, -} - -// skipCopyAnnotation returns true if we should skip copying the annotation with the given annotation key -// TODO: How to decide which annotations should / should not be copied? -// See https://github.com/kubernetes/kubernetes/pull/20035#issuecomment-179558615 -func skipCopyAnnotation(key string) bool { - return annotationsToSkip[key] -} - -func getSkippedAnnotations(annotations map[string]string) map[string]string { - skippedAnnotations := make(map[string]string) - for k, v := range annotations { - if skipCopyAnnotation(k) { - skippedAnnotations[k] = v - } - } - return skippedAnnotations -} - -// copyDeploymentAnnotationsToReplicaSet copies deployment's annotations to replica set's annotations, -// and returns true if replica set's annotation is changed. -// Note that apply and revision annotations are not copied. -func copyDeploymentAnnotationsToReplicaSet(deployment *extensions.Deployment, rs *extensions.ReplicaSet) bool { - rsAnnotationsChanged := false - if rs.Annotations == nil { - rs.Annotations = make(map[string]string) - } - for k, v := range deployment.Annotations { - // newRS revision is updated automatically in getNewReplicaSet, and the deployment's revision number is then updated - // by copying its newRS revision number. We should not copy deployment's revision to its newRS, since the update of - // deployment revision number may fail (revision becomes stale) and the revision number in newRS is more reliable. - if skipCopyAnnotation(k) || rs.Annotations[k] == v { - continue - } - rs.Annotations[k] = v - rsAnnotationsChanged = true - } - return rsAnnotationsChanged -} - -// setDeploymentAnnotationsTo sets deployment's annotations as given RS's annotations. -// This action should be done if and only if the deployment is rolling back to this rs. -// Note that apply and revision annotations are not changed. -func setDeploymentAnnotationsTo(deployment *extensions.Deployment, rollbackToRS *extensions.ReplicaSet) { - deployment.Annotations = getSkippedAnnotations(deployment.Annotations) - for k, v := range rollbackToRS.Annotations { - if !skipCopyAnnotation(k) { - deployment.Annotations[k] = v - } - } -} - -func (dc *DeploymentController) updateDeploymentRevision(deployment *extensions.Deployment, revision string) error { - if deployment.Annotations == nil { - deployment.Annotations = make(map[string]string) - } - if deployment.Annotations[deploymentutil.RevisionAnnotation] != revision { - deployment.Annotations[deploymentutil.RevisionAnnotation] = revision - _, err := dc.updateDeployment(deployment) - return err - } - return nil -} - -func (dc *DeploymentController) reconcileNewReplicaSet(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment *extensions.Deployment) (bool, error) { - if newRS.Spec.Replicas == deployment.Spec.Replicas { - // Scaling not required. - return false, nil - } - if newRS.Spec.Replicas > deployment.Spec.Replicas { - // Scale down. - scaled, _, err := dc.scaleReplicaSetAndRecordEvent(newRS, deployment.Spec.Replicas, deployment) - return scaled, err - } - newReplicasCount, err := deploymentutil.NewRSNewReplicas(deployment, allRSs, newRS) - if err != nil { - return false, err - } - scaled, _, err := dc.scaleReplicaSetAndRecordEvent(newRS, newReplicasCount, deployment) - return scaled, err -} - -func (dc *DeploymentController) getAvailablePodsForReplicaSets(deployment *extensions.Deployment, rss []*extensions.ReplicaSet) (int32, error) { - podList, err := dc.listPods(deployment) - if err != nil { - return 0, err - } - return deploymentutil.CountAvailablePodsForReplicaSets(podList, rss, deployment.Spec.MinReadySeconds) -} - -func (dc *DeploymentController) reconcileOldReplicaSets(allRSs []*extensions.ReplicaSet, oldRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment *extensions.Deployment) (bool, error) { - oldPodsCount := deploymentutil.GetReplicaCountForReplicaSets(oldRSs) - if oldPodsCount == 0 { - // Can't scale down further - return false, nil - } - - minReadySeconds := deployment.Spec.MinReadySeconds - allPodsCount := deploymentutil.GetReplicaCountForReplicaSets(allRSs) - // TODO: use dc.getAvailablePodsForReplicaSets instead - newRSAvailablePodCount, err := deploymentutil.GetAvailablePodsForReplicaSets(dc.client, deployment, []*extensions.ReplicaSet{newRS}, minReadySeconds) - if err != nil { - return false, fmt.Errorf("could not find available pods: %v", err) - } - maxUnavailable := maxUnavailable(*deployment) - - // Check if we can scale down. We can scale down in the following 2 cases: - // * Some old replica sets have unhealthy replicas, we could safely scale down those unhealthy replicas since that won't further - // increase unavailability. - // * New replica set has scaled up and it's replicas becomes ready, then we can scale down old replica sets in a further step. - // - // maxScaledDown := allPodsCount - minAvailable - newReplicaSetPodsUnavailable - // take into account not only maxUnavailable and any surge pods that have been created, but also unavailable pods from - // the newRS, so that the unavailable pods from the newRS would not make us scale down old replica sets in a further - // step(that will increase unavailability). - // - // Concrete example: - // - // * 10 replicas - // * 2 maxUnavailable (absolute number, not percent) - // * 3 maxSurge (absolute number, not percent) - // - // case 1: - // * Deployment is updated, newRS is created with 3 replicas, oldRS is scaled down to 8, and newRS is scaled up to 5. - // * The new replica set pods crashloop and never become available. - // * allPodsCount is 13. minAvailable is 8. newRSPodsUnavailable is 5. - // * A node fails and causes one of the oldRS pods to become unavailable. However, 13 - 8 - 5 = 0, so the oldRS won't be scaled down. - // * The user notices the crashloop and does kubectl rollout undo to rollback. - // * newRSPodsUnavailable is 1, since we rolled back to the good replica set, so maxScaledDown = 13 - 8 - 1 = 4. 4 of the crashlooping pods will be scaled down. - // * The total number of pods will then be 9 and the newRS can be scaled up to 10. - // - // case 2: - // Same example, but pushing a new pod template instead of rolling back (aka "roll over"): - // * The new replica set created must start with 0 replicas because allPodsCount is already at 13. - // * However, newRSPodsUnavailable would also be 0, so the 2 old replica sets could be scaled down by 5 (13 - 8 - 0), which would then - // allow the new replica set to be scaled up by 5. - minAvailable := deployment.Spec.Replicas - maxUnavailable - newRSUnavailablePodCount := newRS.Spec.Replicas - newRSAvailablePodCount - maxScaledDown := allPodsCount - minAvailable - newRSUnavailablePodCount - if maxScaledDown <= 0 { - return false, nil - } - - // Clean up unhealthy replicas first, otherwise unhealthy replicas will block deployment - // and cause timeout. See https://github.com/kubernetes/kubernetes/issues/16737 - oldRSs, cleanupCount, err := dc.cleanupUnhealthyReplicas(oldRSs, deployment, deployment.Spec.MinReadySeconds, maxScaledDown) - if err != nil { - return false, nil - } - glog.V(4).Infof("Cleaned up unhealthy replicas from old RSes by %d", cleanupCount) - - // Scale down old replica sets, need check maxUnavailable to ensure we can scale down - allRSs = append(oldRSs, newRS) - scaledDownCount, err := dc.scaleDownOldReplicaSetsForRollingUpdate(allRSs, oldRSs, deployment) - if err != nil { - return false, nil - } - glog.V(4).Infof("Scaled down old RSes of deployment %s by %d", deployment.Name, scaledDownCount) - - totalScaledDown := cleanupCount + scaledDownCount - return totalScaledDown > 0, nil -} - -// cleanupUnhealthyReplicas will scale down old replica sets with unhealthy replicas, so that all unhealthy replicas will be deleted. -func (dc *DeploymentController) cleanupUnhealthyReplicas(oldRSs []*extensions.ReplicaSet, deployment *extensions.Deployment, minReadySeconds, maxCleanupCount int32) ([]*extensions.ReplicaSet, int32, error) { - sort.Sort(controller.ReplicaSetsByCreationTimestamp(oldRSs)) - // Safely scale down all old replica sets with unhealthy replicas. Replica set will sort the pods in the order - // such that not-ready < ready, unscheduled < scheduled, and pending < running. This ensures that unhealthy replicas will - // been deleted first and won't increase unavailability. - totalScaledDown := int32(0) - for i, targetRS := range oldRSs { - if totalScaledDown >= maxCleanupCount { - break - } - if targetRS.Spec.Replicas == 0 { - // cannot scale down this replica set. - continue - } - // TODO: use dc.getAvailablePodsForReplicaSets instead - availablePodCount, err := deploymentutil.GetAvailablePodsForReplicaSets(dc.client, deployment, []*extensions.ReplicaSet{targetRS}, minReadySeconds) - if err != nil { - return nil, totalScaledDown, fmt.Errorf("could not find available pods: %v", err) - } - if targetRS.Spec.Replicas == availablePodCount { - // no unhealthy replicas found, no scaling required. - continue - } - - scaledDownCount := int32(integer.IntMin(int(maxCleanupCount-totalScaledDown), int(targetRS.Spec.Replicas-availablePodCount))) - newReplicasCount := targetRS.Spec.Replicas - scaledDownCount - if newReplicasCount > targetRS.Spec.Replicas { - return nil, 0, fmt.Errorf("when cleaning up unhealthy replicas, got invalid request to scale down %s/%s %d -> %d", targetRS.Namespace, targetRS.Name, targetRS.Spec.Replicas, newReplicasCount) - } - _, updatedOldRS, err := dc.scaleReplicaSetAndRecordEvent(targetRS, newReplicasCount, deployment) - if err != nil { - return nil, totalScaledDown, err - } - totalScaledDown += scaledDownCount - oldRSs[i] = updatedOldRS - } - return oldRSs, totalScaledDown, nil -} - -// scaleDownOldReplicaSetsForRollingUpdate scales down old replica sets when deployment strategy is "RollingUpdate". -// Need check maxUnavailable to ensure availability -func (dc *DeploymentController) scaleDownOldReplicaSetsForRollingUpdate(allRSs []*extensions.ReplicaSet, oldRSs []*extensions.ReplicaSet, deployment *extensions.Deployment) (int32, error) { - maxUnavailable := maxUnavailable(*deployment) - - // Check if we can scale down. - minAvailable := deployment.Spec.Replicas - maxUnavailable - minReadySeconds := deployment.Spec.MinReadySeconds - // Find the number of ready pods. - // TODO: use dc.getAvailablePodsForReplicaSets instead - availablePodCount, err := deploymentutil.GetAvailablePodsForReplicaSets(dc.client, deployment, allRSs, minReadySeconds) - if err != nil { - return 0, fmt.Errorf("could not find available pods: %v", err) - } - if availablePodCount <= minAvailable { - // Cannot scale down. - return 0, nil - } - glog.V(4).Infof("Found %d available pods in deployment %s, scaling down old RSes", availablePodCount, deployment.Name) - - sort.Sort(controller.ReplicaSetsByCreationTimestamp(oldRSs)) - - totalScaledDown := int32(0) - totalScaleDownCount := availablePodCount - minAvailable - for _, targetRS := range oldRSs { - if totalScaledDown >= totalScaleDownCount { - // No further scaling required. - break - } - if targetRS.Spec.Replicas == 0 { - // cannot scale down this ReplicaSet. - continue - } - // Scale down. - scaleDownCount := int32(integer.IntMin(int(targetRS.Spec.Replicas), int(totalScaleDownCount-totalScaledDown))) - newReplicasCount := targetRS.Spec.Replicas - scaleDownCount - if newReplicasCount > targetRS.Spec.Replicas { - return 0, fmt.Errorf("when scaling down old RS, got invalid request to scale down %s/%s %d -> %d", targetRS.Namespace, targetRS.Name, targetRS.Spec.Replicas, newReplicasCount) - } - _, _, err = dc.scaleReplicaSetAndRecordEvent(targetRS, newReplicasCount, deployment) - if err != nil { - return totalScaledDown, err - } - - totalScaledDown += scaleDownCount - } - - return totalScaledDown, nil -} - -// scaleDownOldReplicaSetsForRecreate scales down old replica sets when deployment strategy is "Recreate" -func (dc *DeploymentController) scaleDownOldReplicaSetsForRecreate(oldRSs []*extensions.ReplicaSet, deployment *extensions.Deployment) (bool, error) { - scaled := false - for _, rs := range oldRSs { - // Scaling not required. - if rs.Spec.Replicas == 0 { - continue - } - scaledRS, _, err := dc.scaleReplicaSetAndRecordEvent(rs, 0, deployment) - if err != nil { - return false, err - } - if scaledRS { - scaled = true - } - } - return scaled, nil -} - -// scaleUpNewReplicaSetForRecreate scales up new replica set when deployment strategy is "Recreate" -func (dc *DeploymentController) scaleUpNewReplicaSetForRecreate(newRS *extensions.ReplicaSet, deployment *extensions.Deployment) (bool, error) { - scaled, _, err := dc.scaleReplicaSetAndRecordEvent(newRS, deployment.Spec.Replicas, deployment) - return scaled, err -} - -// cleanupDeployment is responsible for cleaning up a deployment ie. retains all but the latest N old replica sets -// where N=d.Spec.RevisionHistoryLimit. Old replica sets are older versions of the podtemplate of a deployment kept -// around by default 1) for historical reasons and 2) for the ability to rollback a deployment. -func (dc *DeploymentController) cleanupDeployment(oldRSs []*extensions.ReplicaSet, deployment *extensions.Deployment) error { - if deployment.Spec.RevisionHistoryLimit == nil { - return nil - } - diff := int32(len(oldRSs)) - *deployment.Spec.RevisionHistoryLimit - if diff <= 0 { - return nil - } - - sort.Sort(controller.ReplicaSetsByCreationTimestamp(oldRSs)) - - var errList []error - // TODO: This should be parallelized. - for i := int32(0); i < diff; i++ { - rs := oldRSs[i] - // Avoid delete replica set with non-zero replica counts - if rs.Status.Replicas != 0 || rs.Spec.Replicas != 0 || rs.Generation > rs.Status.ObservedGeneration { - continue - } - if err := dc.client.Extensions().ReplicaSets(rs.Namespace).Delete(rs.Name, nil); err != nil && !errors.IsNotFound(err) { - glog.V(2).Infof("Failed deleting old replica set %v for deployment %v: %v", rs.Name, deployment.Name, err) - errList = append(errList, err) - } - } - - return utilerrors.NewAggregate(errList) -} - -func (dc *DeploymentController) updateDeploymentStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment *extensions.Deployment) error { - newStatus, err := dc.calculateStatus(allRSs, newRS, deployment) - if err != nil { - return err - } - newDeployment := deployment - newDeployment.Status = newStatus - _, err = dc.client.Extensions().Deployments(deployment.Namespace).UpdateStatus(newDeployment) - return err -} - -func (dc *DeploymentController) calculateStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment *extensions.Deployment) (extensions.DeploymentStatus, error) { - availableReplicas, err := dc.getAvailablePodsForReplicaSets(deployment, allRSs) - if err != nil { - return deployment.Status, fmt.Errorf("failed to count available pods: %v", err) - } - totalReplicas := deploymentutil.GetReplicaCountForReplicaSets(allRSs) - - return extensions.DeploymentStatus{ - // TODO: Ensure that if we start retrying status updates, we won't pick up a new Generation value. - ObservedGeneration: deployment.Generation, - Replicas: deploymentutil.GetActualReplicaCountForReplicaSets(allRSs), - UpdatedReplicas: deploymentutil.GetActualReplicaCountForReplicaSets([]*extensions.ReplicaSet{newRS}), - AvailableReplicas: availableReplicas, - UnavailableReplicas: totalReplicas - availableReplicas, - }, nil -} - -func (dc *DeploymentController) scaleReplicaSetAndRecordEvent(rs *extensions.ReplicaSet, newScale int32, deployment *extensions.Deployment) (bool, *extensions.ReplicaSet, error) { - // No need to scale - if rs.Spec.Replicas == newScale { - return false, rs, nil - } - var scalingOperation string - if rs.Spec.Replicas < newScale { - scalingOperation = "up" - } else { - scalingOperation = "down" - } - newRS, err := dc.scaleReplicaSet(rs, newScale, deployment, scalingOperation) - return true, newRS, err -} - -func (dc *DeploymentController) scaleReplicaSet(rs *extensions.ReplicaSet, newScale int32, deployment *extensions.Deployment, scalingOperation string) (*extensions.ReplicaSet, error) { - // NOTE: This mutates the ReplicaSet passed in. Not sure if that's a good idea. - rs.Spec.Replicas = newScale - setReplicasAnnotations(rs, deployment.Spec.Replicas, deployment.Spec.Replicas+maxSurge(*deployment)) - rs, err := dc.client.Extensions().ReplicaSets(rs.ObjectMeta.Namespace).Update(rs) - if err == nil { - dc.eventRecorder.Eventf(deployment, api.EventTypeNormal, "ScalingReplicaSet", "Scaled %s replica set %s to %d", scalingOperation, rs.Name, newScale) - } else { - glog.Warningf("Cannot update replica set %q: %v", rs.Name, err) - dc.enqueueDeployment(deployment) - } - return rs, err -} - -func (dc *DeploymentController) updateDeployment(deployment *extensions.Deployment) (*extensions.Deployment, error) { - return dc.client.Extensions().Deployments(deployment.ObjectMeta.Namespace).Update(deployment) -} - -func (dc *DeploymentController) rollbackToTemplate(deployment *extensions.Deployment, rs *extensions.ReplicaSet) (d *extensions.Deployment, performedRollback bool, err error) { - if !reflect.DeepEqual(deploymentutil.GetNewReplicaSetTemplate(deployment), rs.Spec.Template) { - glog.Infof("Rolling back deployment %s to template spec %+v", deployment.Name, rs.Spec.Template.Spec) - deploymentutil.SetFromReplicaSetTemplate(deployment, rs.Spec.Template) - // set RS (the old RS we'll rolling back to) annotations back to the deployment; - // otherwise, the deployment's current annotations (should be the same as current new RS) will be copied to the RS after the rollback. - // - // For example, - // A Deployment has old RS1 with annotation {change-cause:create}, and new RS2 {change-cause:edit}. - // Note that both annotations are copied from Deployment, and the Deployment should be annotated {change-cause:edit} as well. - // Now, rollback Deployment to RS1, we should update Deployment's pod-template and also copy annotation from RS1. - // Deployment is now annotated {change-cause:create}, and we have new RS1 {change-cause:create}, old RS2 {change-cause:edit}. - // - // If we don't copy the annotations back from RS to deployment on rollback, the Deployment will stay as {change-cause:edit}, - // and new RS1 becomes {change-cause:edit} (copied from deployment after rollback), old RS2 {change-cause:edit}, which is not correct. - setDeploymentAnnotationsTo(deployment, rs) - performedRollback = true - } else { - glog.V(4).Infof("Rolling back to a revision that contains the same template as current deployment %s, skipping rollback...", deployment.Name) - dc.emitRollbackWarningEvent(deployment, deploymentutil.RollbackTemplateUnchanged, fmt.Sprintf("The rollback revision contains the same template as current deployment %q", deployment.Name)) - } - d, err = dc.updateDeploymentAndClearRollbackTo(deployment) - return -} - -// isScalingEvent checks whether the provided deployment has been updated with a scaling event -// by looking at the desired-replicas annotation in the active replica sets of the deployment. -func (dc *DeploymentController) isScalingEvent(d *extensions.Deployment) bool { - newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(d, false) - if err != nil { - return false - } - // If there is no new replica set matching this deployment and the deployment isn't paused - // then there is a new rollout that waits to happen - if newRS == nil && !d.Spec.Paused { - return false - } - allRSs := append(oldRSs, newRS) - for _, rs := range controller.FilterActiveReplicaSets(allRSs) { - desired, ok := getDesiredReplicasAnnotation(rs) - if !ok { - continue - } - if desired != d.Spec.Replicas { - return true - } - } - return false -} diff --git a/pkg/controller/deployment/deployment_controller_test.go b/pkg/controller/deployment/deployment_controller_test.go index d9c2b18105..9ade955fff 100644 --- a/pkg/controller/deployment/deployment_controller_test.go +++ b/pkg/controller/deployment/deployment_controller_test.go @@ -19,7 +19,6 @@ package deployment import ( "fmt" "testing" - "time" "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/testapi" @@ -144,805 +143,6 @@ func newReplicaSet(d *exp.Deployment, name string, replicas int) *exp.ReplicaSet } } -// TestScale tests proportional scaling of deployments. Note that fenceposts for -// rolling out (maxUnavailable, maxSurge) have no meaning for simple scaling other -// than recording maxSurge as part of the max-replicas annotation that is taken -// into account in the next scale event (max-replicas is used for calculating the -// proportion of a replica set). -func TestScale(t *testing.T) { - newTimestamp := unversioned.Date(2016, 5, 20, 2, 0, 0, 0, time.UTC) - oldTimestamp := unversioned.Date(2016, 5, 20, 1, 0, 0, 0, time.UTC) - olderTimestamp := unversioned.Date(2016, 5, 20, 0, 0, 0, 0, time.UTC) - - tests := []struct { - name string - deployment *exp.Deployment - oldDeployment *exp.Deployment - - newRS *exp.ReplicaSet - oldRSs []*exp.ReplicaSet - - expectedNew *exp.ReplicaSet - expectedOld []*exp.ReplicaSet - - desiredReplicasAnnotations map[string]int32 - }{ - { - name: "normal scaling event: 10 -> 12", - deployment: newDeployment(12, nil), - oldDeployment: newDeployment(10, nil), - - newRS: rs("foo-v1", 10, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{}, - - expectedNew: rs("foo-v1", 12, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{}, - }, - { - name: "normal scaling event: 10 -> 5", - deployment: newDeployment(5, nil), - oldDeployment: newDeployment(10, nil), - - newRS: rs("foo-v1", 10, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{}, - - expectedNew: rs("foo-v1", 5, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{}, - }, - { - name: "proportional scaling: 5 -> 10", - deployment: newDeployment(10, nil), - oldDeployment: newDeployment(5, nil), - - newRS: rs("foo-v2", 2, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{rs("foo-v1", 3, nil, oldTimestamp)}, - - expectedNew: rs("foo-v2", 4, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{rs("foo-v1", 6, nil, oldTimestamp)}, - }, - { - name: "proportional scaling: 5 -> 3", - deployment: newDeployment(3, nil), - oldDeployment: newDeployment(5, nil), - - newRS: rs("foo-v2", 2, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{rs("foo-v1", 3, nil, oldTimestamp)}, - - expectedNew: rs("foo-v2", 1, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{rs("foo-v1", 2, nil, oldTimestamp)}, - }, - { - name: "proportional scaling: 9 -> 4", - deployment: newDeployment(4, nil), - oldDeployment: newDeployment(9, nil), - - newRS: rs("foo-v2", 8, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{rs("foo-v1", 1, nil, oldTimestamp)}, - - expectedNew: rs("foo-v2", 4, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{rs("foo-v1", 0, nil, oldTimestamp)}, - }, - { - name: "proportional scaling: 7 -> 10", - deployment: newDeployment(10, nil), - oldDeployment: newDeployment(7, nil), - - newRS: rs("foo-v3", 2, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{rs("foo-v2", 3, nil, oldTimestamp), rs("foo-v1", 2, nil, olderTimestamp)}, - - expectedNew: rs("foo-v3", 3, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{rs("foo-v2", 4, nil, oldTimestamp), rs("foo-v1", 3, nil, olderTimestamp)}, - }, - { - name: "proportional scaling: 13 -> 8", - deployment: newDeployment(8, nil), - oldDeployment: newDeployment(13, nil), - - newRS: rs("foo-v3", 2, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{rs("foo-v2", 8, nil, oldTimestamp), rs("foo-v1", 3, nil, olderTimestamp)}, - - expectedNew: rs("foo-v3", 1, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{rs("foo-v2", 5, nil, oldTimestamp), rs("foo-v1", 2, nil, olderTimestamp)}, - }, - // Scales up the new replica set. - { - name: "leftover distribution: 3 -> 4", - deployment: newDeployment(4, nil), - oldDeployment: newDeployment(3, nil), - - newRS: rs("foo-v3", 1, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, - - expectedNew: rs("foo-v3", 2, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, - }, - // Scales down the older replica set. - { - name: "leftover distribution: 3 -> 2", - deployment: newDeployment(2, nil), - oldDeployment: newDeployment(3, nil), - - newRS: rs("foo-v3", 1, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, - - expectedNew: rs("foo-v3", 1, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 0, nil, olderTimestamp)}, - }, - // Scales up the latest replica set first. - { - name: "proportional scaling (no new rs): 4 -> 5", - deployment: newDeployment(5, nil), - oldDeployment: newDeployment(4, nil), - - newRS: nil, - oldRSs: []*exp.ReplicaSet{rs("foo-v2", 2, nil, oldTimestamp), rs("foo-v1", 2, nil, olderTimestamp)}, - - expectedNew: nil, - expectedOld: []*exp.ReplicaSet{rs("foo-v2", 3, nil, oldTimestamp), rs("foo-v1", 2, nil, olderTimestamp)}, - }, - // Scales down to zero - { - name: "proportional scaling: 6 -> 0", - deployment: newDeployment(0, nil), - oldDeployment: newDeployment(6, nil), - - newRS: rs("foo-v3", 3, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{rs("foo-v2", 2, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, - - expectedNew: rs("foo-v3", 0, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{rs("foo-v2", 0, nil, oldTimestamp), rs("foo-v1", 0, nil, olderTimestamp)}, - }, - // Scales up from zero - { - name: "proportional scaling: 0 -> 6", - deployment: newDeployment(6, nil), - oldDeployment: newDeployment(0, nil), - - newRS: rs("foo-v3", 0, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{rs("foo-v2", 0, nil, oldTimestamp), rs("foo-v1", 0, nil, olderTimestamp)}, - - expectedNew: rs("foo-v3", 6, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{rs("foo-v2", 0, nil, oldTimestamp), rs("foo-v1", 0, nil, olderTimestamp)}, - }, - // Scenario: deployment.spec.replicas == 3 ( foo-v1.spec.replicas == foo-v2.spec.replicas == foo-v3.spec.replicas == 1 ) - // Deployment is scaled to 5. foo-v3.spec.replicas and foo-v2.spec.replicas should increment by 1 but foo-v2 fails to - // update. - { - name: "failed rs update", - deployment: newDeployment(5, nil), - oldDeployment: newDeployment(5, nil), - - newRS: rs("foo-v3", 2, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, - - expectedNew: rs("foo-v3", 2, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{rs("foo-v2", 2, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, - - desiredReplicasAnnotations: map[string]int32{"foo-v2": int32(3)}, - }, - { - name: "deployment with surge pods", - deployment: newDeploymentEnhanced(20, intstr.FromInt(2)), - oldDeployment: newDeploymentEnhanced(10, intstr.FromInt(2)), - - newRS: rs("foo-v2", 6, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{rs("foo-v1", 6, nil, oldTimestamp)}, - - expectedNew: rs("foo-v2", 11, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{rs("foo-v1", 11, nil, oldTimestamp)}, - }, - { - name: "change both surge and size", - deployment: newDeploymentEnhanced(50, intstr.FromInt(6)), - oldDeployment: newDeploymentEnhanced(10, intstr.FromInt(3)), - - newRS: rs("foo-v2", 5, nil, newTimestamp), - oldRSs: []*exp.ReplicaSet{rs("foo-v1", 8, nil, oldTimestamp)}, - - expectedNew: rs("foo-v2", 22, nil, newTimestamp), - expectedOld: []*exp.ReplicaSet{rs("foo-v1", 34, nil, oldTimestamp)}, - }, - } - - for _, test := range tests { - _ = olderTimestamp - t.Log(test.name) - fake := fake.Clientset{} - dc := &DeploymentController{ - client: &fake, - eventRecorder: &record.FakeRecorder{}, - } - - if test.newRS != nil { - desiredReplicas := test.oldDeployment.Spec.Replicas - if desired, ok := test.desiredReplicasAnnotations[test.newRS.Name]; ok { - desiredReplicas = desired - } - setReplicasAnnotations(test.newRS, desiredReplicas, desiredReplicas+maxSurge(*test.oldDeployment)) - } - for i := range test.oldRSs { - rs := test.oldRSs[i] - if rs == nil { - continue - } - desiredReplicas := test.oldDeployment.Spec.Replicas - if desired, ok := test.desiredReplicasAnnotations[rs.Name]; ok { - desiredReplicas = desired - } - setReplicasAnnotations(rs, desiredReplicas, desiredReplicas+maxSurge(*test.oldDeployment)) - } - - if err := dc.scale(test.deployment, test.newRS, test.oldRSs); err != nil { - t.Errorf("%s: unexpected error: %v", test.name, err) - continue - } - if test.expectedNew != nil && test.newRS != nil && test.expectedNew.Spec.Replicas != test.newRS.Spec.Replicas { - t.Errorf("%s: expected new replicas: %d, got: %d", test.name, test.expectedNew.Spec.Replicas, test.newRS.Spec.Replicas) - continue - } - if len(test.expectedOld) != len(test.oldRSs) { - t.Errorf("%s: expected %d old replica sets, got %d", test.name, len(test.expectedOld), len(test.oldRSs)) - continue - } - for n := range test.oldRSs { - rs := test.oldRSs[n] - exp := test.expectedOld[n] - if exp.Spec.Replicas != rs.Spec.Replicas { - t.Errorf("%s: expected old (%s) replicas: %d, got: %d", test.name, rs.Name, exp.Spec.Replicas, rs.Spec.Replicas) - } - } - } -} - -func TestDeploymentController_reconcileNewReplicaSet(t *testing.T) { - tests := []struct { - deploymentReplicas int - maxSurge intstr.IntOrString - oldReplicas int - newReplicas int - scaleExpected bool - expectedNewReplicas int - }{ - { - // Should not scale up. - deploymentReplicas: 10, - maxSurge: intstr.FromInt(0), - oldReplicas: 10, - newReplicas: 0, - scaleExpected: false, - }, - { - deploymentReplicas: 10, - maxSurge: intstr.FromInt(2), - oldReplicas: 10, - newReplicas: 0, - scaleExpected: true, - expectedNewReplicas: 2, - }, - { - deploymentReplicas: 10, - maxSurge: intstr.FromInt(2), - oldReplicas: 5, - newReplicas: 0, - scaleExpected: true, - expectedNewReplicas: 7, - }, - { - deploymentReplicas: 10, - maxSurge: intstr.FromInt(2), - oldReplicas: 10, - newReplicas: 2, - scaleExpected: false, - }, - { - // Should scale down. - deploymentReplicas: 10, - maxSurge: intstr.FromInt(2), - oldReplicas: 2, - newReplicas: 11, - scaleExpected: true, - expectedNewReplicas: 10, - }, - } - - for i, test := range tests { - t.Logf("executing scenario %d", i) - newRS := rs("foo-v2", test.newReplicas, nil, noTimestamp) - oldRS := rs("foo-v2", test.oldReplicas, nil, noTimestamp) - allRSs := []*exp.ReplicaSet{newRS, oldRS} - deployment := deployment("foo", test.deploymentReplicas, test.maxSurge, intstr.FromInt(0), nil) - fake := fake.Clientset{} - controller := &DeploymentController{ - client: &fake, - eventRecorder: &record.FakeRecorder{}, - } - scaled, err := controller.reconcileNewReplicaSet(allRSs, newRS, &deployment) - if err != nil { - t.Errorf("unexpected error: %v", err) - continue - } - if !test.scaleExpected { - if scaled || len(fake.Actions()) > 0 { - t.Errorf("unexpected scaling: %v", fake.Actions()) - } - continue - } - if test.scaleExpected && !scaled { - t.Errorf("expected scaling to occur") - continue - } - if len(fake.Actions()) != 1 { - t.Errorf("expected 1 action during scale, got: %v", fake.Actions()) - continue - } - updated := fake.Actions()[0].(core.UpdateAction).GetObject().(*exp.ReplicaSet) - if e, a := test.expectedNewReplicas, int(updated.Spec.Replicas); e != a { - t.Errorf("expected update to %d replicas, got %d", e, a) - } - } -} - -func TestDeploymentController_reconcileOldReplicaSets(t *testing.T) { - tests := []struct { - deploymentReplicas int - maxUnavailable intstr.IntOrString - oldReplicas int - newReplicas int - readyPodsFromOldRS int - readyPodsFromNewRS int - scaleExpected bool - expectedOldReplicas int - }{ - { - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(0), - oldReplicas: 10, - newReplicas: 0, - readyPodsFromOldRS: 10, - readyPodsFromNewRS: 0, - scaleExpected: true, - expectedOldReplicas: 9, - }, - { - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - oldReplicas: 10, - newReplicas: 0, - readyPodsFromOldRS: 10, - readyPodsFromNewRS: 0, - scaleExpected: true, - expectedOldReplicas: 8, - }, - { // expect unhealthy replicas from old replica sets been cleaned up - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - oldReplicas: 10, - newReplicas: 0, - readyPodsFromOldRS: 8, - readyPodsFromNewRS: 0, - scaleExpected: true, - expectedOldReplicas: 8, - }, - { // expect 1 unhealthy replica from old replica sets been cleaned up, and 1 ready pod been scaled down - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - oldReplicas: 10, - newReplicas: 0, - readyPodsFromOldRS: 9, - readyPodsFromNewRS: 0, - scaleExpected: true, - expectedOldReplicas: 8, - }, - { // the unavailable pods from the newRS would not make us scale down old RSs in a further step - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - oldReplicas: 8, - newReplicas: 2, - readyPodsFromOldRS: 8, - readyPodsFromNewRS: 0, - scaleExpected: false, - }, - } - for i, test := range tests { - t.Logf("executing scenario %d", i) - - newSelector := map[string]string{"foo": "new"} - oldSelector := map[string]string{"foo": "old"} - newRS := rs("foo-new", test.newReplicas, newSelector, noTimestamp) - oldRS := rs("foo-old", test.oldReplicas, oldSelector, noTimestamp) - oldRSs := []*exp.ReplicaSet{oldRS} - allRSs := []*exp.ReplicaSet{oldRS, newRS} - - deployment := deployment("foo", test.deploymentReplicas, intstr.FromInt(0), test.maxUnavailable, newSelector) - fakeClientset := fake.Clientset{} - fakeClientset.AddReactor("list", "pods", func(action core.Action) (handled bool, ret runtime.Object, err error) { - switch action.(type) { - case core.ListAction: - podList := &api.PodList{} - for podIndex := 0; podIndex < test.readyPodsFromOldRS; podIndex++ { - podList.Items = append(podList.Items, api.Pod{ - ObjectMeta: api.ObjectMeta{ - Name: fmt.Sprintf("%s-oldReadyPod-%d", oldRS.Name, podIndex), - Labels: oldSelector, - }, - Status: api.PodStatus{ - Conditions: []api.PodCondition{ - { - Type: api.PodReady, - Status: api.ConditionTrue, - }, - }, - }, - }) - } - for podIndex := 0; podIndex < test.oldReplicas-test.readyPodsFromOldRS; podIndex++ { - podList.Items = append(podList.Items, api.Pod{ - ObjectMeta: api.ObjectMeta{ - Name: fmt.Sprintf("%s-oldUnhealthyPod-%d", oldRS.Name, podIndex), - Labels: oldSelector, - }, - Status: api.PodStatus{ - Conditions: []api.PodCondition{ - { - Type: api.PodReady, - Status: api.ConditionFalse, - }, - }, - }, - }) - } - for podIndex := 0; podIndex < test.readyPodsFromNewRS; podIndex++ { - podList.Items = append(podList.Items, api.Pod{ - ObjectMeta: api.ObjectMeta{ - Name: fmt.Sprintf("%s-newReadyPod-%d", oldRS.Name, podIndex), - Labels: newSelector, - }, - Status: api.PodStatus{ - Conditions: []api.PodCondition{ - { - Type: api.PodReady, - Status: api.ConditionTrue, - }, - }, - }, - }) - } - for podIndex := 0; podIndex < test.oldReplicas-test.readyPodsFromOldRS; podIndex++ { - podList.Items = append(podList.Items, api.Pod{ - ObjectMeta: api.ObjectMeta{ - Name: fmt.Sprintf("%s-newUnhealthyPod-%d", oldRS.Name, podIndex), - Labels: newSelector, - }, - Status: api.PodStatus{ - Conditions: []api.PodCondition{ - { - Type: api.PodReady, - Status: api.ConditionFalse, - }, - }, - }, - }) - } - return true, podList, nil - } - return false, nil, nil - }) - controller := &DeploymentController{ - client: &fakeClientset, - eventRecorder: &record.FakeRecorder{}, - } - - scaled, err := controller.reconcileOldReplicaSets(allRSs, oldRSs, newRS, &deployment) - if err != nil { - t.Errorf("unexpected error: %v", err) - continue - } - if !test.scaleExpected && scaled { - t.Errorf("unexpected scaling: %v", fakeClientset.Actions()) - } - if test.scaleExpected && !scaled { - t.Errorf("expected scaling to occur") - continue - } - continue - } -} - -func TestDeploymentController_cleanupUnhealthyReplicas(t *testing.T) { - tests := []struct { - oldReplicas int - readyPods int - unHealthyPods int - maxCleanupCount int - cleanupCountExpected int - }{ - { - oldReplicas: 10, - readyPods: 8, - unHealthyPods: 2, - maxCleanupCount: 1, - cleanupCountExpected: 1, - }, - { - oldReplicas: 10, - readyPods: 8, - unHealthyPods: 2, - maxCleanupCount: 3, - cleanupCountExpected: 2, - }, - { - oldReplicas: 10, - readyPods: 8, - unHealthyPods: 2, - maxCleanupCount: 0, - cleanupCountExpected: 0, - }, - { - oldReplicas: 10, - readyPods: 10, - unHealthyPods: 0, - maxCleanupCount: 3, - cleanupCountExpected: 0, - }, - } - - for i, test := range tests { - t.Logf("executing scenario %d", i) - oldRS := rs("foo-v2", test.oldReplicas, nil, noTimestamp) - oldRSs := []*exp.ReplicaSet{oldRS} - deployment := deployment("foo", 10, intstr.FromInt(2), intstr.FromInt(2), nil) - fakeClientset := fake.Clientset{} - fakeClientset.AddReactor("list", "pods", func(action core.Action) (handled bool, ret runtime.Object, err error) { - switch action.(type) { - case core.ListAction: - podList := &api.PodList{} - for podIndex := 0; podIndex < test.readyPods; podIndex++ { - podList.Items = append(podList.Items, api.Pod{ - ObjectMeta: api.ObjectMeta{ - Name: fmt.Sprintf("%s-readyPod-%d", oldRS.Name, podIndex), - }, - Status: api.PodStatus{ - Conditions: []api.PodCondition{ - { - Type: api.PodReady, - Status: api.ConditionTrue, - }, - }, - }, - }) - } - for podIndex := 0; podIndex < test.unHealthyPods; podIndex++ { - podList.Items = append(podList.Items, api.Pod{ - ObjectMeta: api.ObjectMeta{ - Name: fmt.Sprintf("%s-unHealthyPod-%d", oldRS.Name, podIndex), - }, - Status: api.PodStatus{ - Conditions: []api.PodCondition{ - { - Type: api.PodReady, - Status: api.ConditionFalse, - }, - }, - }, - }) - } - return true, podList, nil - } - return false, nil, nil - }) - - controller := &DeploymentController{ - client: &fakeClientset, - eventRecorder: &record.FakeRecorder{}, - } - _, cleanupCount, err := controller.cleanupUnhealthyReplicas(oldRSs, &deployment, 0, int32(test.maxCleanupCount)) - if err != nil { - t.Errorf("unexpected error: %v", err) - continue - } - if int(cleanupCount) != test.cleanupCountExpected { - t.Errorf("expected %v unhealthy replicas been cleaned up, got %v", test.cleanupCountExpected, cleanupCount) - continue - } - } -} - -func TestDeploymentController_scaleDownOldReplicaSetsForRollingUpdate(t *testing.T) { - tests := []struct { - deploymentReplicas int - maxUnavailable intstr.IntOrString - readyPods int - oldReplicas int - scaleExpected bool - expectedOldReplicas int - }{ - { - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(0), - readyPods: 10, - oldReplicas: 10, - scaleExpected: true, - expectedOldReplicas: 9, - }, - { - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - readyPods: 10, - oldReplicas: 10, - scaleExpected: true, - expectedOldReplicas: 8, - }, - { - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - readyPods: 8, - oldReplicas: 10, - scaleExpected: false, - }, - { - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - readyPods: 10, - oldReplicas: 0, - scaleExpected: false, - }, - { - deploymentReplicas: 10, - maxUnavailable: intstr.FromInt(2), - readyPods: 1, - oldReplicas: 10, - scaleExpected: false, - }, - } - - for i, test := range tests { - t.Logf("executing scenario %d", i) - oldRS := rs("foo-v2", test.oldReplicas, nil, noTimestamp) - allRSs := []*exp.ReplicaSet{oldRS} - oldRSs := []*exp.ReplicaSet{oldRS} - deployment := deployment("foo", test.deploymentReplicas, intstr.FromInt(0), test.maxUnavailable, map[string]string{"foo": "bar"}) - fakeClientset := fake.Clientset{} - fakeClientset.AddReactor("list", "pods", func(action core.Action) (handled bool, ret runtime.Object, err error) { - switch action.(type) { - case core.ListAction: - podList := &api.PodList{} - for podIndex := 0; podIndex < test.readyPods; podIndex++ { - podList.Items = append(podList.Items, api.Pod{ - ObjectMeta: api.ObjectMeta{ - Name: fmt.Sprintf("%s-pod-%d", oldRS.Name, podIndex), - Labels: map[string]string{"foo": "bar"}, - }, - Status: api.PodStatus{ - Conditions: []api.PodCondition{ - { - Type: api.PodReady, - Status: api.ConditionTrue, - }, - }, - }, - }) - } - return true, podList, nil - } - return false, nil, nil - }) - controller := &DeploymentController{ - client: &fakeClientset, - eventRecorder: &record.FakeRecorder{}, - } - scaled, err := controller.scaleDownOldReplicaSetsForRollingUpdate(allRSs, oldRSs, &deployment) - if err != nil { - t.Errorf("unexpected error: %v", err) - continue - } - if !test.scaleExpected { - if scaled != 0 { - t.Errorf("unexpected scaling: %v", fakeClientset.Actions()) - } - continue - } - if test.scaleExpected && scaled == 0 { - t.Errorf("expected scaling to occur; actions: %v", fakeClientset.Actions()) - continue - } - // There are both list and update actions logged, so extract the update - // action for verification. - var updateAction core.UpdateAction - for _, action := range fakeClientset.Actions() { - switch a := action.(type) { - case core.UpdateAction: - if updateAction != nil { - t.Errorf("expected only 1 update action; had %v and found %v", updateAction, a) - } else { - updateAction = a - } - } - } - if updateAction == nil { - t.Errorf("expected an update action") - continue - } - updated := updateAction.GetObject().(*exp.ReplicaSet) - if e, a := test.expectedOldReplicas, int(updated.Spec.Replicas); e != a { - t.Errorf("expected update to %d replicas, got %d", e, a) - } - } -} - -func TestDeploymentController_cleanupDeployment(t *testing.T) { - selector := map[string]string{"foo": "bar"} - - tests := []struct { - oldRSs []*exp.ReplicaSet - revisionHistoryLimit int - expectedDeletions int - }{ - { - oldRSs: []*exp.ReplicaSet{ - newRSWithStatus("foo-1", 0, 0, selector), - newRSWithStatus("foo-2", 0, 0, selector), - newRSWithStatus("foo-3", 0, 0, selector), - }, - revisionHistoryLimit: 1, - expectedDeletions: 2, - }, - { - // Only delete the replica set with Spec.Replicas = Status.Replicas = 0. - oldRSs: []*exp.ReplicaSet{ - newRSWithStatus("foo-1", 0, 0, selector), - newRSWithStatus("foo-2", 0, 1, selector), - newRSWithStatus("foo-3", 1, 0, selector), - newRSWithStatus("foo-4", 1, 1, selector), - }, - revisionHistoryLimit: 0, - expectedDeletions: 1, - }, - - { - oldRSs: []*exp.ReplicaSet{ - newRSWithStatus("foo-1", 0, 0, selector), - newRSWithStatus("foo-2", 0, 0, selector), - }, - revisionHistoryLimit: 0, - expectedDeletions: 2, - }, - { - oldRSs: []*exp.ReplicaSet{ - newRSWithStatus("foo-1", 1, 1, selector), - newRSWithStatus("foo-2", 1, 1, selector), - }, - revisionHistoryLimit: 0, - expectedDeletions: 0, - }, - } - - for i, test := range tests { - fake := &fake.Clientset{} - controller := NewDeploymentController(fake, controller.NoResyncPeriodFunc) - - controller.eventRecorder = &record.FakeRecorder{} - controller.rsStoreSynced = alwaysReady - controller.podStoreSynced = alwaysReady - for _, rs := range test.oldRSs { - controller.rsStore.Add(rs) - } - - d := newDeployment(1, &tests[i].revisionHistoryLimit) - controller.cleanupDeployment(test.oldRSs, d) - - gotDeletions := 0 - for _, action := range fake.Actions() { - if "delete" == action.GetVerb() { - gotDeletions++ - } - } - if gotDeletions != test.expectedDeletions { - t.Errorf("expect %v old replica sets been deleted, but got %v", test.expectedDeletions, gotDeletions) - continue - } - } -} - func getKey(d *exp.Deployment, t *testing.T) string { if key, err := controller.KeyFunc(d); err != nil { t.Errorf("Unexpected error getting key for deployment %v: %v", d.Name, err) diff --git a/pkg/controller/deployment/recreate.go b/pkg/controller/deployment/recreate.go new file mode 100644 index 0000000000..ccd968348c --- /dev/null +++ b/pkg/controller/deployment/recreate.go @@ -0,0 +1,92 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package deployment + +import ( + "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/controller" +) + +// rolloutRecreate implements the logic for recreating a replica set. +func (dc *DeploymentController) rolloutRecreate(deployment *extensions.Deployment) error { + // Don't create a new RS if not already existed, so that we avoid scaling up before scaling down + newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(deployment, false) + if err != nil { + return err + } + allRSs := append(oldRSs, newRS) + + // scale down old replica sets + scaledDown, err := dc.scaleDownOldReplicaSetsForRecreate(controller.FilterActiveReplicaSets(oldRSs), deployment) + if err != nil { + return err + } + if scaledDown { + // Update DeploymentStatus + return dc.updateDeploymentStatus(allRSs, newRS, deployment) + } + + // If we need to create a new RS, create it now + // TODO: Create a new RS without re-listing all RSs. + if newRS == nil { + newRS, oldRSs, err = dc.getAllReplicaSetsAndSyncRevision(deployment, true) + if err != nil { + return err + } + allRSs = append(oldRSs, newRS) + } + + // scale up new replica set + scaledUp, err := dc.scaleUpNewReplicaSetForRecreate(newRS, deployment) + if err != nil { + return err + } + if scaledUp { + // Update DeploymentStatus + return dc.updateDeploymentStatus(allRSs, newRS, deployment) + } + + dc.cleanupDeployment(oldRSs, deployment) + + // Sync deployment status + return dc.syncDeploymentStatus(allRSs, newRS, deployment) +} + +// scaleDownOldReplicaSetsForRecreate scales down old replica sets when deployment strategy is "Recreate" +func (dc *DeploymentController) scaleDownOldReplicaSetsForRecreate(oldRSs []*extensions.ReplicaSet, deployment *extensions.Deployment) (bool, error) { + scaled := false + for _, rs := range oldRSs { + // Scaling not required. + if rs.Spec.Replicas == 0 { + continue + } + scaledRS, _, err := dc.scaleReplicaSetAndRecordEvent(rs, 0, deployment) + if err != nil { + return false, err + } + if scaledRS { + scaled = true + } + } + return scaled, nil +} + +// scaleUpNewReplicaSetForRecreate scales up new replica set when deployment strategy is "Recreate" +func (dc *DeploymentController) scaleUpNewReplicaSetForRecreate(newRS *extensions.ReplicaSet, deployment *extensions.Deployment) (bool, error) { + scaled, _, err := dc.scaleReplicaSetAndRecordEvent(newRS, deployment.Spec.Replicas, deployment) + return scaled, err +} diff --git a/pkg/controller/deployment/rollback.go b/pkg/controller/deployment/rollback.go new file mode 100644 index 0000000000..aabfbc42ad --- /dev/null +++ b/pkg/controller/deployment/rollback.go @@ -0,0 +1,105 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package deployment + +import ( + "fmt" + "reflect" + + "github.com/golang/glog" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/apis/extensions" + deploymentutil "k8s.io/kubernetes/pkg/util/deployment" +) + +// Rolling back to a revision; no-op if the toRevision is deployment's current revision +func (dc *DeploymentController) rollback(deployment *extensions.Deployment, toRevision *int64) (*extensions.Deployment, error) { + newRS, allOldRSs, err := dc.getAllReplicaSetsAndSyncRevision(deployment, true) + if err != nil { + return nil, err + } + allRSs := append(allOldRSs, newRS) + // If rollback revision is 0, rollback to the last revision + if *toRevision == 0 { + if *toRevision = lastRevision(allRSs); *toRevision == 0 { + // If we still can't find the last revision, gives up rollback + dc.emitRollbackWarningEvent(deployment, deploymentutil.RollbackRevisionNotFound, "Unable to find last revision.") + // Gives up rollback + return dc.updateDeploymentAndClearRollbackTo(deployment) + } + } + for _, rs := range allRSs { + v, err := deploymentutil.Revision(rs) + if err != nil { + glog.V(4).Infof("Unable to extract revision from deployment's replica set %q: %v", rs.Name, err) + continue + } + if v == *toRevision { + glog.V(4).Infof("Found replica set %q with desired revision %d", rs.Name, v) + // rollback by copying podTemplate.Spec from the replica set, and increment revision number by 1 + // no-op if the the spec matches current deployment's podTemplate.Spec + deployment, performedRollback, err := dc.rollbackToTemplate(deployment, rs) + if performedRollback && err == nil { + dc.emitRollbackNormalEvent(deployment, fmt.Sprintf("Rolled back deployment %q to revision %d", deployment.Name, *toRevision)) + } + return deployment, err + } + } + dc.emitRollbackWarningEvent(deployment, deploymentutil.RollbackRevisionNotFound, "Unable to find the revision to rollback to.") + // Gives up rollback + return dc.updateDeploymentAndClearRollbackTo(deployment) +} + +func (dc *DeploymentController) rollbackToTemplate(deployment *extensions.Deployment, rs *extensions.ReplicaSet) (d *extensions.Deployment, performedRollback bool, err error) { + if !reflect.DeepEqual(deploymentutil.GetNewReplicaSetTemplate(deployment), rs.Spec.Template) { + glog.Infof("Rolling back deployment %s to template spec %+v", deployment.Name, rs.Spec.Template.Spec) + deploymentutil.SetFromReplicaSetTemplate(deployment, rs.Spec.Template) + // set RS (the old RS we'll rolling back to) annotations back to the deployment; + // otherwise, the deployment's current annotations (should be the same as current new RS) will be copied to the RS after the rollback. + // + // For example, + // A Deployment has old RS1 with annotation {change-cause:create}, and new RS2 {change-cause:edit}. + // Note that both annotations are copied from Deployment, and the Deployment should be annotated {change-cause:edit} as well. + // Now, rollback Deployment to RS1, we should update Deployment's pod-template and also copy annotation from RS1. + // Deployment is now annotated {change-cause:create}, and we have new RS1 {change-cause:create}, old RS2 {change-cause:edit}. + // + // If we don't copy the annotations back from RS to deployment on rollback, the Deployment will stay as {change-cause:edit}, + // and new RS1 becomes {change-cause:edit} (copied from deployment after rollback), old RS2 {change-cause:edit}, which is not correct. + setDeploymentAnnotationsTo(deployment, rs) + performedRollback = true + } else { + glog.V(4).Infof("Rolling back to a revision that contains the same template as current deployment %s, skipping rollback...", deployment.Name) + dc.emitRollbackWarningEvent(deployment, deploymentutil.RollbackTemplateUnchanged, fmt.Sprintf("The rollback revision contains the same template as current deployment %q", deployment.Name)) + } + d, err = dc.updateDeploymentAndClearRollbackTo(deployment) + return +} + +func (dc *DeploymentController) emitRollbackWarningEvent(deployment *extensions.Deployment, reason, message string) { + dc.eventRecorder.Eventf(deployment, api.EventTypeWarning, reason, message) +} + +func (dc *DeploymentController) emitRollbackNormalEvent(deployment *extensions.Deployment, message string) { + dc.eventRecorder.Eventf(deployment, api.EventTypeNormal, deploymentutil.RollbackDone, message) +} + +// updateDeploymentAndClearRollbackTo sets .spec.rollbackTo to nil and update the input deployment +func (dc *DeploymentController) updateDeploymentAndClearRollbackTo(deployment *extensions.Deployment) (*extensions.Deployment, error) { + glog.V(4).Infof("Cleans up rollbackTo of deployment %s", deployment.Name) + deployment.Spec.RollbackTo = nil + return dc.client.Extensions().Deployments(deployment.ObjectMeta.Namespace).Update(deployment) +} diff --git a/pkg/controller/deployment/rolling.go b/pkg/controller/deployment/rolling.go new file mode 100644 index 0000000000..4708dcf9b7 --- /dev/null +++ b/pkg/controller/deployment/rolling.go @@ -0,0 +1,243 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package deployment + +import ( + "fmt" + "sort" + + "github.com/golang/glog" + "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/controller" + deploymentutil "k8s.io/kubernetes/pkg/util/deployment" + "k8s.io/kubernetes/pkg/util/integer" +) + +// rolloutRolling implements the logic for rolling a new replica set. +func (dc *DeploymentController) rolloutRolling(deployment *extensions.Deployment) error { + newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(deployment, true) + if err != nil { + return err + } + allRSs := append(oldRSs, newRS) + + // Scale up, if we can. + scaledUp, err := dc.reconcileNewReplicaSet(allRSs, newRS, deployment) + if err != nil { + return err + } + if scaledUp { + // Update DeploymentStatus + return dc.updateDeploymentStatus(allRSs, newRS, deployment) + } + + // Scale down, if we can. + scaledDown, err := dc.reconcileOldReplicaSets(allRSs, controller.FilterActiveReplicaSets(oldRSs), newRS, deployment) + if err != nil { + return err + } + if scaledDown { + // Update DeploymentStatus + return dc.updateDeploymentStatus(allRSs, newRS, deployment) + } + + dc.cleanupDeployment(oldRSs, deployment) + + // Sync deployment status + return dc.syncDeploymentStatus(allRSs, newRS, deployment) +} + +func (dc *DeploymentController) reconcileNewReplicaSet(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment *extensions.Deployment) (bool, error) { + if newRS.Spec.Replicas == deployment.Spec.Replicas { + // Scaling not required. + return false, nil + } + if newRS.Spec.Replicas > deployment.Spec.Replicas { + // Scale down. + scaled, _, err := dc.scaleReplicaSetAndRecordEvent(newRS, deployment.Spec.Replicas, deployment) + return scaled, err + } + newReplicasCount, err := deploymentutil.NewRSNewReplicas(deployment, allRSs, newRS) + if err != nil { + return false, err + } + scaled, _, err := dc.scaleReplicaSetAndRecordEvent(newRS, newReplicasCount, deployment) + return scaled, err +} + +func (dc *DeploymentController) reconcileOldReplicaSets(allRSs []*extensions.ReplicaSet, oldRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment *extensions.Deployment) (bool, error) { + oldPodsCount := deploymentutil.GetReplicaCountForReplicaSets(oldRSs) + if oldPodsCount == 0 { + // Can't scale down further + return false, nil + } + + minReadySeconds := deployment.Spec.MinReadySeconds + allPodsCount := deploymentutil.GetReplicaCountForReplicaSets(allRSs) + // TODO: use dc.getAvailablePodsForReplicaSets instead + newRSAvailablePodCount, err := deploymentutil.GetAvailablePodsForReplicaSets(dc.client, deployment, []*extensions.ReplicaSet{newRS}, minReadySeconds) + if err != nil { + return false, fmt.Errorf("could not find available pods: %v", err) + } + maxUnavailable := maxUnavailable(*deployment) + + // Check if we can scale down. We can scale down in the following 2 cases: + // * Some old replica sets have unhealthy replicas, we could safely scale down those unhealthy replicas since that won't further + // increase unavailability. + // * New replica set has scaled up and it's replicas becomes ready, then we can scale down old replica sets in a further step. + // + // maxScaledDown := allPodsCount - minAvailable - newReplicaSetPodsUnavailable + // take into account not only maxUnavailable and any surge pods that have been created, but also unavailable pods from + // the newRS, so that the unavailable pods from the newRS would not make us scale down old replica sets in a further + // step(that will increase unavailability). + // + // Concrete example: + // + // * 10 replicas + // * 2 maxUnavailable (absolute number, not percent) + // * 3 maxSurge (absolute number, not percent) + // + // case 1: + // * Deployment is updated, newRS is created with 3 replicas, oldRS is scaled down to 8, and newRS is scaled up to 5. + // * The new replica set pods crashloop and never become available. + // * allPodsCount is 13. minAvailable is 8. newRSPodsUnavailable is 5. + // * A node fails and causes one of the oldRS pods to become unavailable. However, 13 - 8 - 5 = 0, so the oldRS won't be scaled down. + // * The user notices the crashloop and does kubectl rollout undo to rollback. + // * newRSPodsUnavailable is 1, since we rolled back to the good replica set, so maxScaledDown = 13 - 8 - 1 = 4. 4 of the crashlooping pods will be scaled down. + // * The total number of pods will then be 9 and the newRS can be scaled up to 10. + // + // case 2: + // Same example, but pushing a new pod template instead of rolling back (aka "roll over"): + // * The new replica set created must start with 0 replicas because allPodsCount is already at 13. + // * However, newRSPodsUnavailable would also be 0, so the 2 old replica sets could be scaled down by 5 (13 - 8 - 0), which would then + // allow the new replica set to be scaled up by 5. + minAvailable := deployment.Spec.Replicas - maxUnavailable + newRSUnavailablePodCount := newRS.Spec.Replicas - newRSAvailablePodCount + maxScaledDown := allPodsCount - minAvailable - newRSUnavailablePodCount + if maxScaledDown <= 0 { + return false, nil + } + + // Clean up unhealthy replicas first, otherwise unhealthy replicas will block deployment + // and cause timeout. See https://github.com/kubernetes/kubernetes/issues/16737 + oldRSs, cleanupCount, err := dc.cleanupUnhealthyReplicas(oldRSs, deployment, deployment.Spec.MinReadySeconds, maxScaledDown) + if err != nil { + return false, nil + } + glog.V(4).Infof("Cleaned up unhealthy replicas from old RSes by %d", cleanupCount) + + // Scale down old replica sets, need check maxUnavailable to ensure we can scale down + allRSs = append(oldRSs, newRS) + scaledDownCount, err := dc.scaleDownOldReplicaSetsForRollingUpdate(allRSs, oldRSs, deployment) + if err != nil { + return false, nil + } + glog.V(4).Infof("Scaled down old RSes of deployment %s by %d", deployment.Name, scaledDownCount) + + totalScaledDown := cleanupCount + scaledDownCount + return totalScaledDown > 0, nil +} + +// cleanupUnhealthyReplicas will scale down old replica sets with unhealthy replicas, so that all unhealthy replicas will be deleted. +func (dc *DeploymentController) cleanupUnhealthyReplicas(oldRSs []*extensions.ReplicaSet, deployment *extensions.Deployment, minReadySeconds, maxCleanupCount int32) ([]*extensions.ReplicaSet, int32, error) { + sort.Sort(controller.ReplicaSetsByCreationTimestamp(oldRSs)) + // Safely scale down all old replica sets with unhealthy replicas. Replica set will sort the pods in the order + // such that not-ready < ready, unscheduled < scheduled, and pending < running. This ensures that unhealthy replicas will + // been deleted first and won't increase unavailability. + totalScaledDown := int32(0) + for i, targetRS := range oldRSs { + if totalScaledDown >= maxCleanupCount { + break + } + if targetRS.Spec.Replicas == 0 { + // cannot scale down this replica set. + continue + } + // TODO: use dc.getAvailablePodsForReplicaSets instead + availablePodCount, err := deploymentutil.GetAvailablePodsForReplicaSets(dc.client, deployment, []*extensions.ReplicaSet{targetRS}, minReadySeconds) + if err != nil { + return nil, totalScaledDown, fmt.Errorf("could not find available pods: %v", err) + } + if targetRS.Spec.Replicas == availablePodCount { + // no unhealthy replicas found, no scaling required. + continue + } + + scaledDownCount := int32(integer.IntMin(int(maxCleanupCount-totalScaledDown), int(targetRS.Spec.Replicas-availablePodCount))) + newReplicasCount := targetRS.Spec.Replicas - scaledDownCount + if newReplicasCount > targetRS.Spec.Replicas { + return nil, 0, fmt.Errorf("when cleaning up unhealthy replicas, got invalid request to scale down %s/%s %d -> %d", targetRS.Namespace, targetRS.Name, targetRS.Spec.Replicas, newReplicasCount) + } + _, updatedOldRS, err := dc.scaleReplicaSetAndRecordEvent(targetRS, newReplicasCount, deployment) + if err != nil { + return nil, totalScaledDown, err + } + totalScaledDown += scaledDownCount + oldRSs[i] = updatedOldRS + } + return oldRSs, totalScaledDown, nil +} + +// scaleDownOldReplicaSetsForRollingUpdate scales down old replica sets when deployment strategy is "RollingUpdate". +// Need check maxUnavailable to ensure availability +func (dc *DeploymentController) scaleDownOldReplicaSetsForRollingUpdate(allRSs []*extensions.ReplicaSet, oldRSs []*extensions.ReplicaSet, deployment *extensions.Deployment) (int32, error) { + maxUnavailable := maxUnavailable(*deployment) + + // Check if we can scale down. + minAvailable := deployment.Spec.Replicas - maxUnavailable + minReadySeconds := deployment.Spec.MinReadySeconds + // Find the number of ready pods. + // TODO: use dc.getAvailablePodsForReplicaSets instead + availablePodCount, err := deploymentutil.GetAvailablePodsForReplicaSets(dc.client, deployment, allRSs, minReadySeconds) + if err != nil { + return 0, fmt.Errorf("could not find available pods: %v", err) + } + if availablePodCount <= minAvailable { + // Cannot scale down. + return 0, nil + } + glog.V(4).Infof("Found %d available pods in deployment %s, scaling down old RSes", availablePodCount, deployment.Name) + + sort.Sort(controller.ReplicaSetsByCreationTimestamp(oldRSs)) + + totalScaledDown := int32(0) + totalScaleDownCount := availablePodCount - minAvailable + for _, targetRS := range oldRSs { + if totalScaledDown >= totalScaleDownCount { + // No further scaling required. + break + } + if targetRS.Spec.Replicas == 0 { + // cannot scale down this ReplicaSet. + continue + } + // Scale down. + scaleDownCount := int32(integer.IntMin(int(targetRS.Spec.Replicas), int(totalScaleDownCount-totalScaledDown))) + newReplicasCount := targetRS.Spec.Replicas - scaleDownCount + if newReplicasCount > targetRS.Spec.Replicas { + return 0, fmt.Errorf("when scaling down old RS, got invalid request to scale down %s/%s %d -> %d", targetRS.Namespace, targetRS.Name, targetRS.Spec.Replicas, newReplicasCount) + } + _, _, err = dc.scaleReplicaSetAndRecordEvent(targetRS, newReplicasCount, deployment) + if err != nil { + return totalScaledDown, err + } + + totalScaledDown += scaleDownCount + } + + return totalScaledDown, nil +} diff --git a/pkg/controller/deployment/rolling_test.go b/pkg/controller/deployment/rolling_test.go new file mode 100644 index 0000000000..5407a1e2c7 --- /dev/null +++ b/pkg/controller/deployment/rolling_test.go @@ -0,0 +1,505 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package deployment + +import ( + "fmt" + "testing" + + "k8s.io/kubernetes/pkg/api" + exp "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" + "k8s.io/kubernetes/pkg/client/record" + "k8s.io/kubernetes/pkg/client/testing/core" + "k8s.io/kubernetes/pkg/runtime" + "k8s.io/kubernetes/pkg/util/intstr" +) + +func TestDeploymentController_reconcileNewReplicaSet(t *testing.T) { + tests := []struct { + deploymentReplicas int + maxSurge intstr.IntOrString + oldReplicas int + newReplicas int + scaleExpected bool + expectedNewReplicas int + }{ + { + // Should not scale up. + deploymentReplicas: 10, + maxSurge: intstr.FromInt(0), + oldReplicas: 10, + newReplicas: 0, + scaleExpected: false, + }, + { + deploymentReplicas: 10, + maxSurge: intstr.FromInt(2), + oldReplicas: 10, + newReplicas: 0, + scaleExpected: true, + expectedNewReplicas: 2, + }, + { + deploymentReplicas: 10, + maxSurge: intstr.FromInt(2), + oldReplicas: 5, + newReplicas: 0, + scaleExpected: true, + expectedNewReplicas: 7, + }, + { + deploymentReplicas: 10, + maxSurge: intstr.FromInt(2), + oldReplicas: 10, + newReplicas: 2, + scaleExpected: false, + }, + { + // Should scale down. + deploymentReplicas: 10, + maxSurge: intstr.FromInt(2), + oldReplicas: 2, + newReplicas: 11, + scaleExpected: true, + expectedNewReplicas: 10, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + newRS := rs("foo-v2", test.newReplicas, nil, noTimestamp) + oldRS := rs("foo-v2", test.oldReplicas, nil, noTimestamp) + allRSs := []*exp.ReplicaSet{newRS, oldRS} + deployment := deployment("foo", test.deploymentReplicas, test.maxSurge, intstr.FromInt(0), nil) + fake := fake.Clientset{} + controller := &DeploymentController{ + client: &fake, + eventRecorder: &record.FakeRecorder{}, + } + scaled, err := controller.reconcileNewReplicaSet(allRSs, newRS, &deployment) + if err != nil { + t.Errorf("unexpected error: %v", err) + continue + } + if !test.scaleExpected { + if scaled || len(fake.Actions()) > 0 { + t.Errorf("unexpected scaling: %v", fake.Actions()) + } + continue + } + if test.scaleExpected && !scaled { + t.Errorf("expected scaling to occur") + continue + } + if len(fake.Actions()) != 1 { + t.Errorf("expected 1 action during scale, got: %v", fake.Actions()) + continue + } + updated := fake.Actions()[0].(core.UpdateAction).GetObject().(*exp.ReplicaSet) + if e, a := test.expectedNewReplicas, int(updated.Spec.Replicas); e != a { + t.Errorf("expected update to %d replicas, got %d", e, a) + } + } +} + +func TestDeploymentController_reconcileOldReplicaSets(t *testing.T) { + tests := []struct { + deploymentReplicas int + maxUnavailable intstr.IntOrString + oldReplicas int + newReplicas int + readyPodsFromOldRS int + readyPodsFromNewRS int + scaleExpected bool + expectedOldReplicas int + }{ + { + deploymentReplicas: 10, + maxUnavailable: intstr.FromInt(0), + oldReplicas: 10, + newReplicas: 0, + readyPodsFromOldRS: 10, + readyPodsFromNewRS: 0, + scaleExpected: true, + expectedOldReplicas: 9, + }, + { + deploymentReplicas: 10, + maxUnavailable: intstr.FromInt(2), + oldReplicas: 10, + newReplicas: 0, + readyPodsFromOldRS: 10, + readyPodsFromNewRS: 0, + scaleExpected: true, + expectedOldReplicas: 8, + }, + { // expect unhealthy replicas from old replica sets been cleaned up + deploymentReplicas: 10, + maxUnavailable: intstr.FromInt(2), + oldReplicas: 10, + newReplicas: 0, + readyPodsFromOldRS: 8, + readyPodsFromNewRS: 0, + scaleExpected: true, + expectedOldReplicas: 8, + }, + { // expect 1 unhealthy replica from old replica sets been cleaned up, and 1 ready pod been scaled down + deploymentReplicas: 10, + maxUnavailable: intstr.FromInt(2), + oldReplicas: 10, + newReplicas: 0, + readyPodsFromOldRS: 9, + readyPodsFromNewRS: 0, + scaleExpected: true, + expectedOldReplicas: 8, + }, + { // the unavailable pods from the newRS would not make us scale down old RSs in a further step + deploymentReplicas: 10, + maxUnavailable: intstr.FromInt(2), + oldReplicas: 8, + newReplicas: 2, + readyPodsFromOldRS: 8, + readyPodsFromNewRS: 0, + scaleExpected: false, + }, + } + for i, test := range tests { + t.Logf("executing scenario %d", i) + + newSelector := map[string]string{"foo": "new"} + oldSelector := map[string]string{"foo": "old"} + newRS := rs("foo-new", test.newReplicas, newSelector, noTimestamp) + oldRS := rs("foo-old", test.oldReplicas, oldSelector, noTimestamp) + oldRSs := []*exp.ReplicaSet{oldRS} + allRSs := []*exp.ReplicaSet{oldRS, newRS} + + deployment := deployment("foo", test.deploymentReplicas, intstr.FromInt(0), test.maxUnavailable, newSelector) + fakeClientset := fake.Clientset{} + fakeClientset.AddReactor("list", "pods", func(action core.Action) (handled bool, ret runtime.Object, err error) { + switch action.(type) { + case core.ListAction: + podList := &api.PodList{} + for podIndex := 0; podIndex < test.readyPodsFromOldRS; podIndex++ { + podList.Items = append(podList.Items, api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: fmt.Sprintf("%s-oldReadyPod-%d", oldRS.Name, podIndex), + Labels: oldSelector, + }, + Status: api.PodStatus{ + Conditions: []api.PodCondition{ + { + Type: api.PodReady, + Status: api.ConditionTrue, + }, + }, + }, + }) + } + for podIndex := 0; podIndex < test.oldReplicas-test.readyPodsFromOldRS; podIndex++ { + podList.Items = append(podList.Items, api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: fmt.Sprintf("%s-oldUnhealthyPod-%d", oldRS.Name, podIndex), + Labels: oldSelector, + }, + Status: api.PodStatus{ + Conditions: []api.PodCondition{ + { + Type: api.PodReady, + Status: api.ConditionFalse, + }, + }, + }, + }) + } + for podIndex := 0; podIndex < test.readyPodsFromNewRS; podIndex++ { + podList.Items = append(podList.Items, api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: fmt.Sprintf("%s-newReadyPod-%d", oldRS.Name, podIndex), + Labels: newSelector, + }, + Status: api.PodStatus{ + Conditions: []api.PodCondition{ + { + Type: api.PodReady, + Status: api.ConditionTrue, + }, + }, + }, + }) + } + for podIndex := 0; podIndex < test.oldReplicas-test.readyPodsFromOldRS; podIndex++ { + podList.Items = append(podList.Items, api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: fmt.Sprintf("%s-newUnhealthyPod-%d", oldRS.Name, podIndex), + Labels: newSelector, + }, + Status: api.PodStatus{ + Conditions: []api.PodCondition{ + { + Type: api.PodReady, + Status: api.ConditionFalse, + }, + }, + }, + }) + } + return true, podList, nil + } + return false, nil, nil + }) + controller := &DeploymentController{ + client: &fakeClientset, + eventRecorder: &record.FakeRecorder{}, + } + + scaled, err := controller.reconcileOldReplicaSets(allRSs, oldRSs, newRS, &deployment) + if err != nil { + t.Errorf("unexpected error: %v", err) + continue + } + if !test.scaleExpected && scaled { + t.Errorf("unexpected scaling: %v", fakeClientset.Actions()) + } + if test.scaleExpected && !scaled { + t.Errorf("expected scaling to occur") + continue + } + continue + } +} + +func TestDeploymentController_cleanupUnhealthyReplicas(t *testing.T) { + tests := []struct { + oldReplicas int + readyPods int + unHealthyPods int + maxCleanupCount int + cleanupCountExpected int + }{ + { + oldReplicas: 10, + readyPods: 8, + unHealthyPods: 2, + maxCleanupCount: 1, + cleanupCountExpected: 1, + }, + { + oldReplicas: 10, + readyPods: 8, + unHealthyPods: 2, + maxCleanupCount: 3, + cleanupCountExpected: 2, + }, + { + oldReplicas: 10, + readyPods: 8, + unHealthyPods: 2, + maxCleanupCount: 0, + cleanupCountExpected: 0, + }, + { + oldReplicas: 10, + readyPods: 10, + unHealthyPods: 0, + maxCleanupCount: 3, + cleanupCountExpected: 0, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + oldRS := rs("foo-v2", test.oldReplicas, nil, noTimestamp) + oldRSs := []*exp.ReplicaSet{oldRS} + deployment := deployment("foo", 10, intstr.FromInt(2), intstr.FromInt(2), nil) + fakeClientset := fake.Clientset{} + fakeClientset.AddReactor("list", "pods", func(action core.Action) (handled bool, ret runtime.Object, err error) { + switch action.(type) { + case core.ListAction: + podList := &api.PodList{} + for podIndex := 0; podIndex < test.readyPods; podIndex++ { + podList.Items = append(podList.Items, api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: fmt.Sprintf("%s-readyPod-%d", oldRS.Name, podIndex), + }, + Status: api.PodStatus{ + Conditions: []api.PodCondition{ + { + Type: api.PodReady, + Status: api.ConditionTrue, + }, + }, + }, + }) + } + for podIndex := 0; podIndex < test.unHealthyPods; podIndex++ { + podList.Items = append(podList.Items, api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: fmt.Sprintf("%s-unHealthyPod-%d", oldRS.Name, podIndex), + }, + Status: api.PodStatus{ + Conditions: []api.PodCondition{ + { + Type: api.PodReady, + Status: api.ConditionFalse, + }, + }, + }, + }) + } + return true, podList, nil + } + return false, nil, nil + }) + + controller := &DeploymentController{ + client: &fakeClientset, + eventRecorder: &record.FakeRecorder{}, + } + _, cleanupCount, err := controller.cleanupUnhealthyReplicas(oldRSs, &deployment, 0, int32(test.maxCleanupCount)) + if err != nil { + t.Errorf("unexpected error: %v", err) + continue + } + if int(cleanupCount) != test.cleanupCountExpected { + t.Errorf("expected %v unhealthy replicas been cleaned up, got %v", test.cleanupCountExpected, cleanupCount) + continue + } + } +} + +func TestDeploymentController_scaleDownOldReplicaSetsForRollingUpdate(t *testing.T) { + tests := []struct { + deploymentReplicas int + maxUnavailable intstr.IntOrString + readyPods int + oldReplicas int + scaleExpected bool + expectedOldReplicas int + }{ + { + deploymentReplicas: 10, + maxUnavailable: intstr.FromInt(0), + readyPods: 10, + oldReplicas: 10, + scaleExpected: true, + expectedOldReplicas: 9, + }, + { + deploymentReplicas: 10, + maxUnavailable: intstr.FromInt(2), + readyPods: 10, + oldReplicas: 10, + scaleExpected: true, + expectedOldReplicas: 8, + }, + { + deploymentReplicas: 10, + maxUnavailable: intstr.FromInt(2), + readyPods: 8, + oldReplicas: 10, + scaleExpected: false, + }, + { + deploymentReplicas: 10, + maxUnavailable: intstr.FromInt(2), + readyPods: 10, + oldReplicas: 0, + scaleExpected: false, + }, + { + deploymentReplicas: 10, + maxUnavailable: intstr.FromInt(2), + readyPods: 1, + oldReplicas: 10, + scaleExpected: false, + }, + } + + for i, test := range tests { + t.Logf("executing scenario %d", i) + oldRS := rs("foo-v2", test.oldReplicas, nil, noTimestamp) + allRSs := []*exp.ReplicaSet{oldRS} + oldRSs := []*exp.ReplicaSet{oldRS} + deployment := deployment("foo", test.deploymentReplicas, intstr.FromInt(0), test.maxUnavailable, map[string]string{"foo": "bar"}) + fakeClientset := fake.Clientset{} + fakeClientset.AddReactor("list", "pods", func(action core.Action) (handled bool, ret runtime.Object, err error) { + switch action.(type) { + case core.ListAction: + podList := &api.PodList{} + for podIndex := 0; podIndex < test.readyPods; podIndex++ { + podList.Items = append(podList.Items, api.Pod{ + ObjectMeta: api.ObjectMeta{ + Name: fmt.Sprintf("%s-pod-%d", oldRS.Name, podIndex), + Labels: map[string]string{"foo": "bar"}, + }, + Status: api.PodStatus{ + Conditions: []api.PodCondition{ + { + Type: api.PodReady, + Status: api.ConditionTrue, + }, + }, + }, + }) + } + return true, podList, nil + } + return false, nil, nil + }) + controller := &DeploymentController{ + client: &fakeClientset, + eventRecorder: &record.FakeRecorder{}, + } + scaled, err := controller.scaleDownOldReplicaSetsForRollingUpdate(allRSs, oldRSs, &deployment) + if err != nil { + t.Errorf("unexpected error: %v", err) + continue + } + if !test.scaleExpected { + if scaled != 0 { + t.Errorf("unexpected scaling: %v", fakeClientset.Actions()) + } + continue + } + if test.scaleExpected && scaled == 0 { + t.Errorf("expected scaling to occur; actions: %v", fakeClientset.Actions()) + continue + } + // There are both list and update actions logged, so extract the update + // action for verification. + var updateAction core.UpdateAction + for _, action := range fakeClientset.Actions() { + switch a := action.(type) { + case core.UpdateAction: + if updateAction != nil { + t.Errorf("expected only 1 update action; had %v and found %v", updateAction, a) + } else { + updateAction = a + } + } + } + if updateAction == nil { + t.Errorf("expected an update action") + continue + } + updated := updateAction.GetObject().(*exp.ReplicaSet) + if e, a := test.expectedOldReplicas, int(updated.Spec.Replicas); e != a { + t.Errorf("expected update to %d replicas, got %d", e, a) + } + } +} diff --git a/pkg/controller/deployment/sync.go b/pkg/controller/deployment/sync.go new file mode 100644 index 0000000000..ff3b37828a --- /dev/null +++ b/pkg/controller/deployment/sync.go @@ -0,0 +1,527 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package deployment + +import ( + "fmt" + "reflect" + "sort" + "strconv" + + "github.com/golang/glog" + "k8s.io/kubernetes/pkg/api" + "k8s.io/kubernetes/pkg/api/errors" + "k8s.io/kubernetes/pkg/api/unversioned" + "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/controller" + deploymentutil "k8s.io/kubernetes/pkg/util/deployment" + utilerrors "k8s.io/kubernetes/pkg/util/errors" + labelsutil "k8s.io/kubernetes/pkg/util/labels" + podutil "k8s.io/kubernetes/pkg/util/pod" + rsutil "k8s.io/kubernetes/pkg/util/replicaset" +) + +// sync is responsible for reconciling deployments on scaling events or when they +// are paused. +func (dc *DeploymentController) sync(deployment *extensions.Deployment) error { + newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(deployment, false) + if err != nil { + return err + } + if err := dc.scale(deployment, newRS, oldRSs); err != nil { + // If we get an error while trying to scale, the deployment will be requeued + // so we can abort this resync + return err + } + dc.cleanupDeployment(oldRSs, deployment) + + allRSs := append(oldRSs, newRS) + return dc.syncDeploymentStatus(allRSs, newRS, deployment) +} + +// getAllReplicaSetsAndSyncRevision returns all the replica sets for the provided deployment (new and all old), with new RS's and deployment's revision updated. +// 1. Get all old RSes this deployment targets, and calculate the max revision number among them (maxOldV). +// 2. Get new RS this deployment targets (whose pod template matches deployment's), and update new RS's revision number to (maxOldV + 1), +// only if its revision number is smaller than (maxOldV + 1). If this step failed, we'll update it in the next deployment sync loop. +// 3. Copy new RS's revision number to deployment (update deployment's revision). If this step failed, we'll update it in the next deployment sync loop. +// Note that currently the deployment controller is using caches to avoid querying the server for reads. +// This may lead to stale reads of replica sets, thus incorrect deployment status. +func (dc *DeploymentController) getAllReplicaSetsAndSyncRevision(deployment *extensions.Deployment, createIfNotExisted bool) (*extensions.ReplicaSet, []*extensions.ReplicaSet, error) { + // List the deployment's RSes & Pods and apply pod-template-hash info to deployment's adopted RSes/Pods + rsList, podList, err := dc.rsAndPodsWithHashKeySynced(deployment) + if err != nil { + return nil, nil, fmt.Errorf("error labeling replica sets and pods with pod-template-hash: %v", err) + } + _, allOldRSs, err := deploymentutil.FindOldReplicaSets(deployment, rsList, podList) + if err != nil { + return nil, nil, err + } + + // Calculate the max revision number among all old RSes + maxOldV := maxRevision(allOldRSs) + + // Get new replica set with the updated revision number + newRS, err := dc.getNewReplicaSet(deployment, rsList, maxOldV, allOldRSs, createIfNotExisted) + if err != nil { + return nil, nil, err + } + + // Sync deployment's revision number with new replica set + if newRS != nil && newRS.Annotations != nil && len(newRS.Annotations[deploymentutil.RevisionAnnotation]) > 0 && + (deployment.Annotations == nil || deployment.Annotations[deploymentutil.RevisionAnnotation] != newRS.Annotations[deploymentutil.RevisionAnnotation]) { + if err = dc.updateDeploymentRevision(deployment, newRS.Annotations[deploymentutil.RevisionAnnotation]); err != nil { + glog.V(4).Infof("Error: %v. Unable to update deployment revision, will retry later.", err) + } + } + + return newRS, allOldRSs, nil +} + +// rsAndPodsWithHashKeySynced returns the RSes and pods the given deployment targets, with pod-template-hash information synced. +func (dc *DeploymentController) rsAndPodsWithHashKeySynced(deployment *extensions.Deployment) ([]extensions.ReplicaSet, *api.PodList, error) { + rsList, err := deploymentutil.ListReplicaSets(deployment, + func(namespace string, options api.ListOptions) ([]extensions.ReplicaSet, error) { + return dc.rsStore.ReplicaSets(namespace).List(options.LabelSelector) + }) + if err != nil { + return nil, nil, fmt.Errorf("error listing ReplicaSets: %v", err) + } + syncedRSList := []extensions.ReplicaSet{} + for _, rs := range rsList { + // Add pod-template-hash information if it's not in the RS. + // Otherwise, new RS produced by Deployment will overlap with pre-existing ones + // that aren't constrained by the pod-template-hash. + syncedRS, err := dc.addHashKeyToRSAndPods(rs) + if err != nil { + return nil, nil, err + } + syncedRSList = append(syncedRSList, *syncedRS) + } + syncedPodList, err := dc.listPods(deployment) + if err != nil { + return nil, nil, err + } + return syncedRSList, syncedPodList, nil +} + +// addHashKeyToRSAndPods adds pod-template-hash information to the given rs, if it's not already there, with the following steps: +// 1. Add hash label to the rs's pod template, and make sure the controller sees this update so that no orphaned pods will be created +// 2. Add hash label to all pods this rs owns, wait until replicaset controller reports rs.Status.FullyLabeledReplicas equal to the desired number of replicas +// 3. Add hash label to the rs's label and selector +func (dc *DeploymentController) addHashKeyToRSAndPods(rs extensions.ReplicaSet) (updatedRS *extensions.ReplicaSet, err error) { + updatedRS = &rs + // If the rs already has the new hash label in its selector, it's done syncing + if labelsutil.SelectorHasLabel(rs.Spec.Selector, extensions.DefaultDeploymentUniqueLabelKey) { + return + } + namespace := rs.Namespace + hash := rsutil.GetPodTemplateSpecHash(rs) + rsUpdated := false + // 1. Add hash template label to the rs. This ensures that any newly created pods will have the new label. + updatedRS, rsUpdated, err = rsutil.UpdateRSWithRetries(dc.client.Extensions().ReplicaSets(namespace), updatedRS, + func(updated *extensions.ReplicaSet) error { + // Precondition: the RS doesn't contain the new hash in its pod template label. + if updated.Spec.Template.Labels[extensions.DefaultDeploymentUniqueLabelKey] == hash { + return utilerrors.ErrPreconditionViolated + } + updated.Spec.Template.Labels = labelsutil.AddLabel(updated.Spec.Template.Labels, extensions.DefaultDeploymentUniqueLabelKey, hash) + return nil + }) + if err != nil { + return nil, fmt.Errorf("error updating %s %s/%s pod template label with template hash: %v", updatedRS.Kind, updatedRS.Namespace, updatedRS.Name, err) + } + if !rsUpdated { + // If RS wasn't updated but didn't return error in step 1, we've hit a RS not found error. + // Return here and retry in the next sync loop. + return &rs, nil + } + // Make sure rs pod template is updated so that it won't create pods without the new label (orphaned pods). + if updatedRS.Generation > updatedRS.Status.ObservedGeneration { + if err = deploymentutil.WaitForReplicaSetUpdated(dc.client, updatedRS.Generation, namespace, updatedRS.Name); err != nil { + return nil, fmt.Errorf("error waiting for %s %s/%s generation %d observed by controller: %v", updatedRS.Kind, updatedRS.Namespace, updatedRS.Name, updatedRS.Generation, err) + } + } + glog.V(4).Infof("Observed the update of %s %s/%s's pod template with hash %s.", rs.Kind, rs.Namespace, rs.Name, hash) + + // 2. Update all pods managed by the rs to have the new hash label, so they will be correctly adopted. + selector, err := unversioned.LabelSelectorAsSelector(updatedRS.Spec.Selector) + if err != nil { + return nil, fmt.Errorf("error in converting selector to label selector for replica set %s: %s", updatedRS.Name, err) + } + options := api.ListOptions{LabelSelector: selector} + podList, err := dc.podStore.Pods(namespace).List(options.LabelSelector) + if err != nil { + return nil, fmt.Errorf("error in getting pod list for namespace %s and list options %+v: %s", namespace, options, err) + } + allPodsLabeled := false + if allPodsLabeled, err = deploymentutil.LabelPodsWithHash(&podList, updatedRS, dc.client, namespace, hash); err != nil { + return nil, fmt.Errorf("error in adding template hash label %s to pods %+v: %s", hash, podList, err) + } + // If not all pods are labeled but didn't return error in step 2, we've hit at least one pod not found error. + // Return here and retry in the next sync loop. + if !allPodsLabeled { + return updatedRS, nil + } + + // We need to wait for the replicaset controller to observe the pods being + // labeled with pod template hash. Because previously we've called + // WaitForReplicaSetUpdated, the replicaset controller should have dropped + // FullyLabeledReplicas to 0 already, we only need to wait it to increase + // back to the number of replicas in the spec. + if err = deploymentutil.WaitForPodsHashPopulated(dc.client, updatedRS.Generation, namespace, updatedRS.Name); err != nil { + return nil, fmt.Errorf("%s %s/%s: error waiting for replicaset controller to observe pods being labeled with template hash: %v", updatedRS.Kind, updatedRS.Namespace, updatedRS.Name, err) + } + + // 3. Update rs label and selector to include the new hash label + // Copy the old selector, so that we can scrub out any orphaned pods + if updatedRS, rsUpdated, err = rsutil.UpdateRSWithRetries(dc.client.Extensions().ReplicaSets(namespace), updatedRS, + func(updated *extensions.ReplicaSet) error { + // Precondition: the RS doesn't contain the new hash in its label or selector. + if updated.Labels[extensions.DefaultDeploymentUniqueLabelKey] == hash && updated.Spec.Selector.MatchLabels[extensions.DefaultDeploymentUniqueLabelKey] == hash { + return utilerrors.ErrPreconditionViolated + } + updated.Labels = labelsutil.AddLabel(updated.Labels, extensions.DefaultDeploymentUniqueLabelKey, hash) + updated.Spec.Selector = labelsutil.AddLabelToSelector(updated.Spec.Selector, extensions.DefaultDeploymentUniqueLabelKey, hash) + return nil + }); err != nil { + return nil, fmt.Errorf("error updating %s %s/%s label and selector with template hash: %v", updatedRS.Kind, updatedRS.Namespace, updatedRS.Name, err) + } + if rsUpdated { + glog.V(4).Infof("Updated %s %s/%s's selector and label with hash %s.", rs.Kind, rs.Namespace, rs.Name, hash) + } + // If the RS isn't actually updated in step 3, that's okay, we'll retry in the next sync loop since its selector isn't updated yet. + + // TODO: look for orphaned pods and label them in the background somewhere else periodically + + return updatedRS, nil +} + +func (dc *DeploymentController) listPods(deployment *extensions.Deployment) (*api.PodList, error) { + return deploymentutil.ListPods(deployment, + func(namespace string, options api.ListOptions) (*api.PodList, error) { + podList, err := dc.podStore.Pods(namespace).List(options.LabelSelector) + return &podList, err + }) +} + +// Returns a replica set that matches the intent of the given deployment. Returns nil if the new replica set doesn't exist yet. +// 1. Get existing new RS (the RS that the given deployment targets, whose pod template is the same as deployment's). +// 2. If there's existing new RS, update its revision number if it's smaller than (maxOldRevision + 1), where maxOldRevision is the max revision number among all old RSes. +// 3. If there's no existing new RS and createIfNotExisted is true, create one with appropriate revision number (maxOldRevision + 1) and replicas. +// Note that the pod-template-hash will be added to adopted RSes and pods. +func (dc *DeploymentController) getNewReplicaSet(deployment *extensions.Deployment, rsList []extensions.ReplicaSet, maxOldRevision int64, oldRSs []*extensions.ReplicaSet, createIfNotExisted bool) (*extensions.ReplicaSet, error) { + // Calculate revision number for this new replica set + newRevision := strconv.FormatInt(maxOldRevision+1, 10) + + existingNewRS, err := deploymentutil.FindNewReplicaSet(deployment, rsList) + if err != nil { + return nil, err + } else if existingNewRS != nil { + // Set existing new replica set's annotation + if setNewReplicaSetAnnotations(deployment, existingNewRS, newRevision, true) { + return dc.client.Extensions().ReplicaSets(deployment.ObjectMeta.Namespace).Update(existingNewRS) + } + return existingNewRS, nil + } + + if !createIfNotExisted { + return nil, nil + } + + // new ReplicaSet does not exist, create one. + namespace := deployment.ObjectMeta.Namespace + podTemplateSpecHash := podutil.GetPodTemplateSpecHash(deployment.Spec.Template) + newRSTemplate := deploymentutil.GetNewReplicaSetTemplate(deployment) + // Add podTemplateHash label to selector. + newRSSelector := labelsutil.CloneSelectorAndAddLabel(deployment.Spec.Selector, extensions.DefaultDeploymentUniqueLabelKey, podTemplateSpecHash) + + // Create new ReplicaSet + newRS := extensions.ReplicaSet{ + ObjectMeta: api.ObjectMeta{ + // Make the name deterministic, to ensure idempotence + Name: deployment.Name + "-" + fmt.Sprintf("%d", podTemplateSpecHash), + Namespace: namespace, + }, + Spec: extensions.ReplicaSetSpec{ + Replicas: 0, + Selector: newRSSelector, + Template: newRSTemplate, + }, + } + allRSs := append(oldRSs, &newRS) + newReplicasCount, err := deploymentutil.NewRSNewReplicas(deployment, allRSs, &newRS) + if err != nil { + return nil, err + } + + newRS.Spec.Replicas = newReplicasCount + // Set new replica set's annotation + setNewReplicaSetAnnotations(deployment, &newRS, newRevision, false) + createdRS, err := dc.client.Extensions().ReplicaSets(namespace).Create(&newRS) + if err != nil { + dc.enqueueDeployment(deployment) + return nil, fmt.Errorf("error creating replica set %v: %v", deployment.Name, err) + } + if newReplicasCount > 0 { + dc.eventRecorder.Eventf(deployment, api.EventTypeNormal, "ScalingReplicaSet", "Scaled %s replica set %s to %d", "up", createdRS.Name, newReplicasCount) + } + + return createdRS, dc.updateDeploymentRevision(deployment, newRevision) +} + +func (dc *DeploymentController) updateDeploymentRevision(deployment *extensions.Deployment, revision string) error { + if deployment.Annotations == nil { + deployment.Annotations = make(map[string]string) + } + if deployment.Annotations[deploymentutil.RevisionAnnotation] != revision { + deployment.Annotations[deploymentutil.RevisionAnnotation] = revision + _, err := dc.client.Extensions().Deployments(deployment.ObjectMeta.Namespace).Update(deployment) + return err + } + return nil +} + +// scale scales proportionally in order to mitigate risk. Otherwise, scaling up can increase the size +// of the new replica set and scaling down can decrease the sizes of the old ones, both of which would +// have the effect of hastening the rollout progress, which could produce a higher proportion of unavailable +// replicas in the event of a problem with the rolled out template. Should run only on scaling events or +// when a deployment is paused and not during the normal rollout process. +func (dc *DeploymentController) scale(deployment *extensions.Deployment, newRS *extensions.ReplicaSet, oldRSs []*extensions.ReplicaSet) error { + // If there is only one active replica set then we should scale that up to the full count of the + // deployment. If there is no active replica set, then we should scale up the newest replica set. + if activeOrLatest := findActiveOrLatest(newRS, oldRSs); activeOrLatest != nil { + if activeOrLatest.Spec.Replicas == deployment.Spec.Replicas { + return nil + } + _, _, err := dc.scaleReplicaSetAndRecordEvent(activeOrLatest, deployment.Spec.Replicas, deployment) + return err + } + + // If the new replica set is saturated, old replica sets should be fully scaled down. + // This case handles replica set adoption during a saturated new replica set. + if deploymentutil.IsSaturated(deployment, newRS) { + for _, old := range controller.FilterActiveReplicaSets(oldRSs) { + if _, _, err := dc.scaleReplicaSetAndRecordEvent(old, 0, deployment); err != nil { + return err + } + } + return nil + } + + // There are old replica sets with pods and the new replica set is not saturated. + // We need to proportionally scale all replica sets (new and old) in case of a + // rolling deployment. + if deploymentutil.IsRollingUpdate(deployment) { + allRSs := controller.FilterActiveReplicaSets(append(oldRSs, newRS)) + allRSsReplicas := deploymentutil.GetReplicaCountForReplicaSets(allRSs) + + allowedSize := int32(0) + if deployment.Spec.Replicas > 0 { + allowedSize = deployment.Spec.Replicas + maxSurge(*deployment) + } + + // Number of additional replicas that can be either added or removed from the total + // replicas count. These replicas should be distributed proportionally to the active + // replica sets. + deploymentReplicasToAdd := allowedSize - allRSsReplicas + + // The additional replicas should be distributed proportionally amongst the active + // replica sets from the larger to the smaller in size replica set. Scaling direction + // drives what happens in case we are trying to scale replica sets of the same size. + // In such a case when scaling up, we should scale up newer replica sets first, and + // when scaling down, we should scale down older replica sets first. + scalingOperation := "up" + switch { + case deploymentReplicasToAdd > 0: + sort.Sort(controller.ReplicaSetsBySizeNewer(allRSs)) + + case deploymentReplicasToAdd < 0: + sort.Sort(controller.ReplicaSetsBySizeOlder(allRSs)) + scalingOperation = "down" + + default: /* deploymentReplicasToAdd == 0 */ + // Nothing to add. + return nil + } + + // Iterate over all active replica sets and estimate proportions for each of them. + // The absolute value of deploymentReplicasAdded should never exceed the absolute + // value of deploymentReplicasToAdd. + deploymentReplicasAdded := int32(0) + for i := range allRSs { + rs := allRSs[i] + + proportion := getProportion(rs, *deployment, deploymentReplicasToAdd, deploymentReplicasAdded) + + rs.Spec.Replicas += proportion + deploymentReplicasAdded += proportion + } + + // Update all replica sets + for i := range allRSs { + rs := allRSs[i] + + // Add/remove any leftovers to the largest replica set. + if i == 0 { + leftover := deploymentReplicasToAdd - deploymentReplicasAdded + rs.Spec.Replicas += leftover + if rs.Spec.Replicas < 0 { + rs.Spec.Replicas = 0 + } + } + + if _, err := dc.scaleReplicaSet(rs, rs.Spec.Replicas, deployment, scalingOperation); err != nil { + // Return as soon as we fail, the deployment is requeued + return err + } + } + } + return nil +} + +func (dc *DeploymentController) scaleReplicaSetAndRecordEvent(rs *extensions.ReplicaSet, newScale int32, deployment *extensions.Deployment) (bool, *extensions.ReplicaSet, error) { + // No need to scale + if rs.Spec.Replicas == newScale { + return false, rs, nil + } + var scalingOperation string + if rs.Spec.Replicas < newScale { + scalingOperation = "up" + } else { + scalingOperation = "down" + } + newRS, err := dc.scaleReplicaSet(rs, newScale, deployment, scalingOperation) + return true, newRS, err +} + +func (dc *DeploymentController) scaleReplicaSet(rs *extensions.ReplicaSet, newScale int32, deployment *extensions.Deployment, scalingOperation string) (*extensions.ReplicaSet, error) { + // NOTE: This mutates the ReplicaSet passed in. Not sure if that's a good idea. + rs.Spec.Replicas = newScale + setReplicasAnnotations(rs, deployment.Spec.Replicas, deployment.Spec.Replicas+maxSurge(*deployment)) + rs, err := dc.client.Extensions().ReplicaSets(rs.ObjectMeta.Namespace).Update(rs) + if err == nil { + dc.eventRecorder.Eventf(deployment, api.EventTypeNormal, "ScalingReplicaSet", "Scaled %s replica set %s to %d", scalingOperation, rs.Name, newScale) + } else { + glog.Warningf("Cannot update replica set %q: %v", rs.Name, err) + dc.enqueueDeployment(deployment) + } + return rs, err +} + +// cleanupDeployment is responsible for cleaning up a deployment ie. retains all but the latest N old replica sets +// where N=d.Spec.RevisionHistoryLimit. Old replica sets are older versions of the podtemplate of a deployment kept +// around by default 1) for historical reasons and 2) for the ability to rollback a deployment. +func (dc *DeploymentController) cleanupDeployment(oldRSs []*extensions.ReplicaSet, deployment *extensions.Deployment) error { + if deployment.Spec.RevisionHistoryLimit == nil { + return nil + } + diff := int32(len(oldRSs)) - *deployment.Spec.RevisionHistoryLimit + if diff <= 0 { + return nil + } + + sort.Sort(controller.ReplicaSetsByCreationTimestamp(oldRSs)) + + var errList []error + // TODO: This should be parallelized. + for i := int32(0); i < diff; i++ { + rs := oldRSs[i] + // Avoid delete replica set with non-zero replica counts + if rs.Status.Replicas != 0 || rs.Spec.Replicas != 0 || rs.Generation > rs.Status.ObservedGeneration { + continue + } + if err := dc.client.Extensions().ReplicaSets(rs.Namespace).Delete(rs.Name, nil); err != nil && !errors.IsNotFound(err) { + glog.V(2).Infof("Failed deleting old replica set %v for deployment %v: %v", rs.Name, deployment.Name, err) + errList = append(errList, err) + } + } + + return utilerrors.NewAggregate(errList) +} + +// syncDeploymentStatus checks if the status is up-to-date and sync it if necessary +func (dc *DeploymentController) syncDeploymentStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, d *extensions.Deployment) error { + newStatus, err := dc.calculateStatus(allRSs, newRS, d) + if err != nil { + return err + } + if !reflect.DeepEqual(d.Status, newStatus) { + return dc.updateDeploymentStatus(allRSs, newRS, d) + } + return nil +} + +func (dc *DeploymentController) calculateStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment *extensions.Deployment) (extensions.DeploymentStatus, error) { + availableReplicas, err := dc.getAvailablePodsForReplicaSets(deployment, allRSs) + if err != nil { + return deployment.Status, fmt.Errorf("failed to count available pods: %v", err) + } + totalReplicas := deploymentutil.GetReplicaCountForReplicaSets(allRSs) + + return extensions.DeploymentStatus{ + // TODO: Ensure that if we start retrying status updates, we won't pick up a new Generation value. + ObservedGeneration: deployment.Generation, + Replicas: deploymentutil.GetActualReplicaCountForReplicaSets(allRSs), + UpdatedReplicas: deploymentutil.GetActualReplicaCountForReplicaSets([]*extensions.ReplicaSet{newRS}), + AvailableReplicas: availableReplicas, + UnavailableReplicas: totalReplicas - availableReplicas, + }, nil +} + +func (dc *DeploymentController) getAvailablePodsForReplicaSets(deployment *extensions.Deployment, rss []*extensions.ReplicaSet) (int32, error) { + podList, err := dc.listPods(deployment) + if err != nil { + return 0, err + } + return deploymentutil.CountAvailablePodsForReplicaSets(podList, rss, deployment.Spec.MinReadySeconds) +} + +func (dc *DeploymentController) updateDeploymentStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment *extensions.Deployment) error { + newStatus, err := dc.calculateStatus(allRSs, newRS, deployment) + if err != nil { + return err + } + newDeployment := deployment + newDeployment.Status = newStatus + _, err = dc.client.Extensions().Deployments(deployment.Namespace).UpdateStatus(newDeployment) + return err +} + +// isScalingEvent checks whether the provided deployment has been updated with a scaling event +// by looking at the desired-replicas annotation in the active replica sets of the deployment. +func (dc *DeploymentController) isScalingEvent(d *extensions.Deployment) bool { + newRS, oldRSs, err := dc.getAllReplicaSetsAndSyncRevision(d, false) + if err != nil { + return false + } + // If there is no new replica set matching this deployment and the deployment isn't paused + // then there is a new rollout that waits to happen + if newRS == nil && !d.Spec.Paused { + return false + } + allRSs := append(oldRSs, newRS) + for _, rs := range controller.FilterActiveReplicaSets(allRSs) { + desired, ok := getDesiredReplicasAnnotation(rs) + if !ok { + continue + } + if desired != d.Spec.Replicas { + return true + } + } + return false +} diff --git a/pkg/controller/deployment/sync_test.go b/pkg/controller/deployment/sync_test.go new file mode 100644 index 0000000000..d08cf3d077 --- /dev/null +++ b/pkg/controller/deployment/sync_test.go @@ -0,0 +1,348 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package deployment + +import ( + "testing" + "time" + + "k8s.io/kubernetes/pkg/api/unversioned" + exp "k8s.io/kubernetes/pkg/apis/extensions" + "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/fake" + "k8s.io/kubernetes/pkg/client/record" + "k8s.io/kubernetes/pkg/controller" + "k8s.io/kubernetes/pkg/util/intstr" +) + +func TestScale(t *testing.T) { + newTimestamp := unversioned.Date(2016, 5, 20, 2, 0, 0, 0, time.UTC) + oldTimestamp := unversioned.Date(2016, 5, 20, 1, 0, 0, 0, time.UTC) + olderTimestamp := unversioned.Date(2016, 5, 20, 0, 0, 0, 0, time.UTC) + + tests := []struct { + name string + deployment *exp.Deployment + oldDeployment *exp.Deployment + + newRS *exp.ReplicaSet + oldRSs []*exp.ReplicaSet + + expectedNew *exp.ReplicaSet + expectedOld []*exp.ReplicaSet + + desiredReplicasAnnotations map[string]int32 + }{ + { + name: "normal scaling event: 10 -> 12", + deployment: newDeployment(12, nil), + oldDeployment: newDeployment(10, nil), + + newRS: rs("foo-v1", 10, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{}, + + expectedNew: rs("foo-v1", 12, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{}, + }, + { + name: "normal scaling event: 10 -> 5", + deployment: newDeployment(5, nil), + oldDeployment: newDeployment(10, nil), + + newRS: rs("foo-v1", 10, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{}, + + expectedNew: rs("foo-v1", 5, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{}, + }, + { + name: "proportional scaling: 5 -> 10", + deployment: newDeployment(10, nil), + oldDeployment: newDeployment(5, nil), + + newRS: rs("foo-v2", 2, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v1", 3, nil, oldTimestamp)}, + + expectedNew: rs("foo-v2", 4, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v1", 6, nil, oldTimestamp)}, + }, + { + name: "proportional scaling: 5 -> 3", + deployment: newDeployment(3, nil), + oldDeployment: newDeployment(5, nil), + + newRS: rs("foo-v2", 2, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v1", 3, nil, oldTimestamp)}, + + expectedNew: rs("foo-v2", 1, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v1", 2, nil, oldTimestamp)}, + }, + { + name: "proportional scaling: 9 -> 4", + deployment: newDeployment(4, nil), + oldDeployment: newDeployment(9, nil), + + newRS: rs("foo-v2", 8, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v1", 1, nil, oldTimestamp)}, + + expectedNew: rs("foo-v2", 4, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v1", 0, nil, oldTimestamp)}, + }, + { + name: "proportional scaling: 7 -> 10", + deployment: newDeployment(10, nil), + oldDeployment: newDeployment(7, nil), + + newRS: rs("foo-v3", 2, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 3, nil, oldTimestamp), rs("foo-v1", 2, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 3, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 4, nil, oldTimestamp), rs("foo-v1", 3, nil, olderTimestamp)}, + }, + { + name: "proportional scaling: 13 -> 8", + deployment: newDeployment(8, nil), + oldDeployment: newDeployment(13, nil), + + newRS: rs("foo-v3", 2, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 8, nil, oldTimestamp), rs("foo-v1", 3, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 1, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 5, nil, oldTimestamp), rs("foo-v1", 2, nil, olderTimestamp)}, + }, + // Scales up the new replica set. + { + name: "leftover distribution: 3 -> 4", + deployment: newDeployment(4, nil), + oldDeployment: newDeployment(3, nil), + + newRS: rs("foo-v3", 1, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 2, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, + }, + // Scales down the older replica set. + { + name: "leftover distribution: 3 -> 2", + deployment: newDeployment(2, nil), + oldDeployment: newDeployment(3, nil), + + newRS: rs("foo-v3", 1, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 1, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 0, nil, olderTimestamp)}, + }, + // Scales up the latest replica set first. + { + name: "proportional scaling (no new rs): 4 -> 5", + deployment: newDeployment(5, nil), + oldDeployment: newDeployment(4, nil), + + newRS: nil, + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 2, nil, oldTimestamp), rs("foo-v1", 2, nil, olderTimestamp)}, + + expectedNew: nil, + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 3, nil, oldTimestamp), rs("foo-v1", 2, nil, olderTimestamp)}, + }, + // Scales down to zero + { + name: "proportional scaling: 6 -> 0", + deployment: newDeployment(0, nil), + oldDeployment: newDeployment(6, nil), + + newRS: rs("foo-v3", 3, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 2, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 0, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 0, nil, oldTimestamp), rs("foo-v1", 0, nil, olderTimestamp)}, + }, + // Scales up from zero + { + name: "proportional scaling: 0 -> 6", + deployment: newDeployment(6, nil), + oldDeployment: newDeployment(0, nil), + + newRS: rs("foo-v3", 0, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 0, nil, oldTimestamp), rs("foo-v1", 0, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 6, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 0, nil, oldTimestamp), rs("foo-v1", 0, nil, olderTimestamp)}, + }, + // Scenario: deployment.spec.replicas == 3 ( foo-v1.spec.replicas == foo-v2.spec.replicas == foo-v3.spec.replicas == 1 ) + // Deployment is scaled to 5. foo-v3.spec.replicas and foo-v2.spec.replicas should increment by 1 but foo-v2 fails to + // update. + { + name: "failed rs update", + deployment: newDeployment(5, nil), + oldDeployment: newDeployment(5, nil), + + newRS: rs("foo-v3", 2, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v2", 1, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, + + expectedNew: rs("foo-v3", 2, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v2", 2, nil, oldTimestamp), rs("foo-v1", 1, nil, olderTimestamp)}, + + desiredReplicasAnnotations: map[string]int32{"foo-v2": int32(3)}, + }, + { + name: "deployment with surge pods", + deployment: newDeploymentEnhanced(20, intstr.FromInt(2)), + oldDeployment: newDeploymentEnhanced(10, intstr.FromInt(2)), + + newRS: rs("foo-v2", 6, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v1", 6, nil, oldTimestamp)}, + + expectedNew: rs("foo-v2", 11, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v1", 11, nil, oldTimestamp)}, + }, + { + name: "change both surge and size", + deployment: newDeploymentEnhanced(50, intstr.FromInt(6)), + oldDeployment: newDeploymentEnhanced(10, intstr.FromInt(3)), + + newRS: rs("foo-v2", 5, nil, newTimestamp), + oldRSs: []*exp.ReplicaSet{rs("foo-v1", 8, nil, oldTimestamp)}, + + expectedNew: rs("foo-v2", 22, nil, newTimestamp), + expectedOld: []*exp.ReplicaSet{rs("foo-v1", 34, nil, oldTimestamp)}, + }, + } + + for _, test := range tests { + _ = olderTimestamp + t.Log(test.name) + fake := fake.Clientset{} + dc := &DeploymentController{ + client: &fake, + eventRecorder: &record.FakeRecorder{}, + } + + if test.newRS != nil { + desiredReplicas := test.oldDeployment.Spec.Replicas + if desired, ok := test.desiredReplicasAnnotations[test.newRS.Name]; ok { + desiredReplicas = desired + } + setReplicasAnnotations(test.newRS, desiredReplicas, desiredReplicas+maxSurge(*test.oldDeployment)) + } + for i := range test.oldRSs { + rs := test.oldRSs[i] + if rs == nil { + continue + } + desiredReplicas := test.oldDeployment.Spec.Replicas + if desired, ok := test.desiredReplicasAnnotations[rs.Name]; ok { + desiredReplicas = desired + } + setReplicasAnnotations(rs, desiredReplicas, desiredReplicas+maxSurge(*test.oldDeployment)) + } + + if err := dc.scale(test.deployment, test.newRS, test.oldRSs); err != nil { + t.Errorf("%s: unexpected error: %v", test.name, err) + continue + } + if test.expectedNew != nil && test.newRS != nil && test.expectedNew.Spec.Replicas != test.newRS.Spec.Replicas { + t.Errorf("%s: expected new replicas: %d, got: %d", test.name, test.expectedNew.Spec.Replicas, test.newRS.Spec.Replicas) + continue + } + if len(test.expectedOld) != len(test.oldRSs) { + t.Errorf("%s: expected %d old replica sets, got %d", test.name, len(test.expectedOld), len(test.oldRSs)) + continue + } + for n := range test.oldRSs { + rs := test.oldRSs[n] + exp := test.expectedOld[n] + if exp.Spec.Replicas != rs.Spec.Replicas { + t.Errorf("%s: expected old (%s) replicas: %d, got: %d", test.name, rs.Name, exp.Spec.Replicas, rs.Spec.Replicas) + } + } + } +} + +func TestDeploymentController_cleanupDeployment(t *testing.T) { + selector := map[string]string{"foo": "bar"} + + tests := []struct { + oldRSs []*exp.ReplicaSet + revisionHistoryLimit int + expectedDeletions int + }{ + { + oldRSs: []*exp.ReplicaSet{ + newRSWithStatus("foo-1", 0, 0, selector), + newRSWithStatus("foo-2", 0, 0, selector), + newRSWithStatus("foo-3", 0, 0, selector), + }, + revisionHistoryLimit: 1, + expectedDeletions: 2, + }, + { + // Only delete the replica set with Spec.Replicas = Status.Replicas = 0. + oldRSs: []*exp.ReplicaSet{ + newRSWithStatus("foo-1", 0, 0, selector), + newRSWithStatus("foo-2", 0, 1, selector), + newRSWithStatus("foo-3", 1, 0, selector), + newRSWithStatus("foo-4", 1, 1, selector), + }, + revisionHistoryLimit: 0, + expectedDeletions: 1, + }, + + { + oldRSs: []*exp.ReplicaSet{ + newRSWithStatus("foo-1", 0, 0, selector), + newRSWithStatus("foo-2", 0, 0, selector), + }, + revisionHistoryLimit: 0, + expectedDeletions: 2, + }, + { + oldRSs: []*exp.ReplicaSet{ + newRSWithStatus("foo-1", 1, 1, selector), + newRSWithStatus("foo-2", 1, 1, selector), + }, + revisionHistoryLimit: 0, + expectedDeletions: 0, + }, + } + + for i, test := range tests { + fake := &fake.Clientset{} + controller := NewDeploymentController(fake, controller.NoResyncPeriodFunc) + + controller.eventRecorder = &record.FakeRecorder{} + controller.rsStoreSynced = alwaysReady + controller.podStoreSynced = alwaysReady + for _, rs := range test.oldRSs { + controller.rsStore.Add(rs) + } + + d := newDeployment(1, &tests[i].revisionHistoryLimit) + controller.cleanupDeployment(test.oldRSs, d) + + gotDeletions := 0 + for _, action := range fake.Actions() { + if "delete" == action.GetVerb() { + gotDeletions++ + } + } + if gotDeletions != test.expectedDeletions { + t.Errorf("expect %v old replica sets been deleted, but got %v", test.expectedDeletions, gotDeletions) + continue + } + } +} diff --git a/pkg/controller/deployment/util.go b/pkg/controller/deployment/util.go index 06fbad3c87..4070e82179 100644 --- a/pkg/controller/deployment/util.go +++ b/pkg/controller/deployment/util.go @@ -23,12 +23,123 @@ import ( "github.com/golang/glog" + "k8s.io/kubernetes/pkg/api/annotations" "k8s.io/kubernetes/pkg/apis/extensions" "k8s.io/kubernetes/pkg/controller" deploymentutil "k8s.io/kubernetes/pkg/util/deployment" "k8s.io/kubernetes/pkg/util/integer" ) +func maxRevision(allRSs []*extensions.ReplicaSet) int64 { + max := int64(0) + for _, rs := range allRSs { + if v, err := deploymentutil.Revision(rs); err != nil { + // Skip the replica sets when it failed to parse their revision information + glog.V(4).Infof("Error: %v. Couldn't parse revision for replica set %#v, deployment controller will skip it when reconciling revisions.", err, rs) + } else if v > max { + max = v + } + } + return max +} + +// lastRevision finds the second max revision number in all replica sets (the last revision) +func lastRevision(allRSs []*extensions.ReplicaSet) int64 { + max, secMax := int64(0), int64(0) + for _, rs := range allRSs { + if v, err := deploymentutil.Revision(rs); err != nil { + // Skip the replica sets when it failed to parse their revision information + glog.V(4).Infof("Error: %v. Couldn't parse revision for replica set %#v, deployment controller will skip it when reconciling revisions.", err, rs) + } else if v >= max { + secMax = max + max = v + } else if v > secMax { + secMax = v + } + } + return secMax +} + +// setNewReplicaSetAnnotations sets new replica set's annotations appropriately by updating its revision and +// copying required deployment annotations to it; it returns true if replica set's annotation is changed. +func setNewReplicaSetAnnotations(deployment *extensions.Deployment, newRS *extensions.ReplicaSet, newRevision string, exists bool) bool { + // First, copy deployment's annotations (except for apply and revision annotations) + annotationChanged := copyDeploymentAnnotationsToReplicaSet(deployment, newRS) + // Then, update replica set's revision annotation + if newRS.Annotations == nil { + newRS.Annotations = make(map[string]string) + } + // The newRS's revision should be the greatest among all RSes. Usually, its revision number is newRevision (the max revision number + // of all old RSes + 1). However, it's possible that some of the old RSes are deleted after the newRS revision being updated, and + // newRevision becomes smaller than newRS's revision. We should only update newRS revision when it's smaller than newRevision. + if newRS.Annotations[deploymentutil.RevisionAnnotation] < newRevision { + newRS.Annotations[deploymentutil.RevisionAnnotation] = newRevision + annotationChanged = true + glog.V(4).Infof("Updating replica set %q revision to %s", newRS.Name, newRevision) + } + if !exists && setReplicasAnnotations(newRS, deployment.Spec.Replicas, deployment.Spec.Replicas+maxSurge(*deployment)) { + annotationChanged = true + } + return annotationChanged +} + +var annotationsToSkip = map[string]bool{ + annotations.LastAppliedConfigAnnotation: true, + deploymentutil.RevisionAnnotation: true, + deploymentutil.DesiredReplicasAnnotation: true, + deploymentutil.MaxReplicasAnnotation: true, +} + +// skipCopyAnnotation returns true if we should skip copying the annotation with the given annotation key +// TODO: How to decide which annotations should / should not be copied? +// See https://github.com/kubernetes/kubernetes/pull/20035#issuecomment-179558615 +func skipCopyAnnotation(key string) bool { + return annotationsToSkip[key] +} + +// copyDeploymentAnnotationsToReplicaSet copies deployment's annotations to replica set's annotations, +// and returns true if replica set's annotation is changed. +// Note that apply and revision annotations are not copied. +func copyDeploymentAnnotationsToReplicaSet(deployment *extensions.Deployment, rs *extensions.ReplicaSet) bool { + rsAnnotationsChanged := false + if rs.Annotations == nil { + rs.Annotations = make(map[string]string) + } + for k, v := range deployment.Annotations { + // newRS revision is updated automatically in getNewReplicaSet, and the deployment's revision number is then updated + // by copying its newRS revision number. We should not copy deployment's revision to its newRS, since the update of + // deployment revision number may fail (revision becomes stale) and the revision number in newRS is more reliable. + if skipCopyAnnotation(k) || rs.Annotations[k] == v { + continue + } + rs.Annotations[k] = v + rsAnnotationsChanged = true + } + return rsAnnotationsChanged +} + +// setDeploymentAnnotationsTo sets deployment's annotations as given RS's annotations. +// This action should be done if and only if the deployment is rolling back to this rs. +// Note that apply and revision annotations are not changed. +func setDeploymentAnnotationsTo(deployment *extensions.Deployment, rollbackToRS *extensions.ReplicaSet) { + deployment.Annotations = getSkippedAnnotations(deployment.Annotations) + for k, v := range rollbackToRS.Annotations { + if !skipCopyAnnotation(k) { + deployment.Annotations[k] = v + } + } +} + +func getSkippedAnnotations(annotations map[string]string) map[string]string { + skippedAnnotations := make(map[string]string) + for k, v := range annotations { + if skipCopyAnnotation(k) { + skippedAnnotations[k] = v + } + } + return skippedAnnotations +} + // findActiveOrLatest returns the only active or the latest replica set in case there is at most one active // replica set. If there are more active replica sets, then we should proportionally scale them. func findActiveOrLatest(newRS *extensions.ReplicaSet, oldRSs []*extensions.ReplicaSet) *extensions.ReplicaSet { From 8fe8ec980ed3a3b691b2ec54fd54f8e436657aa6 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sat, 2 Jul 2016 14:56:23 -0700 Subject: [PATCH 333/339] Cleanup a TODO from godeps -> vendor change This logs a false "error" message, so it's time to go. It was needed to ensure nobody has stale build images laying around, but that was quite a while ago, so it's probably safe now. --- build/common.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/build/common.sh b/build/common.sh index 465941e7e4..864c9cd129 100755 --- a/build/common.sh +++ b/build/common.sh @@ -559,16 +559,6 @@ function kube::build::clean_images() { } function kube::build::ensure_data_container() { - # This is temporary, while last remnants of _workspace are obliterated. If - # the data container exists it might be from before the change from - # Godeps/_workspace/ to vendor/, and thereby still have a Godeps/_workspace/ - # directory in it, which trips up godep (yay godep!). Once we are confident - # that this has run ~everywhere we care about, we can remove this. - # TODO(thockin): remove this after v1.3 is cut. - if "${DOCKER[@]}" inspect "${KUBE_BUILD_DATA_CONTAINER_NAME}" \ - | grep -q "Godeps/_workspace/pkg"; then - docker rm -f "${KUBE_BUILD_DATA_CONTAINER_NAME}" - fi if ! "${DOCKER[@]}" inspect "${KUBE_BUILD_DATA_CONTAINER_NAME}" >/dev/null 2>&1; then kube::log::status "Creating data container" local -ra docker_cmd=( From 189d4a5159e8f725c09b1bed2d75c03f11561842 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sat, 19 Dec 2015 22:52:48 -0800 Subject: [PATCH 334/339] Make CIdentifier return error strings --- pkg/api/validation/validation.go | 7 ++++--- pkg/api/validation/validation_test.go | 2 +- pkg/kubectl/run.go | 7 +++++-- pkg/util/validation/validation.go | 7 +++++-- pkg/util/validation/validation_test.go | 6 +++--- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index 5b9b739f6b..6b6b75a90b 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -51,7 +51,6 @@ var RepairMalformedUpdates bool = true const isNegativeErrorMsg string = `must be greater than or equal to 0` const isInvalidQuotaResource string = `must be a standard resource for quota` const fieldImmutableErrorMsg string = `field is immutable` -const cIdentifierErrorMsg string = `must be a C identifier (matching regex ` + validation.CIdentifierFmt + `): e.g. "my_name" or "MyName"` const isNotIntegerErrorMsg string = `must be an integer` func InclusiveRangeErrorMsg(lo, hi int) string { @@ -1087,8 +1086,10 @@ func validateEnv(vars []api.EnvVar, fldPath *field.Path) field.ErrorList { idxPath := fldPath.Index(i) if len(ev.Name) == 0 { allErrs = append(allErrs, field.Required(idxPath.Child("name"), "")) - } else if !validation.IsCIdentifier(ev.Name) { - allErrs = append(allErrs, field.Invalid(idxPath.Child("name"), ev.Name, cIdentifierErrorMsg)) + } else { + for _, msg := range validation.IsCIdentifier(ev.Name) { + allErrs = append(allErrs, field.Invalid(idxPath.Child("name"), ev.Name, msg)) + } } allErrs = append(allErrs, validateEnvVarValueFrom(ev, idxPath.Child("valueFrom"))...) } diff --git a/pkg/api/validation/validation_test.go b/pkg/api/validation/validation_test.go index 2781a1bdb4..25c2f93187 100644 --- a/pkg/api/validation/validation_test.go +++ b/pkg/api/validation/validation_test.go @@ -1155,7 +1155,7 @@ func TestValidateEnv(t *testing.T) { { name: "name not a C identifier", envs: []api.EnvVar{{Name: "a.b.c"}}, - expectedError: `[0].name: Invalid value: "a.b.c": must be a C identifier (matching regex [A-Za-z_][A-Za-z0-9_]*): e.g. "my_name" or "MyName"`, + expectedError: `[0].name: Invalid value: "a.b.c": must match the regex`, }, { name: "value and valueFrom specified", diff --git a/pkg/kubectl/run.go b/pkg/kubectl/run.go index 1ce9f890ef..0b89b7814f 100644 --- a/pkg/kubectl/run.go +++ b/pkg/kubectl/run.go @@ -835,7 +835,10 @@ func parseEnvs(envArray []string) ([]api.EnvVar, error) { } name := env[:pos] value := env[pos+1:] - if len(name) == 0 || !validation.IsCIdentifier(name) || len(value) == 0 { + if len(name) == 0 || len(value) == 0 { + return nil, fmt.Errorf("invalid env: %v", env) + } + if len(validation.IsCIdentifier(name)) != 0 { return nil, fmt.Errorf("invalid env: %v", env) } envVar := api.EnvVar{Name: name, Value: value} @@ -853,7 +856,7 @@ func parseV1Envs(envArray []string) ([]v1.EnvVar, error) { } name := env[:pos] value := env[pos+1:] - if len(name) == 0 || !validation.IsCIdentifier(name) || len(value) == 0 { + if len(name) == 0 || len(validation.IsCIdentifier(name)) != 0 || len(value) == 0 { return nil, fmt.Errorf("invalid env: %v", env) } envVar := v1.EnvVar{Name: name, Value: value} diff --git a/pkg/util/validation/validation.go b/pkg/util/validation/validation.go index 135c5e9082..bdb99b1e32 100644 --- a/pkg/util/validation/validation.go +++ b/pkg/util/validation/validation.go @@ -145,8 +145,11 @@ var cIdentifierRegexp = regexp.MustCompile("^" + CIdentifierFmt + "$") // IsCIdentifier tests for a string that conforms the definition of an identifier // in C. This checks the format, but not the length. -func IsCIdentifier(value string) bool { - return cIdentifierRegexp.MatchString(value) +func IsCIdentifier(value string) []string { + if !cIdentifierRegexp.MatchString(value) { + return []string{RegexError(CIdentifierFmt, "my_name", "MY_NAME", "MyName")} + } + return nil } // IsValidPortNum tests that the argument is a valid, non-zero port number. diff --git a/pkg/util/validation/validation_test.go b/pkg/util/validation/validation_test.go index 6af22f5b1d..6b24835123 100644 --- a/pkg/util/validation/validation_test.go +++ b/pkg/util/validation/validation_test.go @@ -119,8 +119,8 @@ func TestIsCIdentifier(t *testing.T) { "A", "AB", "AbC", "A1", "_A", "A_", "A_B", "A_1", "A__1__2__B", "__123_ABC", } for _, val := range goodValues { - if !IsCIdentifier(val) { - t.Errorf("expected true for '%s'", val) + if msgs := IsCIdentifier(val); len(msgs) != 0 { + t.Errorf("expected true for '%s': %v", val, msgs) } } @@ -132,7 +132,7 @@ func TestIsCIdentifier(t *testing.T) { "#a#", } for _, val := range badValues { - if IsCIdentifier(val) { + if msgs := IsCIdentifier(val); len(msgs) == 0 { t.Errorf("expected false for '%s'", val) } } From 14bece550fc683966b4bf62e2d2fc893921182fc Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Mon, 4 Jan 2016 08:33:26 -0800 Subject: [PATCH 335/339] Make IsValidPortNum/Name return error strings --- pkg/api/validation/validation.go | 86 ++++++++++---------- pkg/api/validation/validation_test.go | 22 ++--- pkg/apis/extensions/validation/validation.go | 11 +-- pkg/util/validation/validation.go | 61 ++++++++------ pkg/util/validation/validation_test.go | 16 ++-- 5 files changed, 99 insertions(+), 97 deletions(-) diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index 6b6b75a90b..eeb014497e 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -53,14 +53,8 @@ const isInvalidQuotaResource string = `must be a standard resource for quota` const fieldImmutableErrorMsg string = `field is immutable` const isNotIntegerErrorMsg string = `must be an integer` -func InclusiveRangeErrorMsg(lo, hi int) string { - return fmt.Sprintf(`must be between %d and %d, inclusive`, lo, hi) -} - -var pdPartitionErrorMsg string = InclusiveRangeErrorMsg(1, 255) -var PortRangeErrorMsg string = InclusiveRangeErrorMsg(1, 65535) -var IdRangeErrorMsg string = InclusiveRangeErrorMsg(0, math.MaxInt32) -var PortNameErrorMsg string = fmt.Sprintf(`must be an IANA_SVC_NAME (at most 15 characters, matching regex %s, it must contain at least one letter [a-z], and hyphens cannot be adjacent to other hyphens): e.g. "http"`, validation.IdentifierNoHyphensBeginEndFmt) +var pdPartitionErrorMsg string = validation.InclusiveRangeError(1, 255) +var IdRangeErrorMsg string = validation.InclusiveRangeError(0, math.MaxInt32) const totalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB @@ -609,7 +603,7 @@ func validateISCSIVolumeSource(iscsi *api.ISCSIVolumeSource, fldPath *field.Path allErrs = append(allErrs, field.Required(fldPath.Child("iqn"), "")) } if iscsi.Lun < 0 || iscsi.Lun > 255 { - allErrs = append(allErrs, field.Invalid(fldPath.Child("lun"), iscsi.Lun, InclusiveRangeErrorMsg(0, 255))) + allErrs = append(allErrs, field.Invalid(fldPath.Child("lun"), iscsi.Lun, validation.InclusiveRangeError(0, 255))) } return allErrs } @@ -624,7 +618,7 @@ func validateFCVolumeSource(fc *api.FCVolumeSource, fldPath *field.Path) field.E allErrs = append(allErrs, field.Required(fldPath.Child("lun"), "")) } else { if *fc.Lun < 0 || *fc.Lun > 255 { - allErrs = append(allErrs, field.Invalid(fldPath.Child("lun"), fc.Lun, InclusiveRangeErrorMsg(0, 255))) + allErrs = append(allErrs, field.Invalid(fldPath.Child("lun"), fc.Lun, validation.InclusiveRangeError(0, 255))) } } return allErrs @@ -1054,8 +1048,10 @@ func validateContainerPorts(ports []api.ContainerPort, fldPath *field.Path) fiel for i, port := range ports { idxPath := fldPath.Index(i) if len(port.Name) > 0 { - if !validation.IsValidPortName(port.Name) { - allErrs = append(allErrs, field.Invalid(idxPath.Child("name"), port.Name, PortNameErrorMsg)) + if msgs := validation.IsValidPortName(port.Name); len(msgs) != 0 { + for i = range msgs { + allErrs = append(allErrs, field.Invalid(idxPath.Child("name"), port.Name, msgs[i])) + } } else if allNames.Has(port.Name) { allErrs = append(allErrs, field.Duplicate(idxPath.Child("name"), port.Name)) } else { @@ -1063,12 +1059,16 @@ func validateContainerPorts(ports []api.ContainerPort, fldPath *field.Path) fiel } } if port.ContainerPort == 0 { - allErrs = append(allErrs, field.Invalid(idxPath.Child("containerPort"), port.ContainerPort, PortRangeErrorMsg)) - } else if !validation.IsValidPortNum(int(port.ContainerPort)) { - allErrs = append(allErrs, field.Invalid(idxPath.Child("containerPort"), port.ContainerPort, PortRangeErrorMsg)) + allErrs = append(allErrs, field.Required(idxPath.Child("containerPort"), "")) + } else { + for _, msg := range validation.IsValidPortNum(int(port.ContainerPort)) { + allErrs = append(allErrs, field.Invalid(idxPath.Child("containerPort"), port.ContainerPort, msg)) + } } - if port.HostPort != 0 && !validation.IsValidPortNum(int(port.HostPort)) { - allErrs = append(allErrs, field.Invalid(idxPath.Child("hostPort"), port.HostPort, PortRangeErrorMsg)) + if port.HostPort != 0 { + for _, msg := range validation.IsValidPortNum(int(port.HostPort)) { + allErrs = append(allErrs, field.Invalid(idxPath.Child("hostPort"), port.HostPort, msg)) + } } if len(port.Protocol) == 0 { allErrs = append(allErrs, field.Required(idxPath.Child("protocol"), "")) @@ -1304,19 +1304,16 @@ func validateExecAction(exec *api.ExecAction, fldPath *field.Path) field.ErrorLi return allErrors } +var supportedHTTPSchemes = sets.NewString(string(api.URISchemeHTTP), string(api.URISchemeHTTPS)) + func validateHTTPGetAction(http *api.HTTPGetAction, fldPath *field.Path) field.ErrorList { allErrors := field.ErrorList{} if len(http.Path) == 0 { allErrors = append(allErrors, field.Required(fldPath.Child("path"), "")) } - if http.Port.Type == intstr.Int && !validation.IsValidPortNum(http.Port.IntValue()) { - allErrors = append(allErrors, field.Invalid(fldPath.Child("port"), http.Port, PortRangeErrorMsg)) - } else if http.Port.Type == intstr.String && !validation.IsValidPortName(http.Port.StrVal) { - allErrors = append(allErrors, field.Invalid(fldPath.Child("port"), http.Port.StrVal, PortNameErrorMsg)) - } - supportedSchemes := sets.NewString(string(api.URISchemeHTTP), string(api.URISchemeHTTPS)) - if !supportedSchemes.Has(string(http.Scheme)) { - allErrors = append(allErrors, field.Invalid(fldPath.Child("scheme"), http.Scheme, fmt.Sprintf("must be one of %v", supportedSchemes.List()))) + allErrors = append(allErrors, ValidatePortNumOrName(http.Port, fldPath.Child("port"))...) + if !supportedHTTPSchemes.Has(string(http.Scheme)) { + allErrors = append(allErrors, field.NotSupported(fldPath.Child("scheme"), http.Scheme, supportedHTTPSchemes.List())) } for _, header := range http.HTTPHeaders { if !validation.IsHTTPHeaderName(header.Name) { @@ -1326,14 +1323,24 @@ func validateHTTPGetAction(http *api.HTTPGetAction, fldPath *field.Path) field.E return allErrors } -func validateTCPSocketAction(tcp *api.TCPSocketAction, fldPath *field.Path) field.ErrorList { - allErrors := field.ErrorList{} - if tcp.Port.Type == intstr.Int && !validation.IsValidPortNum(tcp.Port.IntValue()) { - allErrors = append(allErrors, field.Invalid(fldPath.Child("port"), tcp.Port, PortRangeErrorMsg)) - } else if tcp.Port.Type == intstr.String && !validation.IsValidPortName(tcp.Port.StrVal) { - allErrors = append(allErrors, field.Invalid(fldPath.Child("port"), tcp.Port.StrVal, PortNameErrorMsg)) +func ValidatePortNumOrName(port intstr.IntOrString, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + if port.Type == intstr.Int { + for _, msg := range validation.IsValidPortNum(port.IntValue()) { + allErrs = append(allErrs, field.Invalid(fldPath, port.IntValue(), msg)) + } + } else if port.Type == intstr.String { + for _, msg := range validation.IsValidPortName(port.StrVal) { + allErrs = append(allErrs, field.Invalid(fldPath, port.StrVal, msg)) + } + } else { + allErrs = append(allErrs, field.InternalError(fldPath, fmt.Errorf("unknown type: %v", port.Type))) } - return allErrors + return allErrs +} + +func validateTCPSocketAction(tcp *api.TCPSocketAction, fldPath *field.Path) field.ErrorList { + return ValidatePortNumOrName(tcp.Port, fldPath.Child("port")) } func validateHandler(handler *api.Handler, fldPath *field.Path) field.ErrorList { @@ -2162,8 +2169,8 @@ func validateServicePort(sp *api.ServicePort, requireName, isHeadlessService boo } } - if !validation.IsValidPortNum(int(sp.Port)) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("port"), sp.Port, PortRangeErrorMsg)) + for _, msg := range validation.IsValidPortNum(int(sp.Port)) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("port"), sp.Port, msg)) } if len(sp.Protocol) == 0 { @@ -2172,12 +2179,7 @@ func validateServicePort(sp *api.ServicePort, requireName, isHeadlessService boo allErrs = append(allErrs, field.NotSupported(fldPath.Child("protocol"), sp.Protocol, supportedPortProtocols.List())) } - if sp.TargetPort.Type == intstr.Int && !validation.IsValidPortNum(sp.TargetPort.IntValue()) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("targetPort"), sp.TargetPort, PortRangeErrorMsg)) - } - if sp.TargetPort.Type == intstr.String && !validation.IsValidPortName(sp.TargetPort.StrVal) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("targetPort"), sp.TargetPort, PortNameErrorMsg)) - } + allErrs = append(allErrs, ValidatePortNumOrName(sp.TargetPort, fldPath.Child("targetPort"))...) // in the v1 API, targetPorts on headless services were tolerated. // once we have version-specific validation, we can reject this on newer API versions, but until then, we have to tolerate it for compatibility. @@ -3075,8 +3077,8 @@ func validateEndpointPort(port *api.EndpointPort, requireName bool, fldPath *fie allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), port.Name, msg)) } } - if !validation.IsValidPortNum(int(port.Port)) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("port"), port.Port, PortRangeErrorMsg)) + for _, msg := range validation.IsValidPortNum(int(port.Port)) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("port"), port.Port, msg)) } if len(port.Protocol) == 0 { allErrs = append(allErrs, field.Required(fldPath.Child("protocol"), "")) diff --git a/pkg/api/validation/validation_test.go b/pkg/api/validation/validation_test.go index 25c2f93187..68ae8fbcd7 100644 --- a/pkg/api/validation/validation_test.go +++ b/pkg/api/validation/validation_test.go @@ -1030,17 +1030,17 @@ func TestValidatePorts(t *testing.T) { "name > 15 characters": { []api.ContainerPort{{Name: strings.Repeat("a", 16), ContainerPort: 80, Protocol: "TCP"}}, field.ErrorTypeInvalid, - "name", PortNameErrorMsg, + "name", "15", }, - "name not a IANA svc name ": { + "name contains invalid characters": { []api.ContainerPort{{Name: "a.b.c", ContainerPort: 80, Protocol: "TCP"}}, field.ErrorTypeInvalid, - "name", PortNameErrorMsg, + "name", "alpha-numeric", }, - "name not a IANA svc name (i.e. a number)": { + "name is a number": { []api.ContainerPort{{Name: "80", ContainerPort: 80, Protocol: "TCP"}}, field.ErrorTypeInvalid, - "name", PortNameErrorMsg, + "name", "at least one letter", }, "name not unique": { []api.ContainerPort{ @@ -1052,18 +1052,18 @@ func TestValidatePorts(t *testing.T) { }, "zero container port": { []api.ContainerPort{{ContainerPort: 0, Protocol: "TCP"}}, - field.ErrorTypeInvalid, - "containerPort", PortRangeErrorMsg, + field.ErrorTypeRequired, + "containerPort", "", }, "invalid container port": { []api.ContainerPort{{ContainerPort: 65536, Protocol: "TCP"}}, field.ErrorTypeInvalid, - "containerPort", PortRangeErrorMsg, + "containerPort", "between", }, "invalid host port": { []api.ContainerPort{{ContainerPort: 80, HostPort: 65536, Protocol: "TCP"}}, field.ErrorTypeInvalid, - "hostPort", PortRangeErrorMsg, + "hostPort", "between", }, "invalid protocol case": { []api.ContainerPort{{ContainerPort: 80, Protocol: "tcp"}}, @@ -5968,7 +5968,7 @@ func TestValidateEndpoints(t *testing.T) { }, }, errorType: "FieldValueInvalid", - errorDetail: PortRangeErrorMsg, + errorDetail: "between", }, "Invalid protocol": { endpoints: api.Endpoints{ @@ -6006,7 +6006,7 @@ func TestValidateEndpoints(t *testing.T) { }, }, errorType: "FieldValueInvalid", - errorDetail: PortRangeErrorMsg, + errorDetail: "between", }, "Port missing protocol": { endpoints: api.Endpoints{ diff --git a/pkg/apis/extensions/validation/validation.go b/pkg/apis/extensions/validation/validation.go index c061a03f39..d5e2566539 100644 --- a/pkg/apis/extensions/validation/validation.go +++ b/pkg/apis/extensions/validation/validation.go @@ -425,16 +425,7 @@ func validateIngressBackend(backend *extensions.IngressBackend, fldPath *field.P allErrs = append(allErrs, field.Invalid(fldPath.Child("serviceName"), backend.ServiceName, msg)) } } - if backend.ServicePort.Type == intstr.String { - for _, msg := range validation.IsDNS1123Label(backend.ServicePort.StrVal) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("servicePort"), backend.ServicePort.StrVal, msg)) - } - if !validation.IsValidPortName(backend.ServicePort.StrVal) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("servicePort"), backend.ServicePort.StrVal, apivalidation.PortNameErrorMsg)) - } - } else if !validation.IsValidPortNum(backend.ServicePort.IntValue()) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("servicePort"), backend.ServicePort, apivalidation.PortRangeErrorMsg)) - } + allErrs = append(allErrs, apivalidation.ValidatePortNumOrName(backend.ServicePort, fldPath.Child("servicePort"))...) return allErrs } diff --git a/pkg/util/validation/validation.go b/pkg/util/validation/validation.go index bdb99b1e32..30a1cd16e3 100644 --- a/pkg/util/validation/validation.go +++ b/pkg/util/validation/validation.go @@ -153,8 +153,11 @@ func IsCIdentifier(value string) []string { } // IsValidPortNum tests that the argument is a valid, non-zero port number. -func IsValidPortNum(port int) bool { - return 0 < port && port < 65536 +func IsValidPortNum(port int) []string { + if port < 1 || port > 65535 { + return []string{InclusiveRangeError(1, 65535)} + } + return nil } // Now in libcontainer UID/GID limits is 0 ~ 1<<31 - 1 @@ -176,34 +179,34 @@ func IsValidUserId(uid int64) bool { return minUserID <= uid && uid <= maxUserID } -const doubleHyphensFmt string = ".*(--).*" +var portNameCharsetRegex = regexp.MustCompile("^[-a-z0-9]+$") +var portNameOneLetterRegexp = regexp.MustCompile("[a-z]") -var doubleHyphensRegexp = regexp.MustCompile("^" + doubleHyphensFmt + "$") - -const IdentifierNoHyphensBeginEndFmt string = "[a-z0-9]([a-z0-9-]*[a-z0-9])*" - -var identifierNoHyphensBeginEndRegexp = regexp.MustCompile("^" + IdentifierNoHyphensBeginEndFmt + "$") - -const atLeastOneLetterFmt string = ".*[a-z].*" - -var atLeastOneLetterRegexp = regexp.MustCompile("^" + atLeastOneLetterFmt + "$") - -// IsValidPortName check that the argument is valid syntax. It must be non empty and no more than 15 characters long -// It must contains at least one letter [a-z] and it must contains only [a-z0-9-]. -// Hypens ('-') cannot be leading or trailing character of the string and cannot be adjacent to other hyphens. -// Although RFC 6335 allows upper and lower case characters but case is ignored for comparison purposes: (HTTP -// and http denote the same service). -func IsValidPortName(port string) bool { - if len(port) < 1 || len(port) > 15 { - return false +// IsValidPortName check that the argument is valid syntax. It must be +// non-empty and no more than 15 characters long. It may contain only [-a-z0-9] +// and must contain at least one letter [a-z]. It must not start or end with a +// hyphen, nor contain adjacent hyphens. +// +// Note: We only allow lower-case characters, even though RFC 6335 is case +// insensitive. +func IsValidPortName(port string) []string { + var errs []string + if len(port) > 15 { + errs = append(errs, MaxLenError(15)) } - if doubleHyphensRegexp.MatchString(port) { - return false + if !portNameCharsetRegex.MatchString(port) { + errs = append(errs, "must contain only alpha-numeric characters (a-z, 0-9), and hyphens (-)") } - if identifierNoHyphensBeginEndRegexp.MatchString(port) && atLeastOneLetterRegexp.MatchString(port) { - return true + if !portNameOneLetterRegexp.MatchString(port) { + errs = append(errs, "must contain at least one letter (a-z)") } - return false + if strings.Contains(port, "--") { + errs = append(errs, "must not contain consecutive hyphens") + } + if len(port) > 0 && (port[0] == '-' || port[len(port)-1] == '-') { + errs = append(errs, "must not begin or end with a hyphen") + } + return errs } // IsValidIP tests that the argument is a valid IP address. @@ -263,3 +266,9 @@ func prefixEach(msgs []string, prefix string) []string { } return msgs } + +// InclusiveRangeError returns a string explanation of a numeric "must be +// between" validation failure. +func InclusiveRangeError(lo, hi int) string { + return fmt.Sprintf(`must be between %d and %d, inclusive`, lo, hi) +} diff --git a/pkg/util/validation/validation_test.go b/pkg/util/validation/validation_test.go index 6b24835123..75974231e0 100644 --- a/pkg/util/validation/validation_test.go +++ b/pkg/util/validation/validation_test.go @@ -141,15 +141,15 @@ func TestIsCIdentifier(t *testing.T) { func TestIsValidPortNum(t *testing.T) { goodValues := []int{1, 2, 1000, 16384, 32768, 65535} for _, val := range goodValues { - if !IsValidPortNum(val) { - t.Errorf("expected true for '%d'", val) + if msgs := IsValidPortNum(val); len(msgs) != 0 { + t.Errorf("expected true for %d, got %v", val, msgs) } } badValues := []int{0, -1, 65536, 100000} for _, val := range badValues { - if IsValidPortNum(val) { - t.Errorf("expected false for '%d'", val) + if msgs := IsValidPortNum(val); len(msgs) == 0 { + t.Errorf("expected false for %d", val) } } } @@ -189,14 +189,14 @@ func TestIsValidUserId(t *testing.T) { func TestIsValidPortName(t *testing.T) { goodValues := []string{"telnet", "re-mail-ck", "pop3", "a", "a-1", "1-a", "a-1-b-2-c", "1-a-2-b-3"} for _, val := range goodValues { - if !IsValidPortName(val) { - t.Errorf("expected true for %q", val) + if msgs := IsValidPortName(val); len(msgs) != 0 { + t.Errorf("expected true for %q: %v", val, msgs) } } - badValues := []string{"longerthan15characters", "", "12345", "1-2-3-4", "-begin", "end-", "two--hyphens", "1-2", "whois++"} + badValues := []string{"longerthan15characters", "", strings.Repeat("a", 16), "12345", "1-2-3-4", "-begin", "end-", "two--hyphens", "whois++"} for _, val := range badValues { - if IsValidPortName(val) { + if msgs := IsValidPortName(val); len(msgs) == 0 { t.Errorf("expected false for %q", val) } } From 87c1fc50a8c0e8dab3ae9b887d8fa78b33e6e4af Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Mon, 4 Jan 2016 09:49:39 -0800 Subject: [PATCH 336/339] Make IsValidIP return error strings Also treat 0.0.0.0 as special, like loopback and multicast. --- pkg/api/validation/validation.go | 27 +++++++++++++++++--------- pkg/api/validation/validation_test.go | 9 ++++++++- pkg/util/validation/validation.go | 7 +++++-- pkg/util/validation/validation_test.go | 6 +++--- 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index eeb014497e..8cfb509053 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -2072,10 +2072,13 @@ func ValidateService(service *api.Service) field.ErrorList { ipPath := specPath.Child("externalIPs") for i, ip := range service.Spec.ExternalIPs { idxPath := ipPath.Index(i) - if ip == "0.0.0.0" { - allErrs = append(allErrs, field.Invalid(idxPath, ip, "must be a valid IP address")) + if msgs := validation.IsValidIP(ip); len(msgs) != 0 { + for i := range msgs { + allErrs = append(allErrs, field.Invalid(idxPath, ip, msgs[i])) + } + } else { + allErrs = append(allErrs, validateNonSpecialIP(ip, idxPath)...) } - allErrs = append(allErrs, validateIpIsNotLinkLocalOrLoopback(ip, idxPath)...) } if len(service.Spec.Type) == 0 { @@ -3033,8 +3036,8 @@ func validateEndpointSubsets(subsets []api.EndpointSubset, fldPath *field.Path) func validateEndpointAddress(address *api.EndpointAddress, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} - if !validation.IsValidIP(address.IP) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("ip"), address.IP, "must be a valid IP address")) + for _, msg := range validation.IsValidIP(address.IP) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("ip"), address.IP, msg)) } if len(address.Hostname) > 0 { for _, msg := range validation.IsDNS1123Label(address.Hostname) { @@ -3044,18 +3047,24 @@ func validateEndpointAddress(address *api.EndpointAddress, fldPath *field.Path) if len(allErrs) > 0 { return allErrs } - return validateIpIsNotLinkLocalOrLoopback(address.IP, fldPath.Child("ip")) + allErrs = append(allErrs, validateNonSpecialIP(address.IP, fldPath.Child("ip"))...) + return allErrs } -func validateIpIsNotLinkLocalOrLoopback(ipAddress string, fldPath *field.Path) field.ErrorList { - // We disallow some IPs as endpoints or external-ips. Specifically, loopback addresses are - // nonsensical and link-local addresses tend to be used for node-centric purposes (e.g. metadata service). +func validateNonSpecialIP(ipAddress string, fldPath *field.Path) field.ErrorList { + // We disallow some IPs as endpoints or external-ips. Specifically, + // unspecified and loopback addresses are nonsensical and link-local + // addresses tend to be used for node-centric purposes (e.g. metadata + // service). allErrs := field.ErrorList{} ip := net.ParseIP(ipAddress) if ip == nil { allErrs = append(allErrs, field.Invalid(fldPath, ipAddress, "must be a valid IP address")) return allErrs } + if ip.IsUnspecified() { + allErrs = append(allErrs, field.Invalid(fldPath, ipAddress, "may not be unspecified (0.0.0.0)")) + } if ip.IsLoopback() { allErrs = append(allErrs, field.Invalid(fldPath, ipAddress, "may not be in the loopback range (127.0.0.0/8)")) } diff --git a/pkg/api/validation/validation_test.go b/pkg/api/validation/validation_test.go index 68ae8fbcd7..55c124fee7 100644 --- a/pkg/api/validation/validation_test.go +++ b/pkg/api/validation/validation_test.go @@ -3489,12 +3489,19 @@ func TestValidateService(t *testing.T) { numErrs: 1, }, { - name: "invalid publicIPs", + name: "invalid publicIPs unspecified", tweakSvc: func(s *api.Service) { s.Spec.ExternalIPs = []string{"0.0.0.0"} }, numErrs: 1, }, + { + name: "invalid publicIPs loopback", + tweakSvc: func(s *api.Service) { + s.Spec.ExternalIPs = []string{"127.0.0.1"} + }, + numErrs: 1, + }, { name: "invalid publicIPs host", tweakSvc: func(s *api.Service) { diff --git a/pkg/util/validation/validation.go b/pkg/util/validation/validation.go index 30a1cd16e3..72a132bc50 100644 --- a/pkg/util/validation/validation.go +++ b/pkg/util/validation/validation.go @@ -210,8 +210,11 @@ func IsValidPortName(port string) []string { } // IsValidIP tests that the argument is a valid IP address. -func IsValidIP(value string) bool { - return net.ParseIP(value) != nil +func IsValidIP(value string) []string { + if net.ParseIP(value) == nil { + return []string{"must be a valid IP address, (e.g. 10.9.8.7)"} + } + return nil } const percentFmt string = "[0-9]+%" diff --git a/pkg/util/validation/validation_test.go b/pkg/util/validation/validation_test.go index 75974231e0..b9bcd1b768 100644 --- a/pkg/util/validation/validation_test.go +++ b/pkg/util/validation/validation_test.go @@ -293,8 +293,8 @@ func TestIsValidIP(t *testing.T) { "0.0.0.0", } for _, val := range goodValues { - if !IsValidIP(val) { - t.Errorf("expected true for %q", val) + if msgs := IsValidIP(val); len(msgs) != 0 { + t.Errorf("expected true for %q: %v", val, msgs) } } @@ -306,7 +306,7 @@ func TestIsValidIP(t *testing.T) { "a", } for _, val := range badValues { - if IsValidIP(val) { + if msgs := IsValidIP(val); len(msgs) == 0 { t.Errorf("expected false for %q", val) } } From bb208a02b3ce15305d6b5ad005e418a9dce623fd Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Thu, 28 Jan 2016 23:22:57 -0800 Subject: [PATCH 337/339] Make IsValidPercent return error strings --- pkg/apis/extensions/validation/validation.go | 9 +++-- .../extensions/validation/validation_test.go | 2 +- pkg/util/validation/validation.go | 7 ++-- pkg/util/validation/validation_test.go | 36 +++++++++++++++++++ 4 files changed, 48 insertions(+), 6 deletions(-) diff --git a/pkg/apis/extensions/validation/validation.go b/pkg/apis/extensions/validation/validation.go index d5e2566539..c13d747c8d 100644 --- a/pkg/apis/extensions/validation/validation.go +++ b/pkg/apis/extensions/validation/validation.go @@ -149,8 +149,8 @@ func ValidatePositiveIntOrPercent(intOrPercent intstr.IntOrString, fldPath *fiel allErrs := field.ErrorList{} switch intOrPercent.Type { case intstr.String: - if !validation.IsValidPercent(intOrPercent.StrVal) { - allErrs = append(allErrs, field.Invalid(fldPath, intOrPercent, "must be an integer or percentage (e.g '5%%')")) + for _, msg := range validation.IsValidPercent(intOrPercent.StrVal) { + allErrs = append(allErrs, field.Invalid(fldPath, intOrPercent, msg)) } case intstr.Int: allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(intOrPercent.IntValue()), fldPath)...) @@ -161,7 +161,10 @@ func ValidatePositiveIntOrPercent(intOrPercent intstr.IntOrString, fldPath *fiel } func getPercentValue(intOrStringValue intstr.IntOrString) (int, bool) { - if intOrStringValue.Type != intstr.String || !validation.IsValidPercent(intOrStringValue.StrVal) { + if intOrStringValue.Type != intstr.String { + return 0, false + } + if len(validation.IsValidPercent(intOrStringValue.StrVal)) != 0 { return 0, false } value, _ := strconv.Atoi(intOrStringValue.StrVal[:len(intOrStringValue.StrVal)-1]) diff --git a/pkg/apis/extensions/validation/validation_test.go b/pkg/apis/extensions/validation/validation_test.go index 8c0cc83865..6dc72c8e35 100644 --- a/pkg/apis/extensions/validation/validation_test.go +++ b/pkg/apis/extensions/validation/validation_test.go @@ -632,7 +632,7 @@ func TestValidateDeployment(t *testing.T) { MaxSurge: intstr.FromString("20Percent"), }, } - errorCases["must be an integer or percentage"] = invalidMaxSurgeDeployment + errorCases["must match the regex"] = invalidMaxSurgeDeployment // MaxSurge and MaxUnavailable cannot both be zero. invalidRollingUpdateDeployment := validDeployment() diff --git a/pkg/util/validation/validation.go b/pkg/util/validation/validation.go index 72a132bc50..ad7b1ff299 100644 --- a/pkg/util/validation/validation.go +++ b/pkg/util/validation/validation.go @@ -221,8 +221,11 @@ const percentFmt string = "[0-9]+%" var percentRegexp = regexp.MustCompile("^" + percentFmt + "$") -func IsValidPercent(percent string) bool { - return percentRegexp.MatchString(percent) +func IsValidPercent(percent string) []string { + if !percentRegexp.MatchString(percent) { + return []string{RegexError(percentFmt, "1%", "93%")} + } + return nil } const HTTPHeaderNameFmt string = "[-A-Za-z0-9]+" diff --git a/pkg/util/validation/validation_test.go b/pkg/util/validation/validation_test.go index b9bcd1b768..741df45877 100644 --- a/pkg/util/validation/validation_test.go +++ b/pkg/util/validation/validation_test.go @@ -338,3 +338,39 @@ func TestIsHTTPHeaderName(t *testing.T) { } } } + +func TestIsValidPercent(t *testing.T) { + goodValues := []string{ + "0%", + "00000%", + "1%", + "01%", + "99%", + "100%", + "101%", + } + for _, val := range goodValues { + if msgs := IsValidPercent(val); len(msgs) != 0 { + t.Errorf("expected true for %q: %v", val, msgs) + } + } + + badValues := []string{ + "", + "0", + "100", + "0.0%", + "99.9%", + "hundred", + " 1%", + "1% ", + "-0%", + "-1%", + "+1%", + } + for _, val := range badValues { + if msgs := IsValidPercent(val); len(msgs) == 0 { + t.Errorf("expected false for %q", val) + } + } +} From 3ad6c397d7487bc6b468e41fbfc7bfc30ffaaa6f Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Fri, 29 Jan 2016 00:05:34 -0800 Subject: [PATCH 338/339] Make IsValid{User,Group}Id return error strings --- pkg/api/validation/validation.go | 21 +++++++++++---------- pkg/util/validation/validation.go | 24 +++++++++++++++--------- pkg/util/validation/validation_test.go | 12 ++++++------ 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index 8cfb509053..3563f8bca2 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -19,7 +19,6 @@ package validation import ( "encoding/json" "fmt" - "math" "net" "os" "path" @@ -54,7 +53,6 @@ const fieldImmutableErrorMsg string = `field is immutable` const isNotIntegerErrorMsg string = `must be an integer` var pdPartitionErrorMsg string = validation.InclusiveRangeError(1, 255) -var IdRangeErrorMsg string = validation.InclusiveRangeError(0, math.MaxInt32) const totalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB @@ -1889,16 +1887,19 @@ func ValidatePodSecurityContext(securityContext *api.PodSecurityContext, spec *a if securityContext != nil { allErrs = append(allErrs, validateHostNetwork(securityContext.HostNetwork, spec.Containers, specPath.Child("containers"))...) - if securityContext.FSGroup != nil && !validation.IsValidGroupId(*securityContext.FSGroup) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("fsGroup"), *(securityContext.FSGroup), IdRangeErrorMsg)) + if securityContext.FSGroup != nil { + for _, msg := range validation.IsValidGroupId(*securityContext.FSGroup) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("fsGroup"), *(securityContext.FSGroup), msg)) + } } - if securityContext.RunAsUser != nil && !validation.IsValidUserId(*securityContext.RunAsUser) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("runAsUser"), *(securityContext.RunAsUser), IdRangeErrorMsg)) + if securityContext.RunAsUser != nil { + for _, msg := range validation.IsValidUserId(*securityContext.RunAsUser) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("runAsUser"), *(securityContext.RunAsUser), msg)) + } } - for i, gid := range securityContext.SupplementalGroups { - if !validation.IsValidGroupId(gid) { - supplementalGroup := fmt.Sprintf(`supplementalGroups[%d]`, i) - allErrs = append(allErrs, field.Invalid(fldPath.Child(supplementalGroup), gid, IdRangeErrorMsg)) + for g, gid := range securityContext.SupplementalGroups { + for _, msg := range validation.IsValidGroupId(gid) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("supplementalGroups").Index(g), gid, msg)) } } } diff --git a/pkg/util/validation/validation.go b/pkg/util/validation/validation.go index ad7b1ff299..75aa617ac5 100644 --- a/pkg/util/validation/validation.go +++ b/pkg/util/validation/validation.go @@ -154,10 +154,10 @@ func IsCIdentifier(value string) []string { // IsValidPortNum tests that the argument is a valid, non-zero port number. func IsValidPortNum(port int) []string { - if port < 1 || port > 65535 { - return []string{InclusiveRangeError(1, 65535)} + if 1 <= port && port <= 65535 { + return nil } - return nil + return []string{InclusiveRangeError(1, 65535)} } // Now in libcontainer UID/GID limits is 0 ~ 1<<31 - 1 @@ -169,14 +169,20 @@ const ( maxGroupID = math.MaxInt32 ) -// IsValidGroupId tests that the argument is a valid gids. -func IsValidGroupId(gid int64) bool { - return minGroupID <= gid && gid <= maxGroupID +// IsValidGroupId tests that the argument is a valid Unix GID. +func IsValidGroupId(gid int64) []string { + if minGroupID <= gid && gid <= maxGroupID { + return nil + } + return []string{InclusiveRangeError(minGroupID, maxGroupID)} } -// IsValidUserId tests that the argument is a valid uids. -func IsValidUserId(uid int64) bool { - return minUserID <= uid && uid <= maxUserID +// IsValidUserId tests that the argument is a valid Unix UID. +func IsValidUserId(uid int64) []string { + if minUserID <= uid && uid <= maxUserID { + return nil + } + return []string{InclusiveRangeError(minUserID, maxUserID)} } var portNameCharsetRegex = regexp.MustCompile("^[-a-z0-9]+$") diff --git a/pkg/util/validation/validation_test.go b/pkg/util/validation/validation_test.go index 741df45877..47f59db41c 100644 --- a/pkg/util/validation/validation_test.go +++ b/pkg/util/validation/validation_test.go @@ -157,14 +157,14 @@ func TestIsValidPortNum(t *testing.T) { func TestIsValidGroupId(t *testing.T) { goodValues := []int64{0, 1, 1000, 65535, 2147483647} for _, val := range goodValues { - if !IsValidGroupId(val) { - t.Errorf("expected true for '%d'", val) + if msgs := IsValidGroupId(val); len(msgs) != 0 { + t.Errorf("expected true for '%d': %v", val, msgs) } } badValues := []int64{-1, -1003, 2147483648, 4147483647} for _, val := range badValues { - if IsValidGroupId(val) { + if msgs := IsValidGroupId(val); len(msgs) == 0 { t.Errorf("expected false for '%d'", val) } } @@ -173,14 +173,14 @@ func TestIsValidGroupId(t *testing.T) { func TestIsValidUserId(t *testing.T) { goodValues := []int64{0, 1, 1000, 65535, 2147483647} for _, val := range goodValues { - if !IsValidUserId(val) { - t.Errorf("expected true for '%d'", val) + if msgs := IsValidUserId(val); len(msgs) != 0 { + t.Errorf("expected true for '%d': %v", val, msgs) } } badValues := []int64{-1, -1003, 2147483648, 4147483647} for _, val := range badValues { - if IsValidUserId(val) { + if msgs := IsValidUserId(val); len(msgs) == 0 { t.Errorf("expected false for '%d'", val) } } From 37786e0e778245234ae84666c63619f4e1dcfb86 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Sun, 14 Feb 2016 13:03:30 -0800 Subject: [PATCH 339/339] Make IsHTTPHeaderName return error strings --- pkg/api/validation/validation.go | 4 ++-- pkg/util/validation/validation.go | 11 +++++++---- pkg/util/validation/validation_test.go | 6 +++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index 3563f8bca2..8553c82b75 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -1314,8 +1314,8 @@ func validateHTTPGetAction(http *api.HTTPGetAction, fldPath *field.Path) field.E allErrors = append(allErrors, field.NotSupported(fldPath.Child("scheme"), http.Scheme, supportedHTTPSchemes.List())) } for _, header := range http.HTTPHeaders { - if !validation.IsHTTPHeaderName(header.Name) { - allErrors = append(allErrors, field.Invalid(fldPath.Child("httpHeaders"), header.Name, fmt.Sprintf("name must match %s", validation.HTTPHeaderNameFmt))) + for _, msg := range validation.IsHTTPHeaderName(header.Name) { + allErrors = append(allErrors, field.Invalid(fldPath.Child("httpHeaders"), header.Name, msg)) } } return allErrors diff --git a/pkg/util/validation/validation.go b/pkg/util/validation/validation.go index 75aa617ac5..ee3dba3cae 100644 --- a/pkg/util/validation/validation.go +++ b/pkg/util/validation/validation.go @@ -234,14 +234,17 @@ func IsValidPercent(percent string) []string { return nil } -const HTTPHeaderNameFmt string = "[-A-Za-z0-9]+" +const httpHeaderNameFmt string = "[-A-Za-z0-9]+" -var httpHeaderNameRegexp = regexp.MustCompile("^" + HTTPHeaderNameFmt + "$") +var httpHeaderNameRegexp = regexp.MustCompile("^" + httpHeaderNameFmt + "$") // IsHTTPHeaderName checks that a string conforms to the Go HTTP library's // definition of a valid header field name (a stricter subset than RFC7230). -func IsHTTPHeaderName(value string) bool { - return httpHeaderNameRegexp.MatchString(value) +func IsHTTPHeaderName(value string) []string { + if !httpHeaderNameRegexp.MatchString(value) { + return []string{RegexError(httpHeaderNameFmt, "X-Header-Name")} + } + return nil } // MaxLenError returns a string explanation of a "string too long" validation diff --git a/pkg/util/validation/validation_test.go b/pkg/util/validation/validation_test.go index 47f59db41c..fe4389cddb 100644 --- a/pkg/util/validation/validation_test.go +++ b/pkg/util/validation/validation_test.go @@ -321,8 +321,8 @@ func TestIsHTTPHeaderName(t *testing.T) { "A", "AB", "AbC", "A1", "-A", "A-", "A-B", "A-1", "A--1--2--B", "--123-ABC", } for _, val := range goodValues { - if !IsHTTPHeaderName(val) { - t.Errorf("expected true for '%s'", val) + if msgs := IsHTTPHeaderName(val); len(msgs) != 0 { + t.Errorf("expected true for '%s': %v", val, msgs) } } @@ -333,7 +333,7 @@ func TestIsHTTPHeaderName(t *testing.T) { "?", "@", "{", } for _, val := range badValues { - if IsHTTPHeaderName(val) { + if msgs := IsHTTPHeaderName(val); len(msgs) == 0 { t.Errorf("expected false for '%s'", val) } }