Skip to content

Commit

Permalink
proto: Change RestartPolicy variants to use CamelCase
Browse files Browse the repository at this point in the history
This is a backwards-incompatible change, which is fine because we
haven't released a version of go-tpm-tools containing `RestartPolicy`.
This change also means that the variants of RestartPolicy no longer
conform to the Protobuf style guide. An explanation for why we do this
is given in the comments in the `attest.proto` file.

Signed-off-by: Joe Richey <joerichey@google.com>
  • Loading branch information
josephlr committed Dec 23, 2021
1 parent 7692c0c commit fab232b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions proto/attest.proto
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,15 @@ message SecureBootState {
}

// The container's restart policy.
// See
// See the following Kubernetes documentation for more details:
// https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
// for more details.
// Note that these enum variants do not conform to the standard Protocol Buffers
// style guide so that RestartPolicy_name, RestartPolicy_value, and
// RestartPolicy.String() match the values used by Kubernetes and others.
enum RestartPolicy {
ALWAYS = 0;
ON_FAILURE = 1;
NEVER = 2;
Always = 0;
OnFailure = 1;
Never = 2;
}

message ContainerState {
Expand Down

0 comments on commit fab232b

Please sign in to comment.