Commit Graph

1964 Commits (d0087dfe62019b2d46b4ea0c075231f0108984ec)

Author SHA1 Message Date
Deyuan Deng 241f3d702b Exclude service itself when checking conflict. 2014-11-15 10:40:40 -05:00
Tim Hockin e987f11838 Merge pull request #2319 from brendandburns/external
Externalized services v2
2014-11-14 21:01:19 -08:00
Daniel Smith 29b73cc4b5 Merge pull request #2389 from satnam6502/kubectl
Make the output of kubectl.sh narrower
2014-11-14 17:33:20 -08:00
Dawn Chen eb14ba9396 Merge pull request #2390 from ddysher/random-fix
Use Service.Name for validation error.
2014-11-14 17:27:47 -08:00
Dawn Chen 8a508bcce3 Merge pull request #2391 from lavalamp/fix3
Remove confusing function; add TODO and explanation for (nonfatal) error...
2014-11-14 17:24:18 -08:00
Brendan Burns 4a8a2b5a9f Address comments. 2014-11-14 17:23:13 -08:00
Satnam Singh fa0cb9a25e Make the output kubectl.sh narrower 2014-11-14 17:20:01 -08:00
Daniel Smith c412540cf2 Remove confusing function; add TODO and explanation for (nonfatal) error message in integration test. 2014-11-14 17:16:05 -08:00
Deyuan Deng 29a56c4f18 Use Service.Name for validation error. 2014-11-14 19:36:34 -05:00
Dawn Chen ce145545b9 Add unittests to test PullPolicy. 2014-11-14 16:09:53 -08:00
Dawn Chen f729d748ac If the image with :latest tag specified in Spec, kubelet should try
to pull the latest one even the policy is PullIfNotPresent.
2014-11-14 16:09:53 -08:00
bgrant0607 cb8ca2d341 Merge pull request #2384 from lavalamp/fix3
Add events to kubectl describe
2014-11-14 13:29:40 -08:00
Daniel Smith 9430bb38b8 Merge pull request #2282 from bgrant0607/docgen
Automatic API generation via go-restful
2014-11-14 13:12:25 -08:00
Daniel Smith 6a5da9ee19 Add events to kubectl describe 2014-11-14 11:56:59 -08:00
Brendan Burns 2aa52d043b Add external services v2 support. 2014-11-14 11:32:54 -08:00
Dawn Chen aa711af39e Merge pull request #2355 from brendandburns/kubelet
Add support for the a clusters cloud interface to cloud provider.
2014-11-14 11:14:17 -08:00
Clayton Coleman c95b8694d6 Merge pull request #2340 from erictune/refactor_kube_auth
Refactor kube auth
2014-11-14 14:10:53 -05:00
Brendan Burns d3e48c9525 Add the container API to our dependencies.
Update google-api-go-client
2014-11-14 10:38:22 -08:00
Brendan Burns aabf1c3573 Add a clusters interface and GCE implementation. 2014-11-14 10:38:03 -08:00
Eric Tune 0727219c83 New package defines .kubernetes_auth format.
Refactored common code to that package.
Subsequent PRs will load and emit these files.
2014-11-14 10:36:25 -08:00
Brendan Burns c2485a4056 Merge pull request #2147 from justinsb/ipv6
Initial ipv6 / iptables work
2014-11-14 10:34:37 -08:00
Brendan Burns c25ef89b24 Merge pull request #2367 from lavalamp/fix3
Yet more non-controversial fixes from #2277
2014-11-14 10:25:04 -08:00
Daniel Smith 7df0f6d3bd Merge pull request #2343 from erictune/tokens_need_private_comms
Use https when Insecure is selected.
2014-11-14 09:51:59 -08:00
Daniel Smith de75e5a9bb Fix server-side namespace handling for events; add validation 2014-11-14 09:43:28 -08:00
Daniel Smith 3cf022786e fix up event client for namespaces 2014-11-14 09:43:28 -08:00
Brian Grant 7583e1a643 Automatic API generation by adopting go-restful 2014-11-14 16:49:19 +00:00
Dawn Chen f47f1da3d6 Merge pull request #2345 from yugui/lint/api
Fixes golint errors in pkg/api.
2014-11-13 23:21:42 -08:00
Eric Tune 5c24855349 Rename Secure -> TLS; we may use TLS insecurely. 2014-11-13 21:42:36 -08:00
Daniel Smith d153b98544 Simplify kubectl describe code 2014-11-13 20:25:50 -08:00
Yuki Yugui Sonoda 864bfb65da Fixes golint errors in pkg/api. 2014-11-14 13:14:23 +09:00
Eric Tune dd3c85be09 Use https when Insecure is selected. 2014-11-13 17:25:31 -08:00
Dawn Chen d004939b74 Merge pull request #2362 from erictune/nousage
Remove todos about adding usage to Pods.
2014-11-13 17:13:34 -08:00
Dawn Chen 9ee2535f29 Merge pull request #2366 from lavalamp/fix3
e2e + kubectl improvements
2014-11-13 17:12:10 -08:00
Daniel Smith 01048540bf add --watch-only to kubectl, if you only want new messages 2014-11-13 17:02:36 -08:00
Eric Tune b195d982cd Remove todos about addin usage to Pods.
Usage in Pods would be quite noisy when watching pods.
People should get usage from heapster, or from
some other object TBD.
2014-11-13 16:11:10 -08:00
Dawn Chen 81107c3e98 Change the default Pull policy to PullIfNotPresent. 2014-11-13 15:23:44 -08:00
Dawn Chen ff68b75401 Merge pull request #2333 from derekwaynecarr/validate_uid
Set uid during object create
2014-11-13 13:56:25 -08:00
Daniel Smith d6777557d1 Merge pull request #2305 from ddysher/rm-create-check
Remove health check when creating node.
2014-11-13 13:17:15 -08:00
derekwaynecarr 15701ff403 Set uid during object create 2014-11-13 15:25:49 -05:00
bgrant0607 7cab32b41d Merge pull request #2185 from brendandburns/history
Add a human readable message to pod state.
2014-11-13 10:52:04 -08:00
Clayton Coleman e9aadcaf44 Merge pull request #2350 from smarterclayton/util_encodejson_proven_harmful
util.EncodeJSON proven harmful, remove it everywhere
2014-11-13 10:58:34 -05:00
Clayton Coleman 6d31c2bf8a util.EncodeJSON proven harmful, remove it everywhere
People were misusing EncodeJSON in tests when they should be using
runtime.EncodeOrDie(testapi.Codec(), obj).  Removing the potential
for cutting self on sharp objects.
2014-11-13 10:38:13 -05:00
Paul Morie 47b0f3333e Make client.Interface contain EndpointsNamespacer 2014-11-13 09:39:54 -05:00
Daniel Smith 787c221fd6 Merge pull request #2281 from brendandburns/proxy
Add some retry to the service proxy.
2014-11-12 18:17:14 -08:00
Brendan Burns 3b5029c673 Add some retry to the service proxy. 2014-11-12 16:48:27 -08:00
Deyuan Deng c83ee59e15 Remove health check when creating node. 2014-11-12 18:55:18 -05:00
Daniel Smith 72c922668f Improve error reporting 2014-11-12 15:22:09 -08:00
Daniel Smith 178d0af795 Fix watch for events; add test for interface implementation so it won't break again. 2014-11-12 15:22:08 -08:00
Maria Nita 874ce5d799 Add directory as option for createall command 2014-11-12 23:52:16 +01:00
Daniel Smith 02a0593df0 Add --watch to get command 2014-11-12 13:44:39 -08:00
Daniel Smith 0348a67413 Merge pull request #2195 from smarterclayton/prepare_pod_template_v1beta3
Allow an internal pod template reference or object
2014-11-12 10:55:08 -08:00
Clayton Coleman ab3bf094b6 Merge pull request #2330 from pmorie/typo
Typo fix
2014-11-12 13:37:04 -05:00
Dawn Chen e6de4eba00 Merge pull request #2329 from derekwaynecarr/validate_minion
Centralize minion validation
2014-11-12 10:10:42 -08:00
Paul Morie 80b1e2dde3 Typo fix 2014-11-12 13:05:08 -05:00
derekwaynecarr b326cbbe0c Centralize minion validation 2014-11-12 12:38:15 -05:00
jhadvig f2f1708687 Setting RawTerminal attribute in LogOptions to false 2014-11-12 17:47:52 +01:00
Eric Tune cf21f97cd2 Merge pull request #2309 from lavalamp/fix3
Refactors of kubectl object printers.
2014-11-11 16:39:04 -08:00
Daniel Smith a198a62064 refactor resource printer's version handling (to make adding --watch feature easier) 2014-11-11 16:15:22 -08:00
Daniel Smith 6fa6d3ee3e kubectl resource printing: actually do versioned print 2014-11-11 15:32:13 -08:00
Daniel Smith f1b0b64a75 Add 'source' to events field selector. 2014-11-11 15:32:13 -08:00
Clayton Coleman 8a59000472 Warn if pod has no labels 2014-11-11 17:03:20 -05:00
Clayton Coleman 94c873e7a4 Remaining refactor for PodTemplateSpec and fixing test cases 2014-11-11 17:03:20 -05:00
Daniel Smith 97cb1fa2df Merge pull request #2290 from pmorie/rename
Rename client/cache Store.Contains to ContainedIDs
2014-11-11 10:16:19 -08:00
Clayton Coleman 9fb58029fe Merge pull request #2287 from marianitadn/kubectl-create-factory
Kubectl create factory
2014-11-11 12:57:22 -05:00
Brendan Burns ffcdb9dfb7 Fix build on 32 bit processors. 2014-11-11 09:51:45 -08:00
Paul Morie e2be1564a4 Rename client/cache Store.Contains to ContainedIDs 2014-11-11 11:48:15 -05:00
Maria Nita 2295d4b2e9 kubectl createall command extends Factory 2014-11-11 17:23:39 +01:00
Clayton Coleman b5a88a4662 Merge pull request #2283 from dchen1107/deathrattle
Fixed Eventf with wrong arguments.
2014-11-11 10:41:51 -05:00
Michal Fojtik 0c76c44972 Make getKubeConfig public to allow it for external consumption 2014-11-11 16:02:39 +01:00
Dawn Chen ada43ae233 Fixed Eventf with wrong arguments. 2014-11-10 23:53:48 -08:00
Dawn Chen 30fcf24131 Merge pull request #2121 from brendandburns/standalone
Create a standalone k8s binary, capable of running a full cluster
2014-11-10 22:04:28 -08:00
Brendan Burns db0d98daa2 Merge pull request #2257 from jhadvig/kubelet_timeout
Bumping kubelet write/read timeout
2014-11-10 21:18:25 -08:00
Brendan Burns 3fdbb10255 Add a human readable message to pod state. 2014-11-10 21:05:27 -08:00
Eric Tune 08c8f2cde1 Record event of kubelet restart re: minion obj. 2014-11-10 13:46:48 -08:00
Brendan Burns 2c1221864d Make a standalone binary. 2014-11-10 13:34:11 -08:00
Clayton Coleman 21a6e96418 Merge pull request #2126 from brendandburns/validatez
Add etcd to the list of services to validate.
2014-11-10 14:53:41 -05:00
bgrant0607 3cf17c0094 Merge pull request #2225 from dchen1107/deathrattle
Capture application termination messages/output
2014-11-10 11:25:14 -08:00
Dawn Chen 57454cce81 Add support to capture application termination message and propagate
the message to the upper layer through ContainerStatus.
2014-11-10 10:56:23 -08:00
Dawn Chen 8ffbced280 Introduce terminationMessagePath to Container, and update conversion code
to assign the default path.

