Commit Graph

173 Commits

Author SHA1 Message Date
Dr. Stefan Schimanski 1e4465a8e7 apiserver: simplify deepcopy calls
Kubernetes-commit: b2442224e79f480409806c2ccfa24a9acb708162
2017-08-29 13:16:13 +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
deads2k d1afbac635 create default storage selection functions
Kubernetes-commit: 0258d044d3b46f5d2e6bf30658afd4f29e48a1ca
2017-08-29 13:13:51 +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
bjhaid 7dfcb9c56f This adds an etcd health check endpoint to kube-apiserver
addressing https://github.com/kubernetes/kubernetes/issues/48215.

Kubernetes-commit: 47d748c5dc989ea46142569bf42636c622fe128a
2017-08-29 13:13:05 +00:00
supereagle 2faadf8c85 update generated deepcopy code
Kubernetes-commit: a1c880ece3574a2c7170e0d040489d56dd912e08
2017-08-29 13:13:04 +00:00
Jordan Liggitt d986f949fd Correctly handle empty watch event cache
Kubernetes-commit: 0df769f54061aaa1796e2ef496265b3711e6826a
2017-08-29 13:13:03 +00:00
Wojciech Tyczynski 741f2c78f4 Don't use cacher if uninitialized
Kubernetes-commit: 74b9ba3b4d7c6f0a116464ac01a5f98b915d4586
2017-07-29 13:55:24 +00:00
deads2k 6f848a98cb add reflector metrics
Kubernetes-commit: 151d39682e62b288c247d8174a5f7fb139ee7bd1
2017-07-28 13:56:11 +00:00
Saksham Sharma c51b2a76ca Add benchmarks for envelope transformer
Kubernetes-commit: 449e811ebe3135a35d04afc84c2e9c9481d637fe
2017-07-28 13:56:11 +00:00
Saksham Sharma 8ca16e584a Add unit tests for envelope transformer
Kubernetes-commit: d23a1f135d694ef315f23299f095fd4b85421670
2017-07-28 13:56:11 +00:00
Saksham Sharma 03bcff8111 Implement Envelope encryption Transformer
Kubernetes-commit: 1a92a8aeb3da1df618396f633ec66678ca1ac3a9
2017-07-28 13:56:11 +00:00
Slava Semushin a2a05bd86f ParseEncryptionConfiguration: simplify code.
Also improves function name in godoc and many error messages.

Kubernetes-commit: bf51722ffbfa5521b8c516b8751435f004aacacf
2017-07-28 13:56:11 +00:00
Dr. Stefan Schimanski e24df9a2e5 Update generated code
Kubernetes-commit: 8dd0989b395b29b872e1f5e06934721863e4a210
2017-07-19 03:49:08 +00:00
Dr. Stefan Schimanski 36b2f4560f deepcopy: add interface deepcopy funcs
- add DeepCopyObject() to runtime.Object interface
- add DeepCopyObject() via deepcopy-gen
- add DeepCopyObject() manually
- add DeepCopySelector() to selector interfaces
- add custom DeepCopy func for TableRow.Cells

Kubernetes-commit: 39d95b9b065fffebe5b6f233d978fe1723722085
2017-07-19 03:49:08 +00:00
Clayton Coleman a9bfd91dd9 Do not persist SelfLink into etcd storage
This behavior regressed in an earlier release. Clearing the self link
ensures that a new version is always written and reduces the size of the
stored object by a small amount. Add tests to verify that Create and
Update result in no SelfLink stored in etcd.

Kubernetes-commit: 461c3701f0915acbf49c339f5321fa86879a963e
2017-07-16 04:08:42 +00:00
Tim Allclair b817dfcc02 Name change: s/timstclair/tallclair/
Kubernetes-commit: a2f2e1d4918effb4f0994333c7b88086674e4a5b
2017-07-16 04:08:42 +00:00
Dr. Stefan Schimanski 5c33fc4de4 apimachinery: remove unneeded GetObjectKind() impls
Kubernetes-commit: da3322c2d93671b7cbff9b090dd5e1ce9984130e
2017-07-16 04:08:42 +00:00
Dr. Stefan Schimanski 51b28748a4 Update generated files
Kubernetes-commit: d358cb168d60deec2c84b68003680307a6565bbd
2017-07-16 04:08:42 +00:00
Dr. Stefan Schimanski 15712b92c3 apimachinery+apiserver: extract test types to work w/ deepcopy-gen
Kubernetes-commit: 205cd90d465b7287fdad5f77d1dc4ac13624b067
2017-07-16 04:08:41 +00:00
Clayton Coleman 2f829d739b GuaranteedUpdate must write if stored data is not canonical
An optimization added to the GuaranteedUpdate loop changed the
comparison of the current objects serialization against the stored data,
instead comparing to the in memory object, which defeated the mechanism
we use to migrate stored data.

