Skip to content

Commit

Permalink
fix for running argo
Browse files Browse the repository at this point in the history
Signed-off-by: Neil South <[email protected]>
  • Loading branch information
neildsouth committed Sep 6, 2022
1 parent 87b6529 commit a6ad884
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -577,3 +577,5 @@ GitExtensions.settings.backup
*.AssemblyHooks.vb
/src/WorkflowManager/mc.exe
*.lutconfig
/src/TaskManager/TaskManager/Properties/launchSettings.json
/src/WorkflowManager/WorkflowManager/Properties/launchSettings.json
13 changes: 12 additions & 1 deletion deploy/helm/MTM.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ replicaCount: 1
image:
repository: registry.gitlab.com/answerdigital/londonai/aide/workflow-manager-images/task-manager
pullPolicy: IfNotPresent
tag: 2022-08-22-02
tag: 2022-09-05-01

imagePullSecrets:
- name: gitlab-image-pull
Expand All @@ -29,6 +29,7 @@ enviromentVariables:
WorkflowManager__storage__settings__executableLocation: "mc"
WorkflowManager__messaging__publisherSettings__endpoint: "rabbitmq.monai"
WorkflowManager__messaging__subscriberSettings__endpoint: "rabbitmq.monai"
WorkloadManagerDatabase__ConnectionString: "mongodb://root:[email protected]:27017"

enviromentVariablesFromSecrets:
secrets:
Expand All @@ -49,6 +50,16 @@ service:
type: ClusterIP
port: 5000

serviceAccount:
create: true
name: mtm
namespace: monai
clusterrole:
name: clusterrole-taskmanager-argo-secret-master
rules:
apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]



15 changes: 15 additions & 0 deletions src/TaskManager/Plug-ins/Argo/ArgoPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,21 @@ private async Task CopyWorkflowTemplateToWorkflow(WorkflowTemplate workflowTempl

await CopyTemplateSteps(template.Steps, workflowTemplate, name, workflow, cancellationToken).ConfigureAwait(false);
await CopyTemplateDags(template.Dag, workflowTemplate, name, workflow, cancellationToken).ConfigureAwait(false);
CopyImagePullSecrets(workflowTemplate, workflow);
}

private void CopyImagePullSecrets(WorkflowTemplate workflowTemplate, Workflow workflow)
{
Guard.Against.Null(workflowTemplate.Spec.ImagePullSecrets);

if (workflowTemplate.Spec.ImagePullSecrets.Any())
{
workflow.Spec.ImagePullSecrets = new List<LocalObjectReference>();
foreach (var secret in workflowTemplate.Spec.ImagePullSecrets)
{
workflow.Spec.ImagePullSecrets.Add(secret);
}
}
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/TaskManager/TaskManager/appsettings.Local.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"WorkloadManagerDatabase": {
"ConnectionString": "mongodb://root:rootpassword@localhost:27017",
"ConnectionString": "mongodb://root:rootpassword@localhost:30017",
"DatabaseName": "WorkloadManager",
"WorkflowCollectionName": "Workflows",
"WorkflowInstanceCollectionName": "WorkflowInstances",
Expand Down
2 changes: 1 addition & 1 deletion src/WorkflowManager/WorkflowManager/appsettings.Local.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"WorkloadManagerDatabase": {
"ConnectionString": "mongodb://root:rootpassword@localhost:27017",
"ConnectionString": "mongodb://root:rootpassword@localhost:30017",
"DatabaseName": "WorkloadManager",
"WorkflowCollectionName": "Workflows",
"WorkflowInstanceCollectionName": "WorkflowInstances",
Expand Down

0 comments on commit a6ad884

Please sign in to comment.