diff --git a/docs/install.md b/docs/install.md index e95d47824bf..6ec939cf53e 100644 --- a/docs/install.md +++ b/docs/install.md @@ -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. @@ -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 diff --git a/tekton/publish.yaml b/tekton/publish.yaml index d3e4915dd5f..a49fb64c578 100644 --- a/tekton/publish.yaml +++ b/tekton/publish.yaml @@ -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 @@ -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) diff --git a/tekton/release-pipeline.yaml b/tekton/release-pipeline.yaml index 985143cab59..61b4fc07316 100644 --- a/tekton/release-pipeline.yaml +++ b/tekton/release-pipeline.yaml @@ -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 @@ -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) diff --git a/test/e2e-common.sh b/test/e2e-common.sh index be0206f90b9..5ef47f77e81 100755 --- a/test/e2e-common.sh +++ b/test/e2e-common.sh @@ -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 @@ -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