Commit Graph

45 Commits

Author SHA1 Message Date
Marek Siarkowicz 73e72d16c5 Unify ListOptions validation between cache and etcd
Kubernetes-commit: ccb607f06b91496d02a3b94253261e03e3280630
2025-03-07 12:26:05 +01:00
Marek Siarkowicz 3ad93853da Move GetCurrentResourceVersion to storage.Interface
Kubernetes-commit: fea89f25d1bfd7290bb0165f49a6d288ab5f717a
2025-02-24 19:49:45 +01:00
Abu Kashem 1f27993c44 implement unsafe deletion, and wire it
- implement unsafe deletion, and wire it
- aggregate corrupt object error(s) from the storage LIST operation
- extend storage error:
a) add a new type ErrCodeCorruptObj to represent a corrupt object:
b) add a new member 'InnerErr error' to StorageError to hold
   the inner error
- add API status error

Kubernetes-commit: 5d4b4a160dc551dc8979012eeabea1a098945603
2024-09-20 17:36:27 -04:00
Abu Kashem 33cfd964ef refactor: storage.InternalError should retain the inner error
This is so we can do proper error handling, at the same time
we want to maintain backward compatibility

Kubernetes-commit: f24ec7e00dfd133780b3e6519a19f646c0dbde63
2024-09-26 09:44:09 -04:00
Abu Kashem 3a0975b22c refactor: add delete options for Delete method in storage interface
Kubernetes-commit: bc0ea34bc380e073a7278216fe6690a1b9aee48c
2024-09-19 10:31:08 -04:00
Abu Kashem f28acc6161 refactor etcd store conditional delete
Kubernetes-commit: fecab0713b96bb0d528aea58900942ae0cb52260
2024-09-19 13:14:52 -04:00
Wojciech Tyczyński a643e14347 Implement resilient watchcache initialization post-start-hook
Kubernetes-commit: a5772bd42593f6492f5169eef49bc9884f95abba
2024-06-13 11:02:18 +02:00
ah8ad3 2b7a0cfef8 Add FeatureSupportChecker for etcd storage
Kubernetes-commit: 70e65eee46cbf72efabe8440a92117d1fedf6497
2024-04-23 16:58:01 +03:30
Lukasz Szaszkiewicz 51e79bdd97 storage: document ProgressNotify from storage.ListOptions
At first glance, it seems that the fields storage.ListOptions.ProgressNotify and storage.ListOptions.Predicate.AllowWatchBookmarks
are the same. Unfortunately, this is not the case.

This PR documents the differences and motivations for why these fields are actually distinct.

Kubernetes-commit: 6058540f3d0edc405a1f1b8a96bd82ceca99c240
2023-09-01 10:48:36 +02:00
Marek Siarkowicz cd751eb82e Implement conditionalProgressRequester that allows requesting watch progress notification if watch cache is not fresh
Kubernetes-commit: 98461be8ffa7383152c442414a16adb217e98080
2023-07-10 18:10:49 +02:00
Lukasz Szaszkiewicz 175c211688 Add SendInitialEvents to storage ListOptions
Kubernetes-commit: e1537fc41b9eecb0e5026bfc72b27e4a07d771ba
2023-01-30 14:54:59 +01:00
Sanskar Jaiswal d1bd5277fb Update comment and declaration of `storage.GuaranteedUpdate` to be clearer.
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>

Kubernetes-commit: f8df26ae803103f82edbf1efe17b1b169801b256
2022-04-16 17:19:06 +05:30
Wojciech Tyczyński b028a2ea8d Unify merge GetToList and List storage methods to single GetList
Kubernetes-commit: f3d56369f71f5106eeec8300e77bd69b172733da
2022-02-10 10:15:29 +01:00
Wojciech Tyczyński 9f8f72fea9 Change storage.Interface to utilize recurisve parameter
Kubernetes-commit: 3016b3d8f868a3041c7cb86695de09d7ab27cf3b
2022-02-10 09:58:31 +01:00
Wojciech Tyczyński 71bfcaaea1 Simplify storage.Interface by merging Watch and WatchList functions.
Kubernetes-commit: 53653e9b0a7145c3b6e133c5639194ff79b3719d
2021-11-18 12:40:26 +01:00
Nicolas Mitchell 1cd62ac37f add backticks to comments containing `<` or `>`
Kubernetes-commit: 340555476a4926e10c9ffac8b283cd77ca088c5d
2021-08-21 10:59:50 -07:00
JUN YANG 2a99e7e764 Fix misspelling of condition.
Signed-off-by: JUN YANG <yang.jun22@zte.com.cn>

Kubernetes-commit: 6c566f6dfa5b76d105ce24b3b0cb7f5e3d50d018
2021-03-14 00:17:58 +08:00
wojtekt 3de94d4883 Unify variable naming between GuaranteedUpdate and Delete in storage
Kubernetes-commit: d0726e4b1354b1c8c3978b96ab7b01d13a2b6340
2020-12-16 09:28:44 +01:00
wojtekt 8c25869e43 Add suggestion to storage interface Delete method
Kubernetes-commit: c2d61896f45967cdea15072b7a12faeb635b5dc5
2020-11-03 13:21:00 +01:00
wojtekt 942f220e85 Remove variadic argument from storage interface
Kubernetes-commit: 8b98305858b107369f2c9b9fd8ef1c5b0da078c0
2020-11-02 15:52:51 +01:00
wojtekt e40efde837 Implement etcd3 progress-notify feature in etcd3 layer
Kubernetes-commit: 56e72841b6005740453828a9f4f7a9a1b9a831f6
2020-08-31 12:40:41 +02:00
Joe Betz ee219411ed Add ResourceVersionMatch parameter to make Resource Version semantics consistent for list
Kubernetes-commit: e214f2408b59c745c199645547948a8ad2a87ac2
2020-05-29 10:44:26 -07:00
Joe Betz 5b75cf0ff9 Add GetOptions and ListOptions to storage interface
Kubernetes-commit: 4c99949ae6b4a74e4ffda0caba86c151c23d579e
2020-05-29 10:48:33 -07:00
shaloulcy 6099d76e39 add indexer for storage cacher
Signed-off-by: shaloulcy <lcy041536@gmail.com>

