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.10.12
version: 1.11.0

# 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.2
- name: lms-data-service
version: 1.8.3
version: 1.9.0
- name: ojt
version: 1.7.3
- 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.8.3
version: 1.9.0

# 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 @@ -226,6 +226,25 @@ Create the name of the JSON file used by the learning-history-upload-job
{{- end }}
{{- end }}

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

{{/*
Create the name of the JSON file used by the managers-scheduler-job
*/}}
{{- define "lms-data-service.managersSchedulerJobInputFile" -}}
{{- if .Values.managersSchedulerJob.jsonInputFile -}}
{{ print .Values.managersSchedulerJob.jsonInputFile }}
# The Managers data sync job can only be used by WORKDAY environments currently.
{{- else if eq .Values.global.lmsType "WORKDAY" -}}
{{ print "./temp/start-managers-web-job.json" }}
{{- end }}
{{- end }}

{{/*
Create the name of the CronJob rosters-scheduler-job
*/}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ data:
"instruction": "START",
"communicationType": "WEBSERVICE"
}
start-managers-web-job.json: |
{
"type": "MANAGERS",
"instruction": "START",
"communicationType": "WEBSERVICE"
}
start-rosters-web-job.json: |
{
"type": "ROSTERS",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{{- if .Values.managersSchedulerJob.enabled -}}
{{- if ne .Values.global.lmsType "WORKDAY" -}}
{{- fail "The Managers data sync job (.Values.managersSchedulerJob.enabled) can only be enabled when .Values.global.lmsType is set to 'WORKDAY'." -}}
{{- end -}}
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "lms-data-service.managersSchedulerJobName" . }}
# These labels do not also get added to the pods created by this job
labels:
{{- include "lms-data-service.labels" . | nindent 4 }}
jobCommonName: lms-managers-scheduler-job
annotations:
description: >
Sends a message to the LMS Data Service application via ActiveMQ notifying it to
load managers from the LMS.
spec:
schedule: {{ .Values.managersSchedulerJob.schedule | quote }}
concurrencyPolicy: {{ .Values.managersSchedulerJob.concurrencyPolicy | quote }}
jobTemplate:
spec:
template:
metadata:
annotations:
{{- with .Values.managersSchedulerJob.podAnnotations }}
{{- toYaml . | nindent 12 }}
{{- end }}
labels:
{{- with .Values.managersSchedulerJob.podLabels }}
{{- toYaml . | nindent 12 }}
{{- end }}
spec:
containers:
- name: thub-event-scheduler-job
image: "{{ .Values.managersSchedulerJob.image.repository }}:{{ .Values.managersSchedulerJob.image.tag | default (include "thub.eventSchedulerJobTag" .) }}"
imagePullPolicy: {{ .Values.managersSchedulerJob.image.pullPolicy }}
command: ["java", "-jar", "/home/app/application.jar", "jms", "{{ include "lms-data-service.managersSchedulerJobInputFile" . }}"]
ports:
- containerPort: {{ .Values.managersSchedulerJob.port }}
name: http-server
resources:
{{- toYaml .Values.global.eventSchedulerResources | nindent 14 }}
env:
- name: server.port
value: {{ .Values.managersSchedulerJob.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.managersSchedulerJob.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 @@ -259,6 +259,23 @@ learningHistoryUploadJob:
podAnnotations: {}
podLabels: {}

managersSchedulerJob:
enabled: false
# Run on the eighteenth minute of every 5th hour
schedule: "18 */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: {}

rostersSchedulerJob:
enabled: false
# Run on the 27th minute of every hour from 14 thru 23 and 5
Expand Down
79 changes: 79 additions & 0 deletions charts/thub/ci/workday-test-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This file has test values to use when the chart is being linted
# https://github.com/helm/chart-testing/blob/master/doc/ct_lint.md
# The values are as though the chart is being deployed for a Workday integrated system.

lmsType: "WORKDAY"

managersSchedulerJob:
enabled: true

rostersSchedulerJob:
enabled: true

# Now the rest of this file is the same as charts/thub/ci/test-values.yaml

# AWS credentials for S3 access
awsS3keyId: "exampleId"
awsS3secretKey: "verySecretKey"

assigned-item-service:
# The datasource info for connecting the Grails application to the database
dataSource:
username: "test_username"
password: "test_password"
url: "jdbc:mysql://example.us-east-1.rds.amazonaws.com:3306/schema_name"

item-service:
# The datasource info for connecting the Grails application to the database
dataSource:
username: "test_username"
password: "test_password"
url: "jdbc:mysql://example.us-east-1.rds.amazonaws.com:3306/schema_name"

lms-data-service:
# The datasource info for connecting the Grails application to the database
dataSource:
username: "test_username"
password: "test_password"
url: "jdbc:mysql://example.us-east-1.rds.amazonaws.com:3306/schema_name"
# Encryption key for storing sensitive values in the database
encryptionPassword: "test_password"
# Connection info for the SFTP that the LMS interacts with
sftp:
host: "sftp8.sapsf.com"
user: "my_test_user"
password: "test_password"
downloadDirectory: "FEED/DOWNLOAD/ROLLCALL"
uploadDirectory: "FEED/UPLOAD"

ojt:
# The datasource info for connecting the Grails application to the database
dataSource:
username: "test_username"
password: "test_password"
url: "jdbc:mysql://example.us-east-1.rds.amazonaws.com:3306/schema_name"

user-service:
# The datasource info for connecting the Grails application to the database
dataSource:
username: "test_username"
password: "test_password"
url: "jdbc:mysql://example.us-east-1.rds.amazonaws.com:3306/schema_name"

keycloak-config:
# The username for the database that Keycloak connects to
databaseUsername: "example_keycloak_username"
# The password for the database that Keycloak connects to
databasePassword: "example_keycloak_password"
# Keycloak configuration values
realmName: "test-realm"
clientId: "ojt"
clientSecret: "abcdefg"
# Credentials for the admin of the Keycloak server (master realm)
masterAdminUsername: "test-admin"
# checkov:skip=CKV_SECRET_6:This entire file is just test values
masterAdminPassword: "examplePassword"
# Credentials for an admin of this realm
realmAdminUsername: "realm-admin-username"
# checkov:skip=CKV_SECRET_6:This entire file is just test values
realmAdminPassword: "anotherPassword"
4 changes: 4 additions & 0 deletions charts/thub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ lms-data-service:
enabled: true
# Run every 33 minutes
schedule: "*/33 * * * *"
managersSchedulerJob:
enabled: false
rostersSchedulerJob:
enabled: false

ojt:
resources: {}
Expand Down