Commit Graph

30 Commits (3215e8535ae8afcf850fbaac9df7ff9abe42f9e0)

Author SHA1 Message Date
Kubernetes Submit Queue 50e12ff5a2 Merge pull request #33575 from sttts/sttts-defaulted-config
Automatic merge from submit-queue

Decouple genericapiserver setDefault from New()
2016-09-29 01:52:46 -07:00
Dr. Stefan Schimanski 6f781625db Make genericapiserver Config.Complete type safe 2016-09-29 08:09:39 +02:00
Davanum Srinivas 1b67df90fa Support Access-Control-Expose-Headers in CORS Handler
Our typical HTTP Response has a "Date" Header, if we don't add an
additional http header "Access-Control-Expose-Headers: Date" then
the browser based clients cannot use the Date HTTP Header.

Fixes #33231
2016-09-28 19:32:25 -04:00
Dr. Stefan Schimanski 8391a19b57 Decouple defaulting from genericapiserver and master 2016-09-28 23:16:09 +02:00
Dr. Stefan Schimanski 6c75e922f3 Decouple NewRequestInfoResolver from GenericApiServer instance 2016-09-28 18:51:34 +02:00
Dr. Stefan Schimanski 10cbaf7ce0 Store RequestInfo in Context
... in order to replace the manual RequestInfoResolver dependency injection
through out the code.
2016-09-28 18:51:34 +02:00
Kubernetes Submit Queue 9e1960c507 Merge pull request #33365 from sttts/sttts-custom-handler-chain
Automatic merge from submit-queue

Towards custom handler chains in genericapiserver

**Based on https://github.com/kubernetes/kubernetes/pull/33478**

This PR makes the handler chain construction independent from the genericapiserver instance (with the exception of the `RequestInfoFilter` which will be fixed in https://github.com/kubernetes/kubernetes/pull/33490), i.e. the `Config` is enough to create a custom handler chain.
2016-09-28 01:02:16 -07:00
Kubernetes Submit Queue 1854bdcb0c Merge pull request #29048 from justinsb/volumes_nodename_not_hostname
Automatic merge from submit-queue

Use strongly-typed types.NodeName for a node name

We had another bug where we confused the hostname with the NodeName.

Also, if we want to use different values for the Node.Name (which is
an important step for making installation easier), we need to keep
better control over this.

A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName
2016-09-27 17:58:41 -07:00
Justin Santa Barbara 54195d590f Use strongly-typed types.NodeName for a node name
We had another bug where we confused the hostname with the NodeName.

To avoid this happening again, and to make the code more
self-documenting, we use types.NodeName (a typedef alias for string)
whenever we are referring to the Node.Name.

A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName

Also clean up some of the (many) places where the NodeName is referred
to as a hostname (not true on AWS), or an instanceID (not true on GCE),
etc.
2016-09-27 10:47:31 -04:00
Dr. Stefan Schimanski 157dcda8cc Move longrunning predicate into Config instead of RE
... in order to be available for custom handler chains.
2016-09-27 16:04:35 +02:00
Dr. Stefan Schimanski b806116e40 Move service error handler installer 2016-09-27 16:04:35 +02:00
Dr. Stefan Schimanski e2c17d69f7 Move one-time svg mime init code into Run() 2016-09-27 16:04:35 +02:00
Dr. Stefan Schimanski b48ac54e1c Make audit writer accessible from Config
... such that it can be used for a custom handler chain.
2016-09-27 16:04:34 +02:00
Dr. Stefan Schimanski 6dc2f6337b Separate apiserver handler filters 2016-09-27 09:57:59 +02:00
Dr. Stefan Schimanski a2f943e7c1 Move panic handler into genericapiserver 2016-09-27 09:52:50 +02:00
Dr. Stefan Schimanski acf0a5264a Prune unused parameters and call only once 2016-09-23 14:53:09 +02:00
Dr. Stefan Schimanski 87356c0623 Cleanup handler chain 2016-09-23 12:03:58 +02:00
Dr. Stefan Schimanski 8b33a9ed42 Move TimeoutHandler+MaxInFlightLimit to Config.New() 2016-09-23 12:00:30 +02:00
Kubernetes Submit Queue 6b3f5c4147 Merge pull request #33038 from deads2k/api-11-push-deps-down
Automatic merge from submit-queue

remove storage related fields from genericapiserver

Removes `StorageFactory` and `StorageDecorator` from from `genericapiserver` since both constructs are related to building a `RESTStorage`, which should be provided fully formed (or via factory func) to a truly generic API server.

I found this while trying to move the creation API routes earlier.
2016-09-22 17:04:13 -07:00
Kubernetes Submit Queue a8053c7c59 Merge pull request #33238 from mbohlool/openapi
Automatic merge from submit-queue

Move openapi common code to genericapiserver/openapi/common

a follow up to #32622

Reference: #13414
2016-09-22 10:20:48 -07:00
deads2k f6882e8465 remove storage related fields from genericapiserver 2016-09-22 09:21:34 -04:00
Kubernetes Submit Queue aa935bb8a4 Merge pull request #33170 from soltysh/audit_improvements
Automatic merge from submit-queue

Remove closing audit log file and add error check when writing to audit

This picks the order fix from #33164. Additionally I've removed entirely closing the log file, since it didn't make sense where it was. I've also added error checks when actually writing to audit logs.

@sttts ptal

**1.4 justification:**

Risk: the code only runs if auditing is enabled with an apiserver flag. So the risk is low.
Rollback: nothing should depend on this
Cost: the auditing feature is broken because the impersonation filter is applied before and you might not see the proper user when using `--as` flag. Additionally no errors are logged if writing to audit fails.
2016-09-22 05:06:33 -07:00
mbohlool c25ecc43ab Move openapi common code to genericapiserver/openapi/common 2016-09-21 17:01:54 -07:00
deads2k 561f8d75a5 move core resource registry packages 2016-09-21 10:11:50 -04:00
Maciej Szulik 5873c2679c Remove closing audit log file and add error check when writing to audit 2016-09-21 15:23:38 +02:00
mbohlool 38b2567d8b Move generated openAPI specs out of genericapiserver and make it configurable 2016-09-20 14:06:10 -07:00
Dr. Stefan Schimanski 7f78661d0b Cleanup non-rest apiserver handlers
- rename MuxHelper -> PathRecorderMux
- move non-rest handlers into routes packages within genericapiserver and
  `pkg/routes` (those from master)
- move ui and logs handlers out of genericapiserver (they are
  not generic)
- make version handler configurable (`config.EnableVersion`)
2016-09-15 13:22:45 +02:00
Clayton Coleman acb4c00b39
EnableGarbageCollection should be a struct member on RESTOptions
Not a global. Now that we have RESTOptions this was an easy change.
2016-09-15 00:09:28 -04:00
Maciej Szulik b19fcdce29 Fix namespace in audit logs 2016-09-09 11:43:28 +02:00
deads2k b0d770ad7b refactor genericapiserver new to combine initialization 2016-09-08 08:57:10 -04:00