Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dalehamel committed Jan 27, 2019
1 parent f75bb20 commit b35826d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ image/build:
-f Dockerfile.tracerunner .
$(DOCKER) tag $(IMAGE_TRACERUNNER_BRANCH) $(IMAGE_TRACERUNNER_COMMIT)

.PHONY: image/build-init
image/build-init:
$(DOCKER) build \
-f ./init/Dockerfile.initcontainer ./init

.PHONY: image/push
image/push:
$(DOCKER) push $(IMAGE_TRACERUNNER_BRANCH)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.initcontainer → init/Dockerfile.initcontainer
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ RUN apk add --update \

WORKDIR /

COPY hack/fetch-linux-headers.sh /
COPY /fetch-linux-headers.sh /

ENTRYPOINT [ "/fetch-linux-headers.sh" ]
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/tracejob/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ func (t *TraceJobClient) CreateJob(nj TraceJob) (*batchv1.Job, error) {
},
InitContainers: []apiv1.Container{
apiv1.Container{
Name: "init",// nj.Name,
Image: "quay.io/dalehamel/kubectl-trace:latest",//version.ImageNameTag(),
Name: "kubectl-trace-init",
Image: version.InitImageNameTag(),
VolumeMounts: []apiv1.VolumeMount{
apiv1.VolumeMount{
Name: "lsb-release",
Expand Down
6 changes: 6 additions & 0 deletions pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ var versionFormat = "git commit: %s\nbuild date: %s"
var imageNameTagFormat = "%s:%s"
var defaultImageName = "quay.io/fntlnz/kubectl-trace-bpftrace"
var defaultImageTag = "latest"
var defaultInitImageName = "quay.io/dalehamel/kubectl-trace-init"
var defaultInitImageTag = "latest"

// ImageName returns the container image name defined in Makefile
func ImageName() string {
Expand All @@ -36,6 +38,10 @@ func ImageNameTag() string {
return fmt.Sprintf(imageNameTagFormat, imageName, tag)
}

func InitImageNameTag() string {
return fmt.Sprintf(imageNameTagFormat, defaultInitImageName, defaultInitImageTag)
}

func Time() *time.Time {
if len(buildTime) == 0 {
return nil
Expand Down

0 comments on commit b35826d

Please sign in to comment.