Move default setting for terminationMessagePath to conversion
from validation. Addressed other comments.
2014-11-10 10:55:56 -08:00
fabianofranz c43637b73c Extract several kubectl helpers from cmd/cmd.go 2014-11-10 15:09:32 -02:00
Clayton Coleman 72bf12c86d Update the validation logic to test PodTemplateSpec 2014-11-10 11:33:51 -05:00
Clayton Coleman a68a493e4b Alter the error message when an error list is put in an error list 2014-11-10 11:33:51 -05:00
Clayton Coleman 74c7914f7e Conversion functions to support PodTemplateSpec 2014-11-10 11:33:31 -05:00
Clayton Coleman e3be1e9e14 Changes to core types for introducing PodTemplateSpec 2014-11-10 11:33:31 -05:00
Clayton Coleman 9f15e96bd6 Better logging when a type is invalid during conversion 2014-11-10 11:33:31 -05:00
Clayton Coleman ad92ff6952 When explicitly converting two objects, allow names to differ 2014-11-10 11:33:31 -05:00
jhadvig dfa076b79a Dumping kubelet write/read timeout 2014-11-10 17:09:50 +01:00
Daniel Smith 9bb0d33a3f Fix kubectl -template to be versioned 2014-11-07 16:47:21 -08:00
Daniel Smith 66d62229f6 Fix kubecfg -template to be versioned 2014-11-07 16:47:21 -08:00
Deyuan Deng 38abf0c7ad Return success when registrying unhealthy node. 2014-11-07 15:45:15 -05:00
Daniel Smith 9938254b63 Merge pull request #2226 from claire921/kubectl
Uncapitalize error message in pkg/kubectl
2014-11-07 11:30:39 -08:00
Daniel Smith 4eca141c0f Merge pull request #2236 from dchen1107/cleanup
Remove dead code.
2014-11-07 11:29:52 -08:00
Tim Hockin b4b6453808 Merge pull request #2198 from claire921/service
Service
2014-11-07 11:15:29 -08:00
Dawn Chen b4ab6e6ecc Remove dead code. 2014-11-07 11:05:35 -08:00
Daniel Smith 816c6f58dd Merge pull request #2197 from claire921/scheduler
Refactor selectHost in Sched
2014-11-07 09:38:54 -08:00
Dawn Chen 5342bb4306 Introduce application termination message to ContainerStatus 2014-11-07 09:32:39 -08:00
Justin SB b19170f335 gofmt 2014-11-07 06:34:18 -08:00
Claire Li a4261d0f65 Use switch rather than ifs for getPodStatusForReplicationController in pkg/describe.go 2014-11-06 23:45:51 -08:00
Claire Li 9111f4fdbe Uncapitalize error message in pkg/kubectl 2014-11-06 22:56:39 -08:00
Claire Li 5a7c00754f Fix findPort: correctly handle the empty ports case 2014-11-06 21:55:43 -08:00
Claire Li c5205870c0 Refactor test for findPort in service pkg 2014-11-06 21:55:43 -08:00
Claire Li ea0c6bcbfd Refactor findPort in service pkg 2014-11-06 21:55:43 -08:00
Claire Li 4bee622865 Add check for empty priority list and refactor tests. 2014-11-06 21:38:41 -08:00
Justin SB 04313ff173 Create ip_allocator that copes with IPv6
It uses a set (via a map) of allocated IPs
2014-11-06 21:26:26 -08:00
Sam Ghods cbd13b599d Fix two compilation errors when running go build ./... 2014-11-06 12:55:27 -08:00
Joe Beda cc30ed14d0 Merge pull request #2207 from mikedanese/default-registry-auth
added support for authentication against the default docker registry...
2014-11-06 12:39:49 -08:00
Daniel Smith 42b0131d47 Merge pull request #2191 from thockin/udpsvc
UDP services need UDP portals
2014-11-06 12:19:31 -08:00
Mike Danese 1d76452bc2 added support for authentication against the default docker registry when provided in the .dockercfg
a
2014-11-06 11:52:25 -08:00
Daniel Smith 9846228969 Merge pull request #2201 from erictune/insecure_handler
Return InsecureHandler from master.
2014-11-06 10:59:43 -08:00
Clayton Coleman 4acb8e5eaf Merge pull request #2189 from lavalamp/fix
Add self links to objects sent down the watch channel.
2014-11-06 12:57:07 -05:00
Eric Tune c068b56919 Return InsecureHandler from master.
Subsequent changes will make use of both
m.Handler and m.InsecureHandler for different ports.
2014-11-06 09:11:31 -08:00
derekwaynecarr 56b6273dfb Fix json serialization consistency 2014-11-06 10:24:48 -05:00
Claire Li 18fa043b1b Add a test for selectHost of generic_scheduler 2014-11-05 21:48:42 -08:00
Claire Li 415ac3bf8a Refactor selectHost in generic_scheduler 2014-11-05 21:26:25 -08:00
Brendan Burns d7dc20fd6a Add etcd to the list of services to validate.
Also add minions.
2014-11-05 21:22:01 -08:00
Tim Hockin bc072206c0 UDP services need UDP portals 2014-11-05 17:47:40 -08:00
Daniel Smith 5579f09792 Merge pull request #2148 from lavalamp/eventing3
Add events to kubectl (still need search function)
2014-11-05 17:26:05 -08:00
Daniel Smith 4196780eda Add self links to objects sent down the watch channel. 2014-11-05 17:22:18 -08:00
Clayton Coleman 06633bf4cd Merge pull request #2184 from erictune/policy_csv
ACL file.
2014-11-05 19:13:17 -05:00
Eric Tune 6e81e8c896 Basic ACL file.
Added function to read basic ACL from a CSV file.
Added implementation of Authorize based on that file's policies.
Added docs on authentication and authorization.
Added example file and tested it.
2014-11-05 16:06:22 -08:00
Dawn Chen e88e490614 Merge pull request #2143 from lavalamp/eventing2.1
Begin putting event emission into kubelet
2014-11-05 15:37:26 -08:00
Brendan Burns 0a1493a5ce Merge pull request #2160 from dchen1107/fix
Restart network container when container's configure is changed.
2014-11-05 15:13:05 -08:00
Daniel Smith dcc111bf13 Start putting event generation into kubelet (not enabled yet) 2014-11-05 15:09:14 -08:00
Daniel Smith 25bd151d86 Make fieldPath part of getting a reference rather than part of making an event. 2014-11-05 15:09:14 -08:00
Daniel Smith ecebe958d2 Allow ObjectReferences to be passed to Eventf
... in place of the object they reference.
2014-11-05 15:07:40 -08:00
markturansky 119f654a13 Refactor PodStatus to PodCondition in internal API for v1beta3 2014-11-05 17:26:47 -05:00
Daniel Smith 0b924ed9d9 Add events to kubectl (still need search function) 2014-11-05 13:59:32 -08:00
Daniel Smith 3bd10d4fb4 Merge pull request #2145 from lavalamp/eventing2
Add a placeholder to boundPod's SelfLink
2014-11-05 13:49:53 -08:00
Daniel Smith c163535563 Allow (delayed) apiserver starting when network interface isn't available immediately. 2014-11-05 12:07:33 -08:00
bgrant0607 39fba7c8d5 Merge pull request #2024 from meirf/parse-multivalue-based-selector-syntax
state-based parser for multi-valued set selector syntax
2014-11-05 11:17:39 -08:00
Daniel Smith 3260d300e5 Merge pull request #2166 from claire921/refactor_sched
Refactor PodFitsPorts
2014-11-05 10:30:00 -08:00
Daniel Smith 6e55514a47 Merge pull request #2167 from claire921/clean
Cleanup generic_scheduler
2014-11-05 10:22:24 -08:00
Daniel Smith 1b9dbe10d9 Merge pull request #2168 from claire921/cleanup_predicates
Refactore calculateOccupancy in pkg/scheduler
2014-11-05 10:21:34 -08:00
Meir Fischer 444b74302a state-based parser for multi-valued set selector syntax 2014-11-05 08:47:51 -05:00
Brian Grant 535785e3b9 Update api/validation service validation with service fields moved by #2086 2014-11-05 06:52:06 +00:00
bgrant0607 fc0dab630c Merge pull request #2086 from markturansky/v1beta3_refactor
Refactor internal API for Services to match v1beta3
2014-11-04 21:48:02 -08:00
Claire Li 076f1638b8 Refactore calculateOccupancy in pkg/scheduler 2014-11-04 21:44:44 -08:00
Claire Li 0e989afa66 Cleanup generic_scheduler 2014-11-04 21:39:10 -08:00
Claire Li 8d859f4260 Refactor PodFitsPorts 2014-11-04 21:21:26 -08:00
Brendan Burns c1ce1fcd46 Merge pull request #2163 from lavalamp/fix2
Fix nil docker client (how did this ever work???)
2014-11-04 17:07:53 -08:00
Daniel Smith 4b16e979e6 Fix nil docker client (how did this ever work???) 2014-11-04 16:58:37 -08:00
Dawn Chen 03958f5049 Restart network container when container's configure is changed.
Fix #2099
2014-11-04 14:38:33 -08:00
Daniel Smith e4dcd4a131 Merge pull request #2122 from erictune/moar_attribs
Moar authorization attributes
2014-11-04 13:17:47 -08:00
Daniel Smith 4630948ad7 Merge pull request #2150 from claire921/fix_health_test
Fix health_test.go
2014-11-04 13:16:47 -08:00
Daniel Smith 0ed0858d1d Merge pull request #2149 from claire921/r_health
Refactor Status.String() in health pkg
2014-11-04 13:15:47 -08:00
bgrant0607 c7ff31004b Merge pull request #2094 from brendandburns/svc
Add some validation for externalized service ports.
2014-11-04 13:04:56 -08:00
Clayton Coleman 437f90dac4 Merge pull request #2154 from smarterclayton/namespace_on_create
Check namespace on create of objects like update
2014-11-04 15:23:04 -05:00
Daniel Smith 9177458ad8 Merge pull request #2151 from claire921/r_health_http.go
Refactor formatURL in health/http.go
2014-11-04 11:50:09 -08:00
markturansky bd7643c033 refactor services to v1beta3 2014-11-04 14:23:53 -05:00
Clayton Coleman 192541824f Check namespace on create of objects like update
A user should be allowed to create an object in a non-default namespace
if non is specified in the passed file.
2014-11-04 13:59:23 -05:00
Clayton Coleman 76648ffafb Like update, allow CLI create to clear resourceVersion 2014-11-04 10:44:56 -05:00
Clayton Coleman dbf28cbe51 Lock the output format version based on user input 2014-11-04 10:44:56 -05:00
Clayton Coleman a8ccb0f99f Display an external version of the object for --output
Use the version of the API the RESTMapper prefers (currently)
2014-11-04 10:44:56 -05:00
Clayton Coleman 70aa9cc62c Add --template and --templatefile options for more flexibility
Allow directly entered templates for scripting flexibility.
Changes --output=template to mean "string" and --output=templatefile
to mean "from file"
2014-11-04 10:44:56 -05:00
Clayton Coleman e46adc4cd0 kubectl should error when namespace doesn't match file for update
A user who runs `kubectl update -f foo.json` where foo.json is a
resource in a namespace that does not match $(kubectl namespace)
may not intend to update the resource in that other namespace.

