From 7018e193a2cdb0637afa28984e101f4e0ebb41a6 Mon Sep 17 00:00:00 2001 From: Deepak Kumar Behera Date: Mon, 13 Nov 2023 17:11:42 +0530 Subject: [PATCH] Feature Minio S3 Enhancement #122 Pr --- mxd/README.md | 5 ++--- mxd/minio.tf | 28 ++-------------------------- 2 files changed, 4 insertions(+), 29 deletions(-) diff --git a/mxd/README.md b/mxd/README.md index 4341eeb7..ae900e44 100644 --- a/mxd/README.md +++ b/mxd/README.md @@ -1010,7 +1010,6 @@ curl --location 'http://localhost/alice/management/v2/assets' \ "@type": "DataAddress", "secretAccessKey": "qwerty123", "accessKeyId": "qwerty123", - "endpointOverride": "http://10.96.103.86:9000", "type": "AmazonS3", "blobname": "document.txt", "region":"us-east-1", @@ -1064,7 +1063,7 @@ curl --location 'http://localhost/alice/management/v2/contractdefinitions' \ --header 'X-Api-Key: password' \ --data-raw '{ "@context": {}, - "@id": "2", + "@id": "3", "@type": "ContractDefinition", "accessPolicyId": "2", "contractPolicyId": "2", @@ -1092,7 +1091,7 @@ curl --location 'http://localhost/bob/management/v2/contractnegotiations' \ "connectorAddress": "http://alice-controlplane:8084/api/v1/dsp", "protocol": "dataspace-protocol-http", "connectorId": "BPNL000000000001", - "callbackAddresses": null, + "callbackAddresses": null, "providerId": "BPNL000000000001", "offer": { "offerId": "Mw==:Mw==:Y2JmOWY4MTMtYjU2ZC00NThhLTg1NTQtMTY1NGMyOGQ3ZGQ3", diff --git a/mxd/minio.tf b/mxd/minio.tf index 60d38f6a..997cf69e 100644 --- a/mxd/minio.tf +++ b/mxd/minio.tf @@ -154,38 +154,14 @@ resource "kubernetes_job" "create_minio_bucket" { name = "minio-client" image = "minio/mc:latest" # Use the appropriate MinIO client image command = ["/bin/sh", "-c"] - args = ["mc config host add minio http://${local.minio-url} ${local.minio-username} ${local.minio-password} && mc mb minio/alice-bucket"] + args = ["mc config host add minio http://${local.minio-url} ${local.minio-username} ${local.minio-password} && mc mb minio/alice-bucket && mc mb minio/bob-bucket"] } } } } } -resource "kubernetes_job" "create_bob_minio_bucket" { - depends_on = [kubernetes_deployment.minio, kubernetes_service.minio-service] - metadata { - name = "create-bob-minio-bucket" - namespace = kubernetes_namespace.minio.metadata[0].name - } - spec { - ttl_seconds_after_finished = "90" - completions = 1 - completion_mode = "NonIndexed" - template { - metadata { - name = "create-bob-minio-bucket" - } - spec { - container { - name = "minio-client" - image = "minio/mc:latest" # Use the appropriate MinIO client image - command = ["/bin/sh", "-c"] - args = ["mc config host add minio http://${local.minio-url} ${local.minio-username} ${local.minio-password} && mc mb minio/bob-bucket"] - } - } - } - } -} + resource "kubernetes_job" "put-text-document" { depends_on = [kubernetes_deployment.minio, kubernetes_service.minio-service,