-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
entries for staging and production #21
base: master
Are you sure you want to change the base?
Conversation
I developed the following:
Something else should be inspected? |
templates/deployment.yaml
Outdated
@@ -138,6 +138,42 @@ spec: | |||
readOnly: true | |||
{{- end }} | |||
|
|||
- name: {{ .Chart.Name }}-job-scanner-staging |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deployment and staging are two deployments of the chart, you do not need both inside the chart.
templates/deployment.yaml
Outdated
- | | ||
unset json | ||
|
||
dispatcher_state=$(<dispatcher-state.json) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why set this variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed indeed
templates/deployment.yaml
Outdated
|
||
- name: {{ .Chart.Name }}-job-scanner-production | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
command: ["oda_api"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better set the command to bash
and write bash script as the second arg
templates/deployment.yaml
Outdated
job_id=`echo "$i" | jq -r '.job_id'`; | ||
request_completed=`echo "$i" | jq '.job_status_data[].request_completed'`; | ||
if [[ $request_completed != *"true"* ]]; then | ||
uncompleted_job_ids+=($job_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and then what happens to uncompleted_job_ids
variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understood we wanted to potentially re-submit those uncompleted jobs...otherwise what do we do with them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so propose a command to resubmit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now it extracts, when possible, instrument product_query and job_id, and resubmit the same request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Few questions
command: ["bash"] | ||
args: | ||
- | | ||
oda-api -u DISPATCHER_URL inspect --group-by-job; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what would be good to add is some kind of failsafe, i.e. when this whole script fails the container should not crash.
Else it can not be deployed and it's annoying. And for an optional feature like this it should get deployed anyway.
No description provided.