This commit preserves that optimization but correctly verifies the in
memory serialization against the on disk serialization by fetching the
latest serialized data. Since most updates are not no-ops, this should
not regress the performance of the normal path.

Kubernetes-commit: b851614adfe2b39941d518485480ff527fa4f0c1
2017-07-04 08:39:44 +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
NickrenREN 080796b69a Lower etcd compacted loglevel
Kubernetes-commit: 151b6a04e1355c1b47191f46283a3bfe98dfc393
2017-06-28 00:14:31 +00:00
Clayton Coleman a93da9eb77 Don't bother with a mutable transformer for identity
Kubernetes-commit: dac0d07546f50636ae7f140415aa949325494b2e
2017-06-28 00:14:31 +00:00
Wojciech Tyczynski 6c72e52da3 Add logging to debug conflicts in kubemark-scale test
Kubernetes-commit: 1504c7fc31d1a1f8a37e106b056cc261cdff7a47
2017-06-19 20:36:09 +00:00
Wojciech Tyczynski f6771d9ae8 Revert "Optimize selector for single-matching items"
This reverts commit f93a270edcefc3780247ae89eea02cd13b81237b.

Kubernetes-commit: dbafff3eea4648c8dc6d8ce0d46f7f3932c73bb6
2017-06-13 20:47:32 +00:00
Clayton Coleman 5556dcce58 Add an AES-CBC mode for encrypt at rest
Kubernetes-commit: 395399ab3d93e004e5f59cea5ded675b15a5f250
2017-06-13 20:47:32 +00:00
Clayton Coleman 8076c4cbf2 Add a secretbox implementation for encryption
Uses nacl/secretbox

Kubernetes-commit: 23cd6c52ba4b62e9c333b1fa9e550537f9fd66c2
2017-06-13 20:47:32 +00:00
Clayton Coleman d7dab9510e bump(golang.org/x/crypto/nacl):d172538b2cfce0c13cee31e647d0367aa8cd2486
Kubernetes-commit: 868cdeca8aee343d3b58107cfb12da5b99b86394
2017-06-13 20:47:32 +00:00
David Ashpole 5b1bafe4d2 update prometheus dependency for staging
Kubernetes-commit: 56f53b92074b5da5de8e2307d791c466ec59bf58
2017-06-13 20:47:31 +00:00
Clayton Coleman 5fa08b8c5e Allow initialization of resources
Add support for creating resources that are not immediately visible to
naive clients, but must first be initialized by one or more privileged
cluster agents. These controllers can mark the object as initialized,
allowing others to see them.

Permission to override initialization defaults or modify an initializing
object is limited per resource to a virtual subresource "RESOURCE/initialize"
via RBAC.

Initialization is currently alpha.

Kubernetes-commit: 331eea67d8000e5c4b37e2234a90903c15881c2f
2017-06-13 20:47:30 +00:00
Saksham Sharma 0b1c13686c Add configuration options for encryption providers
Add location transformer, config for transformers

Location transformer helps choose the most specific transformer for
read/write operations depending on the path of resource being accessed.

Configuration allows use of --experimental-encryption-provider-config
to set up encryption providers. Only AEAD is supported at the moment.

Add new files to BUILD, AEAD => k8s-aes-gcm

Use group resources to select encryption provider

Update tests for configuration parsing

Remove location transformer

Allow specifying providers per resource group in configuration

Add IdentityTransformer configuration option

Fix minor issues with initial AEAD implementation

Unified parsing of all configurations

Parse configuration using a union struct

Run configuration parsing in APIserver, refactor parsing

More gdoc, fix minor bugs

Add test coverage for combined transformers

Use table driven tests for encryptionconfig

Kubernetes-commit: 9760d00d08ef0619e30a7b1b90fd290cab960069
2017-06-13 20:47:30 +00:00
Wojciech Tyczynski d84eb10096 Optimize selector for single-matching items
Kubernetes-commit: f93a270edcefc3780247ae89eea02cd13b81237b
2017-06-13 20:47:29 +00:00
Monis Khan 6794013a5b Panic server on watch errors in test environment
This change makes it so that errors during watch decoding panic the
server if it is in a test environment.  This allows us to catch coder
errors related to storing incompatible types at the same location in
etcd.

Signed-off-by: Monis Khan <mkhan@redhat.com>

Kubernetes-commit: a13f026fd012859f04467e6007e2cafe4a788927
2017-06-13 20:47:29 +00:00
Clayton Coleman 08910cc6fc Cache watch returns incorrect object on DELETED events
The underlying storage has always returned the old object on watch
delete events when filtering. The cache watcher does not, which means a
downsteam caller gets different behavior.

