Skip to content

Commit

Permalink
Change release.yaml to include resolvers, add minimal-release.yaml
Browse files Browse the repository at this point in the history
`minimal-release.yaml` is equivalent to `release.yaml` in v0.40.x. It does not contain `config/resolvers`. But from v0.41.0 on, `release.yaml` will contain `config/resolvers`. This will allow users to install Pipelines without including the built-in resolvers, while also letting us default to those resolvers being available and enabled.

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
  • Loading branch information
abayer committed Sep 20, 2022
1 parent d6a146c commit b0f4d2d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
14 changes: 12 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ To install Tekton Pipelines on a Kubernetes cluster:
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.notags.yaml
```

1. **Note**: To install Tekton Pipelines without including [the built-in remote resolvers](#installing-and-configuring-remote-task-and-pipeline-resolution)
follow the directions above, but replace `release.yaml` or `release.notags.yaml` with `minimal-release.yaml` or
`minimal-release.notags.yaml` as appropriate.

1. **Note**: Some cloud providers (such as [GKE](https://github.com/tektoncd/pipeline/issues/3317#issuecomment-708066087))
may also require you to allow port 8443 in your firewall rules so that the Tekton Pipelines webhook is reachable.

Expand Down Expand Up @@ -269,8 +273,14 @@ data:
## Installing and configuring remote Task and Pipeline resolution
To install the latest release of the [built-in remote resolvers](#built-in-resolvers),
run the following command:
By default, when Tekton Pipelines is installed using `release.yaml` or `release.notags.yaml`, the
[built-in resolvers](#built-in-resolvers) are installed into the `tekton-pipelines-resolvers` namespace.

### Installing built-in remote resolvers with a minimal Tekton Pipelines installation

If you have installed Tekton Pipelines using `minimal-release.yaml` or `minimal-release.notags.yaml` and
wish to add the [built-in remote resolvers](#built-in-resolvers) later, you can install them separately
by running the following command:

```bash
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/resolvers.yaml
Expand Down
10 changes: 6 additions & 4 deletions tekton/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,14 @@ spec:
# Publish images and create release.yaml
mkdir -p $OUTPUT_RELEASE_DIR
ko resolve --platform=$(params.platforms) --preserve-import-paths -t $(params.versionTag) -l 'app.kubernetes.io/component!=resolvers' -R -f ${PROJECT_ROOT}/config/ > $OUTPUT_RELEASE_DIR/release.yaml
ko resolve --platform=$(params.platforms) --preserve-import-paths -t $(params.versionTag) -R -f ${PROJECT_ROOT}/config/ > $OUTPUT_RELEASE_DIR/release.yaml
ko resolve --platform=$(params.platforms) --preserve-import-paths -t $(params.versionTag) -l 'app.kubernetes.io/component!=resolvers' -R -f ${PROJECT_ROOT}/config/ > $OUTPUT_RELEASE_DIR/minimal-release.yaml
ko resolve --platform=$(params.platforms) --preserve-import-paths -t $(params.versionTag) -f ${PROJECT_ROOT}/config/resolvers > $OUTPUT_RELEASE_DIR/resolvers.yaml
# Publish images and create release.notags.yaml
# This is useful if your container runtime doesn't support the `image-reference:tag@digest` notation
# This is currently the case for `cri-o` (and most likely others)
ko resolve --platform=$(params.platforms) --preserve-import-paths -l 'app.kubernetes.io/component!=resolvers' -R -f ${PROJECT_ROOT}/config/ > $OUTPUT_RELEASE_DIR/release.notags.yaml
ko resolve --platform=$(params.platforms) --preserve-import-paths -R -f ${PROJECT_ROOT}/config/ > $OUTPUT_RELEASE_DIR/release.notags.yaml
ko resolve --platform=$(params.platforms) --preserve-import-paths -l 'app.kubernetes.io/component!=resolvers' -R -f ${PROJECT_ROOT}/config/ > $OUTPUT_RELEASE_DIR/minimal-release.notags.yaml
ko resolve --platform=$(params.platforms) --preserve-import-paths -f ${PROJECT_ROOT}/config/resolvers > $OUTPUT_RELEASE_DIR/resolvers.notags.yaml
- name: koparse
Expand All @@ -180,9 +182,9 @@ spec:
IMAGES="${IMAGES} ${IMAGES_PATH}/cmd/${cmd}:$(params.versionTag)"
done
# Parse the built images from the release.yaml generated by ko
# Parse the built images from the minimal-release.yaml generated by ko
koparse \
--path $OUTPUT_RELEASE_DIR/release.yaml \
--path $OUTPUT_RELEASE_DIR/minimal-release.yaml \
--base ${IMAGES_PATH} --images ${IMAGES} > /workspace/built_images
for cmd in $(params.resolverImages)
Expand Down
6 changes: 6 additions & 0 deletions tekton/release-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ spec:
description: The full URL of the release file in the bucket
- name: release-no-tag
description: The full URL of the release file (no tag) in the bucket
- name: minimal-release
description: The full URL of the minimal release (without resolvers) file in the bucket
- name: minimal-release-no-tag
description: The full URL of the minimal release file (without resolvers, no tag) in the bucket
- name: resolvers
description: The full URL of the resolvers release file in the bucket
- name: resolvers-no-tag
Expand All @@ -210,5 +214,7 @@ spec:
BASE_URL=$(echo ${BASE_URL} | sed 's,gs://,https://storage.googleapis.com/,g')
echo "${BASE_URL}/release.yaml" > $(results.release.path)
echo "${BASE_URL}/release.notag.yaml" > $(results.release-no-tag.path)
echo "${BASE_URL}/minimal-release.yaml" > $(results.minimal-release.path)
echo "${BASE_URL}/minimal-release.notag.yaml" > $(results.minimal-release-no-tag.path)
echo "${BASE_URL}/resolvers.yaml" > $(results.resolvers.path)
echo "${BASE_URL}/resolvers.notags.yaml" > $(results.resolvers-no-tag.path)
7 changes: 3 additions & 4 deletions test/e2e-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ source $(git rev-parse --show-toplevel)/vendor/github.com/tektoncd/plumbing/scri
function install_pipeline_crd() {
echo ">> Deploying Tekton Pipelines"
local ko_target="$(mktemp)"
ko resolve -l 'app.kubernetes.io/component!=resolvers' -R -f config/ > "${ko_target}" || fail_test "Pipeline image resolve failed"
ko resolve -R -f config/ > "${ko_target}" || fail_test "Pipeline image resolve failed"
cat "${ko_target}" | sed -e 's%"level": "info"%"level": "debug"%' \
| sed -e 's%loglevel.controller: "info"%loglevel.controller: "debug"%' \
| sed -e 's%loglevel.webhook: "info"%loglevel.webhook: "debug"%' \
| kubectl apply -R -f - || fail_test "Build pipeline installation failed"

verify_pipeline_installation

ko apply -f config/resolvers || fail_test "Resolvers installation failed"
verify_resolvers_installation

export SYSTEM_NAMESPACE=tekton-pipelines
Expand All @@ -40,7 +38,8 @@ function install_pipeline_crd_version() {
echo ">> Deploying Tekton Pipelines of Version $1"
kubectl apply -f "https://github.com/tektoncd/pipeline/releases/download/$1/release.yaml" || fail_test "Build pipeline installation failed of Version $1"

if [ "${PIPELINE_FEATURE_GATE}" == "alpha" ]; then
# If the version to be installed is v0.40.x, we need to install resolvers.yaml separately.
if [[ "${1}" == v0.40.* ]]; then
kubectl apply -f "https://github.com/tektoncd/pipeline/releases/download/$1/resolvers.yaml" || fail_test "Resolvers installation failed of Version $1"
fi

Expand Down

0 comments on commit b0f4d2d

Please sign in to comment.