Skip to content

Commit

Permalink
TEP-0025: API change - use string alias instead of bool
Browse files Browse the repository at this point in the history
Today, hermetic execution is supported through annotations as an
experiment. If successful, we plan to support hermetic execution
through a field in the API. The proposed API uses a bool, however
the Kubernetes API conventions [discourage using booleans][bools]
because they limit future expansions. This change updates the field
to use a string alias instead, as recommended in the conventions.

[bools]: https://github.com/kubernetes/community/blob/fbc5ca53d6bfd8388b335f7d0198b67a14b99d91/contributors/devel/sig-architecture/api-conventions.md#primitive-types
  • Loading branch information
jerop authored and tekton-robot committed Feb 7, 2022
1 parent 2f6702c commit 47a7fb0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion teps/0025-hermekton.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ status: implementable
- [Alternatives](#alternatives)
- [Entire Pod Sandboxing](#entire-pod-sandboxing)
- [Don't Use Pipelines Directly](#dont-use-pipelines-directly)
- [Pre/Post-Steps](#prepost-steps)
- [Network-Jail "fences"](#network-jail-fences)
- [Infrastructure Needed (optional)](#infrastructure-needed-optional)
- [Upgrade & Migration Strategy (optional)](#upgrade--migration-strategy-optional)
- [References (optional)](#references-optional)
Expand Down Expand Up @@ -80,8 +82,15 @@ Tekton Pipelines will add support for a new "ExecutionMode" field on several obj
That type will look like:

```go
type HermeticMode string

const (
NetworkingOff HermeticMode = "disabled"
NetworkingOn HermeticMode = "enabled"
)

type ExecutionMode struct {
Hermetic bool
Hermetic HermeticMode `json:"hermetic,omitempty"`
}
```

Expand Down

0 comments on commit 47a7fb0

Please sign in to comment.