This fixes the cache watcher to be consistent with our long term
behavior for watch. It may result in a behavior change (the filter
becomes more precise) but this was a regression in behavior.

Kubernetes-commit: e9e69356e4907fa4d0f45ea7e7768357ba71aba9
2017-06-13 20:47:27 +00:00
deads2k 283dd09ef7 tighten and simplify owners in some staging repos
Kubernetes-commit: e7871dbab26459163fd916b83563c4815c7ca43c
2017-06-13 20:47:27 +00:00
Clayton Coleman ec289c4e0b Refactor move of client-go/util/clock to apimachinery
Kubernetes-commit: 3e095d12b4f152a45b593927804e2e7b8816239a
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
Clayton Coleman 0bd7c5925e generated: bazel
Kubernetes-commit: 7827899b1dd22074eb230e241f63e69499046fb6
2017-05-17 17:27:53 +00:00
Clayton Coleman 4ec184826d Allow config to accept a Transformer
Kubernetes-commit: 4f27d8feea0cbb7634554ef8af1ad6265738a2a1
2017-05-17 17:27:53 +00:00
Clayton Coleman f27996225a Update etcd3 storage to leverage storage/value interfaces
Adds context argument which must be set for AES GCM authenticated data
to be passed.

Kubernetes-commit: a73990a33f95713f026ee7ae9ae6741255aaf8e4
2017-05-17 17:27:53 +00:00
Clayton Coleman 0fb460572a Add an AEAD encrypting transformer for storing secrets encrypted at rest
Tweak the ValueTransformer interface slightly to support additional
context information (to allow authenticated data to be generated by the
store and passed to the transformer). Add a prefix transformer that
looks for known matching prefixes and uses them. Add an AES GCM
transformer that performs AEAD on the values coming in and out of the
store.

Kubernetes-commit: f418468c87d3071c5d9ed14ce850996c77251080
2017-05-17 17:27:53 +00:00
Chao Xu 3ffeae2ff7 hack/update-bazel.sh
Kubernetes-commit: 14045d253d11c801ad94f0928cb9b13a224ee18f
2017-05-13 17:27:43 +00:00
Chao Xu e46eb82a82 remove invocation of k8s.io/client-go/pkg/api/install
change import of client-go/api/helper to kubernetes/api/helper

remove unnecessary use of client-go/api.registry

change use of client-go/pkg/util to kubernetes/pkg/util

remove dependency on client-go/pkg/apis/extensions

remove unnecessary invocation of k8s.io/client-go/extension/intsall

change use of k8s.io/client-go/pkg/apis/authentication to v1

Kubernetes-commit: c354076aa41e3cf417b291d5f0eff2b70395ac30
2017-05-13 17:27:42 +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 2aab760a2a autogenerated
Kubernetes-commit: a05c3c0efdc5822049e34b1a5a1ee259c5fb1906
2017-04-15 20:35:23 +00:00
deads2k 5e858945af remove objectmetafor
Kubernetes-commit: 04460c8750b9a47672aa708251de0e703cfb7266
2017-04-11 20:35:21 +00:00
deads2k e8e8bbf610 remove ListMetaFor
Kubernetes-commit: 7df37c484dac3438530f2b8cb03cf63f85f2fc29
2017-04-08 20:35:19 +00:00
Cao Shufeng 1e6400df1f delete etcd socket file for unit tests
This change clean up the environment for etcd3 unit test.
Without this change, "make test" will leave some socket files in
workspace. And these socket files make hack/verify-generated-protobuf.sh
fails.

