avaloqcloud / terraform-oci-container-instance

Terraform Module for creating an Oracle Cloud Infrastructure Container Instance resource in Compute service
Apache License 2.0
1 stars 4 forks source link

Support for persistent volumes in OCI container instances (upstream) #3

Open josip-stanic opened 1 year ago

josip-stanic commented 1 year ago

This issue is for tracking purposes of missing capabilities upstream in OCI.

At the moment the container service from OCI does not support persisting data across executions of Container instances.

The terraform provider for OCI in https://github.com/oracle/terraform-provider-oci/blob/e812a7f05ea9e5f1c9a513feec586a1539816671/internal/service/container_instances/container_instances_container_instance_resource.go#L704 supports a backing_store parameter which through various imports ENUM's from https://github.com/oracle/oci-go-sdk/blob/fed3620bcb71517b9cecdaed15cd7535bb2aad10/containerinstances/container_empty_dir_volume.go#L68 (in case volume_type equals EMPTYDIR) supports either ephemeral_storage or memory.

We'd like to see support to persist data in some form.

jensbin commented 1 year ago

Container instances have limitation e.g.: persistent storage volume not available (file based or block storage is on the feature roadmap)

https://www.oracle.com/cloud/cloud-native/container-instances/faq/

What are the available storage options for Container Instances? Each container instance gets 15 GB of ephemeral storage by default. It’s used for a variety of purposes, such as storing container images and backing each container's root overlay file system. If the size of any of the container images per container instance exceeds 7.5 GB, the container instance creation may fail. It’s recommended you use external databases to store application data that needs to persist independent of the container instance lifecycle. Options to attach persistent volumes with OCI Block Storage and OCI File Storage will be provided in the future.