external-storage | External storage plugins , provisioners , and helper libraries | Storage library
kandi X-RAY | external-storage Summary
kandi X-RAY | external-storage Summary
An external provisioner is a dynamic PV provisioner whose code lives out-of-tree/external to Kubernetes. Unlike in-tree dynamic provisioners that run as part of the Kubernetes controller manager, external ones can be deployed & updated independently. External provisioners work just like in-tree dynamic PV provisioners. A StorageClass object can specify an external provisioner instance to be its provisioner like it can in-tree provisioners. The instance will then watch for PersistentVolumeClaims that ask for the StorageClass and automatically create PersistentVolumes for them. For more information on how dynamic provisioning works, see the docs or this blog post.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of external-storage
external-storage Key Features
external-storage Examples and Code Snippets
Community Discussions
Trending Discussions on external-storage
QUESTION
I have implemented creating a folder and file in the device's external storage and writing data into that file using this thread.
Now I am trying to get the details of the file. For that, I have added a new function in the interface like below.
...ANSWER
Answered 2021-Mar-18 at 11:47As per the notes in question, I tried to fetch the file details using its path.
QUESTION
I have been getting a java.io.IOException: Not a directory
exception for the following code:
ANSWER
Answered 2021-Mar-03 at 01:32The line dir.mkdirs()
isn't creating a directory for you.
If it won't work- It will not throw exception but it will return false.
Try the following code:
QUESTION
I followed the example in the Ignite documentation for how to configure Ignite to act as a cache with a Postgres database.
I have been able to implement the person example and have had success configuring caches for other simple tables that map to simple POJOS. At this point I have 3 questions:
I have only been using an xml configuration on my server to define caches and their types. Is it possible to configure theses caches with annotations either partially or in whole? I have seen else where that caches and their types can be configured with annotations but I am not certain if annotations can be used to define the data source for my connection to postgres. If the data source cannot be configured via annotations is it possible to configure the data source in the xml? I know I can configure them in my java code but would prefer to either use annotations or the XML, however the XML seems very verbose.
I have some nested tables where each row corresponds to two or more objects, one with the others nested inside (single layer). Is there documentation of how to set up caches for these objects?
Its it possible to use other non built in objects as the cache key?
ANSWER
Answered 2021-Feb-20 at 05:16- It is not possible to configure cache via annotations probably because cache configurations are rich to describe it in such way. You could use Java configuration[1] or create a cache dynamically by calling Ignite#getOrCreateCache. Java and XML configurations are equal in terms of features. A data source could be configured via Java[3] as well via XML[2].
- In this case you could create your own CacheStore implementation to retrieve data from multiple tables.
- As keys you could you primitive types, POJOs, or binary objects.
[1] https://ignite.apache.org/docs/latest/configuring-caches/configuration-overview
[2] https://ignite.apache.org/docs/latest/persistence/external-storage#cachejdbcpojostore
QUESTION
I have an app that needs to create a file in an app-specific directory, but that file need to be public so it can be edited by another app, so I need a path like this "/storage/emulated/0/Android/data/com.my.app/files"
I already checked Xamarin Documentation and I found what I need. Based on that Documentation I can use this method Android.Content.Context.GetExternalFilesDir(string type)
.
But I get this error when I call that method.
An object reference is required for the non-static field, method, or property 'Context.GetExternalFilesDir(string)'
I also already check this forum but found no luck
Any ideas how to solve this issue ?
...ANSWER
Answered 2020-Nov-19 at 10:02To get privateExternalStorage you can use this
Android.App.Application.Context.GetExternalFilesDir(null).AbsolutePath;
QUESTION
I'm developing a SaaS solution on GCP, service mainly running GKE. Service will provide each user with a private space on disk (folder to keep their files and folder).
Technical requirements:
- Mount with ReadWriteMany to multiple pods
- The number of users: around a few hundred thousand.
- Each user's private storage size will be pretty small around a few hundred MB each up to a few GB max. But the number of files will be pretty huge, ~ few thousands to hundred thousand
- File access will be mostly small reads and writes.
- There will be symbolic links to a shared system folder, but no symbolic link between users' folders.
I currently implement an NFS solution based on this, which is a pain to manage and the project is no longer maintained. I have to manually increase the size of backing PVC and restart all the pods that the PV is mounted in case I need to expand the storage capacity.
Filestore seems to be a very good alternative, but the cost is a big problem as it only allows minimum 1TB storage to be provisioned.
I'm looking for a solution that is easy to manage, good-enough performance and cost-effective. Any recommendation is appreciated.
Thank you very much.
...ANSWER
Answered 2020-Aug-20 at 06:23You didn't specify what your end goal is but some alternatives:
- A set of more recent YAML files
- Rook (CSI)
- Ceph
- Glusterfs
- OpenEBS
- Kubernetes support for gce volume resizing.
Some of the solutions above will still involve restarting the pods.
✌️
QUESTION
In my app, I'm trying to make folders in the external storage directory, but I can't get it to work. My code looks like it should work properly (it waits for storage permissions before creating the directories). All the mkdirs()
lines run, but nothing happens - not even an error.
Here is my main code (which is run on a separate thread - I've tried running setupDir()
on the UI thread)
ANSWER
Answered 2020-Jul-28 at 17:32Acording to this,if you use target sdk 29, Without legacy storage, apps still can use getExternalFilesDir() and similar directories without permissions. However, the rest of external storage appears to be inaccessible via filesystem APIs. You can neither read nor write. This includes both files created by other apps and files put on the device by the user (e.g., via a USB cable).
QUESTION
My laptop configuration: Windows 10 Enterprise with Hyper-V (rather than Virtual box).
I was following some Kubernetes tutorial and while doing so my internet connection went down for some time. Later, I resumed the learning but I got the following error and was not able to proceed:
...ANSWER
Answered 2020-Jun-01 at 11:50I did run the below command and it is working fine until now.
QUESTION
Thanks in advance to all those who help.
Hello, I have somewhat of a unique problem, its rather lengthy to explain but I think if solved we can expand the use-cases of Kubernetes. I think I know how to solve it, but I'm not sure if Kubernetes Stateful Sets supports the solution. Let me elaborate the domain of the problem, the problem itself, and then some of my sample solutions and maybe someone can help fill the gaps.
The Domain Space:
- I have a set of Accounts (external to kubernetes) {Account_A, Account_B, Account_C, etc.}
- Accounts can be active or inactive at anytime (Important: in NO PARTICULAR ORDER).
- If activated, a pod is deployed which serves that account, and keeps a persistent volume with all of that accounts work-space/data. That account is interacted with by its unique pod identifier, and IP.
- If deactivated, the pod is removed but the data persists so that the next time it is activated, it will be bound to the same persistent-volume-claim and therefore have access to its previous data.
- If reactivated, a pod is redeployed that uses the previous persistent-volume-claim to resume working on the data from previous sessions
Obviously, looking at the available Kubernetes tools/objects, a stateful-set with headless-service is the ideal way of approaching this. It supports unique pods, which are assigned unique IPs, and supports persistent volumes. It also supports dynamically provisioning persistent-volumes through
The Problem:
As mentioned in the domain, accounts can be active in any order, but stateful-set pods are ordinal, meaning pod_1 has to be active for pod_2 to be active for pod_3 to be active, etc. We can't have pod_1 active and pod_3 active while pod_2 is inactive. This means if I enable Account_A, then Account_C, a pod named pod_1 will be created, and then a pod named pod_2 will be created.
Now you might say that this isn't a problem. We just keep a map that maps each account to the relative pod_number. For example, Account_A -> pod_1 and Account_C -> pod_2
Why is this a problem? Because when specifying a volumeClaimTemplate in the stateful-set, persistent-volume-claims use the pod's name as their identifier when being created. Which means that only the pod with the same name can access the same data. The data(volumes) is bound based on a pod's name, rather than the account. This creates a disconnect between accounts and their persistent volumes. Any pod with name pod_2 will always have the same data that pod_2 has always had, regardless of which account was "mapped" to pod_2.
Let me further illustrate this with an example:
...ANSWER
Answered 2020-Feb-22 at 05:36It seems to me that you're convinced that StatefulSets
is a step in the right direction but that's not entirely true.
StatefulSets
have ordinality due to two reasons:
- Creating ordered
PersistentVolumeClaims
- Being able to create FQDN endpoints for individual pods (using a headless service)
In your case, neither seems to be true. You just need stable storage per account. While you think that #4 from your potential solutions is most unideal, it is the most "Kubernetes native" way to do it.
SolutionYou need to write a component that manages a StatefulSet or even a Deployment per account. I say deployment because you don't need stable network identifiers for each pod. A ClusterIP
service per account will be adequate for communication.
In the Kubernetes world, these components are called controllers (without custom objects) and operators (with custom objects/manages applications).
You can start by looking into operator-sdk and controller-runtime. Operator SDK aggregates commonly used functionalities on top of controller-runtime
as a framework. It also makes developers' life easier by incorporating kubebuilder which is used to generate CRD and K8S API code for custom objects. All you need to define is struct
s for your custom object and a controller.
Take a look at Operator SDK, you'll find that creating and managing custom objects is not that hard.
Custom object based flow for your problemThis is how I imagine the flow of your operator from what I understood in your write up.
- One
Account
object maps to one account. Each object has unique metadata that maps it to its account. It should also have anactive: boolean
in its spec. - Watch for custom
Account
objects Whenever you need to create a new account, use Kubernetes APIs to create a new
Account
object (will trigger an Add event in the controller) and then your controller should- Create/Update a
PersistentVolumeClaim
for the account - Create/Update the
Deployment
with the volume from createdPVC
specified in the Pod template - Catch: Add events are also received for old objects when controller restarts. So the action taken should be "Create or Update".
- Create/Update a
Set the
active
field in your custom object tofalse
for deactivating the account (a Modify event in the controller) and then your controller should- Delete the deployment without touching the volume at all.
- Set the
active
field totrue
for reactivating the account. (modify event again)- Recreate the deployment with the same volume specified in the Pod template
- Delete the
Account
object to clean up underlying resources.
While all of this might not make perfect sense right away, I would still suggest you to go through operator-sdk's docs and examples. IMO, that would be a leap in the right direction.
Cheers!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install external-storage
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page