You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change symlinks /tekton/step folders to a step's corresponding /tekton/run folder.
This is an incremental change to lock down the /tekton folder to prevent tampering
of exitCode files from other steps.
Note: this does not completely protect against a step from tampering from its own
output - more work will needed in a future PR to fully lock this down, but this
is a step in the right direction (and a complete fix will likely require a more
involved design).
While /tekton/steps is now considered an implementation detail and could
potentially be removed, the folder is preserved for now to limit the scope of this PR.
- Moves `exitCode` output to `/tekton/run/<step #>/status`
- Symlinks `/tekton/steps/<step #>` and `/tekton/steps/<step name>` to
`/tekton/run/<step #>/status`.
- Creates new `tekton-init` entrypoint subcommand to initialize the
Tekton step directory.
- Removes `-step_metadata_dir_link` flag from the main entrypoint binary
(this behavior is now handled by the initcontainer).
Co-authored-by: Lee Bernick <leebernick@google.com>
Copy file name to clipboardexpand all lines: cmd/entrypoint/main.go
+1-3
Original file line number
Diff line number
Diff line change
@@ -47,8 +47,7 @@ var (
47
47
breakpointOnFailure=flag.Bool("breakpoint_on_failure", false, "If specified, expect steps to not skip on failure")
48
48
onError=flag.String("on_error", "", "Set to \"continue\" to ignore an error and continue when a container terminates with a non-zero exit code."+
49
49
" Set to \"stopAndFail\" to declare a failure with a step error and stop executing the rest of the steps.")
50
-
stepMetadataDir=flag.String("step_metadata_dir", "", "If specified, create directory to store the step metadata e.g. /tekton/steps/<step-name>/")
51
-
stepMetadataDirLink=flag.String("step_metadata_dir_link", "", "creates a symbolic link to the specified step_metadata_dir e.g. /tekton/steps/<step-index>/")
50
+
stepMetadataDir=flag.String("step_metadata_dir", "", "If specified, create directory to store the step metadata e.g. /tekton/steps/<step-name>/")
52
51
)
53
52
54
53
const (
@@ -133,7 +132,6 @@ func main() {
133
132
BreakpointOnFailure: *breakpointOnFailure,
134
133
OnError: *onError,
135
134
StepMetadataDir: *stepMetadataDir,
136
-
StepMetadataDirLink: *stepMetadataDirLink,
137
135
}
138
136
139
137
// Copy any creds injected by the controller into the $HOME directory of the current
0 commit comments