Commit Graph

363 Commits

Author SHA1 Message Date
Jordan Liggitt 08f23b5217 github.com/googleapis/gnostic v0.4.1
Kubernetes-commit: 93c7b24562d80959f45c308e7412456a410b9b25
2020-03-31 17:18:56 -04:00
Davanum Srinivas c15d16953f Move k8s.io/apiserver/pkg/util/term to k8s.io/component-base/term
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 1d057da2f73118893b5cc27c15d59ff03beb271e
2020-03-16 16:27:44 -04:00
Mike Spreitzer 9df60c9fe6 Renaming: "Change" -> "Add" for consistency with underlying method
Kubernetes-commit: c7b098ac6c276d65a79db6cfeb04f5f0f86eb315
2020-03-05 15:17:33 -05:00
Mike Spreitzer 8235385f97 Fix queued request accounting, extended queueset test
Kubernetes-commit: 8a1b60320986eca05cb281bcce45332e0969268e
2020-03-05 15:13:46 -05:00
Mike Spreitzer 6ae3e470a2 Make some metrics finer-grained, add dispatch counts, note immediate reject
Also add testing of metrics for queuesets.

Kubernetes-commit: f535a9c9ed4b6a0def47c354acad0ac2a8f961b0
2020-03-01 20:22:58 -05:00
Mike Spreitzer 219ab512ff Generalized NonResourcePolicyRule.NonResourceURLs impl
... to match the comment on that field.

Also generalized the test case generator to exercise the new
generality.

Kubernetes-commit: 2e97d3c8732147c3ba2f11d668f50b44e6374348
2020-03-04 00:00:39 -05:00
Mike Spreitzer f9c1780311 Hopefully plainer test strings
Kubernetes-commit: 4a4852ca9a1ffc439e2c476d7057a8be9f081055
2020-03-04 21:47:19 -05:00
Mike Spreitzer f44645645b Added non-randomized tests of matching FlowSchema rules
Kubernetes-commit: 21f78f3348736f242541f7b66e191aa1dce78c47
2020-02-27 23:36:19 -05:00
yue9944882 f452a698b0 register metrics from comp-base
Kubernetes-commit: 11656478be93d4a9e54129ec35cd2b9558e901ac
2020-02-27 17:04:17 +08:00
Jefftree 13613a1c15 Address comment and remove if condition
Kubernetes-commit: 61fa4e6c098559b65fe28c1bf55cb817697e38e5
2020-02-27 17:18:57 -08:00
Jefftree f1c9537c7b pass Dialer instead of egressselector to webhooks
Kubernetes-commit: 1b38199ea8b220be0b645af8a4cbdef4c87ce7fc
2019-12-05 17:28:59 -08:00
Jefftree aa55f94611 authentication webhook via network proxy
Kubernetes-commit: d318e52ffe0ba156a96cb5507026de6827d543ca
2019-12-03 15:20:49 -08:00
yue9944882 f93a7a8312 homogenize metrics naming
Kubernetes-commit: a1523a049ff9fc47d7dc2c4354b16b69d2eb4be2
2020-02-19 16:34:49 +08:00
Ted Yu f2eace2821 Do not dereference qcAPI which maybe nil
Kubernetes-commit: 583f804652ffff898437c80ce357e4f0c379bfb9
2020-02-14 13:30:40 -08:00
Mike Spreitzer 1ef67fe134 Version the API Priority and Fairness FieldManager values
Kubernetes-commit: b142868eaf46b24fce0e6b01e06087c924351857
2020-02-14 13:50:11 -05:00
Mike Spreitzer 1c79014daa Added API Priority and Fairness filter and config consumer
Kubernetes-commit: 73614ddd4e42728a36c7ac6b7b20f27c8032cafb
2020-01-25 19:47:12 -05:00
Mike Danese 5737088b7f refactor
Kubernetes-commit: d55d6175f8e2cfdab0b79aac72046a652c2eb515
2020-01-27 18:19:44 -08:00
Mike Spreitzer fffb0fade5 brushed up according to review
Added LockingWriteMultipleOnly and LockingWriteOnceOnly interfaces,
so that further extensions are possible (in this package or others).

Moved common SetLocked behavior into promisoid.

Made comments say things that were implied.

Kubernetes-commit: cbdd3a279e6161d73f2c4e8a2b916ae74b258621
2020-01-24 14:33:15 -05:00
Mike Spreitzer 27a36b04f5 Tweak new names
Kubernetes-commit: a65f525aed8d9f28f677028f77e2ab41313ae037
2020-01-21 20:35:45 -05:00
Mike Spreitzer 3a091e906d Simplified logic around context cancel, removing bugs
Previously, a `decisionCancel` could overwrite a `decisionReject` or
`decisionExecute`, causing confusion.  Now a request gets exactly one
decision and there is no confusion.

Also added write-once to the promise package and refactored.

Kubernetes-commit: 1c092bf635954bde9c9c363672fa156b9430206b
2020-01-09 14:03:13 -05:00
Mike Spreitzer 4fead639b7 Refactored QueueSet configuration into two phases
So that errors can be detected before resolving concurrency shares
into concurrency counts.

