Commit Graph

31669 Commits (80490e0a55d1de9bde3f75eb14b6bbac1b6d6eec)

Author SHA1 Message Date
Tim Hockin 80490e0a55 go2idl: Allow generators to AddDir() at runtime
This is used subsequently to simplify the conversion generation, so each
package can declare what peer-packages it uses, and have those imported
dynamically, rather than having one mega list of packages to import and not
really being clear why, for any given list item.
2016-07-07 22:09:08 -07:00
Tim Hockin 7fa1e87d66 Simplify convertible check - same type is OK
This is to clarify the code.  No actual effect at the moment, but I manually
verified this in the case of identical types.
2016-07-07 22:09:08 -07:00
Tim Hockin ed59210f04 Renames for clarity in conversion-gen
This is to clarify the intent of the code for new readers (me).
2016-07-07 22:09:08 -07:00
Tim Hockin ab16ccc158 go2idl: don't mutate a map being iterated
This was causing us to process packages we didn't really want, which was only
visible when debugging was enabled.
2016-07-07 22:09:08 -07:00
Tim Hockin 96c0284e91 go2idl: clarify comments wrt get-or-create
This is just comment clarity.
2016-07-07 22:09:08 -07:00
k8s-merge-robot 42805f53b0 Merge pull request #28578 from thockin/dont-checkin-generated-code-prep-1
Automatic merge from submit-queue

Prep for not checking in generated, part 1/2

This PR is extracted from #25978 - it is just the deep-copy related parts.  All the Makefile and conversion stuff is excluded.

@wojtek-t this is literally branched, a bunch of commits deleted, and a very small number of manual fixups applied.  If you think this is easier to review (and if it passes CI) you can feel free to go over it again. I will follow this with a conversion-related PR to build on this.

Or if you prefer, just close this and let the mega-PR ride.

@lavalamp
2016-07-07 21:25:10 -07:00
k8s-merge-robot 1c8985160a Merge pull request #28573 from dims/fix-issue-7496-followup
Automatic merge from submit-queue

Follow up to PR 25640 - Cleanup newline and tweak help text

Follow up to PR https://github.com/kubernetes/kubernetes/pull/25640

* Remove redundant newline below Aliases:
* Renaming "Available Commands:" to "Available Sub-commands:"
2016-07-07 20:52:56 -07:00
k8s-merge-robot 9a414d275d Merge pull request #28542 from liggitt/sa-invalid-token
Automatic merge from submit-queue

Check for valid serviceaccount JWT token before inspecting claims

Moved claims check after the error check that ensures we have a valid JWT token
2016-07-07 20:17:42 -07:00
k8s-merge-robot d6d846f4e5 Merge pull request #28517 from Random-Liu/better-image-pull-test
Automatic merge from submit-queue

Node E2E: Use waiting reason to figure out image pulling error.

Addresses https://github.com/kubernetes/kubernetes/pull/28323#issuecomment-230002158, using `Waiting` reason to check whether the image pulling failures as expected.

@yujuhong 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-07 19:36:25 -07:00
k8s-merge-robot 60b0bc2efc Merge pull request #28516 from Random-Liu/disable-cni-for-local-node-e2e
Automatic merge from submit-queue

Node E2E: Disable kubenet for local node e2e test.

After https://github.com/kubernetes/kubernetes/pull/28196, we must manually setup cni and nsenter in local node to run `make test_e2e_node`, which may not be necessary for local development.

I've tried to move cni downloading logic into `BeforeSuite`, however it is still hard to figure out who should install nsenter, manually installed by every developer? in the `setup_host.sh` script? in `BeforeSuite`?

This PR:
* Added a flag to disable kubenet and disabled kubenet in local test.
* Cleaned up the CNI installation logic a bit.

/cc @yujuhong @freehan 
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-07 18:52:57 -07:00
k8s-merge-robot e06197d478 Merge pull request #28513 from smarterclayton/reflection_met
Automatic merge from submit-queue

Remove reflection path in meta.Accessor

Callers are required to implement their interfaces, removes the
potential for mistakes. We have a reflective test
pkg/api/meta_test.go#TestAccessorImplementations that verifies that all
objects registered to the scheme properly implement their interfaces.