For now, return an error when the user does not explicitly set
the namespace via the CLI:

    # foo.json in 'one', current is 'two'
    $ kubectl update -f foo.json # FAILS

    $ kubectl update --namespace=one -f foo.json # SUCCEEDS
2014-11-04 10:44:56 -05:00
Clayton Coleman 09cfa364c5 Refactor Get and Describe to allow extension of types
Get should use ResourceMapper, allow Printer to be abstracted,
and extract Describe as *Describer types.
2014-11-04 10:44:56 -05:00
Clayton Coleman 39882a3555 Allow Create/Update/Delete kubectl commands to handle arbitrary objects
* Ensure kubectl uses abstractions from other parts of Kube
* Begin adding abstractions that allow arbitrary objects
* Refactor "update" to more closely match allowed behavior
2014-11-04 10:44:56 -05:00
Clayton Coleman f0c23d68f7 Add runtime.ObjectConvertor to RESTMapper 2014-11-04 10:38:00 -05:00
Clayton Coleman dc862ae463 Return the Kind of the object with the RESTMapper 2014-11-04 10:34:47 -05:00
Clayton Coleman 778a50d00b Introduce ObjectConvertor for conversion to known API versions
Will allow clients to transform internal objects to a version
suitable for external output.
2014-11-04 10:34:15 -05:00
Michal Fojtik 581de15905 Fixed wrong godoc for pkg/config methods 2014-11-04 15:51:47 +01:00
Michal Fojtik c8f88a3ae8 Add support for creating a bulk of resources via kubectl apply 2014-11-04 14:52:29 +01:00
Claire Li 51a55d3146 Refactor formatURL in health/http.go 2014-11-03 22:19:25 -08:00
Claire Li d9a6cfd169 Fix health_test.go 2014-11-03 22:03:34 -08:00
Claire Li 5e3193afd1 Refactor Status.String() in health pkg 2014-11-03 21:57:01 -08:00
Daniel Smith 724db61c1d Add a placeholder to boundPod's SelfLink, and test that one can make references to them. 2014-11-03 17:46:33 -08:00
Eric Tune 1668c6f107 Authorization based on namespace, kind, readonly.
Also, pass Authorizer into master.Config.
2014-11-03 17:45:15 -08:00
Eric Tune 3045035512 Get user from request and put in authz attribs.
Added integration tests for user-based auth.
2014-11-03 16:38:56 -08:00
Dawn Chen 6c2212b37a Merge pull request #2142 from erictune/fix_crash
Require a KubeletClient in master.New()
2014-11-03 16:21:00 -08:00
Eric Tune 795bc7f976 Require a KubeletClient in master.New().
Without this, tests which create a master
will panic with a nil pointer when the periodic
podCache update runs.

