Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove nop container and image #715

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/nop/kodata/HEAD

This file was deleted.

1 change: 0 additions & 1 deletion cmd/nop/kodata/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion cmd/nop/kodata/VENDOR-LICENSE

This file was deleted.

23 changes: 0 additions & 23 deletions cmd/nop/main.go

This file was deleted.

1 change: 0 additions & 1 deletion config/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ spec:
"-kubeconfig-writer-image", "github.com/tektoncd/pipeline/cmd/kubeconfigwriter",
"-creds-image", "github.com/tektoncd/pipeline/cmd/creds-init",
"-git-image", "github.com/tektoncd/pipeline/cmd/git-init",
"-nop-image", "github.com/tektoncd/pipeline/cmd/nop",
"-bash-noop-image", "github.com/tektoncd/pipeline/cmd/bash",
"-gsutil-image","github.com/tektoncd/pipeline/cmd/gsutil",
"-entrypoint-image", "github.com/tektoncd/pipeline/cmd/entrypoint",
Expand Down
5 changes: 0 additions & 5 deletions pkg/reconciler/v1alpha1/taskrun/resources/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ var (
// The container used to initialize credentials before the build runs.
credsImage = flag.String("creds-image", "override-with-creds:latest",
"The container image for preparing our Build's credentials.")
// The container that just prints build successful.
nopImage = flag.String("nop-image", "override-with-nop:latest",
"The container image run at the end of the build to log build success")
)