Kubernetes-commit: 1e170637c3ce6c4ccd378275d9e52192f4be12b7
2020-01-18 01:46:11 -05:00
Jefftree 16fa20a151 network proxy with admission wh
Kubernetes-commit: 1289bdaba41848c0d19892cc749798e540b56e8a
2019-11-12 17:35:45 -08:00
Jordan Liggitt 8c0dc1fdf9 Ensure webhook backend requests are not artificially rate-limited
Kubernetes-commit: d620493b7430c0f59d7393c3de8451d6a686c0c1
2019-12-02 11:39:16 -05:00
Ted Yu e5660b53e8 Output port as number in error message
Kubernetes-commit: c224a6de5e01455bcd89763f1483546496e41dcb
2019-11-22 13:12:59 -08:00
Mike Spreitzer d0f4b93c91 Brushed up fairqueuing package
This commit responds to the comments on PR #85192 that were not yet
addressed at the time it merged, apart from the one fixed in PR

Generalized fairqueuing to allow for zero queues, to support a
priority level that limits concurrency but does no queuing.

Kubernetes-commit: b123a43e7117e977606bacd31d77f4a30d2ed212
2019-11-13 23:34:10 -05:00
Ted Yu 82980a5db1 Correct the checking of robinIndex
Kubernetes-commit: 2bdd379a1eb9d0344df41fff0339123849682e7c
2019-11-13 20:13:29 -08:00
Mike Spreitzer cd34d8d0ce Fixed lint and staticcheck oversights
Kubernetes-commit: e10acc78dee5d90d93fc7bc0e76e97bc7bc0b3a3
2019-11-13 09:20:00 -05:00
Mike Spreitzer 63ad2ccdad Brushing up queueset
(1) Replaced random-looking assortment of counter increments and
decrements with something hopefully more principalled-looking.  Most
importantly, introduced the MutablePromise abstraction to neatly wrap
up the complicated business of unioning multiple sources of
unblocking.

(2) Improved debug logging.

(3) Somewhat more interesting test cases, and a bug fix wrt round
robin index.

Kubernetes-commit: 1c31b2bdc65377f502c2306dbdf32a802eb1afb7
2019-11-13 01:52:05 -05:00
Aaron Prindle e231e56df2 review changes - *Locked updates
Kubernetes-commit: 6619df1798859d49bbb52b1c029533035384824e
2019-11-12 09:24:56 -08:00
Aaron Prindle 572fbfc84d review changes
Kubernetes-commit: 396e2d4aa33bb7289cd8e7466e4465f56a73b7d0
2019-11-12 08:51:49 -08:00
Aaron Prindle a222f282e1 fairqueuing implementation with unit tests
Kubernetes-commit: 24065cf5be6bed995da7b7abb37ee78ff95230f0
2019-10-29 21:54:16 -07:00
yue9944882 0db66ae3d6 non-generated api models misc
rule list

rule

rule 2

Kubernetes-commit: 7c28a4b70eb90977f620ba7374ea0a511fcb9515
2019-10-23 15:17:10 +08:00
Bruce Ma 87c35dc179 address some comments
Clean up useless functions, only keep the basic function Deal
and the function DealIntoHand which will be used by Priority
and Fairness.

Improve some comments for constants and functions.

Introduce Dealer to combine parameters and methods into a whole.

Use fixed-size slice to improve performance.

Use math.Ceil and math.Log2 to calculate required entropy bits.

Make the given hand adaptive to handSize in DealIntoHand.

Signed-off-by: Bruce Ma <brucema19901024@gmail.com>

Kubernetes-commit: 7a3ca070cdd9804a22bf5db8a99576b09fc52484
2019-10-11 20:06:31 +08:00
Mike Spreitzer a74f0d114b More work on shuffle sharding utils
Changes following up on shuffle sharding util package.

Made the validation checking function return a slice of error messages
rather than just a bit.

Replaced all the `int32` with `int` because this is intended for more
than just the priority-and-faireness feature and so should not be a
slave to its configuration datatypes.

Introduced ShuffleAndDealIntoHand, to make memory allocation the
caller's problem/privilege.

Made the hand uniformity tester avoid reflection, evaluate the
histogram against the expected range of counts, and run multiple test
cases, including one in which the number of hash values is a power of
two with four extra bits (as the validation check requires) and one in
which the deck size is not a power of two.

Kubernetes-commit: da0b647155912c6b1e6b971aa5685768915d810d
2019-08-08 14:53:40 -04:00
Bruce Ma bd6349fddb Add shuffle sharding utils and tests
Implement several shuffle sharding functions including ShuffleAndDeal,
ShuffleAndDealToSlice.

Add benchmarks and tests for shuffle sharding to test performance,
correctness and distribution uniformity.

Signed-off-by: Bruce Ma <brucema19901024@gmail.com>

Kubernetes-commit: e97eaef4f65ec2cbfebf4fd9e726c9e2a6bf5499
2019-07-29 18:01:08 +08:00
shturec b054ff44ee custom retry strategy in GenericWebhook
Kubernetes-commit: 4877b0b7b50bdc3eaaadd3f968fd846c1396b708
2019-09-27 13:04:10 +03:00
Jordan Liggitt 0ca78287c0 Propagate context to ExponentialBackoff
Kubernetes-commit: 4c686ddc1c5f9bc5c28d711dd56551b1ac003faa
2019-09-24 09:43:04 -04:00
Jordan Liggitt 80b9dc503b Plumb service port, URL port to webhook client auth resolution
Kubernetes-commit: d127042cb81cbf545332ec3124161525ef84183c
2019-09-02 22:38:36 -04:00
Jordan Liggitt 2de636a948 Search client auth with and without port
Kubernetes-commit: 2f5dde7672eaf90c7086f86a5a4ee190559f3bb2
2019-09-02 22:38:55 -04:00
Jordan Liggitt 956977bd20 Use http/1.1 in apiserver->webhook clients
Kubernetes-commit: ddc697866afd1e58cd2ee504277b405052546202
2019-08-28 13:37:50 -04:00
Haowei Cai 8d86fef522 wire up the webhook rejection metrics in webhook handlers
Kubernetes-commit: 620f5f2c587971be50cb27bb2a2d35209b3dc058
2019-08-28 17:32:07 -07:00
Jordan Liggitt 90d670a108 AdmissionReview: Allow webhook admission to dispatch v1 or v1beta1
Kubernetes-commit: dda9bcb082be058c30c83d45e757edbaac8dc65f
2019-07-12 08:44:24 -04:00
Odin Ugedal 1be6195f27 Fix file permissions for non executable files
Normal files should have permissions 644 by default,
and does not require the last bit to be
executable