Deleted unused FakePodInfoGetter.
Added FakeKubeletClient.
Passed to master.New.
Required a KubeletClient in master.New.
2014-11-03 16:09:41 -08:00
Dawn Chen c4aa4d28a6 Merge pull request #2120 from brendandburns/uuid
Add some blocking so that we don't generate identical UUIDs for API objects.
2014-11-03 15:32:56 -08:00
Justin SB 9a053a4b59 Initial ipv6 / iptables work 2014-11-03 15:23:04 -08:00
Daniel Smith 7c2b7b55e7 Merge pull request #2059 from smarterclayton/rest_mapping
Define a mapping between REST resource name and kind/apiVersion
2014-11-03 15:08:21 -08:00
Clayton Coleman 191c1b975c Define a mapping between REST resource name and kind/apiVersion
Allows clients to abstractly map user input to generic resource
paths as per docs/api-conventions.md
2014-11-03 17:09:06 -05:00
Brendan Burns f556f2f82f Add some validation for externalized service ports. 2014-11-03 13:36:34 -08:00
Brendan Burns a624630112 Add some blocking so that we don't generate identical UUIDs for API objects. 2014-11-03 13:27:59 -08:00
Dawn Chen 078bc364b4 Merge pull request #2135 from brendandburns/cleanup
Change a spammy log to V(3)
2014-11-03 12:53:27 -08:00
Dawn Chen 6cc5b7d848 Merge pull request #2125 from brendandburns/flake
Deflake the TestCreate test, by adding an explicit wait.
2014-11-03 08:53:29 -08:00
Dawn Chen e99eac0e78 Merge pull request #2128 from brendandburns/kubelet
Add support for a 'log' command to kubectl.
2014-11-03 08:50:36 -08:00
Dawn Chen 81785d8cde Merge pull request #2124 from brendandburns/fix
Make endpoints return 400 instead of 500
2014-11-03 08:38:34 -08:00
Brendan Burns 4ae3e99177 Change a spammy log to V(3) 2014-11-03 08:38:02 -08:00
Brendan Burns 6de9d9bfe1 Merge pull request #2130 from claire921/refactor_healthz_test
Fix healthz test error handling
2014-11-03 08:24:37 -08:00
markturansky 2260b241dc Removed 'Metadata' from all types 2014-11-03 08:47:22 -05:00
Claire Li eafd142dfa Fix healthz test error handling 2014-11-02 22:26:45 -08:00
Brendan Burns 32a04e48fd Make endpoints return 400 instead of 500 2014-11-02 20:08:06 -08:00
Brendan Burns b0c5d3b022 Add support for a 'log' command to kubectl. 2014-11-02 19:54:19 -08:00
Brendan Burns f02fe2da1b Deflake the TestCreate test, by adding an explicit wait. 2014-11-02 12:38:31 -08:00
Clayton Coleman 10de0d1933 Merge pull request #2108 from brendandburns/fix
Fix a missing lock in the fake etcd client.
2014-11-01 11:36:21 -04:00
Brendan Burns cf4fd8753f Fix a missing lock in the fake etcd client. 2014-10-31 21:36:03 -07:00
Eric Tune 55c2d6bbbb Add basic Authorization.
Added basic interface for authorizer implementations.
Added default "authorize everything" and "authorize nothing
implementations.
Added authorization check immediately after authentication check.
Added an integration test of authorization at the HTTP level of
abstraction.
2014-10-31 12:04:33 -07:00
Brendan Burns 893291d81d Merge pull request #1997 from ddysher/split-master
Separate minion controller from master.
2014-10-31 11:23:58 -07:00
Brendan Burns 69ca97a41c Fix a flaky test by draining the worker pool after syncing. 2014-10-31 09:52:01 -07:00
Brendan Burns 69ad5c9bff Merge pull request #2077 from dchen1107/cleanup
PodUpdate only has the delta changes, not full snapshot of all desired
2014-10-30 21:46:26 -07:00
Brendan Burns 563311071d Merge pull request #2090 from ddysher/stop-httptest-server
Stop httptest server.
2014-10-30 21:44:53 -07:00
Brendan Burns c6df93d76e Merge pull request #2082 from lavalamp/fix
Fix self linking of objects returned in lists.
2014-10-30 21:43:31 -07:00
Deyuan Deng acf9d23b32 Stop httptest server. 2014-10-30 21:37:08 -04:00
Deyuan Deng 019b7fc74c Separate minion controller from master. 2014-10-30 20:24:15 -04:00
Clayton Coleman 41f0929384 Merge pull request #2044 from erictune/fix_mux
Allocate mux in master.New()
2014-10-30 20:15:57 -04:00
Daniel Smith 790a88c6ea Merge pull request #1964 from dchen1107/cadvisor
Add /boundPods to Kubelet
2014-10-30 16:46:44 -07:00
Dawn Chen a1e79048a6 Add /podSpecs to Kubelet 2014-10-30 16:38:08 -07:00
Daniel Smith b28234fac6 Fix self linking of objects returned in lists. 2014-10-30 15:04:11 -07:00
Daniel Smith 64574dcc44 Merge pull request #2074 from derekwaynecarr/ns_watch
Fix watch by namespace
2014-10-30 12:56:50 -07:00
Dawn Chen 445ec719c9 PodUpdate only has the delta changes, not full snapshot of all desired
BoundPods on a node. PR #1865 has a wrong assumption, with which any
PodUpdate operation will cause rest of running containers without updates
are killed as an unexpected ones.