@wojtek-t this may need an additional test or two, but I think this is a
net win over the current state (where people fallback to reflection without
being aware of it).
2016-07-07 18:08:40 -07:00
k8s-merge-robot 60c5985d02 Merge pull request #28500 from deads2k/migration
Automatic merge from submit-queue

don't migrate files you can't access

If you can't access a file, you shouldn't try to migrate it.

Ref https://github.com/openshift/origin/issues/9581

@fabianofranz
2016-07-07 17:32:51 -07:00
Erick Fejta b7ca663423 Merge pull request #28543 from timstclair/toc
Fix mungedocs TOC generation for duplicate headers
2016-07-07 17:24:34 -07:00
k8s-merge-robot 8ea57733b4 Merge pull request #28478 from smarterclayton/adaptation
Automatic merge from submit-queue

Autoscaling should be part of clientset.Adaption

@mfojtik
2016-07-07 16:57:36 -07:00
Tim Hockin 82b2d2c87b Clarify copyable vs in-bounds
This make it clearer where "is copyable" is needed and where "is in bounds" is
needed.  No effect on generated code.
2016-07-07 16:49:46 -07:00
Tim Hockin 1ba6f5df9e go2idl: Allow ... pkg specs
This is closer to standard Go semantics and obsoletes our custom --recursive
flag.
2016-07-07 16:49:46 -07:00
Tim Hockin 51394e862d Make runtime opt in to deepcopy
This minimizes the number of functions generated.  It also breaks the chain of
symbol dependencies to pkg/conversion, so we can remove now-unreferenced
(previously unused but referenced) conversion deep-copies.
2016-07-07 16:49:46 -07:00
Tim Hockin dc10f10e48 Recreate the opt-in/opt-out logic for deepcopy
This is the last piece of Clayton's #26179 to be implemented with file tags.
All diffs are accounted for.  Followup will use this to streamline some
packages.

Also add some V(5) debugging - it was helpful in diagnosing various issues, it
may be helpful again.
2016-07-07 16:49:46 -07:00
Tim Hockin 28af54138d Use file tags to generate deep-copies
This drives most of the logic of deep-copy generation from tags like:
  // +deepcopy-gen=package
..rather than hardcoded lists of packages.  This will make it possible to
subsequently generate code ONLY for packages that need it *right now*, rather
than all of them always.

Also remove pkgs that really do not need deep-copies (no symbols used
anywhere).
2016-07-07 16:49:46 -07:00
Tim Hockin 4c4c6fc40e go2idl: Add an 'output basename' option
This will be used when generated files are no longer checked in.  I include it
as a standalone commit for ease of review.
2016-07-07 16:49:46 -07:00
Tim Hockin ec79eee289 go2idl: remove comma-processing for comment-tags
It's simpler and clearer without them, and it leaves room for per-use-case
parsing of the tag lines.  If anything we should be splitting on whitespace.
2016-07-07 16:49:46 -07:00
Tim Hockin d88fc84bae Make multi-key tags more explicit
This is in prep to simplify tag logic.  Don't rely on processing commas as new
tag delimiters.  Put new tags on new lines.  This had zero effect on generated
code (as intended).
2016-07-07 16:49:46 -07:00
Tim Hockin 052847f4ed go2idl: Track doc.go file-comments
Previously we just tracked comments on the 'package' declaration.  Treat all
file comments as one comment-block, for simplicity.  Can be revisited if
needed.
2016-07-07 16:49:46 -07:00
Tim Hockin 4a00a0fd6d go2idl: Allow multiple values for a comment-tag
This means that tags like:
  // +foo=bar
  // +foo=bat
..will produce []string{"bar", "bat"}.  This is needed for later commits which
will want to use this to make code generation more self contained.
2016-07-07 16:49:46 -07:00
Tim Hockin b01ac4726f go2idl: Consistently handle comments as []string
This makes subsequent comment-tag PRs more consistent.
2016-07-07 16:49:46 -07:00
Tim Hockin 57c3196914 Add support for manually defined DeepCopy methods
In bringing back Clayton's PR piece-by-piece this was almost as easy to
implement as his version, and is much more like what I think we should be
doing.

