Skip to content

Commit

Permalink
Merge pull request #1251 from razee-io/syssub
Browse files Browse the repository at this point in the history
get system subscription cronjob command from razeedeploy job
  • Loading branch information
kdai7 committed Nov 11, 2022
2 parents 7dc61e7 + 1c77a59 commit 25bd4a6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/routes/v1/systemSubscriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ const getOperatorsSubscription = async(req, res) => {
if (process.env.EXTERNAL_HOST) {
host = process.env.EXTERNAL_HOST;
}
let url = `${protocol}://${host}/api/install/razeedeploy-job?orgKey=${bestOrgKey(req.org).key}`;
let image = await axios.get(url);
image = yaml.loadAll(image.data);
image = image[4].spec.template.spec.containers[0].image;
const url = `${protocol}://${host}/api/install/razeedeploy-job?orgKey=${bestOrgKey(req.org).key}`;
let job = await axios.get(url);
job = yaml.loadAll(job.data);
const image = job[4].spec.template.spec.containers[0].image;
const command = job[4].spec.template.spec.containers[0].command[0];

let args = '';
if (RDD_STATIC_ARGS.length > 0) {
Expand Down Expand Up @@ -85,7 +86,7 @@ spec:
imagePullPolicy: Always
command:
[
"./bin/razeedeploy-delta",
"${ command }",
"update",
"--namespace=razeedeploy"
]
Expand Down

0 comments on commit 25bd4a6

Please sign in to comment.