Commit Graph

52 Commits

Author SHA1 Message Date
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Deepak Kinni
a7b1fcba40 Add or Remove PV deletion protection finalizer considering the recalimPolicy
Signed-off-by: Deepak Kinni <dkinni@vmware.com>
2022-04-07 00:48:35 +05:30
Deepak Kinni
836ace46a0 Default enable flag for beta feature HonorPVReclaimPolicy
Signed-off-by: Deepak Kinni <dkinni@vmware.com>
2022-03-26 06:48:28 +05:30
Konstantin Misyutin
4ba98a8610 cleanup: remove unnecessary import aliases 2022-03-16 15:43:09 +08:00
Konstantin Misyutin
1d7cefe9c4 Move volume helpers to "k8s.io/component-helpers/storage/volume".
This patch aims to simplify decoupling "pkg/scheduler/framework/plugins"
from internal "k8s.io/kubernetes" packages. More described in
issue #89930 and PR #102953.

Some helpers from "k8s.io/kubernetes/pkg/controller/volume/persistentvolume"
package moved to "k8s.io/component-helpers/storage/volume" package:

- IsDelayBindingMode
- GetBindVolumeToClaim
- IsVolumeBoundToClaim
- FindMatchingVolume
- CheckVolumeModeMismatches
- CheckAccessModes
- GetVolumeNodeAffinity

Also "CheckNodeAffinity" from "k8s.io/kubernetes/pkg/volume/util"
package moved to "k8s.io/component-helpers/storage/volume" package
to prevent diamond dependency conflict.

Signed-off-by: Konstantin Misyutin <konstantin.misyutin@huawei.com>
2022-03-16 15:43:09 +08:00
Mike Dame
4960d0976a Wire contexts to Core controllers 2021-11-01 10:29:00 -04:00
Jiawei Wang
8de0f11946 Add GA AnnStorageProvisioner annotation to PVC
This PR adds GA AnnStorageProvisioner annotation to
a PVC if the PVC requires dynamic provisioning. This
also deprecates the beta AnnStorageProvisioner annotation
and it will be removed in a later release.
2021-08-26 12:46:47 -07:00
xing-yang
676a3a7012 Only CSI plugin can have a DataSource 2021-02-25 15:27:26 +00:00
David Zhu
b7817a2981 Add annotation annealing for migration for PVs and PVCs during syncVolume and syncClaim. This allows external-provisioners to pick up and delete volumes when they have been rolled up from previous kubernetes versions. 2020-01-27 16:14:53 -08:00
danielqsj
5bc0e26c19 unify alias of api errors under pkg and staging 2019-12-26 16:42:28 +08:00
hwdef
851eac6a97 del unuse var in pkg/controller 2019-09-16 15:05:24 +08:00
Yi Tang
8c13f9dea3 fix pv controller not find pv for pvc provisioning 2019-07-26 16:24:30 +08:00
xiangqian
9688511595 record provision and deletion latency metric
instead of using provisioner from storage class directly, uses plugin name firstly
2019-05-29 14:15:30 -07:00
Yecheng Fu
2d0d226371 Move all private annotations to shared package and update code 2019-05-05 09:43:43 +08:00
Yecheng Fu
842fed658c Refactor PV scheduling library into separate package 2019-05-02 14:45:52 +08:00
Yecheng Fu
0b6c028c8a Extract testing VolumeReactor into a separate package 2019-05-02 14:45:52 +08:00
Deep Debroy
23478f104f PV Controller changes to support provisioning in CSI Migration scenarios
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2019-02-26 08:39:54 -08:00
Michelle Au
fd64c08240 Fix storage feature gate test setting 2018-11-16 10:49:40 -05:00
Yecheng Fu
1e27a28dca Ignore non-avaiable volumes in findMatchingVolume: update tests
- Use VolumeAvaiable instead of empty or pending phase in tests
- Add a test case to verify findMatchingVolume will not choose
  non-avaiable PVs if it's not pre-bind
- Add a test case to verify syncClaim will not choose non-avaibalbe PVs
  if it's not pre-bind
