k3s/pkg
Kubernetes Submit Queue b7100f1ee7
Merge pull request #48859 from victorgp/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Support for custom tls cipher suites in api server and kubelet

**What this PR does / why we need it**:
This pull request aims to solve the problem of users not able to set custom cipher suites in the api server.
Several users have requested this given that some default ciphers are vulnerable.
There is a discussion in #41038 of how to implement this. The options are:
- Setting a fixed list of ciphers, but users will have different requirements so a fixed list would be problematic.
- Letting the user set them by parameter, this requires adding a new parameter that could be pretty long with the list of all the ciphers.

I implemented the second option, if the ciphers are not passed by parameter, the Go default ones will be used (same behavior as now).

**Which issue this PR fixes** 
fixes #41038 

**Special notes for your reviewer**:
The ciphers in Go tls config are constants and the ones passed by parameters are a comma-separated list. I needed to create the `type CipherSuitesFlag` to support that conversion/mapping, because i couldn't find any way to do this type of reflection in Go.
If you think there is another way to implement this, let me know.

If you want to test it out, this is a ciphers combination i tested without the weak ones:

```
TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
```

If this is merged i will implement the same for the Kubelet.

**Release note**:
```release-note
kube-apiserver and kubelet now support customizing TLS ciphers via a `--tls-cipher-suites` flag
```
2018-01-17 17:46:40 -08:00
..
api Merge pull request #57059 from ericchiang/client-go/remove-openapi-import 2018-01-12 01:26:16 -08:00
apis Merge pull request #49874 from k82cn/add_nodeAffinity_in_err_msg 2018-01-10 08:15:41 -08:00
auth Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
capabilities Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
client Merge pull request #57504 from yue9944882/fix-fake-client-dummy-watch 2018-01-16 08:39:03 -08:00
cloudprovider azure disk: if the disk is not found, immediately detach it. This prevents azure keeps the bad request and stops issuing new request 2018-01-16 16:43:10 +00:00
controller Merge pull request #58306 from liggitt/gc-nil-channel 2018-01-17 13:08:30 -08:00
credentialprovider All Kubelet flags should be explicitly registered 2018-01-09 17:37:34 -08:00
features Create a feature flag for sharing PID namespace 2018-01-10 19:33:46 +01:00
fieldpath Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
generated generated 2017-11-22 18:40:09 +00:00
kubeapiserver Merge pull request #56608 from hzxuzhonghu/fix-typo 2018-01-04 15:28:05 -08:00
kubectl low hanging fruit for using cobra commands 2018-01-17 13:43:43 -05:00
kubelet Merge pull request #48859 from victorgp/master 2018-01-17 17:46:40 -08:00
kubemark
master Use race="off" mode instead of disabling race feature 2017-12-23 13:13:09 -08:00
printers Merge pull request #57507 from dixudx/describe_pod_hostport 2018-01-16 10:26:19 -08:00
probe Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
proxy Merge pull request #58035 from m1093782566/windows-proxy-mode 2018-01-17 13:08:37 -08:00
quota Merge pull request #50286 from Pingan2017/modify0808 2018-01-15 11:35:03 -08:00
registry Limit all category to apps group for ds/deployment/replicaset 2018-01-15 14:41:42 -05:00
routes Update Dashboard add-on to version 1.8.0 2017-11-28 17:53:02 +01:00
scheduler remove duplicated import 2018-01-17 09:34:59 +08:00
security Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
securitycontext pkg/securitycontext/util_test.go(TestAddNoNewPrivileges): update tests. 2018-01-08 15:46:39 +01:00
serviceaccount typo wrong, not "namespace", but "secretName" 2017-12-15 09:27:52 +08:00
ssh Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
util Merge pull request #57967 from jsafrane/fix-nfs-root-squash 2018-01-17 13:32:03 -08:00
version All Kubelet flags should be explicitly registered 2018-01-09 17:37:34 -08:00
volume Merge pull request #57967 from jsafrane/fix-nfs-root-squash 2018-01-17 13:32:03 -08:00
watch
.import-restrictions
BUILD create auto-gen files 2018-01-17 16:23:03 +08:00
OWNERS