Skip to content

Commit

Permalink
Feature Minio S3 Enhancement #122 Pr
Browse files Browse the repository at this point in the history
  • Loading branch information
SantoshDeepak1 committed Nov 13, 2023
1 parent b02894f commit 7018e19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 deletions.
5 changes: 2 additions & 3 deletions mxd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
28 changes: 2 additions & 26 deletions mxd/minio.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7018e19

Please sign in to comment.