Commit Graph

64 Commits (3215e8535ae8afcf850fbaac9df7ff9abe42f9e0)

Author SHA1 Message Date
Rodrigo Campos 3366821d9a Fix coding style 2016-08-20 14:58:56 -03:00
Rodrigo Campos 568f4c2e63 Add mode permission bits to configmap, secrets and downwardAPI
This implements the proposal in:
docs/proposals/secret-configmap-downwarapi-file-mode.md

Fixes: #28317.

The mounttest image is updated so it returns the permissions of the linked file
and not the symlink itself.
2016-08-17 14:44:41 -04:00
Jing Xu f19a1148db This change supports robust kubelet volume cleanup
Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.
2016-08-15 11:29:15 -07:00
Ivan Shvedunov df1e925143 Fix wrapped volume race
This fixes race conditions in configmap, secret, downwardapi & git_repo
volume plugins.
wrappedVolumeSpec vars used by volume mounters and unmounters contained
a pointer to api.Volume structs which were being patched by
NewWrapperMounter/NewWrapperUnmounter, causing race condition during
volume mounts.
2016-07-27 12:24:46 +03:00
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Oleg Shaldybin 3b15d5be19 Use correct namespace in unit tests that use fake clientset
Fake clientset no longer needs to be prepopulated with records: keeping
them in leads to the name conflict on creates. Also, since fake
clientset now respects namespaces, we need to correctly populate them.
2016-06-28 11:26:34 -07:00
saadali 542f2dc708 Introduce new kubelet volume manager
This commit adds a new volume manager in kubelet that synchronizes
volume mount/unmount (and attach/detach, if attach/detach controller
is not enabled).

This eliminates the race conditions between the pod creation loop
and the orphaned volumes loops. It also removes the unmount/detach
from the `syncPod()` path so volume clean up never blocks the
`syncPod` loop.
2016-06-15 09:34:08 -07:00
saadali 9b6a505f8a Rename UniqueDeviceName to UniqueVolumeName
Rename UniqueDeviceName to UniqueVolumeName and move helper functions
from attacherdetacher to volumehelper package.
Introduce UniquePodName alias
2016-06-15 09:32:12 -07:00
Vishnu Kannan baa8ac4d6b Add metrics support for a few network based volumes.
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2016-05-23 09:33:12 -07:00
Jan Chaloupka ebe56f5ff9 Extend the current secrets mounting to volume implementation with key to path mapping.
The key to path mapping allows pod to specify different name (thus location) of each secret.
At the same time refactor the volume plugin to use AtomicWritter to project secrets to files in a volume.

Update e2e Secrets test, the secret file permission has changed from 0444 to 0644
Remove TestPluginIdempotent as the AtomicWritter is responsible for secret creation
2016-05-18 16:12:31 +02:00
saadali 79012f6d53 Rename volume.Builder to Mounter and volume.Cleaner to Unmounter 2016-03-25 11:29:58 -07:00
Tim Hockin 23fe2a3584 add maintainers for each volume driver 2016-03-22 22:19:53 -07:00
Tim St. Clair 246b389275 Move test-only volume files to test-only volume package 2016-02-29 14:44:28 -08:00
k8s-merge-robot 11cdc919f5 Merge pull request #21364 from pwittrock/macdu
Auto commit by PR queue bot
2016-02-22 10:09:03 -08:00
Chao Xu ad46715f51 generate fake client for release_1_2 2016-02-17 16:10:02 -08:00
Phillip Wittrock 1e5175594d Fix volume secret_test.go on darwin by not checking volume usage metrics 2016-02-17 12:56:37 -08:00
k8s-merge-robot fcf9c4a1e4 Merge pull request #19741 from pwittrock/syncfsmetrics
Auto commit by PR queue bot
2016-02-05 17:54:22 -08:00
Phillip Wittrock 3de94cd23c Supply volume fs metrics to server/stats/handler.go
* Metrics will not be expose until they are hooked up to a handler
* Metrics are not cached and expose a dos vector, this must be fixed before release or the stats should not be exposed through an api endpoint
2016-02-05 16:00:24 -08:00
Chao Xu 184440f8ef rename release_1_2 to internalclientset 2016-02-05 14:02:28 -08:00
Chao Xu 1b047f8e67 rename legacy to core 2016-02-04 14:26:56 -08:00
Chao Xu f9f5736b01 grep sed 2016-02-03 13:06:07 -08:00
Chao Xu c72d234bbf replacing handwritten client in several controllers 2016-01-31 15:42:02 -08:00
k8s-merge-robot 3f5e417999 Merge pull request #19502 from swagiaal/internalize-ownership
Auto commit by PR queue bot
2016-01-26 23:06:39 -08:00
k8s-merge-robot 52cb4c1d9d Merge pull request #18445 from resouer/fix-emptydir
Auto commit by PR queue bot
2016-01-26 02:45:54 -08:00
harry 0fa5b6c4f7 Add e2e test for wrapper volumes
Use git server in e2e and refactor wrapper builder

