diff --git a/charts/thub/Chart.yaml b/charts/thub/Chart.yaml index 140713c..7053384 100644 --- a/charts/thub/Chart.yaml +++ b/charts/thub/Chart.yaml @@ -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 @@ -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 diff --git a/charts/thub/charts/lms-data-service/Chart.yaml b/charts/thub/charts/lms-data-service/Chart.yaml index 65e93aa..d0a1a25 100644 --- a/charts/thub/charts/lms-data-service/Chart.yaml +++ b/charts/thub/charts/lms-data-service/Chart.yaml @@ -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 diff --git a/charts/thub/charts/lms-data-service/templates/_helpers.tpl b/charts/thub/charts/lms-data-service/templates/_helpers.tpl index bf03bb4..5162278 100644 --- a/charts/thub/charts/lms-data-service/templates/_helpers.tpl +++ b/charts/thub/charts/lms-data-service/templates/_helpers.tpl @@ -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 */}} @@ -124,6 +135,19 @@ 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 */}} @@ -131,6 +155,19 @@ Create the name of the CronJob items-scheduler-job {{ 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 */}} @@ -138,9 +175,46 @@ Create the name of the CronJob items-inactive-scheduler-job {{ 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 }} diff --git a/charts/thub/charts/lms-data-service/templates/assigned-items-scheduler-job.yaml b/charts/thub/charts/lms-data-service/templates/assigned-items-scheduler-job.yaml index f6a54a5..88d33cf 100644 --- a/charts/thub/charts/lms-data-service/templates/assigned-items-scheduler-job.yaml +++ b/charts/thub/charts/lms-data-service/templates/assigned-items-scheduler-job.yaml @@ -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 diff --git a/charts/thub/charts/lms-data-service/templates/event-scheduler-job-input-files-configmap.yaml b/charts/thub/charts/lms-data-service/templates/event-scheduler-job-input-files-configmap.yaml index 01a0d98..1dce169 100644 --- a/charts/thub/charts/lms-data-service/templates/event-scheduler-job-input-files-configmap.yaml +++ b/charts/thub/charts/lms-data-service/templates/event-scheduler-job-input-files-configmap.yaml @@ -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" } @@ -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" } {{/* diff --git a/charts/thub/charts/lms-data-service/templates/instructors-scheduler-job.yaml b/charts/thub/charts/lms-data-service/templates/instructors-scheduler-job.yaml index f256632..170bf3d 100644 --- a/charts/thub/charts/lms-data-service/templates/instructors-scheduler-job.yaml +++ b/charts/thub/charts/lms-data-service/templates/instructors-scheduler-job.yaml @@ -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 diff --git a/charts/thub/charts/lms-data-service/templates/items-inactive-scheduler-job.yaml b/charts/thub/charts/lms-data-service/templates/items-inactive-scheduler-job.yaml index 0e280c6..8e8cb30 100644 --- a/charts/thub/charts/lms-data-service/templates/items-inactive-scheduler-job.yaml +++ b/charts/thub/charts/lms-data-service/templates/items-inactive-scheduler-job.yaml @@ -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 diff --git a/charts/thub/charts/lms-data-service/templates/items-scheduler-job.yaml b/charts/thub/charts/lms-data-service/templates/items-scheduler-job.yaml index 08ebe8f..b87a9c6 100644 --- a/charts/thub/charts/lms-data-service/templates/items-scheduler-job.yaml +++ b/charts/thub/charts/lms-data-service/templates/items-scheduler-job.yaml @@ -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 diff --git a/charts/thub/charts/lms-data-service/templates/learners-scheduler-job.yaml b/charts/thub/charts/lms-data-service/templates/learners-scheduler-job.yaml index 0764c85..fbab34d 100644 --- a/charts/thub/charts/lms-data-service/templates/learners-scheduler-job.yaml +++ b/charts/thub/charts/lms-data-service/templates/learners-scheduler-job.yaml @@ -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 diff --git a/charts/thub/charts/lms-data-service/templates/learning-history-upload-job.yaml b/charts/thub/charts/lms-data-service/templates/learning-history-upload-job.yaml index 88af58c..4642f5e 100644 --- a/charts/thub/charts/lms-data-service/templates/learning-history-upload-job.yaml +++ b/charts/thub/charts/lms-data-service/templates/learning-history-upload-job.yaml @@ -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 diff --git a/charts/thub/charts/lms-data-service/values.yaml b/charts/thub/charts/lms-data-service/values.yaml index 7f0e15d..bd74f2b 100644 --- a/charts/thub/charts/lms-data-service/values.yaml +++ b/charts/thub/charts/lms-data-service/values.yaml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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