Monitord Acces Change
This commit is contained in:
@@ -30,24 +30,18 @@ func (b *ArgoBuilder) CreateService(exec *workflow_execution.WorkflowExecution,
|
||||
}
|
||||
|
||||
func (b *ArgoBuilder) completeServicePorts(exec *workflow_execution.WorkflowExecution, service *models.Service, id string, processing resources.ResourceInterface) {
|
||||
index := 0
|
||||
if d, ok := exec.SelectedInstances[processing.GetID()]; ok {
|
||||
index = d
|
||||
}
|
||||
instance := processing.GetSelectedInstance(&index)
|
||||
if instance != nil && instance.(*resources.ProcessingInstance).Access != nil && instance.(*resources.ProcessingInstance).Access.Container != nil {
|
||||
for _, execute := range instance.(*resources.ProcessingInstance).Access.Container.Exposes {
|
||||
if execute.PAT != 0 {
|
||||
new_port_translation := models.ServicePort{
|
||||
Name: strings.ToLower(processing.GetName()) + id,
|
||||
Port: execute.Port,
|
||||
TargetPort: execute.PAT,
|
||||
Protocol: "TCP",
|
||||
}
|
||||
service.Spec.Ports = append(service.Spec.Ports, new_port_translation)
|
||||
for _, execute := range b.OriginWorkflow.Exposes[processing.GetID()] {
|
||||
if execute.PAT != 0 {
|
||||
new_port_translation := models.ServicePort{
|
||||
Name: strings.ToLower(processing.GetName()) + id,
|
||||
Port: execute.Port,
|
||||
TargetPort: execute.PAT,
|
||||
Protocol: "TCP",
|
||||
}
|
||||
service.Spec.Ports = append(service.Spec.Ports, new_port_translation)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (b *ArgoBuilder) addServiceToArgo() error {
|
||||
|
||||
Reference in New Issue
Block a user