2018-09-19 13:13:31 +08:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
Jan Safranek
c96c0495f4 Pass pod informer to PV controller 2018-02-05 15:40:25 +01:00
Dr. Stefan Schimanski
012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Matthew Wong
5e772b8e4b Add storageClass.mountOptions and use it in all applicable plugins 2017-08-29 11:37:36 -04:00
Jan Safranek
195d5c1546 Fix handling of APIserver errors when saving provisioned PVs.
When API server crashes *after* saving a provisioned PV and before sending
200 OK, the controller tries to save the PV again. In this case, it gets
AlreadyExists error, which should be interpreted as success and not as error.

Especially, a volume that corresponds to the PV should not be deleted in the
underlying storage.
2017-08-29 09:47:32 +02:00
Matthew Wong
0356a840ff Add ReclaimPolicy field to StorageClass 2017-08-14 13:34:32 -04:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Jan Safranek
9d0c47f1db Use storage.v1 instead of v1beta1
storage.v1beta1 was used to work around GKE which does not expose v1. Now that
GKE is updated, we can switch everything to v1.
2017-04-25 10:13:38 +02:00
NickrenREN
e0ef5bfd40 Exit from NewController() for PersistentVolumeController when InitPlugins() failed just like NewAttachDetachController() does 2017-04-12 13:43:09 +08:00
NickrenREN
fa7bd44966 Remove alphaProvisioner in PVController and AlphaStorageClassAnnotation 2017-04-10 17:09:40 +08:00
Jan Safranek
52adaa16e0 PV controller: use attributes instead of beta annotations in unit tests 2017-03-02 10:23:56 +01:00
Jan Safranek
7ae4152712 Move PV/PVC annotations to PV/PVC types.
They aren't part of storage.k8s.io/v1 or v1beta1 API.
Also move associated *GetClass functions.
2017-03-02 10:23:55 +01:00
Jordan Liggitt
41c88e0455
Revert "Merge pull request #40088 from jsafrane/storage-ga-v1"
This reverts commit 5984607cb9, reversing
changes made to 067f92e789.
2017-02-25 22:35:15 -05:00
Jan Safranek
fa93f1c411 Update imports 2017-02-24 13:52:16 +01:00
Matthew Wong
33f98d4db3 Switch pv controller to shared informers 2017-02-16 10:08:23 -05:00
Shyam JVS
2ed7acfbcc Revert "Remove alpha provisioning" 2017-02-16 13:53:55 +01:00
Jan Safranek
587eb199e0 Remove alpha provisioning 2017-02-01 14:51:54 +01:00
Clayton Coleman
9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Tomas Smetana
a02ee64d00 Fix issue #37377: Report an event on successful PVC provisioning
cc: @jsafrane
2016-11-30 10:27:22 +01:00
Chao Xu
7eeb71f698 cmd/kube-controller-manager 2016-11-23 15:53:09 -08:00
Jan Safranek
18de83c641 Implement external provisioning proposal
In other words, add "provisioned-by" annotation to all PVCs
that should be provisioned dynamically.
2016-11-02 14:13:34 +01:00
Scott Creeley
86f1a94be5 Adding default StorageClass annotation printout for resource_printer 2016-10-19 10:59:07 -04:00
Jan Safranek
3a2f4e52a8 Do not report warning event when an nknown provisioner is requested
with StorageClass.Provisioner == <unknown plugin>, we should wait for
either external provisioner or volume admin to provide a PV for a claim
instead of reporting an error.

Fixes #31723
2016-09-07 09:11:41 +02:00
deads2k
cd5b6cc491 move StorageClass to its own group 2016-09-06 08:41:17 -04:00
Jan Safranek
bb5d562f37 Restore alpha behavior 2016-08-18 10:36:50 +02:00
Jan Safranek
d8a95a3785 Update matching logic with storage class
- no default StorageClass
- PVC.Spec.Class == nil means the same as PVC.Spec.Class == ""
2016-08-18 10:36:50 +02:00