Skip to content

Commit

Permalink
fix(controller): More emissary minor bugs (#5193)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Collins <alex_collins@intuit.com>
  • Loading branch information
alexec authored Feb 25, 2021
1 parent e282fcc commit 8acdb1b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ type Config struct {
InitialDelay metav1.Duration `json:"initialDelay,omitempty"`

// The command/args for each image, needed when the command is not specified and the emissary executor is used.
// https://argoproj.github.io/argo-workflows/workflow-executors/#emissary
// https://argoproj.github.io/argo-workflows/workflow-executors/#emissary-emissary
Images map[string]Image `json:"images,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion docs/workflow-controller-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ data:
kubeletInsecure: false

# The command/args for each image, needed when the command is not specified and the emissary executor is used.
# https://argoproj.github.io/argo-workflows/workflow-executors/#emissary
# https://argoproj.github.io/argo-workflows/workflow-executors/#emissary-emissary
images: |
argoproj/argosay:v1:
command: [cowsay]
Expand Down
5 changes: 2 additions & 3 deletions hack/test-examples.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env bash
set -eu -o pipefail

./dist/argo delete -l workflows.argoproj.io/test

grep -lR 'workflows.argoproj.io/test' examples/* | while read f ; do
./dist/argo submit --watch --verify $f
./dist/argo delete -l workflows.argoproj.io/test
./dist/argo submit --watch --verify $f
done
7 changes: 1 addition & 6 deletions workflow/controller/workflowpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ func (woc *wfOperationCtx) createWorkflowPod(ctx context.Context, nodeName strin
}
}
if len(c.Command) == 0 {
return nil, fmt.Errorf("when using the emissary executor you must either explicitly specify the command, or list the image's command in the index: https://argoproj.github.io/argo-workflows/workflow-executors/#emissary")
return nil, fmt.Errorf("when using the emissary executor you must either explicitly specify the command, or list the image's command in the index: https://argoproj.github.io/argo-workflows/workflow-executors/#emissary-emissary")
}
c.Command = append([]string{"/var/run/argo/argoexec", "emissary", "--"}, c.Command...)
}
Expand Down Expand Up @@ -542,13 +542,8 @@ func (woc *wfOperationCtx) createEnvVars() []apiv1.EnvVar {
execEnvVars = append(execEnvVars, woc.controller.Config.Executor.Env...)
}
switch woc.getContainerRuntimeExecutor() {
case common.ContainerRuntimeExecutorK8sAPI:
case common.ContainerRuntimeExecutorKubelet:
execEnvVars = append(execEnvVars,
apiv1.EnvVar{
Name: common.EnvVarContainerRuntimeExecutor,
Value: woc.getContainerRuntimeExecutor(),
},
apiv1.EnvVar{
Name: common.EnvVarDownwardAPINodeIP,
ValueFrom: &apiv1.EnvVarSource{
Expand Down

0 comments on commit 8acdb1b

Please sign in to comment.