Skip to content

Commit

Permalink
Add TEKTON to env var & add to alpha features section in install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Priya Wadhwa committed May 19, 2021
1 parent 9560020 commit b9694a2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pkg/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions pkg/pod/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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{
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit b9694a2

Please sign in to comment.