Specifically, any time which defines a .DeepCopy() method will have that method
called preferentially.  Otherwise we generate our own functions for
deep-copying.  This affected exactly one type - resource.Quantity.  In applying
this heuristic, several places in the generated code were simplified.

To achieve this I had to convert types.Type.Methods from a slice to a map,
which seems correct anyway (to do by-name lookups).
2016-07-07 16:49:46 -07:00
Tim Hockin be481060ea Re-add constraints to deep-copy
This re-institutes some of the rolled-back logic from previous commits. It
bounds the scope of what the deepcopy generator is willing to do with regards
to generating and calling generated functions.
2016-07-07 16:49:46 -07:00
Tim Hockin e18b2f3a2e Revert Clayton's #26179 so I can recreate it
His PR cam during the middle of this development cycle, and it was easier to
burn it down and recreate it than try to patch it into an existing series and
re-test every assumption.  This behavior will be re-introduced in subsequent
commits.
2016-07-07 16:49:46 -07:00
k8s-merge-robot 3494f8e2f9 Merge pull request #28581 from lixiaobing10051267/masternotesorder
Automatic merge from submit-queue

The notes are inconsistent with the code

 In file "pkg/client/cache/store.go, the notes of line 102 "name and namespace" is inconsistent with line 103 "return parts[0], parts[1], nil", because parts[0] is namespace, and parts[1] is name, It is easy to be confused, and better to modify the notes to "namespace and name".
2016-07-07 16:22:50 -07:00
k8s-merge-robot 5f2460b58c Merge pull request #21240 from thockin/validation_pt8
Automatic merge from submit-queue

Validation: Make validation func return error strings

Part of an ongoing series of validation cleanups.

This centralizes the error strings next to the code that checks the error conditions.  Future commits will refine the messages further and provide more utility validators.

I'm OK if this doesn't go into 1.2, but I am tired of rebasing :)  I suggest commit-by-commit review, which should go pretty quickly.  This was largely mechanical.

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/21240)
<!-- Reviewable:end -->
2016-07-07 14:37:11 -07:00
k8s-merge-robot 9fb45943b5 Merge pull request #28467 from gmarek/addon-manager
Automatic merge from submit-queue

Fix the way addon-manager handles non-namespaced objects

Fixes #28451

cc @wojtek-t
2016-07-07 13:56:21 -07:00
Tim St. Clair 868fa6a61a Regenerate TOCs with duplicate header fix 2016-07-07 13:31:17 -07:00
Tim St. Clair 656ce4b623 Fix mungedocs TOC generation
Fix TOC links in the presence duplicate headers.
2016-07-07 13:30:55 -07:00
k8s-merge-robot 61e4ba9439 Merge pull request #28622 from allenmiller/master
Automatic merge from submit-queue

Remove unbalanced right-paren in influxdb-pv.yaml

fixes #28620
2016-07-07 13:22:03 -07:00
k8s-merge-robot b3c2c9eb5d Merge pull request #27381 from dims/fix-issue-2967
Automatic merge from submit-queue

Fix problem specifying fqdn:port in command line

When specifying --server in kubectl for example, we end up
with failure if you use "localhost:8080" instead of
"127.0.0.1:8080". This is because of the way url.Parse
works as shown in snippet:
https://play.golang.org/p/luD57S6sEz

Essentially localhost ends up as the Scheme and NOT as the Host.
So we add another check to make sure we prepend the scheme
when Host ends up being empty as well. Tested with
"kubectl --server localhost:8080 get po"

Fixes #2967
2016-07-07 13:21:58 -07:00
k8s-merge-robot 715d2f2358 Merge pull request #26611 from ZJU-SEL/clean-up-dup
Automatic merge from submit-queue

clean up dup code for kubelet

`RunKubelet` is called elsewhere, hence we should keep it that way.
Fixes #25345
2016-07-07 13:21:53 -07:00
k8s-merge-robot b808206726 Merge pull request #28609 from oscerd/typo-cassandra-example
Automatic merge from submit-queue

Fixed a little typo in Cassandra example Readme