Signed-off-by: Odin Ugedal <odin@ugedal.com>

Kubernetes-commit: 35cb87f9cf71776e99a970dfff751cd29ba7ebfb
2019-06-14 21:04:39 +02:00
Mike Danese da64b0b811 BoundServiceAccountTokenVolume: fix InClusterConfig
Kubernetes-commit: 4198f28855cbda6dac61408fcba6f2d576a9347c
2019-05-14 09:29:16 -07:00
Andrew Kim ef71315b08 update import of generic featuregate code from k8s.io/apiserver/pkg/util/feature -> k8s.io/component-base/featuregate
Kubernetes-commit: c91913924543e1d29f3f3d51354701df9df75def
2019-03-04 12:46:52 -05:00
Andrew Kim 8f01fd2545 move generic feature gate code from k8s.io/apiserver to k8s.io/component-base
Kubernetes-commit: b2831a686c31b5db72f3106b3688f00c40ba1b00
2019-03-04 12:35:31 -05:00
Mike Danese 84cf7582e3 webhook: support exec auth plugin
This allows webhook static kubeconfig to use an exec auth plugin to
configure authentication.

https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#authenticate-apiservers

Kubernetes-commit: 8b45296661de1f12f441736ae44895ac30f320d4
2019-04-22 19:25:11 -07:00
Mehdy Bohlool 6c13576bf2 Add port to ServiceResolvers
Kubernetes-commit: 11f37d757fc0b710245446c80a8c9578ce2c02f1
2019-03-01 16:32:50 -08:00
Mehdy Bohlool f06a9dc218 Add port to ServiceReference of Admission Webhooks, ConversionWebhooks and AuditSync with defaulter and validator
Kubernetes-commit: 404e2f7a30626f02b55180bccf6a5f16bcbbfa82
2019-03-01 14:35:42 -08:00
Marek Counts c7299d9da0 Moved flag and globalflag
Moved all flag code from `staging/src/k8s.io/apiserver/pkg/util/[flag|globalflag]` to `component-base/cli/[flag|globalflag]` except for the term function because of unwanted dependencies.

Kubernetes-commit: 7744f908306e5131be5a94815ac76a7cba6454f2
2019-02-15 10:28:13 -05:00
Dr. Stefan Schimanski 9c9f2c012a apiserver: fix openapi extension types to be JSON
Kubernetes-commit: e67d5f2d8dbbc45d28d0fd5566747ef0df93eb6d
2019-02-07 15:34:42 +01:00
danielqsj 8f8d23605e fix shellcheck in k8s.io/apiserver
Kubernetes-commit: 481c2d8e03508dba2c28aeb4bba48ce48904183b
2019-01-24 13:55:09 +08:00
Andrew Kim 2b43930b32 replace k8s.io/apiserver/pkg/util/trace with k8s.io/utils/trace
Kubernetes-commit: 93b086f6eafc1e94214fc1d946a1917482751cf3
2019-01-24 11:50:30 -05:00
Marek Counts 0550db794e move logs into component-base
all the code changes to move move /apiserver/pkg/util/logs into /component-base/logs

Kubernetes-commit: ba81a5409affb6b861d5994c1e2f7c74a05826e5
2019-01-17 09:06:12 -05:00
Jonathan Basseri b3e7114b6a Allow FeatureGate values to be overridden in benchmarks.
This updates `SetFeatureGateDuringTest` to use the `testing.TB`
interface, which matches *testing.T and *testing.B.

Kubernetes-commit: 28a6a446a14d064d8a85c3e59b3c77f2127be35b
2018-12-13 18:44:39 -08:00
Jordan Liggitt ec307f52e2 Stop checking VolumeScheduling feature gate
Kubernetes-commit: 73dcfe12dac3e3dc8997e7296f34701c0c15ec67
2018-12-27 17:45:04 -05:00
Jordan Liggitt f3ce4369fb Plumb token and token file through rest.Config
Kubernetes-commit: dba85e58debadfcb66aff2b68ba8bcc2eafeac2d
2018-12-04 11:24:29 -05:00
Jordan Liggitt 2433950ca1 drop VerifyFeatureGatesUnchanged
Kubernetes-commit: 2498ca760695ad03d4b400ab1e9766799f4d7975
2018-11-21 10:44:02 -05:00
Jordan Liggitt e5cdab222a Tighten feature gate interface to split out mutating methods
Kubernetes-commit: 1d6db5924f4529431cd88bce20f04940681f0aa6
2018-11-20 23:58:51 -05:00
Jay Lim 70d40a2bc9 *-controller-manager: fix missing global flags for --help
Kubernetes-commit: 10dd5d663197abae40374c3eaa5c0ec2b638a234
2018-11-21 10:46:27 +08:00
Jordan Liggitt 2a34c94d31 Add tests to ensure storage feature gate changes don't escape packages
Kubernetes-commit: 248d66132702c152de0bd90f90f9eb0bd4b34e72
2018-11-15 22:08:01 -05:00
jennybuckley 7cc3f112fb Build OpenAPI Definitions per group instead of per resource
Kubernetes-commit: 758e8623e9b08065f053bedf4474626696b6346c
2018-11-14 12:50:02 -08:00
stewart-yu 0639bdeeb1 kube-scheduler: output flags in logical sections
Kubernetes-commit: a77652e9ab25382706e98e24f6026e28a9fbe621
2018-11-08 12:49:19 +08:00
Davanum Srinivas 2710b17b80 Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135