Fix #2028
2014-10-30 11:22:59 -07:00
Clayton Coleman 8a2d778248 Merge pull request #2066 from lavalamp/eventing2
Event fixes
2014-10-30 14:19:19 -04:00
derekwaynecarr dda19071e3 Fix watch by namespace 2014-10-30 12:56:50 -04:00
derekwaynecarr 5a7aced7b0 Kubectl namespace support
Add unit test for load namespace info
Different message on display of namespace versus setting namespace
2014-10-30 11:05:30 -04:00
Daniel Smith a7cc25f7ff Add namespaces to event creation path. 2014-10-29 18:03:14 -07:00
Clayton Coleman 2c10dd85c3 Merge pull request #2047 from smarterclayton/make_request_testable
Make client.Request/RESTClient more testable and fakeable
2014-10-29 19:33:36 -04:00
Daniel Smith ab9346d107 Use ID instead of Name in v1beta1 & 2 2014-10-29 15:13:44 -07:00
Eric Tune 9713b58caa Allocate mux in master.New()
Callsites no longer allocate a mux.
Master now exposes method to install handlers
which use the master's auth code.  Not used
but forks (openshift) are expected to use these
methods.  These methods will later be a point
for additional plug-in functionality.
Integration tests now use the master-provided
handler which has auth, rather than using the mux,
which didn't.  Fix TestWhoAmI now that /_whoami
sits behind auth.
2014-10-29 14:31:07 -07:00
Daniel Smith 070c6c0440 Fix missing portalNets in tests once and for all by adding a default. 2014-10-29 12:27:35 -07:00
Daniel Smith 858b557bbb Undemocratically remove unused election code.
@brendandburns: leaving this as a separate commit so you can get it back easily when you're ready to do something with it.
2014-10-29 11:38:45 -07:00
Daniel Smith a036ebc1be Switch models. No master election. 2014-10-29 11:38:45 -07:00
Daniel Smith 7146ec9d49 Implement kubernetes & kubernetes-ro services 2014-10-29 11:29:28 -07:00
Daniel Smith 3045311398 Fix subtle bug when proxy constructs outgoing URL. 2014-10-29 11:29:28 -07:00
Daniel Smith 7209ca1543 Make redirect handle namespaces just like proxy (which is weird and needs to be fixed but at least this will be consistent). 2014-10-29 11:29:28 -07:00
Daniel Smith 4311273294 Expand choices for using election code. 2014-10-29 11:29:28 -07:00
Daniel Smith d05dad6c59 Add runner utility. 2014-10-29 11:29:28 -07:00
Clayton Coleman 71fecef6f6 Add test coverage and fix a few minor problems 2014-10-29 14:08:37 -04:00
Daniel Smith 5ac88dbe2e Merge pull request #2055 from smarterclayton/define_an_interface_for_typing
Make DataVersionAndKind public on runtime.Scheme
2014-10-29 10:29:39 -07:00
Daniel Smith 94e736e286 Merge pull request #2009 from smarterclayton/unify_meta
Unify Accessor for ObjectMeta/TypeMeta/ListMeta
2014-10-29 09:58:46 -07:00
Clayton Coleman 58715527aa Make DataVersionAndKind public on runtime.Scheme
Add a new ObjectTyper interface that clients can depend on for
converting between data and object to version and kind.
2014-10-29 12:10:55 -04:00
Clayton Coleman eac933eb44 Make client.Request more testable, break coupling with RESTClient
Moves polling to a function provided by the RESTClient, not innate
to Request. Moves doRequest from RESTClient to Request for clarity.
2014-10-28 23:00:24 -04:00
Daniel Smith dca7363459 Serve API version list, test with an integration test. 2014-10-28 17:35:56 -07:00
Clayton Coleman 1da5c444e8 Merge pull request #2034 from deads2k/expose-parseWatchResourceVersion
expose ParseWatchResourceVersion for downstream use
2014-10-28 19:26:46 -04:00
Dawn Chen f6db096741 Merge pull request #2022 from brendandburns/gc
Add container garbage collection.
2014-10-28 13:37:16 -07:00
Daniel Smith 55c9c06b81 Merge pull request #2001 from VojtechVitek/fix_scheme_panic
Fix reflect panic in runtime/conversion
2014-10-28 13:30:40 -07:00
deads2k 613bf93eaf expose ParseWatchResourceVersion for downstream use 2014-10-28 16:29:33 -04:00
Brendan Burns 51bf451932 Add container garbage collection. 2014-10-28 12:52:06 -07:00
Daniel Smith 66b43a5e87 fix build 2014-10-28 12:44:24 -07:00
Clayton Coleman 5cb3c10289 Merge pull request #1782 from smarterclayton/allow_put_to_set_create
Allow clients to determine the difference between create or update on PUT
2014-10-28 13:40:41 -04:00
Clayton Coleman 88cd3988f7 Merge pull request #2016 from erictune/whoami
Added /whoami and integration test for authorization.
2014-10-28 13:21:24 -04:00
Eric Tune f7ebc7d0d5 Added /_whoami and integration test for auth(z|n)
Added new endpoint /_whoami for debugging authentication.
Added integration test which checks that a user is authenticated
using token authentication.
Rearranged initialization of authenticator to support preceeding.
2014-10-28 09:33:45 -07:00
Vojtech Vitek (V-Teq) 90809c270d Use conversion.EnforcePtr() where appropriate
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-10-28 16:36:09 +01:00
Vojtech Vitek (V-Teq) 8969f0df7e Handle nil values in conversion.EnforcePtr()
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-10-28 16:36:04 +01:00
Tim Hockin 9a617344bf Merge pull request #1945 from brendandburns/tests
Add support for git volumes.
2014-10-27 16:55:37 -07:00
Brendan Burns b59e49fa13 Add support for git volumes. 2014-10-27 16:35:52 -07:00
bgrant0607 854af6b926 Merge pull request #1966 from ddysher/Stop-test-server
Stop test server in endpoint unittest.
2014-10-27 16:35:18 -07:00
bgrant0607 f28b840060 Merge pull request #1982 from thockin/dns
Respect a requested PortalIP if possible
2014-10-27 16:24:37 -07:00
Brendan Burns 455471d77d Further fixes. 2014-10-27 14:48:42 -07:00
Tim Hockin bb5ca0f91b Respect a requested PortalIP if possible 2014-10-27 14:03:52 -07:00
Joe Beda fca05982fc Merge pull request #2010 from brendandburns/fix
Fix the e2e tests and kubecfg given recent additional validation.
2014-10-27 13:43:13 -07:00
Brendan Burns df3dd288f2 Fix the e2e tests and kubecfg given recent additional validation. 2014-10-27 13:39:21 -07:00
Clayton Coleman 66ace4c270 Begin to unify ResourceVersioner and SelfLinker
Create a new MetadataAccessor interface that combines both
and use it where previously latest.ResourceVersioner and SelfLinker
were being used.

