diff --git a/docs/install.md b/docs/install.md index 5d8d4d5ea95..e988092cb8e 100644 --- a/docs/install.md +++ b/docs/install.md @@ -383,6 +383,7 @@ Features currently in "alpha" are: - [Tekton Bundles](./taskruns.md#tekton-bundles) - [Custom Tasks](./runs.md) - [Isolated Step & Sidecar Workspaces](./workspaces.md#isolated-workspaces) +- [Hermetic Execution Mode](./hermetic.md) ## Configuring High Availability diff --git a/pkg/pod/pod.go b/pkg/pod/pod.go index 4eb12f28fae..4698600879d 100644 --- a/pkg/pod/pod.go +++ b/pkg/pod/pod.go @@ -44,7 +44,7 @@ const ( TaskRunLabelKey = pipeline.GroupName + pipeline.TaskRunLabelKey // TektonHermeticEnvVar is the env var we set in containers to indicate they should be run hermetically - TektonHermeticEnvVar = "HERMETIC" + TektonHermeticEnvVar = "TEKTON_HERMETIC" // ExecutionModeAnnotation is an experimental optional annotation to set the execution mode on a TaskRun ExecutionModeAnnotation = "experimental.tekton.dev/execution-mode" // ExecutionModeHermetic indicates hermetic execution mode diff --git a/pkg/pod/pod_test.go b/pkg/pod/pod_test.go index 4a19b13fa5e..fd89b0a08da 100644 --- a/pkg/pod/pod_test.go +++ b/pkg/pod/pod_test.go @@ -1273,7 +1273,7 @@ script-heredoc-randomly-generated-78c5n Resources: corev1.ResourceRequirements{Requests: allZeroQty()}, TerminationMessagePath: "/tekton/termination", Env: []corev1.EnvVar{ - {Name: "HERMETIC", Value: "1"}, + {Name: "TEKTON_HERMETIC", Value: "1"}, }, }}, Volumes: append(implicitVolumes, toolsVolume, downwardVolume, corev1.Volume{ @@ -1289,7 +1289,7 @@ script-heredoc-randomly-generated-78c5n Name: "name", Image: "image", Command: []string{"cmd"}, // avoid entrypoint lookup. - Env: []corev1.EnvVar{{Name: "HERMETIC", Value: "something_else"}}, + Env: []corev1.EnvVar{{Name: "TEKTON_HERMETIC", Value: "something_else"}}, }}}, }, trAnnotation: map[string]string{ @@ -1321,9 +1321,9 @@ script-heredoc-randomly-generated-78c5n Resources: corev1.ResourceRequirements{Requests: allZeroQty()}, TerminationMessagePath: "/tekton/termination", Env: []corev1.EnvVar{ - {Name: "HERMETIC", Value: "something_else"}, + {Name: "TEKTON_HERMETIC", Value: "something_else"}, // this value must be second to override the first - {Name: "HERMETIC", Value: "1"}, + {Name: "TEKTON_HERMETIC", Value: "1"}, }, }}, Volumes: append(implicitVolumes, toolsVolume, downwardVolume, corev1.Volume{