Kubernetes-commit: 954996e231074dc7429f7be1256a579bedd8344c
2018-11-09 13:49:10 -05:00
Patrick Barker 8c2cdbce6d refactors kubeapiserver webhook utility to be generic
Kubernetes-commit: 1081fffdd5f6f523a5de0fd30e85b7208220dcb9
2018-11-01 15:22:58 -06:00
Mehdy Bohlool 154485c3be Refactor webhookclientConfig validation of admission and audit registration
Kubernetes-commit: 1587d189cbf27b3c2470cf1fe56e50afbde412b6
2018-10-30 11:57:29 -07:00
Patrick Barker 53adc37659 updates shared apiserver webhook client
Kubernetes-commit: 5874a1f8faab92aacc5503aa6dbf1c6a724f832f
2018-10-21 10:03:28 -05:00
Christoph Blecker 92e87e143a Update gofmt for go1.11
Kubernetes-commit: 97b2992dc191a357e2167eff5035ce26237a4799
2018-10-05 12:59:38 -07:00
Tim Allclair d6693c2b5a Hide & warn on GA & deprecated feature gates
Kubernetes-commit: d8a399f798a2c6b8f1e2c18cbb517d89de54b00c
2018-08-31 10:16:47 -07:00
Mehdy Bohlool 21f6e2bcdd Refactor addmission webhook hook client to a util package
Kubernetes-commit: 5652d5cffadcd8a2f107b6aecf5fc06c0fc473f1
2018-08-26 23:20:23 +10:00
stewart-yu eaef210960 skip print section flags if no flags
Kubernetes-commit: 01195efbe3a2b7beefdf7308193818fd37790254
2018-08-17 17:20:05 +08:00
Sylvain Rabot 46d2e7d5ab Log real file's name and line
pkg/kubectl/util/logs & staging/src/k8s.io/apiserver/pkg/util/logs
use `glog.info(...)` but this function is not made to be wrapped because
the underlying mechanism use a fixed call trace length to determine
where the log has been emited.

This results is having `logs.go:49` in the logs which is in the body
of the wrapper function and thus useless.

Instead use `glog.infoDepth(1, ...)` which tells the underlying mechanism
to go back 1 more level in the call trace to determine where the log
has been emitted.

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>

Kubernetes-commit: 7e7b01fa3103e272ca4acc5a4fac6a9119c2623d
2018-08-11 14:57:00 +02:00
xuzhonghu 91f6779130 move glog setter to util/logs
Kubernetes-commit: 0aff9490cf528579df55ab6609ff1c8fa6db95e9
2018-06-05 10:18:23 +08:00
Dr. Stefan Schimanski 7aafc31c03 apiserver: output flags in logical sections
Kubernetes-commit: 42d533e40c112f62635a8aa0e3c3def298b26cc9
2018-05-30 14:45:37 +02:00
Antoine Pelisse dbac430f68 dry-run: Use dry-runnable structure
Kubernetes-commit: 68937c4934013739a1efc1b051820667d6d6349d
2018-06-21 08:49:13 -07:00
Lubomir I. Ivanov f1433d0edb apiserver: do not print feature gates for glog v=0
Demand verbosity level > 0 for glog Infof() calls when
setting feature gates in pkg/util/feature_gate.go.

Kubernetes-commit: ac5f5b4099d5868184114f46c9e6d2a1fb8efdbe
2018-06-28 17:10:51 +03:00
Victor Garcia 37be5e4c9f Possible cipher suites values and tls versions in help for apiserver and kubelet
Kubernetes-commit: 3dfa22e3fd8c650789176b9f4a8e46ab43ef5ebf
2018-01-24 22:51:27 -05:00
jennybuckley f87486fed9 Expose openapi schema to handlers
Kubernetes-commit: dee088586a76b876c473418efba8190be7fa6b26
2018-05-24 09:55:19 -07:00
Clayton Coleman bd7d97d47c MapString* should return empty string for String() when null
Kubernetes-commit: ccec4c507f8668f6d88afa837bb4d2f46656da64
2018-05-24 15:02:08 -04:00
Michael Taufen 959ccfb7c3 Kubelet config: Validate new config against future feature gates
This fixes an issue with KubeletConfiguration validation, where the
feature gates set by the new config were not taken into account.

Also fixes a validation issue with dynamic Kubelet config, where flag
precedence was not enforced prior to dynamic config validation in the
controller; this prevented rejection of dynamic configs that don't merge
well with values set via legacy flags.