Just a little fix for a typo in the Cassandra Cluster Example.

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-07 12:49:07 -07:00
k8s-merge-robot f1a6685b71 Merge pull request #24705 from derekwaynecarr/port_active_deadline
Automatic merge from submit-queue

Move ActiveDeadlineSeconds implementation into a kubelet sync observer

The first commit is from: https://github.com/kubernetes/kubernetes/pull/24344

The second commit moves the code for enforcement around active deadlines into a kubelet sync observer pattern.  It groups code that used to be scattered across the kubelet.

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24705)
<!-- Reviewable:end -->
2016-07-07 12:49:02 -07:00
k8s-merge-robot 4da14c8a64 Merge pull request #28204 from thockin/cleanup-third_party
Automatic merge from submit-queue

Cleanup third party (pt 2)

Move forked-and-hacked golang code to the forked/ directory.  Remove ast/build/parse code that is now in stdlib.  Remove unused shell2junit
2016-07-07 12:13:14 -07:00
k8s-merge-robot 8601530bdd Merge pull request #28460 from wojtek-t/remove_cmd_integration
Automatic merge from submit-queue

Remove cmd/integration test

Fix #24440

After few cleanup PRs:
https://github.com/kubernetes/kubernetes/pull/27182
https://github.com/kubernetes/kubernetes/pull/27535
https://github.com/kubernetes/kubernetes/pull/26016

The only things that are being tested here is:
- starting master components without any verification (so if it didn't start, it will still work :P)
- checking if kubelet is starting containers from http manifest.

The latter is already tested in:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/config/http_test.go#L54

So the test is now useless, at the same time, significantly increasing time spent on integration tests.

@lavalamp @mikedanese @spxtr @fejta
2016-07-07 11:36:19 -07:00
k8s-merge-robot 569008809f Merge pull request #28375 from duglin/removeContinue
Automatic merge from submit-queue

Remove unneeded continute

very minor but I noticed and it and it bugged me :-)

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-07-07 11:36:13 -07:00
k8s-merge-robot 51653073ec Merge pull request #25538 from duglin/fixErr
Automatic merge from submit-queue

s/positive/negative/ in the error message


I think we meant to imply that "if the error isn't real" then update the
exceptions file - which to me means "false negative", ie. false failure.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-07-07 11:36:07 -07:00
allenmiller 727bd438de Remove unbalanced right-paren 2016-07-07 11:06:01 -07:00
k8s-merge-robot 939b98481e Merge pull request #28448 from thockin/gce-pd-discard
Automatic merge from submit-queue

Mount r/w GCE PD disks with -o discard

As per https://cloud.google.com/compute/docs/disks/add-persistent-disk#formatting.

Fixes #23258
2016-07-07 11:01:43 -07:00
derekwaynecarr c162fec94d Move ActiveDeadlineSeconds to use lifecycle observers 2016-07-07 13:43:55 -04:00
k8s-merge-robot 3895cede49 Merge pull request #28434 from thockin/br-netfilter-warning
Automatic merge from submit-queue

Remove br_netfilter warning in kube-proxy

Many distros have this module linked in, generating a spurious error.

Fixes #23385
2016-07-07 10:27:20 -07:00
k8s-merge-robot 32e5996d57 Merge pull request #28447 from k82/k8s-26930-km-local-path
Automatic merge from submit-queue

MESOS: Support a pre-installed km binary at a well known, agent-local path

fixes #26930
2016-07-07 09:53:30 -07:00
k8s-merge-robot 05cbaa9900 Merge pull request #28151 from mbohlool/master
Automatic merge from submit-queue

Represent unversioned.Time correctly in swagger spec

unversioned.Time previously represented as "string" type with no format while the correct representation should also have "date-time" as format. fixes #2968
2016-07-07 09:53:25 -07:00
k8s-merge-robot 33242b95d6 Merge pull request #27077 from mikedanese/faster-integration-tests
Automatic merge from submit-queue

break integration tests into seperate packages so that they run in parallel

If this is broken then our tests aren't threadsafe.

ref #25940
2016-07-07 09:21:08 -07:00
Klaus Ma b361f40009 Enable km to use local km in agent. 2016-07-07 23:39:11 +08:00