Skip to content

Commit

Permalink
update fix-status
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratap2018 committed Dec 26, 2024
1 parent b947afe commit 73b57eb
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .deploy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ spec:
value: __AMQ_URL__
- name: TXN_PROCESSOR_DYNAMIC_TAG
value: __TXN_PROCESSOR_DYNAMIC_TAG__
- name: PREFIX
value: __PREFIX__
- name: DB_URL
value: __DB_URL__
- name: DB_CONFIG
value: __DB_CONFIG__
volumeMounts:
- name: credentials
readOnly: true
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,14 @@ jobs:
- name: "Replace vars"
run: find .deploy/deployment.yaml -type f -exec sed -i -e "s#__TXN_PROCESSOR_DYNAMIC_TAG__#${{ vars.TXN_PROCESSOR_DYNAMIC_TAG }}#" {} \;

- name: "Replace vars"
run: find .deploy/deployment.yaml -type f -exec sed -i -e "s#__PREFIX__#${{ vars.PREFIX }}#" {} \;

- name: "Replace vars"
run: find .deploy/deployment.yaml -type f -exec sed -i -e "s#__DB_URL__#${{ vars.DB_URL }}#" {} \;

- name: "Replace vars"
run: find .deploy/deployment.yaml -type f -exec sed -i -e "s#__DB_CONFIG__#${{ vars.DB_CONFIG }}#" {} \;

- name: "Deploy"
run: kubectl apply -f .deploy/deployment.yaml
8 changes: 8 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@





sudo docker run -d \
-p 5672:5672 \
-p 15672:15672 \
-e RABBITMQ_DEFAULT_USER=myuser \
-e RABBITMQ_DEFAULT_PASS=mypassword \
rabbitmq:management
25 changes: 21 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,24 @@ const deploy = async (name,
env: Object.entries(env).map(([key, value]) => ({
name: key,
value: value
}))
})),
volumeMounts: [
{
name: 'mongo',
mountPath: '/data'

}]
}
]

}],
volumes: [
{
name: 'mongo',
secret: {
secretName: 'mongo'
}
}
]
}
}

Expand Down Expand Up @@ -146,10 +161,12 @@ const queueName = process.env.GLOBAL_TXN_CONTROLLER_QUEUE || 'GLOBAL_TXN_CONTROL
console.log(message);
const msg = message.content.toString()
const parsedMessage = JSON.parse(msg)
queueMsg = parsedMessage
queueMsg = {
...parsedMessage,
DB_URL: process.env.DB_URL + '/' + process.env.PREFIX + parsedMessage.tenent + process.env.DB_CONFIG,
}

const podName = parsedMessage.podName + '-' + parsedMessage.granteeWalletAddress
console.log(podName);

// parse and create a pod to kubernetes

Expand Down

0 comments on commit 73b57eb

Please sign in to comment.