Kubernetes-commit: 647e90341ca08640ab8fb3d49edb8027faf4836f
2018-05-03 11:05:33 -07:00
David Eads c41d1d0993 simplify api registration
Kubernetes-commit: c5445d3c56e06ab366b9cca34bd69c5cc386ec47
2018-05-07 08:32:20 -04:00
Matthias Bertschy 0203b2aa93 Update all script to use /usr/bin/env bash in shebang
Kubernetes-commit: 9b15af19b22e91284eeb89827b2091caaec25bf6
2018-04-16 18:31:44 +02:00
David Eads bf8532c54e remove KUBE_API_VERSIONS
Kubernetes-commit: a68c57155e728b2782408cbab88ecee0444a4ba8
2018-04-25 16:07:15 -04:00
David Eads 88d943c0e6 eliminate indirection from type registration
Kubernetes-commit: e7fbbe0e3c91f34836b999e695aa133503cfdae5
2018-04-24 08:21:23 -04:00
rithu john 6f00834df1 oidc authentication: Required claims support
Kubernetes-commit: dd433b595f5f0b1d9a5195b3dbefe0fd2afc425d
2018-04-03 10:54:09 -07:00
hangaoshuai 9c6162ac42 add unit test for function FeatureGateSetFromMap and FeatureGateString
Kubernetes-commit: 95eaccb0959af0ec91c3c4356a528516a5dc693f
2018-03-08 18:52:36 +08:00
Wang Guoliang c26e7f2e3a more concise to merge the array
Kubernetes-commit: 31aad75316b6e63840ec05b8bc9205fbb6d897aa
2018-02-11 21:27:11 +08:00
Kubernetes Publisher 627fa76a8b sync: initially remove files BUILD */BUILD BUILD.bazel */BUILD.bazel 2018-03-15 09:38:17 +00:00
Jeff Grafton 1ab12b2dc8 Autogenerated: hack/update-bazel.sh
Kubernetes-commit: ef56a8d6bb3800ab7803713eafc4191e8202ad6e
2018-02-16 13:43:01 -08:00
halfcrazy 6f8c3a80da fix typo in package apiserver
Kubernetes-commit: 0da91a8577ddfdeaff985cbb6c0da69d5a2ffc81
2018-02-01 03:04:33 +08:00
Michael Taufen 53ab2d6c3c Kubelet flags take precedence
This changes the Kubelet configuration flag precedence order so that
flags take precedence over config from files/ConfigMaps.

See #56171 for rationale.

Note: Feature gates accumulate with the following
precedence (greater number overrides lesser number):
1. file-based config
2. dynamic cofig
3. flag-based config

Kubernetes-commit: 42589266407e32fdf716d1fef689f0aee7142cd9
2018-01-02 10:33:07 -08:00
Jordan Liggitt 1740ed319f Add deprecated stage of feature gates
Kubernetes-commit: 7336eeab8a498e2f1df73fa95a1f16498745a7d6
2018-01-26 10:44:41 -05:00
David Eads 6b198535d6 add options for min tls levels
Kubernetes-commit: ad1680347071cb5bb66ab49c7325eb21d83e143c
2018-01-19 11:50:47 -05:00
Victor Garcia 08a8cccb0a Adding support for custom TLS ciphers in api server and kubelet
Kubernetes-commit: d7dbc96c70d480f0b81cd83ae3abd34b69c1e70d
2017-07-12 23:49:41 -07:00
Cao Shufeng 2a2505e824 remove duplicated import
Kubernetes-commit: 4e7398b67b12390486012dd6f9d708dd64f961f3
2018-01-11 19:15:11 +08:00
Michael Taufen d1a7006fca All Kubelet flags should be explicitly registered
This explicitly registers Kubelet flags from libraries that were
registering flags globally, and stops parsing the global flag set.
In general, we should always be explicit about flags we register
and parse, so that we maintain control over our command-line API.

Kubernetes-commit: 8ec1958667e66fb3da2a1f1428998f59f8b027f2
2017-12-24 19:19:46 -06:00
Di Xu acf3570864 forbid unnamed context
Kubernetes-commit: 792a2299362ebadc9ca68c72347884330db23b2a
2017-12-04 14:39:05 +08:00
hzxuzhonghu db846c31e6 fix comment typo and use wait.Forever
Kubernetes-commit: 9a88f1514134c62f959eee28fdc81519f87715e6
2017-11-14 19:38:10 +08:00
Jeff Grafton c8a97ee31a Autogenerate BUILD files
Kubernetes-commit: efee0704c60a2ee3049268a41535aaee7f661f6c
2017-12-23 13:06:26 -08:00
Michael Taufen 0b031bbb8b omitempty
Kubernetes-commit: 1347c094ce51f1fbababe0a2866c9046ea9ba1cc
2017-11-15 21:25:48 -08:00
Michael Taufen 8d690cc5cb ColonSeparatedMultimapStringString: allow multiple Set invocations with default override
The first call to Set will clear the map before adding entries;
subsequent calls will simply append to the map.
This makes it possible to override default values with a command-line
option rather than appending to defaults,
while still allowing the distribution of key-value pairs across
multiple flag invocations.

For example: `--flag "a:hello" --flag "b:again" --flag "b:beautiful"
--flag "c:world"` results in `{"a": ["hello"], "b": ["again",
"beautiful"], "c": ["world"]}`