Update e2e test to use a fake git server
2016-01-24 16:57:44 +08:00
harry 7405c7899b Add strings pkg to hold strings utils
Replace funtions with strings pkg

Fix all references and rename the pkg
2016-01-15 12:37:50 +08:00
Sami Wagiaalla 7767698459 Remove SupportsOwnershipManagement volume attribute 2016-01-13 10:37:10 -05:00
Sami Wagiaalla 4ac151321a Call SetVolumeOwnership from volume plugins 2016-01-13 10:37:10 -05:00
Sami Wagiaalla f650648aae Add fsGroup to SetUp and SetUpAt 2016-01-13 10:37:10 -05:00
harry c0d49450e4 Fix volume wrapper doesn't have name
Integration test
2016-01-11 15:08:26 +08:00
Chakravarthy Nelluri fa76de79e5 Add support for flex volume. Flex volume adds support for thirdparty(vendor)
volumes and custom mounts.
2015-12-23 14:11:38 -08:00
Phillip Wittrock c67ce887f2 Volume Metrics Interface and base implementation.
- Add volume.MetricsProvider function to Volume interface.
- Add volume.MetricsDu for providing metrics via executing "du".
- Add volulme.MetricsNil for unsupported Volumes.
2015-12-09 16:06:24 -08:00
Paul Morie 911757486d Refactor volume.Builder.IsReadOnly() to volume.Builder.GetAttributes() 2015-11-13 23:34:48 -05:00
Sami Wagiaalla 1d352a16b8 Support volume relabling for pods which specify an SELinux label 2015-10-28 09:26:58 -04:00
Paul Morie 3cd12f5e05 FSGroup implementation 2015-10-22 16:40:59 -04:00
Filip Grzadkowski 7fe34f2050 Introduce nsenter writer for volume plugins 2015-09-17 16:40:29 +02:00
markturansky 0e7f73ad67 expand volume.Spec to include full Volume and PV 2015-09-03 08:57:32 -04:00
Saad Ali b05cab0bc5 Merge pull request #6945 from eparis/IsMountPoint
Rename IsMountPoint to IsLikelyNotMountPoint
2015-08-19 12:47:51 -07:00
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Eric Paris f125ad88ce Rename IsMountPoint to IsLikelyNotMountPoint
IsLikelyNotMountPoint determines if a directory is not a mountpoint.
It is fast but not necessarily ALWAYS correct. If the path is in fact
a bind mount from one part of a mount to another it will not be detected.
mkdir /tmp/a /tmp/b; mount --bin /tmp/a /tmp/b; IsLikelyNotMountPoint("/tmp/b")
will return true. When in fact /tmp/b is a mount point. So this patch
renames the function and switches it from a positive to a negative (I
could think of a good positive name). This should make future users of
this function aware that it isn't quite perfect, but probably good
enough.
2015-08-14 18:45:43 -04:00
Mike Danese 17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
markturansky fae6759490 IsReadOnly bool on builder 2015-07-29 14:35:37 -04:00
Paul Morie 20ba173913 Refactor secrets volume plugin to separate builder and cleaner types 2015-07-27 18:13:39 -04:00
Saad Ali c8d2026fa4 Merge pull request #8737 from pmorie/volume-doc
Add doc.go files for all volume plugins
2015-05-26 14:53:35 -07:00
Paul Morie feb0880b1e Add tests for secret volume plugin reboot/idempotency 2015-05-25 13:34:07 -04:00
Paul Morie 38c96725c0 Add doc.go files for all volume plugins 2015-05-23 16:59:12 -04:00
Tim Hockin fd22f48f5b rename StorageType StorageMedium 2015-05-18 17:21:30 -07:00
Paul Morie bea1c05057 Make secret volumes function correctly across reboot 2015-05-14 01:51:14 -04:00