Skip to content

Commit

Permalink
Add debug tools to argoexec image. Remove privileged mode from sideki…
Browse files Browse the repository at this point in the history
…ck. Disable linting
  • Loading branch information
jessesuen committed Oct 25, 2017
1 parent dc53023 commit a68001d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Dockerfile-argoexec
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FROM debian:9.1

RUN apt-get update && \
apt-get install -y curl jq procps && \
rm -rf /var/lib/apt/lists/*

COPY dist/argoexec /bin/

ENTRYPOINT [ "/bin/argoexec" ]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ IMAGE_PREFIX=${IMAGE_NAMESPACE}/
endif

# Build the project
all: lint cli-linux cli-darwin workflow-image apiserver-image argoexec-image
all: cli-linux cli-darwin workflow-image apiserver-image argoexec-image

builder:
docker build -t ${BUILDER_IMAGE} -f Dockerfile-builder .
Expand Down
8 changes: 7 additions & 1 deletion workflow/controller/workflowpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (wfc *WorkflowController) newInitContainer(tmpl *wfv1.Template) (*corev1.Co
}

func (wfc *WorkflowController) newWaitContainer(tmpl *wfv1.Template) (*corev1.Container, error) {
ctr := wfc.newExecContainer(common.WaitContainerName, true)
ctr := wfc.newExecContainer(common.WaitContainerName, false)
ctr.Command = []string{"sh", "-c"}
argoExecCmd := fmt.Sprintf("echo sleeping; cat %s; sleep 10; echo done", common.PodMetadataAnnotationsPath)
ctr.Args = []string{argoExecCmd}
Expand Down Expand Up @@ -238,6 +238,12 @@ func addInputArtifactVolumes(pod *corev1.Pod, tmpl *wfv1.Template) error {
mainCtr = &ctr
break
}
if ctr.Name == common.WaitContainerName {
// HACK: debug purposes. sleep to experiment with wait container artifacts
ctr.Command = []string{"sh", "-c"}
ctr.Args = []string{"sleep 999999; echo done"}
pod.Spec.Containers[i] = ctr
}
}
if mainCtr == nil {
errors.InternalError("Could not find main container in pod spec")
Expand Down

0 comments on commit a68001d

Please sign in to comment.