Kubernetes-commit: 6e49ac382bbd43e5a3f648607f8005bdf0237317
2017-11-07 09:15:26 -08:00
Michael Taufen b96eecee16 omitempty
Kubernetes-commit: 617b49858fad83a72ce072356bb2808a259943c5
2017-11-16 14:47:39 -08:00
Michael Taufen 47c573fba6 Lift embedded structure out of eviction-related KubeletConfiguration fields
- Changes the following KubeletConfiguration fields from `string` to
`map[string]string`:
  - `EvictionHard`
  - `EvictionSoft`
  - `EvictionSoftGracePeriod`
  - `EvictionMinimumReclaim`
- Adds flag parsing shims to maintain Kubelet's public flags API, while
enabling structured input in the file API.
- Also removes `kubeletconfig.ConfigurationMap`, which was an ad-hoc flag
parsing shim living in the kubeletconfig API group, and replaces it
with the `MapStringString` shim introduced in this PR. Flag parsing
shims belong in a common place, not in the kubeletconfig API.
I manually audited these to ensure that this wouldn't cause errors
parsing the command line for syntax that would have previously been
error free (`kubeletconfig.ConfigurationMap` was unique in that it
allowed keys to be provided on the CLI without values. I believe this was
done in `flags.ConfigurationMap` to facilitate the `--node-labels` flag,
which rightfully accepts value-free keys, and that this shim was then
just copied to `kubeletconfig`). Fortunately, the affected fields
(`ExperimentalQOSReserved`, `SystemReserved`, and `KubeReserved`) expect
non-empty strings in the values of the map, and as a result passing the
empty string is already an error. Thus requiring keys shouldn't break
anyone's scripts.
- Updates code and tests accordingly.

Regarding eviction operators, directionality is already implicit in the
signal type (for a given signal, the decision to evict will be made when
crossing the threshold from either above or below, never both). There is
no need to expose an operator, such as `<`, in the API. By changing
`EvictionHard` and `EvictionSoft` to `map[string]string`, this PR
simplifies the experience of working with these fields via the
`KubeletConfiguration` type. Again, flags stay the same.

Other things:
- There is another flag parsing shim, `flags.ConfigurationMap`, from the
shared flag utility. The `NodeLabels` field still uses
`flags.ConfigurationMap`. This PR moves the allocation of the
`map[string]string` for the `NodeLabels` field from
`AddKubeletConfigFlags` to the defaulter for the external
`KubeletConfiguration` type. Flags are layered on top of an internal
object that has undergone conversion from a defaulted external object,
which means that previously the mere registration of flags would have
overwritten any previously-defined defaults for `NodeLabels` (fortunately
there were none).

Kubernetes-commit: 1085b6f7304d46697ab9ed2131774ae9d4550ce2
2017-10-19 15:42:07 -07:00
Michael Taufen ce50eca6d7 Lift embedded structure out of ManifestURLHeader field
Kubernetes-commit: 7cb21746c09cd7dd8e2beaaa03f17ba41563a318
2017-10-19 15:42:07 -07:00
Mik Vyatskov 470942c90d Always retry network connection error in webhook
Signed-off-by: Mik Vyatskov <vmik@google.com>

Kubernetes-commit: 59bacba0565b3849d939e9330ffd4da2ae19f0e1
2017-10-15 16:52:15 +02:00
dahefanteng 2a250d73b1 remove repeated type conversion
Kubernetes-commit: c12e6dbb80282fa0859a483883bf15b7ba85f01c
2017-10-09 10:03:24 +08:00
Jeff Grafton f4dbe23125 update BUILD files
Kubernetes-commit: aee5f457dbfd70c2d15c33e392dce6a3ca710116
2017-10-12 13:52:10 -07:00
Eric Chiang 1f5bdb8525 generic webhook: set a default timeout for webhook requests
Add a 30 second timeout for all HTTP requests that the webhook sends
so they timeout instead of hanging forever.

Kubernetes-commit: 2de3ee5c48503d3b3214aef55ae7fd0dacc40457
2017-10-11 17:44:29 -07:00
Michael Taufen 8e0c55d47a Make feature gates loadable from a map[string]bool
Command line flag API remains the same. This allows ComponentConfig
structures (e.g. KubeletConfiguration) to express the map structure
behind feature gates in a natural way when written as JSON or YAML.

For example:

KubeletConfiguration Before:
```
apiVersion: kubeletconfig/v1alpha1
kind: KubeletConfiguration
featureGates: "DynamicKubeletConfig=true,Accelerators=true"
```

KubeletConfiguration After:
```
apiVersion: kubeletconfig/v1alpha1
kind: KubeletConfiguration
featureGates:
  DynamicKubeletConfig: true
  Accelerators: true
```

Kubernetes-commit: 131b419596a3d4fce1020c3b11f78034b5880593
2017-09-25 13:36:19 -07:00
Jordan Liggitt 64d1b8400e Make feature gate enablement checks lock-free
Kubernetes-commit: 55692c52e1d6f3922bf4af2b6cbe2b0eef886fbd
2017-09-21 14:51:04 -04:00
Walter Fender 9a6c2541ac Ensure we log the flag apiserver starts with.
Trying to make sure we always log the flags an instance of apiserver
starts with.
This can be especially valuable for emailed logs or e2e/kubemark tests.

