Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/thub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.7.2
version: 1.7.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand All @@ -23,7 +23,7 @@ dependencies:
- name: keycloak-config
version: 0.1.1
- name: lms-data-service
version: 1.5.0
version: 1.5.1
- name: ojt
version: 1.4.13
- name: user-service
Expand Down
2 changes: 1 addition & 1 deletion charts/thub/charts/lms-data-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.5.0
version: 1.5.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
74 changes: 74 additions & 0 deletions charts/thub/charts/lms-data-service/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,17 @@ Create the name of the CronJob assigned-items-scheduler-job
{{ include "lms-data-service.name" . }}-assigned-items-scheduler-job
{{- end }}

{{/*
Create the name of the JSON file used by the assigned-items-scheduler-job
*/}}
{{- define "lms-data-service.assignedItemsSchedulerJobInputFile" -}}
{{- if .Values.assignedItemsSchedulerJob.jsonInputFile -}}
{{ print .Values.assignedItemsSchedulerJob.jsonInputFile }}
{{- else -}}
{{ print "./temp/start-assigned-items-job.json" }}
{{- end }}
{{- end }}

{{/*
Create the name of the CronJob lms-end-incomplete-jobs-scheduler-job
*/}}
Expand All @@ -124,23 +135,86 @@ Create the name of the CronJob instructors-scheduler-job
{{ include "lms-data-service.name" . }}-instructors-scheduler-job
{{- end }}

{{/*
Create the name of the JSON file used by the instructors-scheduler-job
*/}}
{{- define "lms-data-service.instructorsSchedulerJobInputFile" -}}
{{- if .Values.instructorsSchedulerJob.jsonInputFile -}}
{{ print .Values.instructorsSchedulerJob.jsonInputFile }}
{{- else if eq .Values.global.lmsType "WORKDAY" -}}
{{ print "./temp/start-instructors-web-job.json" }}
{{- else -}}
{{ print "./temp/start-instructors-job.json" }}
{{- end }}
{{- end }}

{{/*
Create the name of the CronJob items-scheduler-job
*/}}
{{- define "lms-data-service.itemsSchedulerJobName" -}}
{{ include "lms-data-service.name" . }}-items-scheduler-job
{{- end }}

{{/*
Create the name of the JSON file used by the items-scheduler-job
*/}}
{{- define "lms-data-service.itemsSchedulerJobInputFile" -}}
{{- if .Values.itemsSchedulerJob.jsonInputFile -}}
{{ print .Values.itemsSchedulerJob.jsonInputFile }}
{{- else if eq .Values.global.lmsType "WORKDAY" -}}
{{ print "./temp/start-items-web-job.json" }}
{{- else -}}
{{ print "./temp/start-items-job.json" }}
{{- end }}
{{- end }}

{{/*
Create the name of the CronJob items-inactive-scheduler-job
*/}}
{{- define "lms-data-service.itemsInactiveSchedulerJobName" -}}
{{ include "lms-data-service.name" . }}-items-inactive-scheduler-job
{{- end }}

{{/*
Create the name of the JSON file used by the items-inactive-scheduler-job
*/}}
{{- define "lms-data-service.itemsInactiveSchedulerJobInputFile" -}}
{{- if .Values.itemsInactiveSchedulerJob.jsonInputFile -}}
{{ print .Values.itemsInactiveSchedulerJob.jsonInputFile }}
{{- else if eq .Values.global.lmsType "WORKDAY" -}}
{{ print "./temp/start-items-inactive-web-job.json" }}
{{- else -}}
{{ print "./temp/start-items-inactive-job.json" }}
{{- end }}
{{- end }}

{{/*
Create the name of the CronJob learners-scheduler-job
*/}}
{{- define "lms-data-service.learnersSchedulerJobName" -}}
{{ include "lms-data-service.name" . }}-learners-scheduler-job
{{- end }}

{{/*
Create the name of the JSON file used by the learners-scheduler-job
*/}}
{{- define "lms-data-service.learnersSchedulerJobInputFile" -}}
{{- if .Values.learnersSchedulerJob.jsonInputFile -}}
{{ print .Values.learnersSchedulerJob.jsonInputFile }}
{{- else if eq .Values.global.lmsType "WORKDAY" -}}
{{ print "./temp/start-learners-web-job.json" }}
{{- else -}}
{{ print "./temp/start-learners-job.json" }}
{{- end }}
{{- end }}

