condition.proto 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.run.v2;
  16. import "google/protobuf/timestamp.proto";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/run/v2;run";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "ConditionProto";
  20. option java_package = "com.google.cloud.run.v2";
  21. // Defines a status condition for a resource.
  22. message Condition {
  23. // Represents the possible Condition states.
  24. enum State {
  25. // The default value. This value is used if the state is omitted.
  26. STATE_UNSPECIFIED = 0;
  27. // Transient state: Reconciliation has not started yet.
  28. CONDITION_PENDING = 1;
  29. // Transient state: reconciliation is still in progress.
  30. CONDITION_RECONCILING = 2;
  31. // Terminal state: Reconciliation did not succeed.
  32. CONDITION_FAILED = 3;
  33. // Terminal state: Reconciliation completed successfully.
  34. CONDITION_SUCCEEDED = 4;
  35. }
  36. // Represents the severity of the condition failures.
  37. enum Severity {
  38. // Unspecified severity
  39. SEVERITY_UNSPECIFIED = 0;
  40. // Error severity.
  41. ERROR = 1;
  42. // Warning severity.
  43. WARNING = 2;
  44. // Info severity.
  45. INFO = 3;
  46. }
  47. // Reasons common to all types of conditions.
  48. enum CommonReason {
  49. // Default value.
  50. COMMON_REASON_UNDEFINED = 0;
  51. // Reason unknown. Further details will be in message.
  52. UNKNOWN = 1;
  53. // Revision creation process failed.
  54. REVISION_FAILED = 3;
  55. // Timed out waiting for completion.
  56. PROGRESS_DEADLINE_EXCEEDED = 4;
  57. // The container image path is incorrect.
  58. CONTAINER_MISSING = 6;
  59. // Insufficient permissions on the container image.
  60. CONTAINER_PERMISSION_DENIED = 7;
  61. // Container image is not authorized by policy.
  62. CONTAINER_IMAGE_UNAUTHORIZED = 8;
  63. // Container image policy authorization check failed.
  64. CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED = 9;
  65. // Insufficient permissions on encryption key.
  66. ENCRYPTION_KEY_PERMISSION_DENIED = 10;
  67. // Permission check on encryption key failed.
  68. ENCRYPTION_KEY_CHECK_FAILED = 11;
  69. // At least one Access check on secrets failed.
  70. SECRETS_ACCESS_CHECK_FAILED = 12;
  71. // Waiting for operation to complete.
  72. WAITING_FOR_OPERATION = 13;
  73. // System will retry immediately.
  74. IMMEDIATE_RETRY = 14;
  75. // System will retry later; current attempt failed.
  76. POSTPONED_RETRY = 15;
  77. // An internal error occurred. Further information may be in the message.
  78. INTERNAL = 16;
  79. }
  80. // Reasons specific to Revision resource.
  81. enum RevisionReason {
  82. // Default value.
  83. REVISION_REASON_UNDEFINED = 0;
  84. // Revision in Pending state.
  85. PENDING = 1;
  86. // Revision is in Reserve state.
  87. RESERVE = 2;
  88. // Revision is Retired.
  89. RETIRED = 3;
  90. // Revision is being retired.
  91. RETIRING = 4;
  92. // Revision is being recreated.
  93. RECREATING = 5;
  94. // There was a health check error.
  95. HEALTH_CHECK_CONTAINER_ERROR = 6;
  96. // Health check failed due to user error from customized path of the
  97. // container. System will retry.
  98. CUSTOMIZED_PATH_RESPONSE_PENDING = 7;
  99. // A revision with min_instance_count > 0 was created and is reserved, but
  100. // it was not configured to serve traffic, so it's not live. This can also
  101. // happen momentarily during traffic migration.
  102. MIN_INSTANCES_NOT_PROVISIONED = 8;
  103. // The maximum allowed number of active revisions has been reached.
  104. ACTIVE_REVISION_LIMIT_REACHED = 9;
  105. // There was no deployment defined.
  106. // This value is no longer used, but Services created in older versions of
  107. // the API might contain this value.
  108. NO_DEPLOYMENT = 10;
  109. // A revision's container has no port specified since the revision is of a
  110. // manually scaled service with 0 instance count
  111. HEALTH_CHECK_SKIPPED = 11;
  112. }
  113. // Reasons specific to Execution resource.
  114. enum ExecutionReason {
  115. // Default value.
  116. EXECUTION_REASON_UNDEFINED = 0;
  117. // Internal system error getting execution status. System will retry.
  118. JOB_STATUS_SERVICE_POLLING_ERROR = 1;
  119. // A task reached its retry limit and the last attempt failed due to the
  120. // user container exiting with a non-zero exit code.
  121. NON_ZERO_EXIT_CODE = 2;
  122. // The execution was cancelled by users.
  123. CANCELLED = 3;
  124. }
  125. // type is used to communicate the status of the reconciliation process.
  126. // See also:
  127. // https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting
  128. // Types common to all resources include:
  129. // * "Ready": True when the Resource is ready.
  130. string type = 1;
  131. // State of the condition.
  132. State state = 2;
  133. // Human readable message indicating details about the current status.
  134. string message = 3;
  135. // Last time the condition transitioned from one status to another.
  136. google.protobuf.Timestamp last_transition_time = 4;
  137. // How to interpret failures of this condition, one of Error, Warning, Info
  138. Severity severity = 5;
  139. // The reason for this condition. Depending on the condition type,
  140. // it will populate one of these fields.
  141. // Successful conditions cannot have a reason.
  142. oneof reasons {
  143. // A common (service-level) reason for this condition.
  144. CommonReason reason = 6;
  145. // A reason for the revision condition.
  146. RevisionReason revision_reason = 9;
  147. // A reason for the execution condition.
  148. ExecutionReason execution_reason = 11;
  149. }
  150. }