Commit Graph

51 Commits

Author SHA1 Message Date
Antonio Ojea 38c6ad936b run hack/update-netparse-cve.sh
Kubernetes-commit: 0cd75e8fec62a2531637e80bb950ac9983cac1b0
2021-08-20 01:16:14 +02:00
Dr. Stefan Schimanski 482cbd8dcc apiserver: add --permit-address-sharing flag to listen with SO_REUSEADDR
Kubernetes-commit: cef2ab700fc7d9ce226ab51f78344c907dfbb831
2020-08-10 15:51:37 +02:00
Paulo Gomes 749479fedb Warn when insecure TLS ciphers are selected.
Kubernetes-commit: 550a67869a7290688dde4aeedbcdd72a10e448cf
2020-05-13 16:11:28 +01:00
Davanum Srinivas 5879417a28 switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 442a69c3bdf6fe8e525b05887e57d89db1e2f3a5
2020-04-17 15:25:06 -04:00
Mateusz Gozdek e843f3790e kube-apiserver: use SO_REUSEPORT when creating listener on Unix systems
So multiple instances of kube-apiserver can bind on the same address and
port, to provide seamless upgrades.

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>

Kubernetes-commit: dfe1f968ac31ba9b81a353d4de86d28e73d22d4e
2020-03-06 09:59:20 +01:00
David Eads 2e81ed6ee9 allow an SNI cert to be used to respond for a particular IP
Kubernetes-commit: 2c8639deb70c5934109022372caa32ca029db473
2019-11-14 16:08:11 -05:00
Antonio Ojea e29a8f8fd0 clarify apiserver bind-address flag usage
From the listen godoc:

For TCP networks, if the host in the address parameter is empty or a
literal unspecified IP address, Listen listens on all available unicast
and anycast IP addresses of the local system.

Since the BindNetwork options is "tcp" by default, using an unspecified
address doesn't bind the listener to the IP family.

Kubernetes-commit: 05010d23ac7751a17aa26fb5cc011eb4f2127b1e
2020-01-04 10:51:48 +01:00
Jin Hase 132e8e3270 Clean up kube-apiserver reference document
Kubernetes-commit: 49b6e40461766dc7785c99cd0be77b6db37d5d75
2019-12-24 21:21:06 +09:00
Antonio Ojea 223a85f36f apiserver: add localhost to alternateDNS for IPv6
apiserver adds localhost to the alternateDNS field
if the bind address is 0.0.0.0.
This PR considers the IPv6 unspecified address too.

Kubernetes-commit: 29ec87f769c6494fad5c0a0c624efe2dc6eeab13
2019-12-20 12:10:59 +01:00
Dan Winship 0031a567fa Fix apiserver to advertise IPv6 endpoints if bound to IPv6
Also rename utilnet.ChooseBindAddress() to ResolveBindAddress(), to
better describe its functionality.

Kubernetes-commit: afa0b808f873b515c9d58a9ead788972ea7d2533
2019-10-30 10:46:46 -04:00
Jack Kleeman c4dfb52a33 Dynamic SNI certificates
Reload SNI certificate cert and key file from disk every minute and notify
the dynamic certificate controller when they change, allowing serving
tls config to be updated.

Kubernetes-commit: d9adf535f35051be1d79d1309c72762939593d7c
2019-10-24 17:38:21 +01:00
Jack Kleeman 51b8ce994d Dynamic serving certificate
Reload certificate cert and key file from disk every minute and notify
the dynamic certificate controller when they change, allowing serving
tls config to be updated.

Kubernetes-commit: 3f5fbfbfac281f40c11de2f57d58cc332affc37b
2019-10-22 19:10:40 +01:00
Jack Kleeman 40fefa1b37 Plumb dynamic SNI certificates
We create and use a dynamic certificate provider for the SNI serving
certificates. Currently we only use static serving certificate
providers, so the files are not reloaded, but we should be able to move
to a provider that is able to reload later on.

Kubernetes-commit: 84bc6b151d0726db0c737443874577f044e0e9c8
2019-10-08 19:03:56 +01:00
Jack Kleeman 8da4640a3d Plumb dynamic serving certificates
We create and use a dynamic certificate provider for the main apiserver
serving certificates: SNI will be handled separately later. Currently we
only use static serving certificate providers, so the files are not
reloaded, but we should be able to move to a provider that is able to
reload later on.

