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.3
version: 1.7.4

# 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.1
version: 1.5.2
- 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.1
version: 1.5.2

# 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
19 changes: 19 additions & 0 deletions charts/thub/charts/lms-data-service/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,22 @@ Create the name of the JSON file used by the learning-history-upload-job
{{ print "./temp/start-lms-learning-history-job.json" }}
{{- end }}
{{- end }}

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

{{/*
Create the name of the JSON file used by the rosters-scheduler-job
This job is currently used only when integrating with Workday
*/}}
{{- define "lms-data-service.rostersSchedulerJobInputFile" -}}
{{- if .Values.rostersSchedulerJob.jsonInputFile -}}
{{ print .Values.rostersSchedulerJob.jsonInputFile }}
{{- else -}}
{{ print "./temp/start-rosters-web-job.json" }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ data:
"instruction": "START",
"communicationType": "WEBSERVICE"
}
start-rosters-web-job.json: |
{
"type": "ROSTERS",
"instruction": "START",
"communicationType": "WEBSERVICE"
}

{{/*
Could use this code if we want to load them from files rather than have them here.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{{- if .Values.rostersSchedulerJob.enabled -}}
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "lms-data-service.rostersSchedulerJobName" . }}
# These labels do not also get added to the pods created by this job
labels:
{{- include "lms-data-service.labels" . | nindent 4 }}
jobCommonName: lms-rosters-scheduler-job
annotations:
description: >
Sends a message to the LMS Data Service application via ActiveMQ notifying it to
load rosters (aka Learning Enrollments) from the LMS.
spec:
schedule: {{ .Values.rostersSchedulerJob.schedule | quote }}
concurrencyPolicy: {{ .Values.rostersSchedulerJob.concurrencyPolicy | quote }}
jobTemplate:
spec:
template:
metadata:
annotations:
{{- with .Values.rostersSchedulerJob.podAnnotations }}
{{- toYaml . | nindent 12 }}
{{- end }}
labels:
{{- with .Values.rostersSchedulerJob.podLabels }}
{{- toYaml . | nindent 12 }}
{{- end }}
spec:
containers:
- name: thub-event-scheduler-job
image: "{{ .Values.rostersSchedulerJob.image.repository }}:{{ .Values.rostersSchedulerJob.image.tag | default (include "thub.eventSchedulerJobTag" .) }}"
imagePullPolicy: {{ .Values.rostersSchedulerJob.image.pullPolicy }}
command: ["java", "-jar", "/home/app/application.jar", "jms", "{{ include "lms-data-service.rostersSchedulerJobInputFile" . }}"]
ports:
- containerPort: {{ .Values.rostersSchedulerJob.port }}
name: http-server
resources:
{{- toYaml .Values.global.eventSchedulerResources | nindent 14 }}
env:
- name: server.port
value: {{ .Values.rostersSchedulerJob.port | quote }}
- name: hclabs.scheduler.destinationQueue
value: {{ include "thub.sfLmsDataJobQueueName" . }}
- name: micronaut.jms.activemq.classic.connection-string
valueFrom:
configMapKeyRef:
name: mq-broker-config
key: spring.activemq.brokerUrl
- name: micronaut.jms.activemq.classic.username
valueFrom:
configMapKeyRef:
name: mq-broker-config
key: spring.activemq.user
- name: micronaut.jms.activemq.classic.password
valueFrom:
configMapKeyRef:
name: mq-broker-config
key: spring.activemq.password
volumeMounts:
- name: message-file
mountPath: /home/app/temp
readOnly: true
volumes:
- name: message-file
configMap:
# Provide the name of the ConfigMap containing the files you want
# to add to the container
name: {{ include "lms-data-service.eventSchedulerInputFilesConfigmapName" . }}
restartPolicy: {{ .Values.rostersSchedulerJob.restartPolicy }}
{{- end }}
17 changes: 17 additions & 0 deletions charts/thub/charts/lms-data-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,23 @@ learningHistoryUploadJob:
podAnnotations: {}
podLabels: {}

rostersSchedulerJob:
enabled: false
# Run on the 27th minute of every hour from 14 thru 23 and 5
schedule: "27 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
# Overrides the image tag whose default is the helper "thub.eventSchedulerJobTag".
tag: ""
port: 8099
restartPolicy: Never
podAnnotations: {}
podLabels: {}

global:
# Resources for the thub-event-scheduler-job container
eventSchedulerResources: {}