Skip to content

Commit bb565e1

Browse files
authored
Merge pull request #404 from Project-MONAI/nds-fix-for-imagepullsecrets
Nds fix for imagepullsecrets
2 parents 6e4a1e9 + 01176ac commit bb565e1

File tree

11 files changed

+135
-8
lines changed

11 files changed

+135
-8
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,3 +577,5 @@ GitExtensions.settings.backup
577577
*.AssemblyHooks.vb
578578
/src/WorkflowManager/mc.exe
579579
*.lutconfig
580+
/src/TaskManager/TaskManager/Properties/launchSettings.json
581+
/src/WorkflowManager/WorkflowManager/Properties/launchSettings.json

deploy/helm/Gateway.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ replicaCount: 1
1616
image:
1717
repository: registry.gitlab.com/answerdigital/londonai/aide/workflow-manager-images/infomatics-gateway
1818
pullPolicy: IfNotPresent
19-
tag: 2022-08-01
19+
tag: 2022-08-30-01
20+
21+
imagePullSecrets:
22+
- name: gitlab-image-pull
2023

2124
enviromentVariables:
2225
InformaticsGateway__messaging__publisherSettings__endpoint: "rabbitmq-monai"
@@ -29,6 +32,8 @@ enviromentVariables:
2932
InformaticsGateway__storage__settings__accessKey: "rootminio"
3033
InformaticsGateway__storage__settings__accessToken: "rootminio"
3134
InformaticsGateway__dicom__scp__rejectUnknownSources: false
35+
Kestrel__EndPoints__Http__Url: "http://::5000"
36+
InformaticsGateway__storage__watermarkPercent: 95
3237

3338

3439
service:

deploy/helm/MTM.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright 2022 MONAI Consortium
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
replicaCount: 1
16+
17+
image:
18+
repository: registry.gitlab.com/answerdigital/londonai/aide/workflow-manager-images/task-manager
19+
pullPolicy: IfNotPresent
20+
tag: 2022-09-05-01
21+
22+
imagePullSecrets:
23+
- name: gitlab-image-pull
24+
25+
enviromentVariables:
26+
WorkflowManager__storage__settings__endpoint: "minio.monai:9000"
27+
WorkflowManager__storage__settings__accessKey: "rootminio"
28+
WorkflowManager__storage__settings__accessToken: "rootminio"
29+
WorkflowManager__storage__settings__executableLocation: "mc"
30+
WorkflowManager__messaging__publisherSettings__endpoint: "rabbitmq.monai"
31+
WorkflowManager__messaging__subscriberSettings__endpoint: "rabbitmq.monai"
32+
WorkloadManagerDatabase__ConnectionString: "mongodb://root:[email protected]:27017"
33+
34+
enviromentVariablesFromSecrets:
35+
secrets:
36+
- name: WorkflowManager__messaging__subscriberSettings__username
37+
secretName: rabbit-secret-master
38+
secretKey: username
39+
- name: WorkflowManager__messaging__subscriberSettings__password
40+
secretName: rabbit-secret-master
41+
secretKey: password
42+
- name: WorkflowManager__messaging__publisherSettings__username
43+
secretName: rabbit-secret-master
44+
secretKey: username
45+
- name: WorkflowManager__messaging__publisherSettings__password
46+
secretName: rabbit-secret-master
47+
secretKey: password
48+
49+
service:
50+
type: ClusterIP
51+
port: 5000
52+
53+
serviceAccount:
54+
create: true
55+
name: mtm
56+
namespace: monai
57+
clusterrole:
58+
name: clusterrole-taskmanager-argo-secret-master
59+
rules:
60+
apiGroups: [""]
61+
resources: ["secrets"]
62+
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
63+
64+
65+

deploy/helm/MWM.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ enviromentVariables:
2727
WorkflowManager__storage__settings__accessKey: "rootminio"
2828
WorkflowManager__storage__settings__accessToken: "rootminio"
2929
WorkflowManager__storage__settings__executableLocation: "mc"
30-
WorkflowManager__messaging__publisherSettings__endpoint: "rabbitmq.monai"
31-
WorkflowManager__messaging__subscriberSettings__endpoint: "rabbitmq.monai"
30+
WorkflowManager__messaging__publisherSettings__endpoint: "rabbitmq-monai.monai"
31+
WorkflowManager__messaging__subscriberSettings__endpoint: "rabbitmq-monai.monai"
3232
WorkloadManagerDatabase__ConnectionString: "mongodb://root:[email protected]:27017"
33+
Kestrel__EndPoints__Http__Url: "http://::5000"
3334

3435
enviromentVariablesFromSecrets:
3536
secrets:

deploy/helm/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ spec:
6363
value: {{ $value | quote }}
6464
{{- end }}
6565

66-
{{- range .Values.enviromentVariablesFromSecrets.secrets }}
66+
{{- range (.Values.enviromentVariablesFromSecrets).secrets }}
6767
- name: {{ .name }}
6868
valueFrom:
6969
secretKeyRef:

deploy/helm/templates/volume.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
{{- if .Values.volumeMounts -}}
14+
{{- if .Values.volumeMounts }}
1515
apiVersion: v1
1616
kind: PersistentVolume
1717
metadata:

deploy/helm/templates/volumeclaim.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
{{- if .Values.volumeMounts -}}
14+
{{- if .Values.volumeMounts }}
1515
apiVersion: v1
1616
kind: PersistentVolumeClaim
1717
metadata:

src/TaskManager/Plug-ins/Argo/ArgoPlugin.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,19 @@ private async Task CopyWorkflowTemplateToWorkflow(WorkflowTemplate workflowTempl
486486

487487
await CopyTemplateSteps(template.Steps, workflowTemplate, name, workflow, cancellationToken).ConfigureAwait(false);
488488
await CopyTemplateDags(template.Dag, workflowTemplate, name, workflow, cancellationToken).ConfigureAwait(false);
489+
CopyImagePullSecrets(workflowTemplate, workflow);
490+
}
491+
492+
private void CopyImagePullSecrets(WorkflowTemplate workflowTemplate, Workflow workflow)
493+
{
494+
if (workflowTemplate.Spec.ImagePullSecrets?.Any() is true)
495+
{
496+
workflow.Spec.ImagePullSecrets = new List<LocalObjectReference>();
497+
foreach (var secret in workflowTemplate.Spec.ImagePullSecrets)
498+
{
499+
workflow.Spec.ImagePullSecrets.Add(secret);
500+
}
501+
}
489502
}
490503

491504
/// <summary>

src/TaskManager/TaskManager/appsettings.Local.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"WorkloadManagerDatabase": {
3-
"ConnectionString": "mongodb://root:rootpassword@localhost:27017",
3+
"ConnectionString": "mongodb://root:rootpassword@localhost:30017",
44
"DatabaseName": "WorkloadManager",
55
"WorkflowCollectionName": "Workflows",
66
"WorkflowInstanceCollectionName": "WorkflowInstances",

src/WorkflowManager/WorkflowManager/appsettings.Local.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"WorkloadManagerDatabase": {
3-
"ConnectionString": "mongodb://root:rootpassword@localhost:27017",
3+
"ConnectionString": "mongodb://root:rootpassword@localhost:30017",
44
"DatabaseName": "WorkloadManager",
55
"WorkflowCollectionName": "Workflows",
66
"WorkflowInstanceCollectionName": "WorkflowInstances",

0 commit comments

Comments
 (0)