Kubernetes-commit: 6f89f1027488aeba4af0786988c2fd2ace9a6f1d
2019-10-07 18:49:24 +01:00
Andrew Lytvynov 3604e0cbb0 Extract new keyutil package from client-go/util/cert
This package contains public/private key utilities copied directly from
client-go/util/cert. All imports were updated.

Future PRs will actually refactor the libraries.

Updates #71004

Kubernetes-commit: 18458392ca24c85c688e655aace1afd04f864cbd
2018-12-09 16:24:38 -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
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
Jordan Liggitt 22df332aff Allow components to generate certificates in-memory
Kubernetes-commit: b7160d4ee2073f06293d7c3b20acdf4620fadf61
2018-10-16 17:22:13 -04:00
Justin Santa Barbara ecbc9eada2 Fix grammar in secure-port flag help
The phrasing made it difficult to understand the message.

Kubernetes-commit: c0ded2d9f5beb5eb02b356076166c365073a639a
2018-08-30 18:50:26 -04:00
Dr. Stefan Schimanski 55957fdc66 apiserver: add SecureServingOptions.ExternalAddress
Before this the advertised IP (which shows up in the server cert) in case of
listening to loopback was the first host interface IP. This makes self-signed
certs non-constant, such that we cannot use fixtures.

Kubernetes-commit: c1c564fd4d21dd68ea14d7ea678d8619f47fe445
2018-07-06 12:32:01 +02:00
Dr. Stefan Schimanski fa6b67b429 apiserver: use fixtures for self-signed certs in test server
Kubernetes-commit: 7deccb5b7a7c5224d3d90e1391dd22b2d1f1b9b9
2018-07-06 12:04:38 +02:00
Dr. Stefan Schimanski ad29bd83ae kube-apiserver: disallow --secure-port 0
Kubernetes-commit: e15ac9eb72c4e105e7a3d84711e5a6056c0f6a48
2018-07-06 12:58:59 +02:00
Dr. Stefan Schimanski 5746122767 apiserver: don't create self-signed certs with disabled secure serving
Kubernetes-commit: 798535164ae11a7e3c036ed7793aa884942edc88
2018-07-04 19:09:26 +02: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
hzxuzhonghu 240b9cf032 remove unused rls-ca-file flag
Kubernetes-commit: 9c0803e14c0d76e2e8225db546c0d2ce0b522ab7
2018-03-20 15:26:31 +08:00
Mike Spreitzer aa5d4f9f32 Fixes for HTTP/2 max streams per connection setting
This PR makes two changes.  One is to introduce a parameter
for the HTTP/2 setting that an api-server sends to its clients
telling them how many streams they may have concurrently open in
an HTTP/2 connection.  If left at its default value of zero,
this means to use the default in golang's HTTP/2 code (which
is currently 250).

The other change is to make the recommended options for an aggregated
api-server set this limit to 1000.  The limit of 250 is annoyingly low
for the use case of many controllers watching objects of Kinds served
by an aggregated api-server reached through the main api-server (in
its mode as a proxy for the aggregated api-server, in which it uses a
single HTTP/2 connection for all calls proxied to that aggregated
api-server).

Fixes #60042

