From ef1db5413fbb32978ff8c5f0519503d492f1751c Mon Sep 17 00:00:00 2001 From: Aaron Tam Date: Fri, 21 Oct 2022 03:57:01 -0700 Subject: [PATCH] Update storage.md with Oracle Cloud Infrastructure provider (#5778) Signed-off-by: aaron.tam Signed-off-by: aaron.tam --- docs/storage.md | 85 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 76 insertions(+), 9 deletions(-) diff --git a/docs/storage.md b/docs/storage.md index 27094455be..301f538814 100644 --- a/docs/storage.md +++ b/docs/storage.md @@ -37,15 +37,16 @@ In Kubernetes it is as easy as (on Thanos sidecar example): Current object storage client implementations: -| Provider | Maturity | Aimed For | Auto-tested on CI | Maintainers | -|----------------------------------------------------------------------------------------|--------------------|-----------------------|-------------------|-------------------------| -| [Google Cloud Storage](#gcs) | Stable | Production Usage | yes | @bwplotka | -| [AWS/S3](#s3) (and all S3-compatible storages e.g disk-based [Minio](https://min.io/)) | Stable | Production Usage | yes | @bwplotka | -| [Azure Storage Account](#azure) | Stable | Production Usage | no | @vglafirov | -| [OpenStack Swift](#openstack-swift) | Beta (working PoC) | Production Usage | yes | @FUSAKLA | -| [Tencent COS](#tencent-cos) | Beta | Production Usage | no | @jojohappy,@hanjm | -| [AliYun OSS](#aliyun-oss) | Beta | Production Usage | no | @shaulboozhiao,@wujinhu | -| [Local Filesystem](#filesystem) | Stable | Testing and Demo only | yes | @bwplotka | +| Provider | Maturity | Aimed For | Auto-tested on CI | Maintainers | +|-------------------------------------------------------------------------------------------|--------------------|-----------------------|-------------------|----------------------------------| +| [Google Cloud Storage](#gcs) | Stable | Production Usage | yes | @bwplotka | +| [AWS/S3](#s3) (and all S3-compatible storages e.g disk-based [Minio](https://min.io/)) | Stable | Production Usage | yes | @bwplotka | +| [Azure Storage Account](#azure) | Stable | Production Usage | no | @vglafirov | +| [OpenStack Swift](#openstack-swift) | Beta (working PoC) | Production Usage | yes | @FUSAKLA | +| [Tencent COS](#tencent-cos) | Beta | Production Usage | no | @jojohappy,@hanjm | +| [AliYun OSS](#aliyun-oss) | Beta | Production Usage | no | @shaulboozhiao,@wujinhu | +| [Local Filesystem](#filesystem) | Stable | Testing and Demo only | yes | @bwplotka | +| [Oracle Cloud Infrastructure Object Storage](#oracle-cloud-infrastructure-object-storage) | Beta | Production Usage | yes | @aarontams,@gaurav-05,@ericrrath | **Missing support to some object storage?** Check out [how to add your client section](#how-to-add-a-new-client-to-thanos) @@ -512,6 +513,72 @@ config: prefix: "" ``` +### Oracle Cloud Infrastructure Object Storage + +To configure Oracle Cloud Infrastructure (OCI) Object Storage as Thanos Object Store, you need to provide appropriate authentication credentials to your OCI tenancy. The OCI object storage client implementation for Thanos supports either the default keypair or instance principal authentication. + +#### API Signing Key + +The default API signing key authentication provider leverages same [configuration as the OCI CLI](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cliconcepts.htm) which is usually stored in at `$HOME/.oci/config` or via variable names starting with the string `OCI_CLI`. If the same configuration is found in multiple places the provider will prefer the first one. + +The following example configures the provider to look for an existing API signing key for authentication: + +```yaml +type: OCI +config: + provider: "default" + bucket: "" + compartment_ocid: "" + part_size: "" // Optional part size to override the OCI default of 128 MiB, value is in bytes. + max_request_retries: "" // Optional maximum number of retries for a request. + request_retry_interval: "" // Optional sleep duration in seconds between retry requests. + http_config: + idle_conn_timeout: 1m30s // Optional maximum amount of time an idle (keep-alive) connection will remain idle before closing itself. Zero means no limit. + response_header_timeout: 2m // Optional amount of time to wait for a server's response headers after fully writing the request. + tls_handshake_timeout: 10s // Optional maximum amount of time waiting to wait for a TLS handshake. Zero means no timeout. + expect_continue_timeout: 1s // Optional amount of time to wait for a server's first response headers. Zero means no timeout and causes the body to be sent immediately. + insecure_skip_verify: false // Optional. If true, crypto/tls accepts any certificate presented by the server and any host name in that certificate. + max_idle_conns: 100 // Optional maximum number of idle (keep-alive) connections across all hosts. Zero means no limit. + max_idle_conns_per_host: 100 // Optional maximum idle (keep-alive) connections to keep per-host. If zero, DefaultMaxIdleConnsPerHost=2 is used. + max_conns_per_host: 0 // Optional maximum total number of connections per host. + disable_compression: false // Optional. If true, prevents the Transport from requesting compression. + client_timeout: 90s // Optional time limit for requests made by the HTTP Client. +``` + +#### Instance Principal Provider + +For Example: + +```yaml +type: OCI +config: + provider: "instance-principal" + bucket: "" + compartment_ocid: "" +``` + +You can also include any of the optional configuration just like the example in `Default Provider`. + +#### Raw Provider + +For Example: + +```yaml +type: OCI +config: + provider: "raw" + bucket: "" + compartment_ocid: "" + tenancy_ocid: "" + user_ocid: "" + region: "" + fingerprint: "" + privatekey: "" + passphrase: "" // Optional passphrase to encrypt the private API Signing key +``` + +You can also include any of the optional configuration just like the example in `Default Provider`. + ### How to add a new client to Thanos? objstore.go