Kubernetes-commit: 366459aee84a4de1f0342a464bd479a5d12e6f0f
2017-09-08 10:00:50 -07:00
Jordan Liggitt 605d377a4e Make feature gate threadsafe
Kubernetes-commit: d3546434b7252167b851a40a339d8ed2049ee5e5
2017-09-01 16:37:08 +00:00
Jordan Liggitt 8494697027 Feature gate initializers field
Kubernetes-commit: 658956f0631c6bd3ecf9f756db4a0710efea98ea
2017-08-29 13:18:50 +00:00
Nikhita Raghunath 9edc635fcc FeatureGate: update comments
Kubernetes-commit: fea5a8bc8a7ef2f956d2b11cb54248ec9545ef15
2017-08-29 13:16:12 +00:00
Jeff Grafton 6c539a43c6 Use buildozer to delete licenses() rules except under third_party/
Kubernetes-commit: a7f49c906df816123e7d4ccbd4cebab411519465
2017-08-29 13:15:24 +00:00
Jeff Grafton 6caa2933ae Use buildozer to remove deprecated automanaged tags
Kubernetes-commit: 33276f06be5e872bf53ca62a095fcf0a6b6c11a8
2017-08-29 13:15:24 +00:00
Clayton Coleman 0d288373d0 SuggestClientDelay is not about retrying, clarify message and header
SuggestClientDelay is returning whether the server has requested that
the client delay their next action. It is *not* about whether the client
should retry the action. Webhook was using it incorrectly, and the
method is now up to date.

Kubernetes-commit: 04846cc25b862c1eabff03ea0b11cbf2f7fae8e2
2017-08-29 13:14:37 +00:00
Jeff Grafton 44942b068a Run hack/update-bazel.sh to generate BUILD files
Kubernetes-commit: 3579017b865ddbc5449d6bba87346f086e4b93ff
2017-08-29 13:13:51 +00:00
mbohlool e671fe20d7 Update main repo references to new kube-openapi repo
Kubernetes-commit: 400b77b48f972b1e10854980586559d5852088c7
2017-08-29 13:13:04 +00:00
Clayton Coleman ec4f695076 generated: bazel / godeps
Kubernetes-commit: c73622108ccd285b245cf9fe2dc218a47398d31d
2017-07-16 04:08:42 +00:00
Clayton Coleman bcc0d0a6d0 Unify generic proxy code in apimachinery
Make the utility package truly generic, consolidate all generic proxy in
apimachinery.

Kubernetes-commit: edc12aafe2fbfe3475bdf03c34ffa26cc4322673
2017-07-16 04:08:41 +00:00
Eric Paris b7f543928d prioritize messages for long steps
Kubernetes-commit: f4767c270dde1de68235fd21ac4b907f6ef33385
2017-06-28 00:14:32 +00:00
sakeven a238a912d3 add level for print flags
Signed-off-by: sakeven <jc5930@sina.cn>

Kubernetes-commit: 8b1a08a9194cf423ba53e6662f9e746852f60164
2017-06-28 00:14:31 +00:00
Chao Xu 8be42ee0d0 run hack/update-all
Kubernetes-commit: 60604f8818aecbc9c3736fbc32747cc0a535bc80
2017-06-28 00:14:31 +00:00
Chao Xu 81b7aaaa7d run root-rewrite-import-client-go-api-types
Kubernetes-commit: f2d3220a11111f86b2f481e70e3c1ca4f5896f44
2017-06-28 00:14:31 +00:00
Jordan Liggitt 5c2f76950a Add websocket protocol authentication method
Kubernetes-commit: e2a03bcf2a568b5c40e8f92e1009440038f5e5ee
2017-06-28 00:14:31 +00:00
Matt Liggett 1526f6a57c Add version and flag info to apiserver and CM logs.
Should help debugging.
Specifically for #45706

Kubernetes-commit: f6bcac3fecbc5ef105b903d8e14252ccb2b55e51
2017-06-16 22:11:33 +00:00
Dr. Stefan Schimanski c0e7280688 Update bazel
Kubernetes-commit: c7d9a396fdf9ef63272896200ab90afa0581c8f3
2017-06-13 20:47:30 +00:00
Dr. Stefan Schimanski a3e36a6bf1 aggregation: add ExternalName service support
Kubernetes-commit: 8b409e8f777a305454616554c40c905acad596ac
2017-06-13 20:47:30 +00:00
Dr. Stefan Schimanski 6b536dfda4 aggregation: handle ClusterIPNone correctly
Kubernetes-commit: b1f708758c70dfbb3dde4dec7d2f423b7303e661
2017-06-13 20:47:30 +00:00
Dr. Stefan Schimanski 449313536f aggregation: unify mode implementations
Kubernetes-commit: d56759452cccd34c33d987d001092128d0b0f2ff
2017-06-13 20:47:30 +00:00
Dr. Stefan Schimanski 0b2bbf270c aggregation: restore cluster-ip routing tests
Kubernetes-commit: 35335c09e17c3479ff660f93aaaeed041837b247
2017-06-13 20:47:30 +00:00
Walter Fender 5428bc23d8 Change to aggregator so it calls a user apiservice via its pod IP.
proxy_handler now uses the endpoint router to map the cluster IP to
appropriate endpoint (Pod) IP for the given resource.
Added code to allow aggregator routing to be optional.
Updated bazel build.
Fixes to cover JLiggit comments.
Added util ResourceLocation method based on Listers.
Fixed issues from verification steps.
Updated to add an interface to obfuscate some of the routing logic.
Collapsed cluster IP resolution in to the aggregator routing
implementation.
Added 2 simple unit tests for ResolveEndpoint

Kubernetes-commit: ad8a83a7c1741efb507d924a17eb809748ee2e06
2017-06-13 20:47:29 +00:00
Clayton Coleman 01a774be49 Move client-go/util/clock to apimachinery/pkg/util/clock
For reuse

