diff --git a/cmd/imagedigestexporter/main.go b/cmd/imagedigestexporter/main.go index 6554b96bd6e..64937da777a 100644 --- a/cmd/imagedigestexporter/main.go +++ b/cmd/imagedigestexporter/main.go @@ -24,7 +24,6 @@ import ( "github.com/google/go-containerregistry/pkg/v1/layout" v1alpha1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1" - _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" ) var ( diff --git a/docs/developers/README.md b/docs/developers/README.md index 312cf362d07..3baee5b3fa3 100644 --- a/docs/developers/README.md +++ b/docs/developers/README.md @@ -128,3 +128,10 @@ with the binary and file(s) is mounted. If the image is a private registry, the service account should include an [ImagePullSecret](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account) + +## Builder namespace on containers + +The `/builder/` namespace is reserved on containers for various system tools, such as the following: + + - The environment variable HOME is set to `/builder/home`, used by the builder tools and injected on into all of the step containers + - Default location for output-images `/builder/output-images` \ No newline at end of file diff --git a/docs/resources.md b/docs/resources.md index a6f6c6bb281..aef0c3e9206 100644 --- a/docs/resources.md +++ b/docs/resources.md @@ -184,7 +184,7 @@ spec: outputImageDir: /workspace/builtImage steps: ... ``` -If no value is specified for `outputImageDir`, it will default to `/tools/image-outputs/{resource-name}`. +If no value is specified for `outputImageDir`, it will default to `/builder/image-outputs/{resource-name}`. *Please check the builder tool used on how to pass this path to create the output file.* diff --git a/pkg/apis/pipeline/v1alpha1/image_resource.go b/pkg/apis/pipeline/v1alpha1/image_resource.go index 09811c732c6..9653034ddfc 100644 --- a/pkg/apis/pipeline/v1alpha1/image_resource.go +++ b/pkg/apis/pipeline/v1alpha1/image_resource.go @@ -98,8 +98,8 @@ func (s *ImageResource) GetOutputImageDir() string { } func (s ImageResource) String() string { - // the String() func works as a toString func to return the contents as a string - // and has to follow the interface and therefore cannot return an error + // the String() func implements the Stringer interface, and therefore + // cannot return an error // if the Marshal func gives an error, the returned string will be empty json, _ := json.Marshal(s) return string(json) diff --git a/pkg/apis/pipeline/v1alpha1/task_defaults.go b/pkg/apis/pipeline/v1alpha1/task_defaults.go index 7b1af3a0870..da56e47ba59 100644 --- a/pkg/apis/pipeline/v1alpha1/task_defaults.go +++ b/pkg/apis/pipeline/v1alpha1/task_defaults.go @@ -31,7 +31,7 @@ func (ts *TaskSpec) SetDefaults(ctx context.Context) { for i, o := range ts.Outputs.Resources { if o.Type == PipelineResourceTypeImage { if o.OutputImageDir == "" { - ts.Outputs.Resources[i].OutputImageDir = fmt.Sprintf("/tools/image-outputs/%s", o.Name) + ts.Outputs.Resources[i].OutputImageDir = fmt.Sprintf("/builder/image-outputs/%s", o.Name) } } }