Kubernetes-commit: 4e9dcf3da536a9b956eb092fe9dbc5b2081cfb9d
2017-03-31 20:37:15 +00:00
Jordan Liggitt a22f78080a Preserve custom etcd prefix compatibility for etcd3
Kubernetes-commit: 6853e4d71ea128ff955fad32972ad9edcb376dfb
2017-03-18 19:56:09 +00:00
Dr. Stefan Schimanski 07a502d3a2 apimachinery: handle duplicated and conflicting type registration
Kubernetes-commit: 395be3b4010b0eef63e98961a14064360fdca26c
2017-03-18 19:56:08 +00:00
Derek Carr 53343624bb stop spamming logs on restart of api server
Kubernetes-commit: 9211e0380f39f08ff99dcf78f50fefad1d0179b8
2017-03-18 19:56:08 +00:00
Dr. Stefan Schimanski 73c30cda7e staging/src/*: run gofmt 2017-02-23 09:48:09 -05:00
fate-grand-order 3890a8e1d0 fix misspell "underlying" in cacher.go 2017-02-23 09:48:09 -05:00
Wojciech Tyczynski bdf67d9749 Revert "Revert "Avoid unnecessary copies in cacher"" 2017-02-16 08:03:04 -05:00
Dr. Stefan Schimanski 585aca0c2c k8s.io/apiserver: straighten EtcdOptions, backend Config and kube RESTOptionsFactory 2017-02-16 08:03:03 -05:00
Wojciech Tyczynski c2f76cc51b Revert "Avoid unnecessary copies in cacher" 2017-02-13 07:36:41 -05:00
Clayton Coleman 74dc1360f1 Allow ValueTransformer to indicate resource is stale
Allows a transformer (such as an encrypter) to force an update if a new
key is in use, thus allowing simple writes to the REST layer to
trivially migrate keys.
2017-02-13 07:36:41 -05:00
Clayton Coleman 3d8615c851 Allow values to be wrapped prior to serialization in etcd3 2017-02-13 07:36:41 -05:00
Clayton Coleman 679a2b25d7 Allow values to be wrapped prior to serialization in etcd2
This adds a new value transformer to the etcd2 store that can transform
the value from etcd on read and write. This will allow the store to
implement encryption at rest or otherwise transform the value prior to
persistence.
2017-02-13 07:36:41 -05:00
Dr. Stefan Schimanski 0e2b28a48d Update generated files 2017-02-13 07:36:41 -05:00
Dr. Stefan Schimanski 4b46da7a0d Mechanical import fixup: pkg/storage 2017-02-13 07:36:41 -05:00
Dr. Stefan Schimanski 4a2fe15be7 Mechanical move: pkg/storage -> k8s.io/apiserver 2017-02-13 07:36:41 -05:00
Dr. Stefan Schimanski 6025c228e6 pkg/storage/etcd: cut off pkg/api scheme 2017-02-02 09:36:48 -05:00
Wojciech Tyczynski 83dfb6ab47 Avoid unnecessary copies in cacher 2017-02-02 09:36:48 -05:00
deads2k 55fd399ad4 move pkg/storage to apiserver 2017-02-01 07:33:52 -05:00
deads2k b60c7818e4 move storage/storagebackend to apiserver 2017-01-27 14:15:18 -05:00
Clayton Coleman e31581569e iQEcBAABCAAGBQJYfoobAAoJED0WkGtPHFyz80gH/RNPz9wEQ9kjzmq5Zccmxcnn
Nz8+i0Ksr4dvwTV7SaYO8NHpkqTR6z5X1vLlwIAve/hjCyvZ58xT1qEbPyXNWXvq
 sYgj1b490wdrF0cFQVY7YoKUK5FgwGnmdK+vXG2bUZl6qlnik742QDP5zkxPnwHI
 tpz4o0SfOisxFFkktowems4SMBBLSozqChzAnhbE0b5L/+bLcxOkNaZ8w0CPX5TE
 1uVpw+lAuLq/10XKBhWb6wyc/2+aW0EfUs/4JIK69giPY+Km0QMejIJ4UYc6ml2F
 DOGcWR+nKbeMIi6TFMZd1MdfLhSzipRxCECv1MYEZgIg3nGchYdybriJiYG8R3M=
 =DxiX
 -----END PGP SIGNATURE-----

Correct import statements
2017-01-18 07:43:45 -05:00
Clayton Coleman 474b80883a iQEcBAABCAAGBQJYfoneAAoJED0WkGtPHFyzON8H/2oS1qSlJg/iJ8Ia6Hf/U7/k
i7CaVgRIrMJbxPbPeXSE9UZuoUkuM8R9/J5J1Nu/ZNhEoHfUDWCKvLTIyRmplrIX
 GW/I7LHoRaFdi4RDQLprBdbWJt0Vyi2JNwIoX8EDsNT9/09WmRbNaganoQ35bos0
 ath62hBu34h1xIa9vXf+eh08IqReNraztRD/f7SOfHk2qhLQGREDqPUC/jEkrW5+
 45+mT2RvzTmnY2yoMxh1StpISqxOTX/R9Pt8wWwY7LcC0s9GLMYpTRMynaWr40rb
 30XEdFr6O5sRui4Ho2pjb0YY2NuhyPhiEfGMY2p+zRO9uXaFhQJBxd4OnDNXPp4=
 =bile
 -----END PGP SIGNATURE-----

Move APIs and core code to use metav1.ObjectMeta
2017-01-18 07:43:45 -05:00
deads2k 1f282a1786 move name generation to generic api server storage helpers 2017-01-17 10:46:17 -05:00
deads2k 6687ea314a moves of genericapiserver packages without dependencies 2017-01-13 13:38:51 -05:00