Kubernetes-commit: 8013212db54e95050c622675c6706cce5de42b45
2017-05-21 17:28:01 +00:00
Clayton Coleman 3cbbcf996a Move pkg/util/cache to apimachinery
Will be used by client-go as well

Kubernetes-commit: 529e627c8a4338d48cd2bf658303bac6fef6aaaa
2017-05-21 17:28:01 +00:00
Chao Xu e84e32eaa5 remove references to client-go/pkg/api
Kubernetes-commit: d978f22e04519f6eecfde839110c398dc28d4e8e
2017-05-03 20:36:26 +00:00
Mike Danese aab2f083cf replace CloneTLSConfig() with (*tls.Config).Clone()
Kubernetes-commit: 6c6dbec1e2364b994bdae42828e094b9b540f9b3
2017-04-28 20:36:30 +00:00
Andy Goldstein 478b3779f2 Add redirect support to SpdyRoundTripper
Add support for following redirects to the SpdyRoundTripper. This is
necessary for clients using it directly (e.g. the apiserver talking
directly to the kubelet) because the CRI streaming server issues a
redirect for streaming requests.

Also extract common logic for following redirects.

Kubernetes-commit: 715d5d9c91c669cf33c0bf9a9c9d352c6c4228a6
2017-04-27 20:37:01 +00:00
Jeremy Whitlock 02115850aa apiserver: add pkg/util/webhook tests
This commit adds tests for pkg/util/webhooks.  The purpose of this was
not only for better code coverage but also to alleviate the need for
consumers to write their own tests for core functionality.

Kubernetes-commit: d15dba7e8bff943d91ba6f58fcb0dfefa357a7f1
2017-04-26 20:36:15 +00:00
Mike Danese 2aab760a2a autogenerated
Kubernetes-commit: a05c3c0efdc5822049e34b1a5a1ee259c5fb1906
2017-04-15 20:35:23 +00:00
Abhishek Dasgupta ba77f4a298 Updated key.pm and cert.pm to remove error in setting up localhostCert pool.
Signed-off-by: Abhishek Dasgupta <a10gupta@linux.vnet.ibm.com>

Kubernetes-commit: 0d42da1b9345e2a649f298ac4f77807143e7befa
2017-04-10 20:35:11 +00:00
Dr. Stefan Schimanski 25380b2e8b Support multiple --feature-gates flags in the command line
Kubernetes-commit: faa5b44381ab04d9a4645b949311b70fb00ca60f
2017-03-18 19:56:09 +00:00
Derek Carr 53343624bb stop spamming logs on restart of api server
Kubernetes-commit: 9211e0380f39f08ff99dcf78f50fefad1d0179b8
2017-03-18 19:56:08 +00:00
Timothy St. Clair 3c7b74f219 Cleanup work to enable feature gating annotations 2017-02-23 09:48:09 -05:00
Robert Rati d4431d8e63 Feature-Gate affinity in annotations 2017-02-23 09:48:09 -05:00
Dr. Stefan Schimanski 73c30cda7e staging/src/*: run gofmt 2017-02-23 09:48:09 -05:00
deads2k ef02ebd216 copy pkg/util/logs to apiserver 2017-02-14 14:04:06 -05:00
Dr. Stefan Schimanski 0c2f5c4565 pkg/util: move trace.go to k8s.io/apiserver/pkg/util/trace 2017-01-30 09:46:32 -05:00
deads2k 2770a87575 stop hardcoding api registry and codecs in webhook 2017-01-27 08:47:01 -05:00
Dr. Stefan Schimanski 5858be0e9d third_party/forked/golang/netutil: move to k8s.io/apimachinery 2017-01-27 08:47:01 -05:00
Dr. Stefan Schimanski de513ec8e2 pkg/util: move proxy into k8s.io/apiserver 2017-01-27 08:47:01 -05:00
Dr. Stefan Schimanski 29814dd5b7 pkg/util: move Trie to k8s.io/apiserver 2017-01-27 08:47:01 -05:00
Dr. Stefan Schimanski 01994f3f6a Update generated files 2017-01-25 07:42:18 -05:00
Dr. Stefan Schimanski 1689f4218c pkg/util/flag: move to k8s.io/apiserver 2017-01-25 07:42:18 -05:00
Dr. Stefan Schimanski 5b638522cc pkg/flag: make feature gate extensible and split between generic and kube 2017-01-25 07:42:18 -05:00
deads2k 3ac45aec91 move authoritative client-go utils out of pkg 2017-01-25 07:42:18 -05:00
deads2k 64ca3b645e move utils used in restclient to client-go 2017-01-19 10:27:27 -05:00
Dr. Stefan Schimanski dc90e9a003 genericapiserver: move packages
Towards a sane k8s.io/apiserver package structure.
2017-01-19 10:27:27 -05:00
deads2k 5ec0163a4f mechanicals 2017-01-16 15:01:42 -05:00
deads2k 708baaf567 move no k8s.io/kubernetes deps to apiserver 2017-01-16 15:01:42 -05:00
deads2k 6687ea314a moves of genericapiserver packages without dependencies 2017-01-13 13:38:51 -05:00
deads2k 3af9046f55 mechanicals 2017-01-13 13:38:51 -05:00
deads2k f22426d63f move no k8s.io/kubernetes dependencies round one 2017-01-13 13:38:51 -05:00