Adds Namespace to the get/set interface. Adds TODO about future
fast path for metadata (as per thockin's comment)
2014-10-27 16:00:55 -04:00
Eric Tune 245585f364 Move handler setup: cmd/apiserver -> pkg/master
Moved CORS handler setup and authorizer setup.
Will allow for integration test of authorization.
2014-10-27 11:43:12 -07:00
Clayton Coleman 126d4dcf96 Merge pull request #1978 from erictune/master_int_test
Integration test on master, not just apiserver.
2014-10-27 13:12:13 -04:00
Tim Hockin 37ffb41b81 Merge pull request #1830 from markturansky/label_validation
add RFC952 validation to labels
2014-10-27 09:54:18 -07:00
Eric Tune 40a5ca034d Integration test on master, not just apiserver.
Moved code from cmd/apiserver to pkg/master.

test/integration/client_test made to use a master object,
instead of an apiserver.Handle.

Subsequent PRs will move more handler-installation into
pkg/master, with the goal that every http.Handler of a
standalone apiserver process can also be tested
in a "testing"-style go test.

In particular, a subsequent PR will test
authorization.
2014-10-27 09:14:58 -07:00
Vojtech Vitek (V-Teq) 6a6f24b126 Fix reflect panic in runtime/conversion
Fixes `panic: reflect: call of reflect.Value.Type on zero Value`
when calling conversion.EnforcePtr() or
runtime.Scheme.ObjectVersionAndKind() from default type switch.

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-10-27 06:01:14 +01:00
Clayton Coleman 52b582271b Typo in conversion Godoc 2014-10-26 22:21:11 -04:00