Skip to content

Commit

Permalink
chore: break dependency on util
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed May 15, 2021
1 parent 8ca5215 commit 1e57f5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ COPY .git/ .git/
COPY api/ api/
COPY shared/ shared/
COPY manager/ manager/
RUN go generate ./shared/util/version.go
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -a -ldflags="-X 'github.com/argoproj-labs/argo-dataflow/shared/util.message=xx$(git log -n1 --oneline)'" -o bin/manager ./manager

FROM gcr.io/distroless/static:nonroot AS controller
Expand All @@ -29,7 +28,6 @@ COPY .git/ .git/
COPY api/ api/
COPY shared/ shared/
COPY runner/ runner/
RUN go generate ./shared/util/version.go
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -a -ldflags="-X 'github.com/argoproj-labs/argo-dataflow/shared/util.message=xx$(git log -n1 --oneline)'" -o bin/runner ./runner
COPY kill/ kill/
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -a -ldflags="-X 'github.com/argoproj-labs/argo-dataflow/shared/util.message=xx$(git log -n1 --oneline)'" -o bin/kill ./kill
Expand Down
5 changes: 3 additions & 2 deletions api/v1alpha1/step_spec.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package v1alpha1

import (
"encoding/json"
"strconv"
"time"

"github.com/argoproj-labs/argo-dataflow/shared/util"
corev1 "k8s.io/api/core/v1"
"k8s.io/utils/pointer"
)
Expand Down Expand Up @@ -56,12 +56,13 @@ func (in *StepSpec) GetPodSpec(req GetPodSpecReq) corev1.PodSpec {
Name: "var-run-argo-dataflow",
VolumeSource: corev1.VolumeSource{EmptyDir: &corev1.EmptyDirVolumeSource{}},
}
data, _ := json.Marshal(in)
volumeMounts := []corev1.VolumeMount{{Name: volume.Name, MountPath: PathVarRun}}
envVars := []corev1.EnvVar{
{Name: EnvPipelineName, Value: req.PipelineName},
{Name: EnvNamespace, Value: req.Namespace},
{Name: EnvReplica, Value: strconv.Itoa(int(req.Replica))},
{Name: EnvStepSpec, Value: util.MustJSON(in)},
{Name: EnvStepSpec, Value: string(data)},
{Name: EnvUpdateInterval, Value: req.UpdateInterval.String()},
}
return corev1.PodSpec{
Expand Down

0 comments on commit 1e57f5c

Please sign in to comment.