Kubernetes-commit: 201c11f147c85b029665915bee3a62eea19d6d57
2018-02-19 14:18:07 -05:00
steveperry-53 2aca9afa1d sync: squashed up to merge cc7cea74ae668cd401d99cc472569605cb640517 in b3099bcf532bc470ff7075e93025b8741da09be4 2018-02-27 01:30:07 +00:00
Dr. Stefan Schimanski 338a852bbb apiserver: make SecureServingOptions and authz/n options re-usable
Kubernetes-commit: 4e0114b0dd3701b68c02d038edcf4fbe84515a68
2018-01-31 16:17:48 +01:00
hzxuzhonghu 808a483472 pass listener in integration test to prevent port in use flake
Kubernetes-commit: a6c43c6a5ca7cc4449684d5e68d73773be91cd41
2018-01-29 11:58:23 +08:00
hzxuzhonghu 9e657b874d deprecate insecure http flags and remove already deprecated public-address-override
Kubernetes-commit: 24c687fdad009fec01703ae0f93ab141b97c0028
2018-01-30 16:05:33 +08:00
David Eads 0989af6244 remove --tls-ca-file which had no effect
Kubernetes-commit: 114711f77d1f12e10b1190db02ca17302992f5ad
2018-01-29 10:29:14 -05:00
David Eads b16b687dc5 generated
Kubernetes-commit: 4ce7bcced4cc68a833759a218f9c3be7f72fd1c0
2018-01-19 11:55:55 -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
hzxuzhonghu 170e8ac6dd pass listener to genericapiserver
Kubernetes-commit: 6ba30f678c232793430a98770e7a851f1e814fd2
2017-11-16 13:32:12 +08:00
tengqm 65c833f23a Fix apiserver help message
Kubernetes-commit: acad74670dd1167ea0e90b2eeef6946d3871bdbf
2017-09-04 17:22:25 +08:00
Dr. Stefan Schimanski a063c5336d apiserver: avoid panics on nil sub-option structs
Kubernetes-commit: b153268da79d2acf14e042945959801c3dba8221
2017-09-09 21:44:32 +00:00
Dr. Stefan Schimanski 97e22b00fa apiserver: split core API creation from secure serving
Kubernetes-commit: 2b64d3a0fd2ccdad4b2f21acb484a36e04381856
2017-09-09 21:44:32 +00:00
Dr. Stefan Schimanski 75cf96f31e apiserver: stratify versioned informer construction
Kubernetes-commit: ca3f7453464f6866a3bf467c8b9d8e132484cfb4
2017-09-09 21:44:32 +00:00
p0lyn0mial c4948f98da incluster config will be used when creating external shared informers.
previously the loopback configuration was used to talk to the server.
As a consequence a custom API server was unable to talk to the root API server.

Kubernetes-commit: 074544b3b024156e4ce91de5778281dbe1b47a72
2017-06-28 00:14:31 +00:00
p0lyn0mial ceeef3670c This PR implements AdmissionOptions.ApplyTo
ApplyTo adds the admission chain to the server configuration the method lazily initializes a generic plugin
that is appended to the list of pluginInitializers.

apiserver.Config will hold an instance of SharedInformerFactory to ensure we only have once instance.
The field will be initialized in apisever.SecureServingOptions

Kubernetes-commit: 8cea69aa9812d6627ebdfa4f8b9c1d7624a8f3f5
2017-05-16 17:27:50 +00:00
Dr. Stefan Schimanski e640e78936 apiserver: fix --tls-sni-cert-key doc string
Kubernetes-commit: 53365880086f0d0d53002de7ce816284da41f4d0
2017-05-12 17:30:08 +00:00
xiangpengzhao 1512c30ca6 Delete "hard-coded" default value in flags usage.
Kubernetes-commit: 420caf200cdb1ba41d6af43c5695c29de2082851
2017-04-29 20:35:54 +00:00
deads2k 38fb6e78f7 move legacy insecure options out of the main flow
Kubernetes-commit: cd297546807fc08546905a2b96879d13bcf3a30b
2017-03-31 20:37:15 +00:00
deads2k c2afcd59a6 move insecure options to kubeapiserver
Kubernetes-commit: c2f8ef1b1a4e0e60379b7b7447d59a87b0b0ccf9
2017-03-31 20:37:15 +00:00
deads2k 91f0fac434 force callers to specify the cert dns names
Kubernetes-commit: f31eb0a77f0616a5c4c3477b6d87a5a6726845cc
2017-03-31 20:37:15 +00:00
deads2k 7170396682 tweak defaults for recommended apiserver options
Kubernetes-commit: acba2cbd6d188a34f4c3032c933921ba22a0f77c
2017-03-18 19:56:08 +00:00
Dr. Stefan Schimanski 954f7be538 apiserver: self-signed in-memory cert for loopback 2017-02-27 15:10:34 -05:00
deads2k 147d3934cf auto-create the loopback token 2017-02-14 14:04:06 -05:00
deads2k 284a95797b apiserver command line options lead to config 2017-02-13 07:36:41 -05:00