Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
VidyasagarMSC committed Jun 16, 2020
2 parents f31050c + 57c8606 commit 8e1aa35
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions backend/.env.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
COS_APIKEY=
COS_SECRET_APIKEY=
COS_ENDPOINT=s3.us-south.cloud-object-storage.appdomain.cloud
COS_RESOURCE_INSTANCE_ID=
COS_SECRET_RESOURCE_INSTANCE_ID=
COS_BUCKETNAME=
6 changes: 2 additions & 4 deletions backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ function getCosClient(){
endpoint:
process.env.COS_ENDPOINT ||
"s3.us-south.cloud-object-storage.appdomain.cloud",
apiKeyId: process.env.COS_APIKEY,
apiKeyId: process.env.COS_SECRET_APIKEY,
ibmAuthEndpoint: "https://iam.cloud.ibm.com/identity/token",
serviceInstanceId: process.env.COS_RESOURCE_INSTANCE_ID,
credentials: new myCOS.Credentials('c3d38fdb9e0948c6b9e3410a115e7a45', '56e147c24d6cc1d13afcba17a57418ab0bce52b4f3bb0ce6'),
signatureVersion: 'v4'
serviceInstanceId: process.env.COS_SECRET_RESOURCE_INSTANCE_ID,
};

var cosClient = new myCOS.S3(config);
Expand Down
2 changes: 1 addition & 1 deletion frontend/.env.template
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BACKEND_URL=http://localhost:3001/images
BACKEND_URL=http://localhost:3001
4 changes: 3 additions & 1 deletion jobs/analyze_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ spec:
image: ibmcom/backend-job
envFrom:
- secretRef:
name: cos-secret
name: cos-job-secret
- secretRef:
name: vr-secret
- configMapRef:
name: backend-configuration
resources:
requests:
memory: "128Mi"
Expand Down
4 changes: 2 additions & 2 deletions jobs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ var config = {
endpoint:
process.env.COS_ENDPOINT ||
"s3.us-south.cloud-object-storage.appdomain.cloud",
apiKeyId: process.env.COS_APIKEY,
apiKeyId: process.env.COS_JOB_SECRET_APIKEY,
ibmAuthEndpoint: "https://iam.cloud.ibm.com/identity/token",
serviceInstanceId: process.env.COS_RESOURCE_INSTANCE_ID,
serviceInstanceId: process.env.COS_JOB_SECRET_RESOURCE_INSTANCE_ID,
};

var cosClient = new myCOS.S3(config);
Expand Down

0 comments on commit 8e1aa35

Please sign in to comment.