Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add environment variables for dynamic object storage #195

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions storage/aws/elasticache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Amazon ElastiCache is a fully managed, Redis- and Memcached-compatible service d

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_adapter_absolute_path"></a> [adapter\_absolute\_path](#input\_adapter\_absolute\_path) | The adapter's absolute path | `string` | `"/adapters/object/redis/ArmoniK.Core.Adapters.Redis.dll"` | no |
| <a name="input_adapter_class_name"></a> [adapter\_class\_name](#input\_adapter\_class\_name) | Name of the adapter's class | `string` | `"ArmoniK.Core.Adapters.Redis.ObjectBuilder"` | no |
| <a name="input_apply_immediately"></a> [apply\_immediately](#input\_apply\_immediately) | Specifies whether any modifications are applied immediately, or during the next maintenance window | `bool` | `false` | no |
| <a name="input_automatic_failover_enabled"></a> [automatic\_failover\_enabled](#input\_automatic\_failover\_enabled) | Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails | `bool` | `false` | no |
| <a name="input_client_name"></a> [client\_name](#input\_client\_name) | Name of the redis client | `string` | `"ArmoniK.Core"` | no |
Expand Down
14 changes: 8 additions & 6 deletions storage/aws/elasticache/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ output "kms_key_id" {
output "env" {
description = "Elements to be set as environment variables"
value = ({
"Components__ObjectStorage" = var.object_storage_adapter
"Redis__EndpointUrl" = "${aws_elasticache_replication_group.elasticache.primary_endpoint_address}:${aws_elasticache_replication_group.elasticache.port}"
"Redis__Ssl" = var.ssl_option
"Redis__ClientName" = var.client_name
"Redis__CaPath" = ""
"Redis__InstanceName" = var.instance_name
"Components__ObjectStorage" = var.object_storage_adapter
"Components__ObjectStorageAdaptorSettings__ClassName" = var.adapter_class_name
"Components__ObjectStorageAdaptorSettings__AdapterAbsolutePath" = var.adapter_absolute_path
"Redis__EndpointUrl" = "${aws_elasticache_replication_group.elasticache.primary_endpoint_address}:${aws_elasticache_replication_group.elasticache.port}"
"Redis__Ssl" = var.ssl_option
"Redis__ClientName" = var.client_name
"Redis__CaPath" = ""
"Redis__InstanceName" = var.instance_name
})
}
12 changes: 12 additions & 0 deletions storage/aws/elasticache/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,15 @@ variable "ssl_option" {
type = string
default = "true"
}

variable "adapter_class_name" {
description = "Name of the adapter's class"
type = string
default = "ArmoniK.Core.Adapters.Redis.ObjectBuilder"
}

variable "adapter_absolute_path" {
description = "The adapter's absolute path"
type = string
default = "/adapters/object/redis/ArmoniK.Core.Adapters.Redis.dll"
}
2 changes: 1 addition & 1 deletion storage/aws/mq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_adapter_absolute_path"></a> [adapter\_absolute\_path](#input\_adapter\_absolute\_path) | The adapter's absolut path | `string` | `"/adapters/queue/amqp/ArmoniK.Core.Adapters.Amqp.dll"` | no |
| <a name="input_adapter_absolute_path"></a> [adapter\_absolute\_path](#input\_adapter\_absolute\_path) | The adapter's absolute path | `string` | `"/adapters/queue/amqp/ArmoniK.Core.Adapters.Amqp.dll"` | no |
| <a name="input_adapter_class_name"></a> [adapter\_class\_name](#input\_adapter\_class\_name) | Name of the adapter's class | `string` | `"ArmoniK.Core.Adapters.Amqp.QueueBuilder"` | no |
| <a name="input_apply_immediately"></a> [apply\_immediately](#input\_apply\_immediately) | Specifies whether any broker modifications are applied immediately, or during the next maintenance window | `bool` | `false` | no |
| <a name="input_authentication_strategy"></a> [authentication\_strategy](#input\_authentication\_strategy) | AWS MQ authentication strategy | `string` | `"simple"` | no |
Expand Down
2 changes: 1 addition & 1 deletion storage/aws/mq/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ variable "adapter_class_name" {
}

variable "adapter_absolute_path" {
description = "The adapter's absolut path"
description = "The adapter's absolute path"
type = string
default = "/adapters/queue/amqp/ArmoniK.Core.Adapters.Amqp.dll"
}
Expand Down
2 changes: 2 additions & 0 deletions storage/aws/s3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_adapter_absolute_path"></a> [adapter\_absolute\_path](#input\_adapter\_absolute\_path) | The adapter's absolute path | `string` | `"/adapters/object/s3/ArmoniK.Core.Adapters.S3.dll"` | no |
| <a name="input_adapter_class_name"></a> [adapter\_class\_name](#input\_adapter\_class\_name) | Name of the adapter's class | `string` | `"ArmoniK.Core.Adapters.S3.ObjectBuilder"` | no |
| <a name="input_attach_deny_insecure_transport_policy"></a> [attach\_deny\_insecure\_transport\_policy](#input\_attach\_deny\_insecure\_transport\_policy) | Controls if S3 bucket should have deny non-SSL transport policy attached | `bool` | `true` | no |
| <a name="input_attach_policy"></a> [attach\_policy](#input\_attach\_policy) | Controls if S3 bucket should have bucket policy attached (set to `true` to use value of `policy` as bucket policy) | `bool` | `false` | no |
| <a name="input_attach_public_policy"></a> [attach\_public\_policy](#input\_attach\_public\_policy) | Controls if a user defined public bucket policy will be attached (set to `false` to allow upstream to apply defaults to the bucket) | `bool` | `false` | no |
Expand Down
14 changes: 8 additions & 6 deletions storage/aws/s3/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ output "arn" {
output "env" {
description = "Elements to be set as environment variables"
value = ({
"Components__ObjectStorage" = var.object_storage_adapter
"S3__BucketName" = aws_s3_bucket.s3_bucket.bucket
"S3__UseChecksum" = true
"S3__MustForcePathStyle" = true
"S3__UseChunkEncoding" = true
"S3__EndpointUrl" = "https://s3.${aws_s3_bucket.s3_bucket.region}.amazonaws.com"
"Components__ObjectStorage" = var.object_storage_adapter
"Components__ObjectStorageAdaptorSettings__ClassName" = var.adapter_class_name
"Components__ObjectStorageAdaptorSettings__AdapterAbsolutePath" = var.adapter_absolute_path
"S3__BucketName" = aws_s3_bucket.s3_bucket.bucket
"S3__UseChecksum" = true
"S3__MustForcePathStyle" = true
"S3__UseChunkEncoding" = true
"S3__EndpointUrl" = "https://s3.${aws_s3_bucket.s3_bucket.region}.amazonaws.com"
})
}
12 changes: 12 additions & 0 deletions storage/aws/s3/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,15 @@ variable "object_storage_adapter" {
type = string
default = "ArmoniK.Adapters.S3.ObjectStorage"
}

variable "adapter_class_name" {
description = "Name of the adapter's class"
type = string
default = "ArmoniK.Core.Adapters.S3.ObjectBuilder"
}

variable "adapter_absolute_path" {
description = "The adapter's absolute path"
type = string
default = "/adapters/object/s3/ArmoniK.Core.Adapters.S3.dll"
}
2 changes: 2 additions & 0 deletions storage/gcp/gcs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_adapter_absolute_path"></a> [adapter\_absolute\_path](#input\_adapter\_absolute\_path) | The adapter's absolute path | `string` | `"/adapters/object/s3/ArmoniK.Core.Adapters.S3.dll"` | no |
| <a name="input_adapter_class_name"></a> [adapter\_class\_name](#input\_adapter\_class\_name) | Name of the adapter's class | `string` | `"ArmoniK.Core.Adapters.S3.ObjectBuilder"` | no |
| <a name="input_autoclass"></a> [autoclass](#input\_autoclass) | The bucket's Autoclass configuration. | `bool` | `null` | no |
| <a name="input_cors"></a> [cors](#input\_cors) | The bucket's Cross-Origin Resource Sharing (CORS) configuration. | <pre>object({<br> origin = list(string)<br> method = list(string)<br> response_header = list(string)<br> max_age_seconds = number<br> })</pre> | `null` | no |
| <a name="input_data_locations"></a> [data\_locations](#input\_data\_locations) | The bucket's custom location configuration, which specifies the individual regions that comprise a dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty. | `list(string)` | `null` | no |
Expand Down
14 changes: 8 additions & 6 deletions storage/gcp/gcs/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ output "iam_members" {
output "env" {
description = "Elements to be set as environment variables"
value = ({
"Components__ObjectStorage" = var.object_storage_adapter
"S3__BucketName" = google_storage_bucket.gcs.name
"S3__UseChecksum" = false
"S3__MustForcePathStyle" = false
"S3__UseChunkEncoding" = false
"S3__EndpointUrl" = "https://storage.googleapis.com"
"Components__ObjectStorage" = var.object_storage_adapter
"Components__ObjectStorageAdaptorSettings__ClassName" = var.adapter_class_name
"Components__ObjectStorageAdaptorSettings__AdapterAbsolutePath" = var.adapter_absolute_path
"S3__BucketName" = google_storage_bucket.gcs.name
"S3__UseChecksum" = false
"S3__MustForcePathStyle" = false
"S3__UseChunkEncoding" = false
"S3__EndpointUrl" = "https://storage.googleapis.com"
})
}

Expand Down
12 changes: 12 additions & 0 deletions storage/gcp/gcs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,15 @@ variable "password" {
type = string
default = ""
}

variable "adapter_class_name" {
description = "Name of the adapter's class"
type = string
default = "ArmoniK.Core.Adapters.S3.ObjectBuilder"
}

variable "adapter_absolute_path" {
description = "The adapter's absolute path"
type = string
default = "/adapters/object/s3/ArmoniK.Core.Adapters.S3.dll"
}
2 changes: 2 additions & 0 deletions storage/gcp/memorystore/redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_adapter_absolute_path"></a> [adapter\_absolute\_path](#input\_adapter\_absolute\_path) | The adapter's absolute path | `string` | `"/adapters/object/redis/ArmoniK.Core.Adapters.Redis.dll"` | no |
| <a name="input_adapter_class_name"></a> [adapter\_class\_name](#input\_adapter\_class\_name) | Name of the adapter's class | `string` | `"ArmoniK.Core.Adapters.Redis.ObjectBuilder"` | no |
| <a name="input_auth_enabled"></a> [auth\_enabled](#input\_auth\_enabled) | Indicates whether OSS Redis AUTH is enabled for the instance. If set to true AUTH is enabled on the instance. | `bool` | `false` | no |
| <a name="input_authorized_network"></a> [authorized\_network](#input\_authorized\_network) | The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. | `string` | `null` | no |
| <a name="input_client_name"></a> [client\_name](#input\_client\_name) | Name of the redis client | `string` | `"ArmoniK.Core"` | no |
Expand Down
12 changes: 7 additions & 5 deletions storage/gcp/memorystore/redis/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ output "region" {
output "env" {
description = "Elements to be set as environment variables"
value = ({
"Components__ObjectStorage" = var.object_storage_adapter
"Redis__EndpointUrl" = "${google_redis_instance.cache.read_endpoint}:${google_redis_instance.cache.read_endpoint_port}"
"Redis__Ssl" = var.ssl_option
"Redis__ClientName" = var.client_name
"Redis__InstanceName" = var.instance_name
"Components__ObjectStorage" = var.object_storage_adapter
"Components__ObjectStorageAdaptorSettings__ClassName" = var.adapter_class_name
"Components__ObjectStorageAdaptorSettings__AdapterAbsolutePath" = var.adapter_absolute_path
"Redis__EndpointUrl" = "${google_redis_instance.cache.read_endpoint}:${google_redis_instance.cache.read_endpoint_port}"
"Redis__Ssl" = var.ssl_option
"Redis__ClientName" = var.client_name
"Redis__InstanceName" = var.instance_name
})
}

Expand Down
12 changes: 12 additions & 0 deletions storage/gcp/memorystore/redis/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,15 @@ variable "namespace" {
type = string
default = "armonik"
}

variable "adapter_class_name" {
description = "Name of the adapter's class"
type = string
default = "ArmoniK.Core.Adapters.Redis.ObjectBuilder"
}

variable "adapter_absolute_path" {
description = "The adapter's absolute path"
type = string
default = "/adapters/object/redis/ArmoniK.Core.Adapters.Redis.dll"
}
2 changes: 2 additions & 0 deletions storage/onpremise/minio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_adapter_absolute_path"></a> [adapter\_absolute\_path](#input\_adapter\_absolute\_path) | The adapter's absolute path | `string` | `"/adapters/object/s3/ArmoniK.Core.Adapters.S3.dll"` | no |
| <a name="input_adapter_class_name"></a> [adapter\_class\_name](#input\_adapter\_class\_name) | Name of the adapter's class | `string` | `"ArmoniK.Core.Adapters.S3.ObjectBuilder"` | no |
| <a name="input_minio"></a> [minio](#input\_minio) | Parameters of S3 payload storage | <pre>object({<br> image = string<br> tag = string<br> image_pull_secrets = string<br> host = string<br> bucket_name = string<br> node_selector = any<br> })</pre> | n/a | yes |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace of ArmoniK storage resources | `string` | n/a | yes |
| <a name="input_object_storage_adapter"></a> [object\_storage\_adapter](#input\_object\_storage\_adapter) | Name of the ArmoniK adapter to use for the storage | `string` | `"ArmoniK.Adapters.S3.ObjectStorage"` | no |
Expand Down
14 changes: 8 additions & 6 deletions storage/onpremise/minio/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ output "must_force_path_style" {
output "env" {
description = "Elements to be set as environment variables"
value = ({
"Components__ObjectStorage" = var.object_storage_adapter
"S3__BucketName" = var.minio.bucket_name
"S3__UseChecksum" = true
"S3__MustForcePathStyle" = true
"S3__UseChunkEncoding" = true
"S3__EndpointUrl" = "http://${var.minio.host}:${local.port}"
"Components__ObjectStorage" = var.object_storage_adapter
"Components__ObjectStorageAdaptorSettings__ClassName" = var.adapter_class_name
"Components__ObjectStorageAdaptorSettings__AdapterAbsolutePath" = var.adapter_absolute_path
"S3__BucketName" = var.minio.bucket_name
"S3__UseChecksum" = true
"S3__MustForcePathStyle" = true
"S3__UseChunkEncoding" = true
"S3__EndpointUrl" = "http://${var.minio.host}:${local.port}"
})
}

Expand Down
12 changes: 12 additions & 0 deletions storage/onpremise/minio/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,15 @@ variable "object_storage_adapter" {
type = string
default = "ArmoniK.Adapters.S3.ObjectStorage"
}

variable "adapter_class_name" {
description = "Name of the adapter's class"
type = string
default = "ArmoniK.Core.Adapters.S3.ObjectBuilder"
}

variable "adapter_absolute_path" {
description = "The adapter's absolute path"
type = string
default = "/adapters/object/s3/ArmoniK.Core.Adapters.S3.dll"
}
2 changes: 2 additions & 0 deletions storage/onpremise/nfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_adapter_absolute_path"></a> [adapter\_absolute\_path](#input\_adapter\_absolute\_path) | The adapter's absolute path | `string` | `"/adapters/object/local_storage/ArmoniK.Core.Adapters.LocalStorage.dll"` | no |
| <a name="input_adapter_class_name"></a> [adapter\_class\_name](#input\_adapter\_class\_name) | Name of the adapter's class | `string` | `"ArmoniK.Core.Adapters.LocalStorage.ObjectBuilder"` | no |
| <a name="input_image"></a> [image](#input\_image) | image for the external client provisioner | `string` | `"k8s.gcr.io/sig-storage/nfs-subdir-external-provisioner"` | no |
| <a name="input_image_policy"></a> [image\_policy](#input\_image\_policy) | policy for getting the image | `string` | `"IfNotPresent"` | no |
| <a name="input_image_pull_secrets"></a> [image\_pull\_secrets](#input\_image\_pull\_secrets) | pull secrets if needed | `string` | `""` | no |
Expand Down
6 changes: 4 additions & 2 deletions storage/onpremise/nfs/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ output "pvc_name" {
output "env" {
description = "Elements to be set as environment variables"
value = ({
"Components__ObjectStorage" = var.object_storage_adapter
"LocalStorage__Path" = var.mount_path
"Components__ObjectStorage" = var.object_storage_adapter
"Components__ObjectStorageAdaptorSettings__ClassName" = var.adapter_class_name
"Components__ObjectStorageAdaptorSettings__AdapterAbsolutePath" = var.adapter_absolute_path
"LocalStorage__Path" = var.mount_path
})
}

Expand Down
12 changes: 12 additions & 0 deletions storage/onpremise/nfs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,15 @@ variable "mount_path" {
type = string
default = "/local_storage"
}

variable "adapter_class_name" {
description = "Name of the adapter's class"
type = string
default = "ArmoniK.Core.Adapters.LocalStorage.ObjectBuilder"
}

variable "adapter_absolute_path" {
description = "The adapter's absolute path"
type = string
default = "/adapters/object/local_storage/ArmoniK.Core.Adapters.LocalStorage.dll"
}
2 changes: 2 additions & 0 deletions storage/onpremise/redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_adapter_absolute_path"></a> [adapter\_absolute\_path](#input\_adapter\_absolute\_path) | The adapter's absolute path | `string` | `"/adapters/object/redis/ArmoniK.Core.Adapters.Redis.dll"` | no |
| <a name="input_adapter_class_name"></a> [adapter\_class\_name](#input\_adapter\_class\_name) | Name of the adapter's class | `string` | `"ArmoniK.Core.Adapters.Redis.ObjectBuilder"` | no |
| <a name="input_client_name"></a> [client\_name](#input\_client\_name) | Name of the redis client | `string` | `"ArmoniK.Core"` | no |
| <a name="input_instance_name"></a> [instance\_name](#input\_instance\_name) | Name of the instance | `string` | `"ArmoniKRedis"` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace of ArmoniK storage resources | `string` | n/a | yes |
Expand Down
14 changes: 8 additions & 6 deletions storage/onpremise/redis/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ output "endpoints" {
output "env" {
description = "Elements to be set as environment variables"
value = ({
"Components__ObjectStorage" = var.object_storage_adapter
"Redis__EndpointUrl" = local.redis_url
"Redis__Ssl" = var.ssl_option
"Redis__ClientName" = var.client_name
"Redis__CaPath" = "${var.path}/chain.pem"
"Redis__InstanceName" = var.instance_name
"Components__ObjectStorage" = var.object_storage_adapter
"Components__ObjectStorageAdaptorSettings__ClassName" = var.adapter_class_name
"Components__ObjectStorageAdaptorSettings__AdapterAbsolutePath" = var.adapter_absolute_path
"Redis__EndpointUrl" = local.redis_url
"Redis__Ssl" = var.ssl_option
"Redis__ClientName" = var.client_name
"Redis__CaPath" = "${var.path}/chain.pem"
"Redis__InstanceName" = var.instance_name
})
}

Expand Down
Loading
Loading