From ba3337aad8fd4d781823f4bcc094f7772e1d07a0 Mon Sep 17 00:00:00 2001 From: Chitrang Patel Date: Fri, 2 Dec 2022 12:48:30 -0500 Subject: [PATCH] TEP 0127 larger results using sidecar logs: Feature flags Moved config to enable access to sidecar logs into a different folder so that it is not installed by default. Also addressed some nit comments and removed docs for installation (will be added in the final PR) so that it does not suggest that the feature is ready for use. --- docs/install.md | 27 ------------------- .../clusterrole.yaml | 0 .../clusterrolebinding.yaml | 0 ...ags-invalid-max-result-size-bad-value.yaml | 2 +- ...ags-invalid-max-result-size-too-large.yaml | 2 +- .../feature-flags-invalid-results-from.yaml | 2 +- ...eature-flags-results-via-sidecar-logs.yaml | 2 +- 7 files changed, 4 insertions(+), 31 deletions(-) rename {config => optional_config}/enable-log-access-to-controller/clusterrole.yaml (100%) rename {config => optional_config}/enable-log-access-to-controller/clusterrolebinding.yaml (100%) diff --git a/docs/install.md b/docs/install.md index e3478a5294d..b72df5f3611 100644 --- a/docs/install.md +++ b/docs/install.md @@ -24,7 +24,6 @@ This guide explains how to install Tekton Pipelines. It covers the following top - [Customizing the Pipelines Controller behavior](#customizing-the-pipelines-controller-behavior) - [Alpha Features](#alpha-features) - [Beta Features](#beta-features) -- [Enabling larger results using sidecar logs](#enabling-larger-results-using-sidecar-logs) - [Configuring High Availability](#configuring-high-availability) - [Configuring tekton pipeline controller performance](#configuring-tekton-pipeline-controller-performance) - [Creating a custom release of Tekton Pipelines](#creating-a-custom-release-of-tekton-pipelines) @@ -479,32 +478,6 @@ the `feature-flags` ConfigMap alongside your Tekton Pipelines deployment via For beta versions of Tekton CRDs, setting `enable-api-fields` to "beta" is the same as setting it to "stable". -## Enabling larger results using sidecar logs - -**Note**: The maximum size of a Task's results is limited by the container termination message feature of Kubernetes, as results are passed back to the controller via this mechanism. At present, the limit is per task is “4096 bytes”. All results produced by the task share this upper limit. - -To exceed this limit of 4096 bytes, you can enable larger results using sidecar logs. By enabling this feature, you will have a configurable limit (with a default of 4096 bytes) per result with no restriction on the number of results. The results are still stored in the taskrun crd so they should not exceed the 1.5MB CRD size limit. - -**Note**: to enable this feature, you need to grant `get` access to all `pods/log` to the `Tekton pipeline controller`. This means that the tekton pipeline controller has the ability to access the pod logs. - -1. Create a cluster role and rolebinding by applying the following spec to provide log access to `tekton-pipelines-controller`. - -``` -kubectl apply -f config/enable-log-access-to-controller/ -``` - -2. Set the `results-from` feature flag to use sidecar logs by setting `results-from: sidecar-logs` in the [configMap](#customizing-the-pipelines-controller-behavior). - -``` -kubectl patch cm feature-flags -n tekton-pipelines -p '{"data":{"results-from":"sidecar-logs"}}' -``` - -3. If you want the size per result to be something other than 4096 bytes, you can set the `max-result-size` feature flag in bytes by setting `max-result-size: 8192(whatever you need here)`. **Note:** The value you can set here cannot exceed the size of the CRD limit of 1.5 MB. - -``` -kubectl patch cm feature-flags -n tekton-pipelines -p '{"data":{"max-result-size":""}}' -``` - ## Configuring High Availability If you want to run Tekton Pipelines in a way so that webhooks are resiliant against failures and support diff --git a/config/enable-log-access-to-controller/clusterrole.yaml b/optional_config/enable-log-access-to-controller/clusterrole.yaml similarity index 100% rename from config/enable-log-access-to-controller/clusterrole.yaml rename to optional_config/enable-log-access-to-controller/clusterrole.yaml diff --git a/config/enable-log-access-to-controller/clusterrolebinding.yaml b/optional_config/enable-log-access-to-controller/clusterrolebinding.yaml similarity index 100% rename from config/enable-log-access-to-controller/clusterrolebinding.yaml rename to optional_config/enable-log-access-to-controller/clusterrolebinding.yaml diff --git a/pkg/apis/config/testdata/feature-flags-invalid-max-result-size-bad-value.yaml b/pkg/apis/config/testdata/feature-flags-invalid-max-result-size-bad-value.yaml index 38e02bde881..00b895c1235 100644 --- a/pkg/apis/config/testdata/feature-flags-invalid-max-result-size-bad-value.yaml +++ b/pkg/apis/config/testdata/feature-flags-invalid-max-result-size-bad-value.yaml @@ -1,4 +1,4 @@ -# Copyright 2021 The Tekton Authors +# Copyright 2022 The Tekton Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pkg/apis/config/testdata/feature-flags-invalid-max-result-size-too-large.yaml b/pkg/apis/config/testdata/feature-flags-invalid-max-result-size-too-large.yaml index bd66ea5427e..5de8debb0ef 100644 --- a/pkg/apis/config/testdata/feature-flags-invalid-max-result-size-too-large.yaml +++ b/pkg/apis/config/testdata/feature-flags-invalid-max-result-size-too-large.yaml @@ -1,4 +1,4 @@ -# Copyright 2021 The Tekton Authors +# Copyright 2022 The Tekton Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pkg/apis/config/testdata/feature-flags-invalid-results-from.yaml b/pkg/apis/config/testdata/feature-flags-invalid-results-from.yaml index 7bed1e89fb5..b05562cd937 100644 --- a/pkg/apis/config/testdata/feature-flags-invalid-results-from.yaml +++ b/pkg/apis/config/testdata/feature-flags-invalid-results-from.yaml @@ -1,4 +1,4 @@ -# Copyright 2021 The Tekton Authors +# Copyright 2022 The Tekton Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pkg/apis/config/testdata/feature-flags-results-via-sidecar-logs.yaml b/pkg/apis/config/testdata/feature-flags-results-via-sidecar-logs.yaml index 68276837559..9dccf38f69a 100644 --- a/pkg/apis/config/testdata/feature-flags-results-via-sidecar-logs.yaml +++ b/pkg/apis/config/testdata/feature-flags-results-via-sidecar-logs.yaml @@ -1,4 +1,4 @@ -# Copyright 2021 The Tekton Authors +# Copyright 2022 The Tekton Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.