Kubernetes-commit: 87582e2c3c1cb8c8e10ec05a4700f865c759b7b2
2019-11-19 16:52:07 +08:00
willise f0281f38ec fix: typos in comments of admission
Kubernetes-commit: e8b5658bd11384d2796f9512f6edb95c632a0a59
2020-01-10 14:01:06 +08:00
Jordan Liggitt 0c706a033c Plumb context to admission Admit/Validate
Kubernetes-commit: 61774cd7176cae0c0324d23ab20e6c6b3038153f
2019-08-19 10:48:08 -04:00
Ted Yu 4eb89249bd Rename TriggerPublisherFunc as IndexerFunc
Kubernetes-commit: 6e98aab26e4fb867a6d8b4342937823cf1597d89
2019-07-18 06:45:48 -07:00
wojtekt bb8cecbe8c Simplify trigger functions in cacher
Kubernetes-commit: 68fd329e00d1ddf19a7ec0db1607820a1c4c008a
2019-07-04 14:21:06 +02:00
Jordan Liggitt 00e2435130 Make GetRemainingItemCount/SetRemainingItemCount use pointers
Kubernetes-commit: 145e8c46cf81ff16b65ff729c392ced262984847
2019-05-27 12:03:26 -04:00
Chao Xu 5c9333e4d3 Run deleteValidation at the storage layer so that it will be retried on
conflict.

Adding unit test verify that deleteValidation is retried.

adding e2e test verifying the webhook can intercept configmap and custom
resource deletion, and the existing object is sent via the
admissionreview.OldObject.

update the admission integration test to verify that the existing object
is passed to the deletion admission webhook as oldObject, in case of an
immediate deletion and in case of an update-on-delete.

Kubernetes-commit: 7bb4a3bace048cb9cd93d0221a7bf7c4accbf6be
2019-04-09 13:49:16 -07:00
Chao Xu 034ed25bbe Add RemainingItemCount to ListMeta
Kubernetes-commit: 58c18309a84f9e0fe05b92c202616e4ecf8062f7
2019-04-01 14:44:19 -07:00
YAMAMOTO Takashi a78eeebaec Fix a typo in a code example in a comment
Kubernetes-commit: d11e779f1d1fbdcd628212f57d9023a868ca1b7f
2019-03-08 15:36:20 +09:00
ajatprabha ad205f8388 add ResourceVersion check to Preconditions#Check
Kubernetes-commit: 3135cea2cce02bc8c6796e97f4579d538f357f74
2019-02-15 12:30:34 +05:30
ajatprabha 10074505ca add ResourceVersion to DeleteOptions.Preconditions
Kubernetes-commit: 8f48d762717dfe1f479cfabaabc4fb9261a1bc8f
2019-02-14 04:09:12 +05:30
Jordan Liggitt 80029a760c Deprecate and remove use of alpha metadata.initializers field, remove IncludeUninitialized options
Kubernetes-commit: 17aa60686ebe5fd04b4fe6f442dc36a8d70b6730
2019-01-17 09:19:28 -05:00
Antoine Pelisse 30e2071cad storage: Move precondition check as a method of preconditions
Kubernetes-commit: b5258a53809bde48cac07848d787a0fc7db16b2a
2018-07-31 13:53:27 -07:00
fisherxu dd4ba939ef collapse the resource version parse
Kubernetes-commit: 68ec856b4506d4440b327141051bdf31fc92be42
2018-06-23 17:29:06 +08:00
hzxuzhonghu 6ab99203b7 Replace "golang.org/x/net/context" with "context"
Kubernetes-commit: 70e45eccf27726f0e63dd1024924ccc7e2cd35a0
2018-02-28 12:20:22 +08:00
Marek Grabowski e36f8069aa Add a metric exposing number of objects per type
Kubernetes-commit: f6e9ebffa2df10f7792fbea0a0fbe5ab8e388a26
2018-02-12 15:58:57 +00:00
Daniel Smith 4b163fbe32 resource version parsing should all be in one place
Kubernetes-commit: 023895d597be6539a1a16fa54d60e47a17d85dc1
2018-01-10 10:43:59 -08:00
Di Xu 7a46c8324d remove FilterFunc and use SelectionPredicate everywhere
Kubernetes-commit: 3ae7bdd211e3df1350446b6def142b4d31c75e52
2017-11-22 16:57:06 +08:00
Clayton Coleman 460257fd61 Server side implementation of paging for etcd3
Add a feature gate in the apiserver to control whether paging can be
used. Add controls to the storage factory that allow it to be disabled
per resource. Use a JSON encoded continuation token that can be
versioned. Create a 410 error if the continuation token is expired.

Adds GetContinue() to ListMeta.

Kubernetes-commit: 8952a0cb722b77459cf2701632a30f5b264f5aba
2017-09-03 14:04:12 +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
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
deads2k 55fd399ad4 move pkg/storage to apiserver 2017-02-01 07:33:52 -05:00