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 support for build-gcs and the gcs-fetcher image #3771

Merged
merged 1 commit into from
Feb 22, 2021
Merged
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
2 changes: 0 additions & 2 deletions .ko.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ baseImageOverrides:
# They are produced from ./images/Dockerfile
github.com/tektoncd/pipeline/cmd/git-init: gcr.io/tekton-nightly/github.com/tektoncd/pipeline/build-base:latest

# GCS fetcher needs root due to workspace permissions
github.com/tektoncd/pipeline/vendor/github.com/GoogleCloudPlatform/cloud-builders/gcs-fetcher/cmd/gcs-fetcher: gcr.io/distroless/static:latest
# PullRequest resource needs root because in output mode it needs to access pr.json
# which might have been copied or written with any level of permissions.
github.com/tektoncd/pipeline/cmd/pullrequest-init: gcr.io/distroless/static:latest
2 changes: 0 additions & 2 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ var (
kubeconfigWriterImage = flag.String("kubeconfig-writer-image", "", "The container image containing our kubeconfig writer binary.")
shellImage = flag.String("shell-image", "", "The container image containing a shell")
gsutilImage = flag.String("gsutil-image", "", "The container image containing gsutil")
buildGCSFetcherImage = flag.String("build-gcs-fetcher-image", "", "The container image containing our GCS fetcher binary.")
prImage = flag.String("pr-image", "", "The container image containing our PR binary.")
imageDigestExporterImage = flag.String("imagedigest-exporter-image", "", "The container image containing our image digest exporter binary.")
namespace = flag.String("namespace", corev1.NamespaceAll, "Namespace to restrict informer to. Optional, defaults to all namespaces.")
Expand All @@ -70,7 +69,6 @@ func main() {
KubeconfigWriterImage: *kubeconfigWriterImage,
ShellImage: *shellImage,
GsutilImage: *gsutilImage,
BuildGCSFetcherImage: *buildGCSFetcherImage,
PRImage: *prImage,
ImageDigestExporterImage: *imageDigestExporterImage,
}
Expand Down
1 change: 0 additions & 1 deletion config/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ spec:
"-nop-image", "ko://github.com/tektoncd/pipeline/cmd/nop",
"-imagedigest-exporter-image", "ko://github.com/tektoncd/pipeline/cmd/imagedigestexporter",
"-pr-image", "ko://github.com/tektoncd/pipeline/cmd/pullrequest-init",
"-build-gcs-fetcher-image", "ko://github.com/tektoncd/pipeline/vendor/github.com/GoogleCloudPlatform/cloud-builders/gcs-fetcher/cmd/gcs-fetcher",

# This is gcr.io/google.com/cloudsdktool/cloud-sdk:302.0.0-slim
"-gsutil-image", "gcr.io/google.com/cloudsdktool/cloud-sdk@sha256:27b2c22bf259d9bc1a291e99c63791ba0c27a04d2db0a43241ba0f1f20f4067f",
Expand Down
76 changes: 1 addition & 75 deletions docs/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ For example:
- [Cluster Resource](#cluster-resource)
- [Storage Resource](#storage-resource)
- [GCS Storage Resource](#gcs-storage-resource)
- [BuildGCS Storage Resource](#buildgcs-storage-resource)
- [Cloud Event Resource](#cloud-event-resource)
- [Why Aren't PipelineResources in Beta?](#why-arent-pipelineresources-in-beta)

Expand Down Expand Up @@ -844,8 +843,7 @@ the blob.

Only blob storage type
[Google Cloud Storage](https://cloud.google.com/storage/)(gcs) is supported as
of now via [GCS storage resource](#gcs-storage-resource) and
[BuildGCS storage resource](#buildgcs-storage-resource).
of now via [GCS storage resource](#gcs-storage-resource).

#### GCS Storage Resource

Expand Down Expand Up @@ -933,78 +931,6 @@ service account.

--------------------------------------------------------------------------------

#### `Deprecated: `BuildGCS Storage Resource

**NB:** This Resource type is _deprecated_, and will be removed in a future
release. To fetch objects from Google Cloud Storage, prefer the [GCS storage
resource](#gcs-storage-resource) instead.

The `build-gcs` storage resource points to a
[Google Cloud Storage](https://cloud.google.com/storage/) blob like
[GCS Storage Resource](#gcs-storage-resource), either in the form of a .zip
archive, or based on the contents of a source manifest file.

In addition to fetching an .zip archive, BuildGCS also unzips it.

A
[Source Manifest File](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher#source-manifests)
is a JSON object, which is listing other objects in a Cloud Storage that should
be fetched. The format of the manifest is a mapping of the destination file path
to the location in a Cloud Storage, where the file's contents can be found. The
`build-gcs` resource can also do incremental uploads of sources via the Source
Manifest File.

To create a `build-gcs` type of storage resource using the `PipelineResource`
CRD:

```yaml
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: build-gcs-storage
namespace: default
spec:
type: storage
params:
- name: type
value: build-gcs
- name: location
value: gs://build-crd-tests/rules_docker-master.zip
- name: artifactType
value: Archive
```

Params that can be added are the following:

1. `location`: represents the location of the blob storage.
1. `type`: represents the type of blob storage. For BuildGCS, this value should
be set to `build-gcs`
1. `artifactType`: represent the type of `gcs` resource. Right now, we support
following types:

* `ZipArchive`:
* ZipArchive indicates that the resource fetched is an archive file in the
zip format.
* It unzips the archive and places all the files in the directory, which
is set at runtime.
* `Archive` is also supported and is equivalent to `ZipArchive`, but is
deprecated.
* `TarGzArchive`:
* TarGzArchive indicates that the resource fetched is a gzipped archive
file in the tar format.
* It unzips the archive and places all the files in the directory, which
is set at runtime.
* [`Manifest`](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher#source-manifests):
* Manifest indicates that the resource should be fetched using a source
manifest file.

Private buckets other than the ones accessible by a
[TaskRun Service Account](./taskruns.md#service-account) can not be configured
as `storage` resources for the `build-gcs` storage resource right now. This is
because the container image
[gcr.io/cloud-builders//gcs-fetcher](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher)
does not support configuring secrets.

### Cloud Event Resource

The `cloudevent` resource represents a
Expand Down
11 changes: 0 additions & 11 deletions docs/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,6 @@ variable via `resources.inputs.<resourceName>.<variableName>` or
| `type` | Type value of `"gcs"`. |
| `location` | The fully qualified address of the blob storage. |

#### Variables for the `BuildGCS` type

**NB:** This Resource type is **Deprecated**. See [BuildGCS Storage
Resource](./resources.md#buildgcs-storage-resource) for more information.

| Variable | Description |
| -------- | ----------- |
| `name` | The name of the resource. |
| `type` | Type value of `"build-gcs"`. |
| `location` | The fully qualified address of the blob storage. |

#### Variables for the `Cluster` type

| Variable | Description |
Expand Down
27 changes: 0 additions & 27 deletions examples/v1alpha1/taskruns/build-gcs-targz.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions examples/v1alpha1/taskruns/build-gcs-zip.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions examples/v1beta1/taskruns/build-gcs-targz.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions examples/v1beta1/taskruns/build-gcs-zip.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@ module github.com/tektoncd/pipeline
go 1.13

require (
cloud.google.com/go/storage v1.11.0 // indirect
github.com/Azure/azure-sdk-for-go v50.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.17 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.10 // indirect
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
github.com/GoogleCloudPlatform/cloud-builders/gcs-fetcher v0.0.0-20191203181535-308b93ad1f39
github.com/aws/aws-sdk-go v1.37.1 // indirect
github.com/cloudevents/sdk-go/v2 v2.1.0
github.com/docker/cli v20.10.2+incompatible // indirect
github.com/docker/docker v20.10.2+incompatible // indirect
Expand Down
Loading