func makeCredentialInitializer(serviceAccountName, namespace string, kubeclient kubernetes.Interface) (*corev1.Container, []corev1.Volume, error) {
Expand Down Expand Up @@ -220,8 +217,6 @@ func MakePod(taskRun *v1alpha1.TaskRun, taskSpec v1alpha1.TaskSpec, kubeclient k
}
gibberish := hex.EncodeToString(b)

podContainers = append(podContainers, corev1.Container{Name: "nop", Image: *nopImage, Command: []string{"/ko-app/nop"}})

return &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
// We execute the build's pod in the same namespace as where the build was
Expand Down
9 changes: 0 additions & 9 deletions pkg/reconciler/v1alpha1/taskrun/resources/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ import (

var (
ignorePrivateResourceFields = cmpopts.IgnoreUnexported(resource.Quantity{})
nopContainer = corev1.Container{
Name: "nop",
Image: *nopImage,
Command: []string{"/ko-app/nop"},
}
)

func TestMakePod(t *testing.T) {
Expand Down Expand Up @@ -105,7 +100,6 @@ func TestMakePod(t *testing.T) {
VolumeMounts: implicitVolumeMounts,
WorkingDir: workspaceDir,
},
nopContainer,
},
Volumes: implicitVolumes,
},
Expand Down Expand Up @@ -144,7 +138,6 @@ func TestMakePod(t *testing.T) {
VolumeMounts: implicitVolumeMounts,
WorkingDir: workspaceDir,
},
nopContainer,
},
Volumes: implicitVolumesWithSecrets,
},
Expand Down Expand Up @@ -177,7 +170,6 @@ func TestMakePod(t *testing.T) {
VolumeMounts: implicitVolumeMounts,
WorkingDir: workspaceDir,
},
nopContainer,
},
Volumes: implicitVolumes,
},
Expand Down Expand Up @@ -210,7 +202,6 @@ func TestMakePod(t *testing.T) {
VolumeMounts: implicitVolumeMounts,
WorkingDir: workspaceDir,
},
nopContainer,
},
Volumes: implicitVolumes,
},
Expand Down
8 changes: 0 additions & 8 deletions pkg/reconciler/v1alpha1/taskrun/taskrun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ func TestReconcile(t *testing.T) {
tb.VolumeMount("workspace", workspaceDir),
tb.VolumeMount("home", "/builder/home"),
),
tb.PodContainer("nop", "override-with-nop:latest", tb.Command("/ko-app/nop")),
),
),
}, {
Expand All @@ -339,7 +338,6 @@ func TestReconcile(t *testing.T) {
tb.VolumeMount("workspace", workspaceDir),
tb.VolumeMount("home", "/builder/home"),
),
tb.PodContainer("nop", "override-with-nop:latest", tb.Command("/ko-app/nop")),
),
),
}, {
Expand Down Expand Up @@ -393,7 +391,6 @@ func TestReconcile(t *testing.T) {
tb.VolumeMount("workspace", workspaceDir),
tb.VolumeMount("home", "/builder/home"),
),
tb.PodContainer("nop", "override-with-nop:latest", tb.Command("/ko-app/nop")),
),
),
}, {
Expand Down Expand Up @@ -491,7 +488,6 @@ func TestReconcile(t *testing.T) {
tb.VolumeMount("workspace", workspaceDir),
tb.VolumeMount("home", "/builder/home"),
),
tb.PodContainer("nop", "override-with-nop:latest", tb.Command("/ko-app/nop")),
),
),
}, {
Expand Down Expand Up @@ -527,7 +523,6 @@ func TestReconcile(t *testing.T) {
tb.VolumeMount("workspace", workspaceDir),
tb.VolumeMount("home", "/builder/home"),
),
tb.PodContainer("nop", "override-with-nop:latest", tb.Command("/ko-app/nop")),
),
),
}, {
Expand All @@ -553,7 +548,6 @@ func TestReconcile(t *testing.T) {
tb.VolumeMount("workspace", workspaceDir),
tb.VolumeMount("home", "/builder/home"),
),
tb.PodContainer("nop", "override-with-nop:latest", tb.Command("/ko-app/nop")),
),
),
}, {
Expand Down Expand Up @@ -589,7 +583,6 @@ func TestReconcile(t *testing.T) {
tb.VolumeMount("workspace", workspaceDir),
tb.VolumeMount("home", "/builder/home"),
),
tb.PodContainer("nop", "override-with-nop:latest", tb.Command("/ko-app/nop")),
),
),
}, {
Expand All @@ -616,7 +609,6 @@ func TestReconcile(t *testing.T) {
tb.VolumeMount("workspace", workspaceDir),
tb.VolumeMount("home", "/builder/home"),
),
tb.PodContainer("nop", "override-with-nop:latest", tb.Command("/ko-app/nop")),
),
),
}} {
Expand Down
2 changes: 0 additions & 2 deletions tekton/koparse/test_koparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/kubeconfigwriter@sha256:68453f5bb4b76c0eab98964754114d4f79d3a50413872520d8919a6786ea2b35",
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/creds-init@sha256:67448da79e4731ab534b91df08da547bc434ab08e41d905858f2244e70290f48",
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/git-init@sha256:7d5520efa2d55e1346c424797988c541327ee52ef810a840b5c6f278a9de934a",
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/nop@sha256:3784d6b8f73043a29d2c1d6196801bee46fe808fbb94ba4fd21ca52dce503183",
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/bash@sha256:d55917ef5c92627027e3755bfc577fbfa2fb783cccfb13a98632cb6ba6088cd6",
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/gsutil@sha256:421a261436e16af4057b4a069fdae8a5aca6e37269952209ad9932a774aa0003",
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/controller@sha256:bdc6f22a44944c829983c30213091b60f490b41f89577e8492f6a2936be0df41",
Expand All @@ -25,7 +24,6 @@
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/kubeconfigwriter",
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/creds-init",
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/git-init",
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/nop",
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/bash",
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/gsutil",
"gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/controller",
Expand Down
2 changes: 0 additions & 2 deletions tekton/koparse/test_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,6 @@ spec:
- gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/creds-init@sha256:67448da79e4731ab534b91df08da547bc434ab08e41d905858f2244e70290f48
- -git-image
- gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/git-init@sha256:7d5520efa2d55e1346c424797988c541327ee52ef810a840b5c6f278a9de934a
- -nop-image
- gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/nop@sha256:3784d6b8f73043a29d2c1d6196801bee46fe808fbb94ba4fd21ca52dce503183
- -bash-noop-image
- gcr.io/knative-releases/github.com/knative/build-pipeline/cmd/bash@sha256:d55917ef5c92627027e3755bfc577fbfa2fb783cccfb13a98632cb6ba6088cd6
- -gsutil-image
Expand Down
13 changes: 0 additions & 13 deletions tekton/publish-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,6 @@ spec:
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: nop-image
spec:
type: image
params:
- name: url
value: cmd/nop # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: bash-image
spec:
Expand Down Expand Up @@ -169,9 +159,6 @@ spec:
- name: builtGitInitImage
resourceRef:
name: git-init-image
- name: builtNopImage
resourceRef:
name: nop-image
- name: builtBashImage
resourceRef:
name: bash-image
Expand Down
6 changes: 3 additions & 3 deletions test/builder/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestPod(t *testing.T) {
tb.PodSpec(
tb.PodServiceAccountName("sa"),
tb.PodRestartPolicy(corev1.RestartPolicyNever),
tb.PodContainer("nop", "nop:latest"),
tb.PodContainer("bash", "bash:latest"),
tb.PodInitContainer("basic", "ubuntu",
tb.Command("/bin/sh"),
tb.Args("-c", "ls -l"),
Expand Down Expand Up @@ -69,8 +69,8 @@ func TestPod(t *testing.T) {
ServiceAccountName: "sa",
RestartPolicy: corev1.RestartPolicyNever,
Containers: []corev1.Container{{
Name: "nop",
Image: "nop:latest",
Name: "bash",
Image: "bash:latest",
}},
InitContainers: []corev1.Container{{
Name: "basic",
Expand Down