{{/*
Create the name of the JSON file used by the learning-history-upload-job
*/}}
{{- define "lms-data-service.learningHistoryUploadJobInputFile" -}}
{{- if .Values.learningHistoryUploadJob.jsonInputFile -}}
{{ print .Values.learningHistoryUploadJob.jsonInputFile }}
{{- else -}}
{{ print "./temp/start-lms-learning-history-job.json" }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: thub-event-scheduler-job
image: "{{ .Values.assignedItemsSchedulerJob.image.repository }}:{{ .Values.assignedItemsSchedulerJob.image.tag | default (include "thub.eventSchedulerJobTag" .) }}"
imagePullPolicy: {{ .Values.assignedItemsSchedulerJob.image.pullPolicy }}
command: ["java", "-jar", "/home/app/application.jar", "jms", "./temp/start-assigned-items-job.json"]
command: ["java", "-jar", "/home/app/application.jar", "jms", "{{ include "lms-data-service.assignedItemsSchedulerJobInputFile" . }}"]
ports:
- containerPort: {{ .Values.assignedItemsSchedulerJob.port }}
name: http-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ metadata:
description: >
This ConfigMap contains files used by thub-event-scheduler-job.
data:
start-assigned-items-job.json: |
lms-end-incomplete-jobs.json: |
{
"type": "ASSIGNED_ITEMS",
"instruction": "START",
"communicationType": "SFTP"
"type": "END_INCOMPLETE_DATA_SYNCS",
"instruction": "START"
}
start-lms-learning-history-job.json: |
start-assigned-items-job.json: |
{
"type": "LEARNING_HISTORY",
"type": "ASSIGNED_ITEMS",
"instruction": "START",
"communicationType": "SFTP"
}
Expand Down Expand Up @@ -44,10 +43,36 @@ data:
"instruction": "START",
"communicationType": "SFTP"
}
lms-end-incomplete-jobs.json: |
start-lms-learning-history-job.json: |
{
"type": "LEARNING_HISTORY",
"instruction": "START",
"communicationType": "SFTP"
}
# These jobs are used when integrating with Workday LMS
start-instructors-web-job.json: |
{
"type": "INSTRUCTORS",
"instruction": "START",
"communicationType": "WEBSERVICE"
}
start-items-web-job.json: |
{
"type": "END_INCOMPLETE_DATA_SYNCS",
"instruction": "START"
"type": "ITEMS",
"instruction": "START",
"communicationType": "WEBSERVICE"
}
start-items-inactive-web-job.json: |
{
"type": "ITEMS_INACTIVE",
"instruction": "START",
"communicationType": "WEBSERVICE"
}
start-learners-web-job.json: |
{
"type": "LEARNERS",
"instruction": "START",
"communicationType": "WEBSERVICE"
}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: thub-event-scheduler-job
image: "{{ .Values.instructorsSchedulerJob.image.repository }}:{{ .Values.instructorsSchedulerJob.image.tag | default (include "thub.eventSchedulerJobTag" .) }}"
imagePullPolicy: {{ .Values.instructorsSchedulerJob.image.pullPolicy }}
command: ["java", "-jar", "/home/app/application.jar", "jms", "./temp/start-instructors-job.json"]
command: ["java", "-jar", "/home/app/application.jar", "jms", "{{ include "lms-data-service.instructorsSchedulerJobInputFile" . }}"]
ports:
- containerPort: {{ .Values.instructorsSchedulerJob.port }}
name: http-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: thub-event-scheduler-job
image: "{{ .Values.itemsInactiveSchedulerJob.image.repository }}:{{ .Values.itemsInactiveSchedulerJob.image.tag | default (include "thub.eventSchedulerJobTag" .) }}"
imagePullPolicy: {{ .Values.itemsInactiveSchedulerJob.image.pullPolicy }}
command: ["java", "-jar", "/home/app/application.jar", "jms", "./temp/start-items-inactive-job.json"]
command: ["java", "-jar", "/home/app/application.jar", "jms", "{{ include "lms-data-service.itemsInactiveSchedulerJobInputFile" . }}"]
ports:
- containerPort: {{ .Values.itemsInactiveSchedulerJob.port }}
name: http-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: thub-event-scheduler-job
image: "{{ .Values.itemsSchedulerJob.image.repository }}:{{ .Values.itemsSchedulerJob.image.tag | default (include "thub.eventSchedulerJobTag" .) }}"
imagePullPolicy: {{ .Values.itemsSchedulerJob.image.pullPolicy }}
command: ["java", "-jar", "/home/app/application.jar", "jms", "./temp/start-items-job.json"]
command: ["java", "-jar", "/home/app/application.jar", "jms", "{{ include "lms-data-service.itemsSchedulerJobInputFile" . }}"]
ports:
- containerPort: {{ .Values.itemsSchedulerJob.port }}
name: http-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: thub-event-scheduler-job
image: "{{ .Values.learnersSchedulerJob.image.repository }}:{{ .Values.learnersSchedulerJob.image.tag | default (include "thub.eventSchedulerJobTag" .) }}"
imagePullPolicy: {{ .Values.learnersSchedulerJob.image.pullPolicy }}
command: ["java", "-jar", "/home/app/application.jar", "jms", "./temp/start-learners-job.json"]
command: ["java", "-jar", "/home/app/application.jar", "jms", "{{ include "lms-data-service.learnersSchedulerJobInputFile" . }}"]
ports:
- containerPort: {{ .Values.learnersSchedulerJob.port }}
name: http-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: thub-event-scheduler-job
image: "{{ .Values.learningHistoryUploadJob.image.repository }}:{{ .Values.learningHistoryUploadJob.image.tag | default (include "thub.eventSchedulerJobTag" .) }}"
imagePullPolicy: {{ .Values.learningHistoryUploadJob.image.pullPolicy }}
command: ["java", "-jar", "/home/app/application.jar", "jms", "./temp/start-lms-learning-history-job.json"]
command: ["java", "-jar", "/home/app/application.jar", "jms", "{{ include "lms-data-service.learningHistoryUploadJobInputFile" . }}"]
ports:
- containerPort: {{ .Values.learningHistoryUploadJob.port }}
name: http-server
Expand Down
12 changes: 12 additions & 0 deletions charts/thub/charts/lms-data-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ assignedItemsSchedulerJob:
# Run on the 15th minute of every hour from 14 thru 23 and 5
schedule: "15 14-23,5 * * *"
concurrencyPolicy: "Replace"
# Overrides the default JSON file used by the job
jsonInputFile: ""
image:
repository: 342628741687.dkr.ecr.us-west-2.amazonaws.com/thub-event-scheduler-cli-job
pullPolicy: IfNotPresent
Expand Down Expand Up @@ -169,6 +171,8 @@ instructorsSchedulerJob:
# Run at 2:30 AM every day
schedule: "30 2 * * *"
concurrencyPolicy: "Replace"
# Overrides the default JSON file used by the job
jsonInputFile: ""
image:
repository: 342628741687.dkr.ecr.us-west-2.amazonaws.com/thub-event-scheduler-cli-job
pullPolicy: IfNotPresent
Expand All @@ -184,6 +188,8 @@ itemsSchedulerJob:
# Run on the 4th minute of every 4th hour
schedule: "4 */4 * * *"
concurrencyPolicy: "Replace"
# Overrides the default JSON file used by the job
jsonInputFile: ""
image:
repository: 342628741687.dkr.ecr.us-west-2.amazonaws.com/thub-event-scheduler-cli-job
pullPolicy: IfNotPresent
Expand All @@ -199,6 +205,8 @@ itemsInactiveSchedulerJob:
# Run on the 50th minute of every 12th hour
schedule: "50 */12 * * *"
concurrencyPolicy: "Replace"
# Overrides the default JSON file used by the job
jsonInputFile: ""
image:
repository: 342628741687.dkr.ecr.us-west-2.amazonaws.com/thub-event-scheduler-cli-job
pullPolicy: IfNotPresent
Expand All @@ -214,6 +222,8 @@ learnersSchedulerJob:
# Run on the eigth minute of every 3rd hour
schedule: "8 */3 * * *"
concurrencyPolicy: "Replace"
# Overrides the default JSON file used by the job
jsonInputFile: ""
image:
repository: 342628741687.dkr.ecr.us-west-2.amazonaws.com/thub-event-scheduler-cli-job
pullPolicy: IfNotPresent
Expand All @@ -229,6 +239,8 @@ learningHistoryUploadJob:
# Run every 33 minutes
schedule: "*/33 * * * *"
concurrencyPolicy: "Replace"
# Overrides the default JSON file used by the job
jsonInputFile: ""
image:
repository: 342628741687.dkr.ecr.us-west-2.amazonaws.com/thub-event-scheduler-cli-job
pullPolicy: IfNotPresent
Expand Down