summaryrefslogtreecommitdiff
path: root/third_party/googleapis/google/cloud/run/v2/condition.proto
blob: 3e98749c93b8ca8847744d2a6bd930d1e077e3b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.run.v2;

import "google/protobuf/timestamp.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/run/v2;run";
option java_multiple_files = true;
option java_outer_classname = "ConditionProto";
option java_package = "com.google.cloud.run.v2";

// Defines a status condition for a resource.
message Condition {
  // Represents the possible Condition states.
  enum State {
    // The default value. This value is used if the state is omitted.
    STATE_UNSPECIFIED = 0;

    // Transient state: Reconciliation has not started yet.
    CONDITION_PENDING = 1;

    // Transient state: reconciliation is still in progress.
    CONDITION_RECONCILING = 2;

    // Terminal state: Reconciliation did not succeed.
    CONDITION_FAILED = 3;

    // Terminal state: Reconciliation completed successfully.
    CONDITION_SUCCEEDED = 4;
  }

  // Represents the severity of the condition failures.
  enum Severity {
    // Unspecified severity
    SEVERITY_UNSPECIFIED = 0;

    // Error severity.
    ERROR = 1;

    // Warning severity.
    WARNING = 2;

    // Info severity.
    INFO = 3;
  }

  // Reasons common to all types of conditions.
  enum CommonReason {
    // Default value.
    COMMON_REASON_UNDEFINED = 0;

    // Reason unknown. Further details will be in message.
    UNKNOWN = 1;

    // Revision creation process failed.
    REVISION_FAILED = 3;

    // Timed out waiting for completion.
    PROGRESS_DEADLINE_EXCEEDED = 4;

    // The container image path is incorrect.
    CONTAINER_MISSING = 6;

    // Insufficient permissions on the container image.
    CONTAINER_PERMISSION_DENIED = 7;

    // Container image is not authorized by policy.
    CONTAINER_IMAGE_UNAUTHORIZED = 8;

    // Container image policy authorization check failed.
    CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED = 9;

    // Insufficient permissions on encryption key.
    ENCRYPTION_KEY_PERMISSION_DENIED = 10;

    // Permission check on encryption key failed.
    ENCRYPTION_KEY_CHECK_FAILED = 11;

    // At least one Access check on secrets failed.
    SECRETS_ACCESS_CHECK_FAILED = 12;

    // Waiting for operation to complete.
    WAITING_FOR_OPERATION = 13;

    // System will retry immediately.
    IMMEDIATE_RETRY = 14;

    // System will retry later; current attempt failed.
    POSTPONED_RETRY = 15;

    // An internal error occurred. Further information may be in the message.
    INTERNAL = 16;
  }

  // Reasons specific to Revision resource.
  enum RevisionReason {
    // Default value.
    REVISION_REASON_UNDEFINED = 0;

    // Revision in Pending state.
    PENDING = 1;

    // Revision is in Reserve state.
    RESERVE = 2;

    // Revision is Retired.
    RETIRED = 3;

    // Revision is being retired.
    RETIRING = 4;

    // Revision is being recreated.
    RECREATING = 5;

    // There was a health check error.
    HEALTH_CHECK_CONTAINER_ERROR = 6;

    // Health check failed due to user error from customized path of the
    // container. System will retry.
    CUSTOMIZED_PATH_RESPONSE_PENDING = 7;

    // A revision with min_instance_count > 0 was created and is reserved, but
    // it was not configured to serve traffic, so it's not live. This can also
    // happen momentarily during traffic migration.
    MIN_INSTANCES_NOT_PROVISIONED = 8;

    // The maximum allowed number of active revisions has been reached.
    ACTIVE_REVISION_LIMIT_REACHED = 9;

    // There was no deployment defined.
    // This value is no longer used, but Services created in older versions of
    // the API might contain this value.
    NO_DEPLOYMENT = 10;

    // A revision's container has no port specified since the revision is of a
    // manually scaled service with 0 instance count
    HEALTH_CHECK_SKIPPED = 11;
  }

  // Reasons specific to Execution resource.
  enum ExecutionReason {
    // Default value.
    EXECUTION_REASON_UNDEFINED = 0;

    // Internal system error getting execution status. System will retry.
    JOB_STATUS_SERVICE_POLLING_ERROR = 1;

    // A task reached its retry limit and the last attempt failed due to the
    // user container exiting with a non-zero exit code.
    NON_ZERO_EXIT_CODE = 2;
  }

  // type is used to communicate the status of the reconciliation process.
  // See also:
  // https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting
  // Types common to all resources include:
  // * "Ready": True when the Resource is ready.
  string type = 1;

  // State of the condition.
  State state = 2;

  // Human readable message indicating details about the current status.
  string message = 3;

  // Last time the condition transitioned from one status to another.
  google.protobuf.Timestamp last_transition_time = 4;

  // How to interpret failures of this condition, one of Error, Warning, Info
  Severity severity = 5;

  // The reason for this condition. Depending on the condition type,
  // it will populate one of these fields.
  // Successful conditions may not have a reason.
  oneof reasons {
    // A common (service-level) reason for this condition.
    CommonReason reason = 6;

    // A reason for the revision condition.
    RevisionReason revision_reason = 9;

    // A reason for the execution condition.
    ExecutionReason execution_reason = 11;
  }
}